* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.dashboard {
    min-height: 100vh;
}

.dashboard-header {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    color: #2c3e50;
    padding: 12px 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.header-content h1 {
    font-size: 1.25rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

#userDisplay {
    font-size: 0.85rem;
}

.btn-logout {
    background: rgba(0,0,0,0.1);
    color: #2c3e50;
    border: 1px solid rgba(0,0,0,0.2);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
}

.btn-logout:hover {
    background: rgba(0,0,0,0.2);
}

.dashboard-nav {
    background: white;
    border-bottom: 1px solid #ddd;
    padding: 0 12px;
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
    padding: 8px 0;
}

.nav-btn {
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    border-radius: 6px;
    transition: all 0.3s;
}

.nav-btn:hover {
    background: var(--bg);
    color: #d4ac0f;
}

.nav-btn.active {
    background: #f1c40f;
    color: #2c3e50;
}

.dashboard-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 16px;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

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

.section-actions {
    display: flex;
    gap: 8px;
}

.filters {
    width: 100%;
}

.filters input,
.filters select {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.vehicle-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vehicle-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    background: white;
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border-left: 4px solid #f1c40f;
}

.vehicle-row:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.vehicle-number-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
    border: 1px solid #f1c40f;
    cursor: pointer;
    text-decoration: none;
}

.vehicle-number-badge:hover {
    background: #fde68a;
}

.vehicle-category {
    text-transform: capitalize;
    color: #555;
    font-size: 0.8rem;
}

.vehicle-meta {
    color: #555;
    font-size: 0.8rem;
    flex: 1;
    min-width: 140px;
}

.vehicle-actions {
    display: flex;
    gap: 6px;
}

.vehicle-actions .btn {
    padding: 5px 8px;
    font-size: 0.8rem;
}

.mot-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.mot-valid {
    background: #d1fae5;
    color: #065f46;
}

.mot-warning {
    background: #ffedd5;
    color: #9a3412;
}

.mot-expired {
    background: #fee2e2;
    color: #991b1b;
}

.mot-unknown {
    background: #f3f4f6;
    color: #374151;
}

.vehicle-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 4px solid #f1c40f;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.vehicle-card h3 {
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.vehicle-card .vehicle-info {
    margin-bottom: 8px;
    color: #555;
    font-size: 0.95rem;
}

.vehicle-card .vehicle-info strong {
    color: #2c3e50;
}

.vehicle-card .vehicle-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.vehicle-card .btn {
    flex: 1;
    padding: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-primary {
    background: #f1c40f;
    color: #2c3e50;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-primary:hover {
    background: #d4ac0f;
}

.btn-secondary {
    background: #f39c12;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #e67e22;
}

.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

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

.btn-success {
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-success:hover {
    background: #229954;
}

.no-vehicles {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.no-vehicles h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.error {
    background-color: #fee;
    color: #c0392b;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}

.success {
    background-color: #efe;
    color: #27ae60;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 8px;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .filters {
        flex-direction: column;
    }

    .vehicle-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .vehicle-meta {
        flex: 1 1 auto;
    }

    .vehicle-actions {
        justify-content: flex-end;
    }

    .nav-btn {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
}
