﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    transition: background 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

    /* DARK MODE (default) */
    body.dark-mode {
        background: radial-gradient(circle at 10% 30%, #0a0f1e, #03050b);
        color: #eef5ff;
    }

        body.dark-mode::before {
            content: "";
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.03"><path fill="none" stroke="white" stroke-width="0.8" d="M20,30 L35,22 L50,30 L65,22 L80,30 M15,45 L30,37 L45,45 L60,37 L75,45 M10,60 L25,52 L40,60 L55,52 L70,60 M25,75 L40,67 L55,75 L70,67 L85,75"/><circle cx="50" cy="50" r="4" stroke="white" fill="none"/><polygon points="48,48 52,50 48,52" fill="white" opacity="0.4"/></svg>');
            background-repeat: repeat;
            background-size: 60px;
            pointer-events: none;
            z-index: 0;
        }

    /* LIGHT MODE */
    body.light-mode {
        background: linear-gradient(135deg, #f5f7fa 0%, #e8edf5 100%);
        color: #1a2a3a;
    }

        body.light-mode::before {
            display: none;
        }

/* Navbar Styles */
.navbar-custom {
    backdrop-filter: blur(12px);
    padding: 0.8rem 2rem;
    z-index: 100;
    transition: all 0.3s ease;
}

body.dark-mode .navbar-custom {
    background: rgba(10, 20, 35, 0.95);
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

body.light-mode .navbar-custom {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 100, 150, 0.15);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
}

body.dark-mode .navbar-brand {
    background: linear-gradient(120deg, #ffffff, #9ad0f5);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

body.light-mode .navbar-brand {
    background: linear-gradient(120deg, #1a5276, #2c7cb6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Navigation Links */
.nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link-custom {
    font-weight: 500;
    padding: 0.5rem 1.2rem !important;
    border-radius: 2rem;
    transition: all 0.3s ease;
    margin: 0 0.2rem;
    cursor: pointer;
    background: none;
    border: none;
}

body.dark-mode .nav-link-custom {
    color: #b9d0f0 !important;
}

body.light-mode .nav-link-custom {
    color: #2c5f8a !important;
}

.nav-link-custom:hover, .nav-link-custom.active {
    background: rgba(44, 156, 212, 0.2);
}

body.dark-mode .nav-link-custom:hover,
body.dark-mode .nav-link-custom.active {
    color: #6bb5ff !important;
}

body.light-mode .nav-link-custom:hover,
body.light-mode .nav-link-custom.active {
    background: rgba(44, 156, 212, 0.15);
    color: #1a5d8f !important;
}

/* User Info Section */
.user-info-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(66, 153, 225, 0.3);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
}

body.dark-mode .user-avatar {
    background: linear-gradient(135deg, #2c9cd4, #1a5276);
    color: white;
}

body.light-mode .user-avatar {
    background: linear-gradient(135deg, #2c7cb6, #1a5276);
    color: white;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.7rem;
    opacity: 0.7;
}

.logout-btn {
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    background: none;
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 6px;
}

body.dark-mode .logout-btn {
    border-color: #e74c3c;
    color: #e74c3c;
}

    body.dark-mode .logout-btn:hover {
        background: rgba(231, 76, 60, 0.2);
    }

body.light-mode .logout-btn {
    border-color: #c0392b;
    color: #c0392b;
}

    body.light-mode .logout-btn:hover {
        background: rgba(192, 57, 43, 0.1);
    }

/* Theme Toggle Switch */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    display: inline-block;
    position: relative;
    width: 60px;
    height: 30px;
    margin: 0 8px;
}

    .theme-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #2c3e50;
    transition: 0.3s;
    border-radius: 30px;
}

    .slider:before {
        position: absolute;
        content: "🌙";
        height: 24px;
        width: 24px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: 0.3s;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
    }

input:checked + .slider {
    background-color: #ffd966;
}

    input:checked + .slider:before {
        content: "☀️";
        transform: translateX(30px);
    }

/* Main Container */
.main-container {
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.main-container:fullscreen {
    width: 100vw;
    height: 100vh;
    max-width: none;
    margin: 0;
    padding: 1.5rem;
    overflow: auto;
}

body.dark-mode .main-container:fullscreen {
    background: linear-gradient(135deg, #06111d 0%, #0d1b2a 100%);
}

body.light-mode .main-container:fullscreen {
    background: linear-gradient(135deg, #f8fbff 0%, #eef5fb 100%);
}

.content-card {
    border-radius: 1.5rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

body.dark-mode .content-card {
    background: rgba(18, 25, 45, 0.75);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(66, 153, 225, 0.25);
}

body.light-mode .content-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(44, 156, 212, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.page-title {
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

body.dark-mode .page-title {
    color: #eef5ff;
}

body.light-mode .page-title {
    color: #1a5276;
}

/* Table Styles */
.vehicle-table {
    width: 100%;
}

    .vehicle-table thead th {
        padding: 1rem;
        font-weight: 600;
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

body.dark-mode .vehicle-table thead th {
    background: rgba(0, 20, 40, 0.6);
    border-bottom: 2px solid #2c9cd4;
    color: #b9d0f0;
}

body.light-mode .vehicle-table thead th {
    background: rgba(44, 156, 212, 0.1);
    border-bottom: 2px solid #2c7cb6;
    color: #1a5276;
}

.vehicle-table tbody tr {
    transition: background 0.2s ease;
}

body.dark-mode .vehicle-table tbody tr {
    border-bottom: 1px solid rgba(72, 120, 184, 0.2);
}

body.light-mode .vehicle-table tbody tr {
    border-bottom: 1px solid rgba(44, 156, 212, 0.15);
}

.vehicle-table tbody tr:hover {
    background: rgba(44, 156, 212, 0.1);
}

.vehicle-table td {
    padding: 1rem;
    vertical-align: middle;
}

body.light-mode .vehicle-table td {
    color: #2c3e50;
}

/* Status Badges */
.status-clear {
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
}

body.dark-mode .status-clear {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

body.light-mode .status-clear {
    background: rgba(46, 204, 113, 0.15);
    color: #1e8449;
}

.status-suspect {
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
}

body.dark-mode .status-suspect {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

body.light-mode .status-suspect {
    background: rgba(231, 76, 60, 0.12);
    color: #c0392b;
}

/* Refresh Indicator */
.refresh-badge {
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

body.dark-mode .refresh-badge {
    background: rgba(44, 156, 212, 0.2);
    color: #6bb5ff;
}

body.light-mode .refresh-badge {
    background: rgba(44, 156, 212, 0.1);
    color: #2c7cb6;
}

.auto-refresh-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Search and Filter Bar */
.search-bar {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
}

body.dark-mode .search-input input {
    background: rgba(10, 20, 35, 0.8);
    border: 1px solid #2a3a55;
    color: #f0f4fa;
}

body.light-mode .search-input input {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #cbd5e0;
    color: #1a2a3a;
}

.search-input input:focus {
    border-color: #2c9cd4;
    box-shadow: 0 0 0 2px rgba(44, 156, 212, 0.2);
    outline: none;
}

.filter-select {
    min-width: 150px;
}

body.dark-mode .filter-select select {
    background: rgba(10, 20, 35, 0.8);
    border: 1px solid #2a3a55;
    color: #f0f4fa;
}

body.light-mode .filter-select select {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #cbd5e0;
    color: #1a2a3a;
}

/* Stats Cards */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    border-radius: 1rem;
    padding: 1rem;
    text-align: center;
}

body.dark-mode .stat-card {
    background: rgba(10, 20, 35, 0.6);
    border: 1px solid rgba(66, 153, 225, 0.2);
}

body.light-mode .stat-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(44, 156, 212, 0.2);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
}

body.dark-mode .empty-state {
    color: #8da3c0;
}

body.light-mode .empty-state {
    color: #5d6d7e;
}

/* Logout Confirmation Modal */
.logout-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.logout-modal-content {
    max-width: 400px;
    margin: 1rem;
    border-radius: 1.5rem;
    padding: 1.5rem;
    text-align: center;
}

body.dark-mode .logout-modal-content {
    background: #1a2a3a;
    border: 1px solid rgba(66, 153, 225, 0.3);
}

body.light-mode .logout-modal-content {
    background: white;
    border: 1px solid #cbd5e0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn-confirm {
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

    .btn-confirm.logout {
        background: #e74c3c;
        color: white;
    }

    .btn-confirm.cancel {
        background: #7f8c8d;
        color: white;
    }

/* Responsive */
@media (max-width: 992px) {
    .navbar-custom .container-fluid {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .user-info-section {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 1rem;
    }

    .vehicle-table thead th, .vehicle-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }

    .navbar-custom {
        padding: 0.8rem 1rem;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-links {
        order: 2;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .user-info-section {
        order: 1;
    }

    .theme-switch-wrapper {
        order: 3;
    }
}
