/* ============================================
   FIX FILE - Additional Design Improvements
   ============================================ */

/* Improve text readability globally */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ensure proper spacing and borders on all cards */
.section-card,
.metric-card-v2,
.violation-category,
.primary-action-card {
    position: relative;
    overflow: visible;
}

/* Better contrast for all text elements */
p, span, div {
    color: inherit;
}

/* Ensure icons are properly aligned */
i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Improve button contrast */
button {
    font-weight: 600;
}

/* Better spacing for metric cards */
.metric-data {
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Ensure proper text wrapping */
.item-description,
.alert-details p,
.primary-action-card p {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Improve badge visibility */
.badge,
.count-badge,
.item-priority {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

/* Better shadows for depth */
.section-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.section-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Ensure proper icon sizes */
.metric-icon i,
.category-icon i,
.action-card-icon i {
    font-size: inherit;
}

/* Better spacing in violation items */
.violation-items {
    max-width: 100%;
}

.violation-item {
    min-height: auto;
}

/* Improve chart visibility */
.chart-container {
    background: #fafbfc;
    border-radius: 8px;
    padding: 16px;
}

/* Better alert styling */
.alerts-list {
    max-width: 100%;
}

/* Ensure proper grid behavior */
.metrics-grid-4,
.charts-row,
.action-stats {
    width: 100%;
}

/* Better hover effects */
.metric-card-v2:hover,
.violation-item:hover,
.alert-item:hover,
.primary-action-card:hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Improve text contrast in colored backgrounds */
.badge-critical,
.badge-warning,
.count-badge {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Better section spacing */
.dashboard-left > *:not(:last-child) {
    margin-bottom: 32px;
}

.dashboard-right > *:not(:last-child) {
    margin-bottom: 24px;
}

/* Ensure proper card heights */
.primary-action-card {
    min-height: auto;
    display: flex;
    flex-direction: column;
}

/* Better line heights for readability */
.metric-label,
.stat-lbl,
.category-weight,
.info-label {
    line-height: 1.4;
}

.metric-value,
.stat-num,
.info-value {
    line-height: 1.2;
}

/* Improve section header visibility */
.section-header {
    position: relative;
    background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
}

/* Better responsive text */
@media (max-width: 1200px) {
    .metric-label {
        font-size: 11px;
    }
    
    .metric-value {
        font-size: 26px;
    }
}

@media (max-width: 768px) {
    .section-header h2 {
        font-size: 20px;
    }
    
    .metric-label {
        font-size: 11px;
    }
    
    .metric-value {
        font-size: 24px;
    }
    
    .category-title h3 {
        font-size: 18px;
    }
    
    .item-description {
        font-size: 14px;
    }
}

/* Ensure proper z-index stacking */
.hero-section {
    z-index: 1;
}

.section-card {
    z-index: 2;
}

.section-card:hover {
    z-index: 3;
}

/* Better focus states for accessibility */
button:focus,
.btn-icon:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Improve loading states */
.section-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Better print styles */
@media print {
    .section-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
    
    .hero-section {
        background: white;
        color: black;
        border: 2px solid #3b82f6;
    }
}
