/* ===== CSS Variables / Themes ===== */
:root {
    /* Light mode (default) */
    --bg-primary: #f0f4f8;
    --bg-secondary: #fdfdfd;
    --bg-glass: rgba(255, 255, 255, 0.7);
    --bg-glass-hover: rgba(255, 255, 255, 0.85);
    --bg-glass-strong: rgba(255, 255, 255, 0.9);
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border-color: rgba(0, 0, 0, 0.1);
    --border-glass: rgba(255, 255, 255, 0.3);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
    --accent: #4f46e5;
    --accent-hover: #4338ca;
    --accent-light: rgba(79, 70, 229, 0.1);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
    --hero-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --glass-blur: 20px;
    --card-radius: 20px;
    --btn-radius: 14px;
    --nav-bg: rgba(255, 255, 255, 0.8);
    --input-bg: rgba(255, 255, 255, 0.8);
    --badge-bg: rgba(79, 70, 229, 0.1);
    --badge-text: #4f46e5;
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-glass: rgba(30, 41, 59, 0.7);
    --bg-glass-hover: rgba(30, 41, 59, 0.85);
    --bg-glass-strong: rgba(30, 41, 59, 0.9);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --border-glass: rgba(255, 255, 255, 0.08);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
    --accent: #818cf8;
    --accent-hover: #6366f1;
    --accent-light: rgba(129, 140, 248, 0.15);
    --nav-bg: rgba(15, 23, 42, 0.85);
    --input-bg: rgba(30, 41, 59, 0.8);
    --badge-bg: rgba(129, 140, 248, 0.15);
    --badge-text: #818cf8;
}

/* ===== Base Styles ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1.15rem;
    line-height: 1.7;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Big text for elderly users */
h1 { font-size: 2.8rem; font-weight: 800; line-height: 1.2; }
h2 { font-size: 2.2rem; font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.7rem; font-weight: 600; line-height: 1.4; }
h4 { font-size: 1.4rem; font-weight: 600; }
p, li, td, th, label, input, select, textarea, a { font-size: 1.15rem; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: var(--accent-hover);
}

/* ===== Glass Card ===== */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-glass);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: var(--bg-glass-hover);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.glass-card-static {
    background: var(--bg-glass);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-glass);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
}

/* ===== Navigation ===== */
.navbar {
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--hero-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand svg {
    width: 32px;
    height: 32px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--btn-radius);
    transition: all 0.2s;
    font-weight: 500;
    font-size: 1.05rem;
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    background: var(--accent-light);
    color: var(--accent);
}

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

/* ===== Theme Toggle ===== */
.theme-toggle {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.theme-toggle:hover {
    background: var(--accent-light);
    transform: rotate(15deg);
}

/* ===== Language Switcher ===== */
.lang-switch {
    display: flex;
    border-radius: var(--btn-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.lang-btn {
    padding: 0.4rem 0.8rem;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s;
}

.lang-btn:hover {
    background: var(--accent-light);
    color: var(--accent);
}

.lang-btn.active {
    background: var(--accent);
    color: white;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border: none;
    border-radius: var(--btn-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--hero-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    color: white;
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

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

.btn-success:hover {
    opacity: 0.9;
    color: white;
}

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

.btn-danger:hover {
    opacity: 0.9;
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: #1a202c;
}

.btn-warning:hover {
    opacity: 0.9;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.3rem;
}

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

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.form-input {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--btn-radius);
    color: var(--text-primary);
    font-size: 1.15rem;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-input::placeholder {
    color: var(--text-muted);
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

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

.form-error {
    color: var(--danger);
    font-size: 0.95rem;
    margin-top: 0.3rem;
}

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

.container-sm {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
}

/* ===== Hero Section ===== */
.hero {
    background: var(--hero-gradient);
    padding: 6rem 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255,255,255,0.08) 0%, transparent 40%);
    animation: float 15s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-20px, -20px) rotate(5deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 1.5rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero .btn-primary {
    background: white;
    color: var(--gradient-start);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.hero .btn-primary:hover {
    box-shadow: 0 6px 30px rgba(0,0,0,0.3);
}

.hero .btn-secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.5);
    backdrop-filter: blur(10px);
}

.hero-stat {
    margin-top: 3rem;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255,255,255,0.15);
    padding: 1rem 2rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.hero-stat-number {
    font-size: 2.5rem;
    font-weight: 800;
}

.hero-stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
    text-align: left;
}

/* ===== Features Section ===== */
.features-section {
    padding: 5rem 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    text-align: center;
    padding: 2.5rem 2rem;
}

.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: var(--hero-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    margin-bottom: 0.8rem;
}

.feature-card p {
    color: var(--text-secondary);
}

/* ===== Steps Section ===== */
.steps-section {
    padding: 5rem 2rem;
    text-align: center;
}

.steps-section h2 {
    margin-bottom: 3rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.step-card {
    padding: 2rem;
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--hero-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto 1.2rem;
}

/* ===== Parking Lot Cards ===== */
.parking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.parking-card {
    overflow: hidden;
    padding: 0;
}

.parking-card-image {
    height: 200px;
    background: var(--hero-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.parking-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.parking-card-image svg {
    width: 80px;
    height: 80px;
    opacity: 0.5;
}

.parking-card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.parking-card-body {
    padding: 1.5rem;
}

.parking-card-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent);
}

.parking-card-price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
}

.parking-card-info {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.parking-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--border-color);
}

.parking-info-row:last-child {
    border-bottom: none;
}

.parking-info-label {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.parking-info-value {
    font-weight: 600;
    font-size: 1rem;
}

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

.parking-card-actions .btn {
    flex: 1;
    justify-content: center;
}

/* ===== Profile Section ===== */
.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    background: var(--hero-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    font-weight: 800;
    flex-shrink: 0;
}

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

.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--hero-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 0.3rem;
}

/* ===== Table ===== */
.table-container {
    overflow-x: auto;
    border-radius: var(--card-radius);
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 700;
    padding: 1rem 1.2rem;
    text-align: left;
    font-size: 1rem;
    white-space: nowrap;
}

.data-table td {
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 1rem;
}

.data-table tr:hover td {
    background: var(--accent-light);
}

.data-table th:first-child { border-radius: var(--card-radius) 0 0 0; }
.data-table th:last-child { border-radius: 0 var(--card-radius) 0 0; }

/* ===== Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-primary {
    background: var(--badge-bg);
    color: var(--badge-text);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

/* ===== Alerts ===== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--btn-radius);
    margin-bottom: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--warning);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--info);
}

/* ===== Admin Tabs ===== */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding: 0.5rem;
    background: var(--bg-glass);
    border-radius: var(--card-radius);
    border: 1px solid var(--border-color);
}

.admin-tab {
    padding: 0.8rem 1.5rem;
    border-radius: var(--btn-radius);
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s;
    font-size: 1rem;
}

.admin-tab:hover, .admin-tab.active {
    background: var(--accent);
    color: white;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-glass);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    margin-top: 4rem;
}

/* ===== Utility ===== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.w-full { width: 100%; }
.hidden { display: none; }
.section-title { margin-bottom: 2rem; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.8rem 1rem;
    }

    .nav-links {
        justify-content: center;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.7rem; }

    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1.2rem; }

    .parking-grid {
        grid-template-columns: 1fr;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 1rem;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .data-table th, .data-table td {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ===== Lockout Page ===== */
.lockout-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lockout-card {
    max-width: 500px;
    text-align: center;
}

.lockout-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* ===== Modal ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

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

.modal-content {
    max-width: 480px;
    width: 90%;
    padding: 2rem;
    animation: fadeInUp 0.3s ease;
}
