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

:root {
    --primary-red: #0ea5e9;   /* Sky blue - main */
    --primary-red-dark: #0284c7;   /* Sky blue - dark */
    --primary-red-light: #38bdf8;   /* Sky blue - light */
    --bg-white: #ffffff;
    --bg-gray: #f9fafb;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-gray);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Navigation */
.navbar {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-red);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-links {
    display: flex;
    gap: 0.4rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    padding: 0.5rem 0.8rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s;
    font-size: 0.85rem; /* Reduced from 0.95rem */
    white-space: nowrap;
}

.nav-links a:hover {
    background-color: var(--bg-gray);
    color: var(--primary-red);
}

.nav-links a.active {
    background-color: var(--primary-red);
    color: white;
}

.btn-username {
    background-color: var(--primary-red);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 0.375rem;
    font-size: 0.85rem;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
}

.btn-username:hover {
    background-color: var(--primary-red-dark);
}

/* Responsive Navigation */
@media (max-width: 1024px) {
    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-md);
        padding: 2rem 0;
        gap: 0;
        z-index: 999;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        width: 100%;
        margin: 0.5rem 0;
    }

    .nav-links a {
        display: block;
        padding: 1rem;
        width: 100%;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .navbar {
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 768px) {
    .nav-logo {
        height: 45px;
        max-width: 170px;
    }

    .nav-links a {
        font-size: 0.8rem;
    }
}

/* Container */
.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Cards */
.card {
    background-color: var(--bg-white);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-header h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    font-weight: 600;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

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

.btn-primary:hover {
    background-color: var(--primary-red-dark);
}

.btn-secondary {
    background-color: var(--text-gray);
    color: white;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-success {
    background-color: #10b981;
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

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

.btn-danger:hover {
    background-color: #dc2626;
}

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

.table thead {
    background-color: var(--bg-gray);
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody tr:hover {
    background-color: var(--bg-gray);
}

/* Search Form */
.search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-form .form-group {
    margin-bottom: 0;
}

/* Messages */
.messages {
    margin-bottom: 1.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Login Page */
body.login-page {
    background: transparent !important;
    background-color: transparent !important;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #1e3c72 100%) !important;
    position: relative;
    overflow: hidden;
}

/* Automotive-themed background with road effect */
.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        /* Road lines - more visible */
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 95px,
            rgba(255, 255, 255, 0.2) 95px,
            rgba(255, 255, 255, 0.2) 100px
        ),
        /* Light rays - more visible */
        radial-gradient(ellipse 800px 600px at 30% 20%, rgba(255, 255, 255, 0.25) 0%, transparent 60%),
        radial-gradient(ellipse 600px 500px at 70% 80%, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    background-size: 200px 100%, 100% 100%, 100% 100%;
    opacity: 1;
    animation: roadMove 20s linear infinite;
    z-index: 0;
}

@keyframes roadMove {
    0% {
        background-position: 0 0, 0 0, 0 0;
    }
    100% {
        background-position: 200px 0, 0 0, 0 0;
    }
}

/* Car silhouette effect using CSS - simplified and elegant */
.login-container::after {
    content: '';
    position: absolute;
    bottom: -8%;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 350px;
    background: 
        /* Car body silhouette - more visible */
        radial-gradient(ellipse 500px 250px at 50% 60%, rgba(0, 0, 0, 0.3) 0%, transparent 70%),
        /* Car shadow */
        linear-gradient(to top, rgba(0, 0, 0, 0.35) 0%, transparent 60%);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    opacity: 0.5;
    pointer-events: none;
    filter: blur(3px);
    z-index: 0;
}

.login-card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

.login-logo-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-brand-text {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary-red);
    letter-spacing: 0.05em;
}

.login-card h1 {
    text-align: center;
    color: var(--primary-red);
    margin-bottom: 2rem;
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.3;
}

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

.stat-card {
    background-color: var(--bg-white);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    text-align: center;
}

.stat-card h3 {
    font-size: 2rem;
    color: var(--primary-red);
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--text-gray);
    font-size: 0.95rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-gray);
}

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

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-brand {
        font-size: 1.2rem;
    }
    
    .nav-brand-text {
        font-size: 1.2rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .search-form {
        grid-template-columns: 1fr;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
    
    .login-brand-text {
        font-size: 1.75rem;
    }
}

