/* ==========================================================================
   D-Evidences - Modern French Editorial Design System
   A refined, warm interface with depth and subtle animations
   ========================================================================== */

/* Google Fonts - Distinctive typography */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* ==========================================================================
   CSS Variables - Design Tokens
   ========================================================================== */
:root {
    /* Typography */
    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Primary Palette - Deep Navy to Slate */
    --primary-900: #0f172a;
    --primary-800: #1e293b;
    --primary-700: #334155;
    --primary-600: #475569;
    --primary-500: #64748b;
    --primary-400: #94a3b8;
    --primary-300: #cbd5e1;
    --primary-200: #e2e8f0;
    --primary-100: #f1f5f9;
    --primary-50: #f8fafc;

    /* Accent - Warm Coral/Terracotta */
    --accent-600: #c2410c;
    --accent-500: #e07a5f;
    --accent-400: #f4a261;
    --accent-300: #fcd9bd;
    --accent-200: #fef3eb;

    /* Semantic Colors */
    --success-600: #059669;
    --success-500: #10b981;
    --success-100: #d1fae5;

    --warning-600: #d97706;
    --warning-500: #f59e0b;
    --warning-100: #fef3c7;

    --danger-600: #dc2626;
    --danger-500: #ef4444;
    --danger-100: #fee2e2;

    --info-600: #0284c7;
    --info-500: #0ea5e9;
    --info-100: #e0f2fe;

    /* Background & Surface */
    --bg-base: #faf9f7;
    --bg-elevated: #ffffff;
    --bg-subtle: #f5f4f1;
    --bg-muted: #efeee9;

    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.08);

    /* Borders & Shadows */
    --border-subtle: rgba(0, 0, 0, 0.06);
    --border-default: rgba(0, 0, 0, 0.1);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);

    /* Spacing Scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--primary-800);
    background: var(--bg-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(224, 122, 95, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(30, 58, 95, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.2;
    color: var(--primary-900);
    margin-bottom: var(--space-4);
}

h1, .h1 { font-size: 2.5rem; letter-spacing: -0.02em; }
h2, .h2 { font-size: 2rem; letter-spacing: -0.01em; }
h3, .h3 { font-size: 1.5rem; }
h4, .h4 { font-size: 1.25rem; }
h5, .h5 { font-size: 1.125rem; font-family: var(--font-body); font-weight: 600; }
h6, .h6 { font-size: 1rem; font-family: var(--font-body); font-weight: 600; }

p { margin-bottom: var(--space-4); }

a {
    color: var(--accent-500);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-600);
}

.text-muted {
    color: var(--primary-500) !important;
}

small, .small {
    font-size: 0.8125rem;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle);
    padding: var(--space-3) var(--space-6);
    transition: all var(--transition-base);
}

.navbar-brand {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--primary-900) !important;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.navbar-brand i {
    color: var(--accent-500);
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--primary-600) !important;
    padding: var(--space-2) var(--space-4) !important;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-900) !important;
    background: var(--bg-subtle);
}

.navbar-nav .nav-link.active {
    color: var(--accent-600) !important;
    background: var(--accent-200);
}

.navbar-nav .nav-link i {
    margin-right: var(--space-2);
    font-size: 1.1em;
}

/* User dropdown */
.navbar .dropdown-toggle::after {
    display: none;
}

.navbar .dropdown-menu {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2);
    margin-top: var(--space-2);
    min-width: 200px;
}

.navbar .dropdown-item {
    border-radius: var(--radius-sm);
    padding: var(--space-2) var(--space-3);
    font-weight: 500;
    color: var(--primary-700);
    transition: all var(--transition-fast);
}

.navbar .dropdown-item:hover {
    background: var(--bg-subtle);
    color: var(--primary-900);
}

.navbar .dropdown-item i {
    margin-right: var(--space-2);
    width: 1.25rem;
    text-align: center;
}

/* ==========================================================================
   Cards - Glassmorphism Effect
   ========================================================================== */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-subtle);
    padding: var(--space-4) var(--space-5);
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--primary-800);
}

.card-header h5, .card-header h6 {
    margin: 0;
    font-family: var(--font-body);
    font-weight: 600;
}

.card-body {
    padding: var(--space-5);
}

.card-footer {
    background: var(--bg-subtle);
    border-top: 1px solid var(--border-subtle);
    padding: var(--space-3) var(--space-5);
}

/* Stat Cards - Dashboard */
.stat-card {
    position: relative;
    overflow: hidden;
    border: none;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.95;
    z-index: 0;
}

.stat-card > * {
    position: relative;
    z-index: 1;
}

.stat-card.bg-primary::before { background: linear-gradient(135deg, #1e3a5f 0%, #334155 100%); }
.stat-card.bg-success::before { background: linear-gradient(135deg, #059669 0%, #10b981 100%); }
.stat-card.bg-info::before { background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%); }
.stat-card.bg-warning::before { background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%); }
.stat-card.bg-danger::before { background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%); }

.stat-card .card-body {
    padding: var(--space-6);
}

.stat-card h4 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: var(--space-1);
    color: white;
}

.stat-card p {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
    margin: 0;
    color: white;
}

.stat-card .icon-bg {
    position: absolute;
    right: -10px;
    bottom: -10px;
    font-size: 5rem;
    opacity: 0.15;
    color: white;
}

/* Clickable stat cards */
a.text-decoration-none .card {
    cursor: pointer;
}

a.text-decoration-none:hover .card {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.875rem;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    border: none;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.btn:focus {
    box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.3);
}

.btn i {
    font-size: 1.1em;
}

/* Primary Button */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-700) 100%);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-800) 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Accent Button */
.btn-accent, .btn-warning {
    background: linear-gradient(135deg, var(--accent-500) 0%, var(--accent-400) 100%);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-accent:hover, .btn-warning:hover {
    background: linear-gradient(135deg, var(--accent-600) 0%, var(--accent-500) 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Success Button */
.btn-success {
    background: linear-gradient(135deg, var(--success-600) 0%, var(--success-500) 100%);
    color: white;
}

.btn-success:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(135deg, var(--danger-600) 0%, var(--danger-500) 100%);
    color: white;
}

.btn-danger:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* Outline Buttons */
.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary-300);
    color: var(--primary-700);
}

.btn-outline-primary:hover {
    background: var(--primary-800);
    border-color: var(--primary-800);
    color: white;
}

.btn-outline-secondary {
    background: transparent;
    border: 2px solid var(--primary-200);
    color: var(--primary-600);
}

.btn-outline-secondary:hover {
    background: var(--bg-subtle);
    border-color: var(--primary-300);
    color: var(--primary-800);
}

.btn-outline-danger {
    background: transparent;
    border: 2px solid var(--danger-500);
    color: var(--danger-500);
}

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

/* Button Sizes */
.btn-sm {
    padding: var(--space-1) var(--space-3);
    font-size: 0.8125rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: var(--space-3) var(--space-6);
    font-size: 1rem;
    border-radius: var(--radius-md);
}

/* Button Groups */
.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.btn-group .btn:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form-label {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--primary-700);
    margin-bottom: var(--space-2);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-control, .form-select {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    padding: var(--space-3) var(--space-4);
    border: 2px solid var(--primary-200);
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    color: var(--primary-800);
    transition: all var(--transition-fast);
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent-400);
    box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.15);
    outline: none;
}

.form-control::placeholder {
    color: var(--primary-400);
}

.form-control-sm, .form-select-sm {
    padding: var(--space-2) var(--space-3);
    font-size: 0.875rem;
}

.form-control-lg {
    padding: var(--space-4) var(--space-5);
    font-size: 1rem;
}

/* Checkbox & Radio */
.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--primary-300);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.form-check-input:checked {
    background-color: var(--accent-500);
    border-color: var(--accent-500);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.2);
}

.form-check-label {
    font-size: 0.9375rem;
    color: var(--primary-700);
    margin-left: var(--space-2);
}

/* Input Groups */
.input-group-text {
    background: var(--bg-subtle);
    border: 2px solid var(--primary-200);
    border-radius: var(--radius-md);
    color: var(--primary-500);
}

.input-group > .form-control:not(:first-child),
.input-group > .form-select:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group > .input-group-text:first-child {
    border-right: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* ==========================================================================
   Tables
   ========================================================================== */
.table {
    --bs-table-bg: transparent;
    font-size: 0.875rem;
}

.table thead th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-500);
    background: var(--bg-subtle);
    border-bottom: 2px solid var(--border-default);
    padding: var(--space-3) var(--space-4);
}

.table tbody td {
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
    color: var(--primary-700);
}

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

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

.table-responsive {
    border-radius: var(--radius-md);
    overflow: hidden;
}

/* ==========================================================================
   Badges
   ========================================================================== */
.badge {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
}

.bg-primary { background: var(--primary-800) !important; }
.bg-secondary { background: var(--primary-500) !important; }
.bg-success { background: var(--success-500) !important; }
.bg-danger { background: var(--danger-500) !important; }
.bg-warning { background: var(--warning-500) !important; color: white !important; }
.bg-info { background: var(--info-500) !important; }

/* Status Badges */
.badge-libre, .badge-success {
    background: var(--success-100) !important;
    color: var(--success-600) !important;
}

.badge-occupe, .badge-primary {
    background: var(--info-100) !important;
    color: var(--info-600) !important;
}

.badge-travaux, .badge-warning {
    background: var(--warning-100) !important;
    color: var(--warning-600) !important;
}

.badge-indisponible, .badge-danger {
    background: var(--danger-100) !important;
    color: var(--danger-600) !important;
}

/* ==========================================================================
   Alerts
   ========================================================================== */
.alert {
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    font-size: 0.9375rem;
    border-left: 4px solid;
}

.alert-success {
    background: var(--success-100);
    color: var(--success-600);
    border-left-color: var(--success-500);
}

.alert-danger {
    background: var(--danger-100);
    color: var(--danger-600);
    border-left-color: var(--danger-500);
}

.alert-warning {
    background: var(--warning-100);
    color: var(--warning-600);
    border-left-color: var(--warning-500);
}

.alert-info {
    background: var(--info-100);
    color: var(--info-600);
    border-left-color: var(--info-500);
}

.alert .btn-close {
    opacity: 0.6;
    filter: none;
}

/* ==========================================================================
   Progress Bars
   ========================================================================== */
.progress {
    height: 8px;
    background: var(--bg-muted);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--accent-500) 0%, var(--accent-400) 100%);
    transition: width var(--transition-slow);
}

.progress-bar.bg-success {
    background: linear-gradient(90deg, var(--success-600) 0%, var(--success-500) 100%);
}

.progress-bar.bg-primary {
    background: linear-gradient(90deg, var(--info-600) 0%, var(--info-500) 100%);
}

.progress-bar.bg-warning {
    background: linear-gradient(90deg, var(--warning-600) 0%, var(--warning-500) 100%);
}

.progress-bar.bg-danger {
    background: linear-gradient(90deg, var(--danger-600) 0%, var(--danger-500) 100%);
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination {
    gap: var(--space-1);
}

.page-link {
    border: none;
    border-radius: var(--radius-sm);
    padding: var(--space-2) var(--space-3);
    color: var(--primary-600);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.page-link:hover {
    background: var(--bg-subtle);
    color: var(--primary-800);
}

.page-item.active .page-link {
    background: var(--primary-800);
    color: white;
}

.page-item.disabled .page-link {
    background: transparent;
    color: var(--primary-300);
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-backdrop {
    background: var(--primary-900);
}

.modal-backdrop.show {
    opacity: 0.7;
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 1px solid var(--border-subtle);
    padding: var(--space-5) var(--space-6);
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
}

.modal-body {
    padding: var(--space-6);
}

.modal-footer {
    border-top: 1px solid var(--border-subtle);
    padding: var(--space-4) var(--space-6);
    gap: var(--space-3);
}

/* ==========================================================================
   Dropdowns
   ========================================================================== */
.dropdown-menu {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2);
}

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: var(--space-2) var(--space-4);
    color: var(--primary-700);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.dropdown-item:hover, .dropdown-item:focus {
    background: var(--bg-subtle);
    color: var(--primary-900);
}

.dropdown-item.active {
    background: var(--accent-200);
    color: var(--accent-600);
}

.dropdown-divider {
    border-color: var(--border-subtle);
    margin: var(--space-2) 0;
}

/* ==========================================================================
   List Groups
   ========================================================================== */
.list-group {
    border-radius: var(--radius-md);
}

.list-group-item {
    border: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: var(--space-4);
    background: transparent;
    color: var(--primary-700);
    transition: all var(--transition-fast);
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item:hover {
    background: var(--bg-subtle);
}

.list-group-item-action {
    cursor: pointer;
}

.list-group-item-action:hover {
    color: var(--primary-900);
}

/* ==========================================================================
   Login Page
   ========================================================================== */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-900) 50%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 30% 70%, rgba(224, 122, 95, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 70% 30%, rgba(244, 162, 97, 0.1) 0%, transparent 40%);
    animation: loginBgFloat 20s ease-in-out infinite;
}

@keyframes loginBgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-2%, 2%) rotate(1deg); }
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: var(--space-10);
    max-width: 420px;
    width: 100%;
    animation: loginCardSlide 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes loginCardSlide {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card .logo {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--primary-900);
    margin-bottom: var(--space-2);
}

.login-card .logo i {
    color: var(--accent-500);
}

.login-card h2 {
    font-size: 1.5rem;
    color: var(--primary-800);
    margin-bottom: var(--space-6);
}

/* ==========================================================================
   Upload Zones
   ========================================================================== */
.upload-zone {
    border: 2px dashed var(--primary-300);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    text-align: center;
    background: var(--bg-subtle);
    transition: all var(--transition-base);
    cursor: pointer;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--accent-400);
    background: var(--accent-200);
}

.upload-zone i {
    font-size: 3rem;
    color: var(--primary-400);
    margin-bottom: var(--space-4);
    transition: all var(--transition-base);
}

.upload-zone:hover i {
    color: var(--accent-500);
    transform: scale(1.1);
}

.upload-zone p {
    color: var(--primary-600);
    margin: 0;
}

/* ==========================================================================
   Map Page
   ========================================================================== */
#map {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-subtle);
}

.leaflet-popup-content-wrapper {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.leaflet-popup-content {
    font-family: var(--font-body);
    font-size: 0.875rem;
}

/* ==========================================================================
   Page Header
   ========================================================================== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border-subtle);
}

.page-header h1 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.page-header h1 i {
    color: var(--accent-500);
}

/* ==========================================================================
   Empty States
   ========================================================================== */
.empty-state {
    text-align: center;
    padding: var(--space-12) var(--space-6);
}

.empty-state i {
    font-size: 4rem;
    color: var(--primary-300);
    margin-bottom: var(--space-4);
}

.empty-state h4 {
    color: var(--primary-600);
    margin-bottom: var(--space-2);
}

.empty-state p {
    color: var(--primary-400);
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background: var(--bg-subtle);
    border-top: 1px solid var(--border-subtle);
    padding: var(--space-4) 0;
    margin-top: var(--space-8);
    font-size: 0.8125rem;
    color: var(--primary-500);
}

/* ==========================================================================
   Animations & Micro-interactions
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.animate-fade-in {
    animation: fadeIn var(--transition-slow) ease-out;
}

.animate-slide-up {
    animation: slideUp var(--transition-slow) ease-out;
}

/* Staggered animations for lists */
.stagger-animation > *:nth-child(1) { animation-delay: 0ms; }
.stagger-animation > *:nth-child(2) { animation-delay: 50ms; }
.stagger-animation > *:nth-child(3) { animation-delay: 100ms; }
.stagger-animation > *:nth-child(4) { animation-delay: 150ms; }
.stagger-animation > *:nth-child(5) { animation-delay: 200ms; }
.stagger-animation > *:nth-child(6) { animation-delay: 250ms; }

/* Loading spinner */
.spinner-border {
    border-color: var(--accent-300);
    border-right-color: var(--accent-500);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-md { border-radius: var(--radius-md); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.bg-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
}

.text-accent { color: var(--accent-500); }
.bg-accent { background: var(--accent-500); }

.border-subtle { border-color: var(--border-subtle) !important; }

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    body {
        background: white;
    }

    .navbar, footer, .btn, .no-print {
        display: none !important;
    }

    .card {
        border: 1px solid #ddd;
        box-shadow: none;
        backdrop-filter: none;
    }
}

/* ==========================================================================
   Main Navbar - Modern Glassmorphism
   ========================================================================== */
.main-navbar {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle);
    padding: var(--space-3) var(--space-6);
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: all var(--transition-base);
}

.main-navbar .brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-700) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    box-shadow: var(--shadow-sm);
}

.main-navbar .brand-text {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--primary-900);
    letter-spacing: -0.01em;
}

.main-navbar .nav-link {
    font-weight: 500;
    color: var(--primary-600) !important;
    padding: var(--space-2) var(--space-4) !important;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.main-navbar .nav-link:hover {
    color: var(--primary-900) !important;
    background: var(--bg-subtle);
}

.main-navbar .nav-link.active {
    color: var(--accent-600) !important;
    background: var(--accent-200);
}

.main-navbar .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--accent-500);
    border-radius: var(--radius-full);
}

.main-navbar .nav-link i {
    font-size: 1.1em;
}

/* User dropdown in navbar */
.user-dropdown {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-500) 0%, var(--accent-400) 100%);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
}

/* Dropdown menu glass effect */
.dropdown-menu-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2);
    margin-top: var(--space-2) !important;
    min-width: 220px;
    animation: dropdownFadeIn 0.2s ease;
}

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

.dropdown-menu-glass .dropdown-header {
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    margin-bottom: var(--space-2);
}

.dropdown-menu-glass .dropdown-item {
    border-radius: var(--radius-sm);
    padding: var(--space-2) var(--space-3);
    font-weight: 500;
    color: var(--primary-700);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
}

.dropdown-menu-glass .dropdown-item:hover {
    background: var(--bg-subtle);
    color: var(--primary-900);
}

.dropdown-menu-glass .dropdown-item.text-danger:hover {
    background: var(--danger-100);
    color: var(--danger-600);
}

.dropdown-menu-glass .dropdown-divider {
    border-color: var(--border-subtle);
    margin: var(--space-2) 0;
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */
.main-content {
    padding: var(--space-8) var(--space-6);
    min-height: calc(100vh - 140px);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.main-footer {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-subtle);
    padding: var(--space-4) var(--space-6);
    margin-top: auto;
}

/* ==========================================================================
   Alert Floating Animation
   ========================================================================== */
.alert-floating {
    animation: alertSlideIn 0.3s ease;
    border-radius: var(--radius-md);
    border: none;
    box-shadow: var(--shadow-md);
}

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

.alert-success {
    background: var(--success-100);
    color: var(--success-600);
}

.alert-danger {
    background: var(--danger-100);
    color: var(--danger-600);
}

.alert-warning {
    background: var(--warning-100);
    color: var(--warning-600);
}

.alert-info {
    background: var(--info-100);
    color: var(--info-600);
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 768px) {
    h1, .h1 { font-size: 2rem; }
    h2, .h2 { font-size: 1.5rem; }

    .card-body {
        padding: var(--space-4);
    }

    .stat-card h4 {
        font-size: 2rem;
    }

    .stat-card .icon-bg {
        font-size: 3rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-4);
    }

    .main-navbar {
        padding: var(--space-2) var(--space-4);
    }

    .main-navbar .brand-text {
        font-size: 1.1rem;
    }

    .main-navbar .brand-icon {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }

    .main-content {
        padding: var(--space-4) var(--space-3);
    }

    .navbar-collapse {
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        border-radius: var(--radius-lg);
        padding: var(--space-3);
        margin-top: var(--space-3);
        border: 1px solid var(--border-subtle);
    }
}

/* ==========================================================================
   Dark Mode Support (if needed in future)
   ========================================================================== */
@media (prefers-color-scheme: dark) {
    /* Can be enabled later by uncommenting */
    /*
    :root {
        --bg-base: #0f172a;
        --bg-elevated: #1e293b;
        --bg-subtle: #334155;
        --bg-muted: #475569;
        --glass-bg: rgba(30, 41, 59, 0.8);
        --glass-border: rgba(255, 255, 255, 0.1);
        --border-subtle: rgba(255, 255, 255, 0.1);
    }
    */
}
