/*
 * Neon Purple Theme for Parking System
 * Professional Modern Design - 2026
 */

:root {
    /* Neon Purple Color Palette */
    --neon-purple: #B24BF3;
    --neon-purple-light: #D896FF;
    --neon-purple-dark: #8B2FC9;
    --neon-purple-glow: rgba(178, 75, 243, 0.5);

    /* Dark Theme */
    --bg-primary: #0A0118;
    --bg-secondary: #150828;
    --bg-tertiary: #1F0E3C;
    --bg-card: #2A1250;
    --bg-hover: #3A1A68;

    /* Accent Colors */
    --accent-success: #00FFB3;
    --accent-warning: #FFB800;
    --accent-danger: #FF3366;
    --accent-info: #00D9FF;

    /* Text Colors */
    --text-primary: #FFFFFF;
    --text-secondary: #D4C5F9;
    --text-muted: #9B8DB8;
    --text-disabled: #5A4B6F;

    /* Borders & Shadows */
    --border-color: rgba(178, 75, 243, 0.2);
    --shadow-sm: 0 2px 8px rgba(178, 75, 243, 0.1);
    --shadow-md: 0 4px 16px rgba(178, 75, 243, 0.2);
    --shadow-lg: 0 8px 32px rgba(178, 75, 243, 0.3);
    --shadow-glow: 0 0 20px rgba(178, 75, 243, 0.4);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Global Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated Background Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(178, 75, 243, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(178, 75, 243, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

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

.container-sm {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-right: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    overflow-y: auto;
    transition: transform var(--transition-normal);
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.sidebar-logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--neon-purple) 0%, var(--neon-purple-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.sidebar-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
    margin: 4px 0;
}

.sidebar-menu-item i {
    width: 24px;
    margin-right: 12px;
    font-size: 1.1rem;
}

.sidebar-menu-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-left-color: var(--neon-purple);
}

.sidebar-menu-item.active {
    background: var(--bg-card);
    color: var(--neon-purple-light);
    border-left-color: var(--neon-purple);
    font-weight: 600;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    padding: 30px;
    transition: margin-left var(--transition-normal);
}

/* Header */
.page-header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.page-title i {
    color: var(--neon-purple);
    font-size: 2rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    margin-bottom: 24px;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--neon-purple-glow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--neon-purple-light);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

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

/* Stats Card */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--neon-purple) 0%, var(--neon-purple-light) 100%);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
}

.stat-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--neon-purple) 0%, var(--neon-purple-dark) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: var(--shadow-glow);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--neon-purple-light);
    margin: 12px 0;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.stat-change {
    font-size: 0.85rem;
    margin-top: 8px;
    font-weight: 600;
}

.stat-change.positive {
    color: var(--accent-success);
}

.stat-change.negative {
    color: var(--accent-danger);
}

/* Forms */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.form-label i {
    margin-right: 6px;
    color: var(--neon-purple);
}

.form-control,
.form-select,
.form-textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.form-control:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--neon-purple);
    box-shadow: 0 0 0 4px var(--neon-purple-glow);
    background: var(--bg-card);
}

.form-control::placeholder {
    color: var(--text-disabled);
}

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

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--neon-purple) 0%, var(--neon-purple-dark) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(178, 75, 243, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(178, 75, 243, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-success) 0%, #00CC8E 100%);
    color: var(--bg-primary);
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-danger) 0%, #CC0044 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--accent-warning) 0%, #CC9400 100%);
    color: var(--bg-primary);
}

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

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--neon-purple);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 18px 36px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
}

.table thead {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-card) 100%);
}

.table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 700;
    color: var(--neon-purple-light);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--border-color);
}

.table td {
    padding: 16px 20px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr {
    transition: background var(--transition-fast);
}

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

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(0, 255, 179, 0.2);
    color: var(--accent-success);
    border: 1px solid var(--accent-success);
}

.badge-danger {
    background: rgba(255, 51, 102, 0.2);
    color: var(--accent-danger);
    border: 1px solid var(--accent-danger);
}

.badge-warning {
    background: rgba(255, 184, 0, 0.2);
    color: var(--accent-warning);
    border: 1px solid var(--accent-warning);
}

.badge-info {
    background: rgba(0, 217, 255, 0.2);
    color: var(--accent-info);
    border: 1px solid var(--accent-info);
}

.badge-primary {
    background: rgba(178, 75, 243, 0.2);
    color: var(--neon-purple-light);
    border: 1px solid var(--neon-purple);
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid;
}

.alert i {
    font-size: 1.5rem;
}

.alert-success {
    background: rgba(0, 255, 179, 0.1);
    color: var(--accent-success);
    border-color: var(--accent-success);
}

.alert-danger {
    background: rgba(255, 51, 102, 0.1);
    color: var(--accent-danger);
    border-color: var(--accent-danger);
}

.alert-warning {
    background: rgba(255, 184, 0, 0.1);
    color: var(--accent-warning);
    border-color: var(--accent-warning);
}

.alert-info {
    background: rgba(0, 217, 255, 0.1);
    color: var(--accent-info);
    border-color: var(--accent-info);
}

/* Login Page Specific Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
    position: relative;
}

.login-container::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--neon-purple-glow) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation: float 6s ease-in-out infinite;
}

.login-container::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--neon-purple-glow) 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    animation: float 8s ease-in-out infinite reverse;
}

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

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 48px;
    box-shadow: var(--shadow-lg);
    max-width: 480px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo {
    font-size: 3rem;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--neon-purple) 0%, var(--neon-purple-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { filter: drop-shadow(0 0 10px var(--neon-purple-glow)); }
    50% { filter: drop-shadow(0 0 20px var(--neon-purple-glow)); }
}

.login-title {
    font-size: 2rem;
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.role-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 28px;
}

.role-btn {
    padding: 16px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.role-btn i {
    font-size: 2rem;
}

.role-btn:hover {
    border-color: var(--neon-purple);
    background: var(--bg-hover);
}

.role-btn.active {
    background: linear-gradient(135deg, var(--neon-purple) 0%, var(--neon-purple-dark) 100%);
    border-color: var(--neon-purple);
    color: white;
    box-shadow: var(--shadow-glow);
}

/* Charts */
.chart-container {
    position: relative;
    height: 350px;
    margin-top: 20px;
}

/* Loader */
.loader {
    border: 4px solid var(--bg-tertiary);
    border-top: 4px solid var(--neon-purple);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar:not(.hidden) {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        left: 20px !important;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .login-card {
        padding: 32px 24px;
    }

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

@media (max-width: 480px) {
    .role-selector {
        grid-template-columns: 1fr;
    }
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: var(--neon-purple);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    transition: all var(--transition-fast);
}

.menu-toggle:hover {
    transform: scale(1.1);
}

.menu-toggle i {
    transition: transform var(--transition-fast);
}

.sidebar.hidden {
    transform: translateX(-100%);
}

.sidebar.hidden ~ .main-content {
    margin-left: 0;
}

.sidebar.hidden ~ .menu-toggle {
    left: 20px;
}

.sidebar:not(.hidden) ~ .menu-toggle {
    left: 300px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header h2 i {
    color: var(--neon-purple);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: all var(--transition-fast);
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.p-0 { padding: 0; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }
.flex { display: flex; }
.flex-column { flex-direction: column; }
.flex-center { align-items: center; justify-content: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.text-success { color: var(--accent-success); }
.text-danger { color: var(--accent-danger); }
.text-warning { color: var(--accent-warning); }
.text-info { color: var(--accent-info); }
.text-purple { color: var(--neon-purple-light); }
