:root {
    --brand-primary: #2c3e50;
    --brand-secondary: #3498db;
    --brand-accent: #f39c12;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.header h1 i {
    margin-right: 0.5rem;
    color: var(--brand-accent);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Main content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Screen management */
.screen {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Welcome screen */
.welcome-container {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.welcome-header {
    margin-bottom: 3rem;
}

.welcome-header h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.welcome-header p {
    font-size: 1.2rem;
    color: #7f8c8d;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    justify-content: center;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.action-btn {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 200px;
}

.action-btn:hover {
    border-color: var(--brand-secondary);
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.2);
    transform: translateY(-2px);
}

.action-btn i {
    font-size: 2.5rem;
    color: var(--brand-secondary);
    margin-bottom: 1rem;
    display: block;
}

.action-btn span {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    display: block;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.action-btn small {
    color: #7f8c8d;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Quick stats */
.quick-stats {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 150px;
}

.stat-card i {
    font-size: 2rem;
    color: var(--brand-secondary);
}

.stat-card h3 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 0.2rem;
}

.stat-card p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Screen header */
.screen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.screen-header h2 {
    font-size: 2rem;
    color: #2c3e50;
}

/* Buttons */
.btn {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    background: none;
}

.btn-primary {
    background: var(--brand-secondary);
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

/* Filters */
.filters {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.filter-select,
.filter-input {
    padding: 0.7rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Results container */
.results-container {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.results-header h3 {
    color: #2c3e50;
    font-size: 1.3rem;
}

#results-count {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Table styling */
.table-container {
    overflow-x: auto;
}

.repair-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.repair-table th,
.repair-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.repair-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.repair-table tr:hover {
    background: #f8f9fa;
}

.repair-table .bus-number {
    font-weight: 600;
    color: #3498db;
}

.repair-table .cost {
    font-weight: 600;
    color: #27ae60;
}

.repair-table .repair-type {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.repair-type.general {
    background: #e3f2fd;
    color: #1976d2;
}

.repair-type.oil {
    background: #fff3e0;
    color: #f57c00;
}

.repair-type.tire {
    background: #f3e5f5;
    color: #7b1fa2;
}

.repair-type.brake {
    background: #ffebee;
    color: #c62828;
}

/* Pagination */
.pagination-controls {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background: white;
    border: 1px solid #ddd;
    color: #333;
}

.pagination .btn:hover {
    background: #f8f9fa;
}

.pagination .btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination .btn.active:hover {
    background: #2980b9;
    border-color: #2980b9;
}

.pagination-dots {
    padding: 0 0.5rem;
    color: #7f8c8d;
}

/* Form styling */
.form-container {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.repair-fields {
    display: none;
}

.info-box {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 4px;
    padding: 1rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-box i {
    color: #1976d2;
}

.info-box p {
    margin: 0;
    color: #1976d2;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.loading-spinner {
    /* This container does NOT spin */
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-circle {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    flex-shrink: 0; /* Prevents the circle from being squished */
}

.spinner-circle i {
    font-size: 2.5rem;
    color: #3498db;
    line-height: 1;
    /* Only the icon spins */
}

.loading-text {
    color: white;
    font-weight: 600;
    margin: 0;
    font-size: 1.2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    /* Text is outside the circle and does NOT spin */
}

/* Action buttons */
.actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.edit-repair-btn {
    background: #f39c12;
    color: white;
}

.edit-repair-btn:hover {
    background: #e67e22;
}

.delete-repair-btn {
    background: #e74c3c;
    color: white;
}

.delete-repair-btn:hover {
    background: #c0392b;
}

.btn-sm i {
    margin-right: 0.3rem;
}

.required {
    color: #e74c3c;
    font-weight: bold;
}

/* ============================================ */
/*              REPORTS STYLES                */
/* ============================================ */

/* Reports Container */
.reports-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Reports Navigation Tabs */
.reports-nav {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.reports-nav::-webkit-scrollbar {
    display: none;
}

.report-tab {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.3s ease;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    min-width: fit-content;
}

.report-tab:hover {
    color: #495057;
    background: rgba(52, 152, 219, 0.05);
}

.report-tab.active {
    color: #3498db;
    background: white;
    border-bottom-color: #3498db;
}

.report-tab i {
    margin-right: 0.5rem;
}

/* Reports Filters */
.reports-filters {
    background: #f8f9fa;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
}

.reports-filters .filter-group {
    min-width: 160px;
}

.reports-filters .filter-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

/* Reports Content */
.reports-content {
    padding: 2rem;
    min-height: 600px;
}

/* Reports Dashboard */
.reports-dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
}

.dashboard-header h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    font-size: 1.1rem;
    color: #7f8c8d;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.metric-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-3px);
}

.metric-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.metric-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.metric-card:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.metric-icon {
    font-size: 3rem;
    opacity: 0.9;
}

.metric-content h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.metric-content p {
    font-size: 1rem;
    opacity: 0.9;
}

/* Dashboard Reports Grid */
.dashboard-reports {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.report-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.report-card:hover {
    border-color: #3498db;
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.15);
    transform: translateY(-2px);
}

.report-icon {
    font-size: 3rem;
    color: #3498db;
    margin-bottom: 1rem;
}

.report-card h3 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.report-card p {
    color: #6c757d;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-container {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    height: 400px;
}

.chart-container h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
}

.chart-container canvas {
    max-height: 320px;
}

/* Report Section */
.report-section {
    max-width: 1200px;
    margin: 0 auto;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.report-header h2 {
    font-size: 2rem;
    color: #2c3e50;
}

.report-actions {
    display: flex;
    gap: 0.5rem;
}

.export-btn {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 0.7rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.export-btn:hover {
    background: #138496;
}

/* Performance Table */
.performance-table-container {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.performance-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.performance-table th,
.performance-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.performance-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.performance-table tr:hover {
    background: #f8f9fa;
}

.performance-score {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.score-good {
    background: #d4edda;
    color: #155724;
}

.score-warning {
    background: #fff3cd;
    color: #856404;
}

.score-critical {
    background: #f8d7da;
    color: #721c24;
}

/* Cost Summary */
.cost-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.summary-card h4 {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cost-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

/* Frequency Insights */
.frequency-insights {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.frequency-insights h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

/* Comparison Setup */
.comparison-setup {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.bus-selector {
    margin-top: 1rem;
}

.bus-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.checkbox-label:hover {
    background: #f8f9fa;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
}

.checkbox-label input[type="checkbox"]:checked + span {
    font-weight: 500;
    color: #007bff;
}

.comparison-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.comparison-controls select {
    flex: 1;
    max-width: 200px;
}

.comparison-controls button {
    white-space: nowrap;
}

.comparison-results {
    margin-top: 2rem;
}

.comparison-insights {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

/* Heatmap */
.heatmap-container {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

#repair-heatmap {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-style: italic;
}

/* Loading States */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #6c757d;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.error-icon {
    font-size: 4rem;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.error-container h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.error-container p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

/* Responsive Design for Reports */
@media (max-width: 768px) {
    .reports-nav {
        flex-direction: column;
    }
    
    .report-tab {
        border-bottom: none;
        border-right: 3px solid transparent;
        text-align: left;
    }
    
    .report-tab.active {
        border-right-color: #3498db;
        border-bottom: none;
    }
    
    .reports-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .reports-filters .filter-actions {
        margin-left: 0;
        justify-content: center;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        min-width: 0;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-reports {
        grid-template-columns: 1fr;
    }
    
    .cost-summary {
        grid-template-columns: 1fr;
    }
    
    .bus-checkboxes {
        grid-template-columns: 1fr;
    }
    
    .comparison-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .comparison-controls select {
        max-width: none;
        margin-bottom: 10px;
    }
    
    .bus-checkboxes {
        max-height: 200px;
        overflow-y: auto;
    }
}

@media (max-width: 480px) {
    .reports-content {
        padding: 1rem;
    }
    
    .dashboard-header h2 {
        font-size: 2rem;
    }
    
    .metric-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .metric-content h3 {
        font-size: 2rem;
    }
    
    .chart-container {
        height: 300px;
        padding: 1rem;
    }
    
    .chart-container canvas {
        max-height: 220px;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
} 

/* Bus Comparison Enhancements */
.bus-input-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
}

.bus-input-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.bus-input-section input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 10px;
}

.bus-input-section input[type="text"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.bus-input-section button {
    margin-top: 5px;
}

.bus-info {
    font-size: 12px;
    color: #6c757d;
    font-weight: normal;
}

.checkbox-label {
    display: block;
    padding: 8px 12px;
    margin: 4px 0;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-label:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
}

.checkbox-label input[type="checkbox"]:checked + span {
    font-weight: 500;
    color: #007bff;
}

.notification.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 10px 15px;
    border-radius: 4px;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.btn-secondary.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 3px;
}

.comparison-setup {
    margin-bottom: 20px;
}

.comparison-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.comparison-controls select {
    flex: 1;
    max-width: 200px;
}

.comparison-controls button {
    white-space: nowrap;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .comparison-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .comparison-controls select {
        max-width: none;
        margin-bottom: 10px;
    }
    
    .bus-checkboxes {
        max-height: 200px;
        overflow-y: auto;
    }
} 

/* Error highlight used by scroll-to-error */
.field-error {
	border: 2px solid #e74c3c !important;
	background-color: rgba(231, 76, 60, 0.05) !important;
	box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.25);
	transition: all 0.3s ease;
}

.field-error:focus {
	border-color: #e74c3c !important;
	box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.3);
} 
/* Inspections Section */
.inspections-container {
    padding: 2rem 0;
}

.bus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.bus-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.bus-card-clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
    border: 2px solid #3498db;
}

.bus-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #3498db, #2c3e50);
}

.bus-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.bus-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.bus-card-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.bus-card-icon {
    font-size: 2rem;
    color: #3498db;
}

.bus-card-info {
    margin: 1rem 0;
}

.bus-info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #ecf0f1;
}

.bus-info-label {
    color: #7f8c8d;
    font-weight: 500;
}

.bus-info-value {
    color: #2c3e50;
    font-weight: 600;
}

.bus-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.bus-card-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-passed {
    background-color: #d4edda;
    color: #155724;
}

.status-needs-attention {
    background-color: #fff3cd;
    color: #856404;
}

.status-failed {
    background-color: #f8d7da;
    color: #721c24;
}

.status-no-inspection {
    background-color: #e2e3e5;
    color: #383d41;
}

/* Inspection Checklist */
.inspection-header-section,
.inspection-footer-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.inspection-section {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.inspection-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

/* Brake Throw Readings Table */
.brake-throw-table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

.brake-throw-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.brake-throw-table thead {
    background: #3498db;
    color: white;
}

.brake-throw-table th {
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    border: 1px solid #2980b9;
}

.brake-throw-table td {
    padding: 0.5rem;
    text-align: center;
    border: 1px solid #ddd;
}

.brake-throw-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.brake-throw-table tbody tr:hover {
    background: #e9ecef;
}

.brake-throw-table td:first-child {
    font-weight: 600;
    background: #ecf0f1;
    color: #2c3e50;
}

.brake-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.95rem;
    text-align: center;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.brake-input:focus {
    border-color: #3498db;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.brake-input::placeholder {
    color: #adb5bd;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.checklist-item:hover {
    background: #e9ecef;
}

.checklist-item-number {
    min-width: 40px;
    font-weight: 600;
    color: #3498db;
}

.checklist-item-description {
    flex: 1;
    padding: 0 1rem;
    color: #2c3e50;
}

.checklist-item-checkbox {
    margin-right: 1rem;
}

.checklist-item-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checklist-item-notes {
    margin-top: 0.5rem;
    width: 100%;
}

.checklist-item-notes input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Inspection History */
.history-container {
    padding: 1rem;
}

.history-item {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.history-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #ecf0f1;
}

.history-item-date {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
}

.history-item-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.history-info-item {
    display: flex;
    flex-direction: column;
}

.history-info-label {
    color: #7f8c8d;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.history-info-value {
    color: #2c3e50;
    font-weight: 600;
}

.history-item-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease;
}

.modal-content.large-modal {
    max-width: 800px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #7f8c8d;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #e74c3c;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Repair Types Management */
.repair-types-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.repair-type-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.repair-type-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.repair-type-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.repair-type-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2c3e50;
}

.repair-type-actions {
    display: flex;
    gap: 0.5rem;
}

.repair-type-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.feature-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: #e3f2fd;
    color: #1976d2;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 0;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Manage Buses Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.data-table thead {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.data-table tbody tr:hover {
    background-color: #f8f9fa;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bus-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .repair-types-container {
        grid-template-columns: 1fr;
    }

    .data-table {
        font-size: 0.875rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

.badge-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #7f8c8d;
}

.empty-state i {
    display: block;
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1.125rem;
}

/* User Management Styles */
.role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-superadmin {
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
    color: white;
}

.role-admin {
    background: linear-gradient(135deg, #2980b9, #3498db);
    color: white;
}

.role-mechanic {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.role-user {
    background: #bdc3c7;
    color: #2c3e50;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

/* Small inline badge (for "You" indicator) */
.badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    background-color: #3498db;
    color: white;
    margin-left: 0.25rem;
}

/* User table specific styles */
#users-table .actions {
    white-space: nowrap;
}

#users-table .actions .btn {
    margin-right: 0.25rem;
}

#users-table .actions .btn:last-child {
    margin-right: 0;
}

/* User modal form styles */
#user-form .form-group {
    margin-bottom: 1rem;
}

#user-form .form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #7f8c8d;
}

/* Admin-only button styling */
.action-btn.admin-only {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    grid-column: 1 / -1;
    max-width: 300px;
    justify-self: center;
}

.action-btn.admin-only:hover {
    background: linear-gradient(135deg, #8e44ad, #7d3c98);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(142, 68, 173, 0.3);
}

/* Password input with toggle button */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .form-input {
    flex: 1;
    padding-right: 45px;
}

.password-toggle-btn {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7f8c8d;
    transition: color 0.2s ease;
}

.password-toggle-btn:hover {
    color: #3498db;
}

.password-toggle-btn:focus {
    outline: none;
    color: #3498db;
}

.password-match-hint {
    min-height: 18px;
}

.password-match-hint.match {
    color: #27ae60;
}

.password-match-hint.no-match {
    color: #e74c3c;
}

/* Vendor orders workflow */
.vendor-layout {
    display: grid;
    gap: 1rem;
}

.vendor-panel {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
}

.vendor-browser-panel {
    display: grid;
    gap: 1rem;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.vendor-import-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vendor-import-actions .form-input {
    width: min(320px, 100%);
}

.vendor-browser-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.vendor-stat {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.75rem;
    background: #f8fafc;
    min-width: 0;
}

.vendor-stat-label {
    display: block;
    margin-bottom: 0.25rem;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.vendor-stat strong {
    display: block;
    color: #1f2937;
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

.vendor-browser-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.vendor-browser-section {
    min-width: 0;
}

.browser-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.browser-section-header h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #1f2937;
}

.browser-section-header span {
    color: #64748b;
    font-size: 0.85rem;
}

.vendor-browser-list {
    display: grid;
    gap: 0.5rem;
    max-height: 320px;
    overflow: auto;
    padding-right: 0.25rem;
}

.vendor-browser-item {
    width: 100%;
    min-width: 0;
    display: grid;
    gap: 0.15rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #ffffff;
    color: #1f2937;
    padding: 0.65rem;
    text-align: left;
    cursor: pointer;
}

.vendor-browser-item:hover,
.vendor-browser-item:focus {
    border-color: #3498db;
    outline: none;
}

.browser-item-main,
.browser-item-meta,
.browser-item-sub {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.browser-item-main {
    font-weight: 700;
}

.browser-item-meta {
    color: #334155;
    font-size: 0.85rem;
}

.browser-item-sub {
    color: #64748b;
    font-size: 0.8rem;
}

.vendor-detail-card,
.vendor-detail-empty {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.75rem;
    min-height: 220px;
    background: #ffffff;
}

.vendor-detail-empty {
    color: #64748b;
}

.vendor-detail-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.vendor-detail-title strong,
.vendor-detail-title span {
    overflow-wrap: anywhere;
}

.vendor-detail-grid {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.35rem 0.75rem;
    margin: 0 0 0.75rem;
}

.vendor-detail-grid dt {
    color: #64748b;
    font-weight: 700;
}

.vendor-detail-grid dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.vendor-detail-text {
    margin-top: 0.75rem;
}

.vendor-detail-text strong {
    display: block;
    margin-bottom: 0.25rem;
}

.vendor-detail-text p {
    margin: 0;
    overflow-wrap: anywhere;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.vendor-filters {
    align-items: end;
}

.vendor-orders-table th,
.vendor-orders-table td {
    vertical-align: top;
}

.vendor-orders-table tbody tr {
    cursor: pointer;
}

.receipt-status {
    display: inline-flex;
    align-items: center;
    min-height: 1.5rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.receipt-present {
    background: #d4edda;
    color: #155724;
}

.receipt-missing {
    background: #f8d7da;
    color: #721c24;
}

.receipt-unknown {
    background: #e2e3e5;
    color: #383d41;
}

.receipt-not_applicable {
    background: #d1ecf1;
    color: #0c5460;
}

.vendor-import-result {
    margin-top: 1rem;
}

.import-summary {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

@media (max-width: 1180px) {
    .vendor-browser-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .vendor-browser-grid {
        grid-template-columns: 1fr;
    }

    .vendor-browser-list {
        max-height: 260px;
    }
}
