/* ============================================
   RTA DASHBOARD - COMPACT PROFESSIONAL DESIGN
   ============================================ */

/* Reset and Base */
* {
    box-sizing: border-box;
}

/* Dashboard Container */
.dashboard-home {
    max-width: 100%;
    margin: 0;
    padding: 0 16px;
    overflow-x: hidden;
}

/* Hero Section - Compact */
.hero-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    padding: 24px 32px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(30, 58, 138, 0.25);
}

.hero-content h1 {
    color: white;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-content h1 i {
    font-size: 36px;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin: 0 0 16px 0;
}

.hero-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.meta-item {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
}

/* Main Layout - Single Column with Embedded Sections */
.dashboard-main-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 100%;
    overflow-x: hidden;
}

/* KPI Metrics Row - Horizontal */
.kpi-metrics-row {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 16px;
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.kpi-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kpi-header h2 i {
    font-size: 18px;
    color: #3b82f6;
}

.metrics-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.metric-card-compact {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.metric-card-compact:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.metric-icon-compact {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.metric-icon-compact.vehicles { background: #3b82f6; }
.metric-icon-compact.trips { background: #10b981; }
.metric-icon-compact.uptime { background: #8b5cf6; }
.metric-icon-compact.violations { background: #ef4444; }

.metric-data-compact {
    flex: 1;
}

.metric-label-compact {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.metric-value-compact {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
    margin-bottom: 4px;
}

.metric-change-compact {
    font-size: 11px;
    font-weight: 600;
}

.metric-change-compact.positive { color: #059669; }
.metric-change-compact.negative { color: #dc2626; }
.metric-change-compact.neutral { color: #64748b; }

/* Content Grid - Two Column Layout */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Assessments Column */
.assessments-column {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: fit-content;
}

.assessments-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.assessments-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

/* Compact Assessment Cards */
.assessment-card-compact {
    margin-bottom: 16px;
    border-left: 4px solid #3b82f6;
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px;
}

.assessment-card-compact.institutional {
    border-left-color: #f59e0b;
}

.assessment-intro-compact {
    background: #dbeafe;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    border-left: 3px solid #2563eb;
}

.assessment-intro-compact p {
    margin: 0;
    color: #1e40af;
    font-weight: 600;
    font-size: 13px;
}

.institutional .assessment-intro-compact {
    background: #fef3c7;
    border-left-color: #f59e0b;
}

.institutional .assessment-intro-compact p {
    color: #92400e;
}

/* Compact Violation Categories */
.violation-category-compact {
    margin-bottom: 12px;
    background: white;
    border-radius: 8px;
    padding: 12px;
    border: 2px solid #e5e7eb;
}

.violation-category-compact.severe { border-color: #dc2626; }
.violation-category-compact.medium { border-color: #f97316; }
.violation-category-compact.simple { border-color: #eab308; }

.category-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.category-title-compact {
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-icon-compact {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.severe .category-icon-compact { background: #dc2626; }
.medium .category-icon-compact { background: #f97316; }
.simple .category-icon-compact { background: #eab308; }

.category-title-compact h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.count-badge-compact {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    background: #64748b;
}

/* Compact Violation Items */
.violation-items-compact {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.violation-item-compact {
    background: #f8fafc;
    padding: 8px 10px;
    border-radius: 6px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    border: 1px solid #e2e8f0;
    font-size: 12px;
}

.violation-item-compact:hover {
    border-color: #3b82f6;
    background: white;
}

.item-number-compact {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: #1e293b;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 10px;
    flex-shrink: 0;
}

.item-description-compact {
    flex: 1;
    color: #1e293b;
    line-height: 1.4;
    font-weight: 500;
}

/* Right Sidebar */
.sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Compact Alerts */
.alerts-compact {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.alerts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.alerts-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.alerts-header h3 i {
    font-size: 14px;
    color: #3b82f6;
}

.alert-item-compact {
    background: #f8fafc;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 3px solid #3b82f6;
    font-size: 12px;
}

.alert-item-compact.critical { border-left-color: #dc2626; }
.alert-item-compact.warning { border-left-color: #f97316; }

.alert-title-compact {
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.alert-description-compact {
    color: #64748b;
    margin-bottom: 4px;
    line-height: 1.3;
}

.alert-time-compact {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 600;
}

/* Quick Actions Compact */
.quick-actions-compact {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.quick-actions-header {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.quick-actions-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-item-compact {
    background: #f8fafc;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.action-item-compact:hover {
    border-color: #3b82f6;
    background: white;
    transform: translateY(-1px);
}

.action-icon-compact {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    background: #64748b;
}

.action-icon-compact.violations { background: #dc2626; }
.action-icon-compact.performance { background: #10b981; }
.action-icon-compact.reports { background: #8b5cf6; }

.action-content-compact {
    flex: 1;
}

.action-title-compact {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2px;
}

.action-description-compact {
    font-size: 11px;
    color: #64748b;
    line-height: 1.3;
}

.action-badge-compact {
    background: #e5e7eb;
    color: #64748b;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
}

/* Charts Section - Compact */
.charts-section-compact {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-top: 16px;
}

.charts-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.charts-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.chart-card-compact {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
}

.chart-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}

.chart-container-compact {
    height: 180px;
    background: white;
    border-radius: 6px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-home {
        padding: 0 8px;
    }
    
    .hero-section {
        padding: 16px 20px;
    }
    
    .hero-content h1 {
        font-size: 24px;
    }
    
    .metrics-grid-compact {
        grid-template-columns: 1fr;
    }
    
    .content-grid {
        gap: 12px;
    }
    
    .sidebar-column {
        gap: 12px;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .metrics-grid-compact {
        grid-template-columns: 1fr;
    }
    
    .metric-card-compact {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-meta {
        flex-direction: column;
        gap: 8px;
    }
}