/* HAM Portal - Main Stylesheet
   Amateur Radio Club Member Portal
   Color scheme inspired by DX1ARM - Professional dark theme */

/* ===== CSS Variables ===== */
:root {
    /* Primary Colors */
    --primary-dark: #0f1419;
    --primary: #1a2332;
    --primary-light: #243447;

    /* Accent Colors */
    --accent-blue: #2563eb;
    --accent-cyan: #00d4ff;
    --accent-purple: #7c3aed;

    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Borders & Shadows */
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.3);

    /* Glassmorphism */
    --glass-bg: rgba(26, 35, 50, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===== Light Mode Theme ===== */
body.light-mode {
    --primary-dark: #f8fafc;
    --primary: #ffffff;
    --primary-light: #f1f5f9;

    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.3);

    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(0, 0, 0, 0.1);
}

body.light-mode {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-blue);
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--space-md);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1rem;
}

h6 {
    font-size: 0.875rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-muted {
    color: var(--text-muted);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-danger {
    color: var(--danger);
}

/* ===== Layout ===== */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--space-lg);
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: var(--space-xl) 0;
}

/* ===== Grid System ===== */
.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ===== Header & Navigation ===== */
.header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.nav-account {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Navigation links container */
.nav-links-container {
    display: contents;
}

/* Drawer header - hidden on desktop */
.nav-drawer-header {
    display: none;
}

/* User section in drawer - hidden on desktop */
.nav-user-section {
    display: none;
}

/* Visibility helpers */
.hidden-desktop {
    display: none;
}

.hidden-mobile {
    display: flex;
}

@media (max-width: 768px) {
    .nav {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: var(--primary);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 0;
        border-left: 1px solid var(--glass-border);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        z-index: 999;
    }

    .nav.active {
        right: 0;
    }

    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 44px;
        height: 44px;
        gap: 5px;
        padding: 10px;
    }

    .hidden-desktop {
        display: flex !important;
    }

    .hidden-mobile {
        display: none !important;
    }

    /* Drawer header */
    .nav-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: var(--space-lg);
        border-bottom: 1px solid var(--border-color);
        background: rgba(255, 255, 255, 0.03);
    }

    .nav-drawer-close {
        background: rgba(255, 255, 255, 0.1);
        border: none;
        color: var(--text-primary);
        width: 40px;
        height: 40px;
        border-radius: var(--radius-full);
        cursor: pointer;
        font-size: 1.2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
    }

    .nav-drawer-close:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: rotate(90deg);
    }

    /* Links container */
    .nav-links-container {
        flex: 1;
        padding: var(--space-md);
        display: flex;
        flex-direction: column;
        gap: var(--space-xs);
    }

    .nav-link {
        padding: var(--space-md) var(--space-lg);
        border-radius: var(--radius-md);
        font-size: 1rem;
        display: flex;
        align-items: center;
        gap: var(--space-md);
    }

    .nav-link i {
        width: 24px;
        text-align: center;
    }

    .nav-link.active {
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(124, 58, 237, 0.2));
        color: var(--text-primary);
        border-left: 3px solid var(--accent-cyan);
    }

    /* User section */
    .nav-user-section {
        display: flex;
        flex-direction: column;
        gap: var(--space-md);
        padding: var(--space-lg);
        border-top: 1px solid var(--border-color);
        background: rgba(255, 255, 255, 0.03);
    }

    .nav-user-info {
        display: flex;
        align-items: center;
        gap: var(--space-md);
    }

    .nav-user-avatar {
        width: 48px;
        height: 48px;
        background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
        border-radius: var(--radius-full);
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 1.1rem;
        color: white;
    }

    .nav-user-details {
        flex: 1;
    }

    .nav-user-callsign {
        font-weight: 600;
        color: var(--text-primary);
    }

    .nav-user-role {
        font-size: 0.8rem;
        color: var(--text-secondary);
    }
}

/* ===== Theme Toggle Button ===== */
.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-left: var(--space-md);
    position: relative;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.theme-toggle i {
    font-size: 1.2rem;
    transition: all var(--transition-fast);
}

/* Dark mode - show sun icon */
.theme-toggle #themeIconLight {
    display: block;
    color: var(--warning);
}

.theme-toggle #themeIconDark {
    display: none;
}

/* Light mode - show moon icon */
body.light-mode .theme-toggle #themeIconLight {
    display: none;
}

body.light-mode .theme-toggle #themeIconDark {
    display: block;
    color: var(--accent-blue);
}

/* ===== Cards ===== */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0;
}

.card-body {
    flex: 1;
}

.card-footer {
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-color);
}

/* Stat Cards */
.stat-card {
    text-align: center;
    padding: var(--space-xl);
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--space-md);
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-card .stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: var(--space-sm);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-cyan);
    color: var(--accent-cyan);
}

.btn-outline:hover:not(:disabled) {
    background: var(--accent-cyan);
    color: var(--primary-dark);
}

.btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: 1.1rem;
}

.btn-sm {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: var(--space-md);
    font-size: 1rem;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-md) center;
    padding-right: calc(var(--space-md) * 3);
}

/* Fix for dark mode dropdown options */
.form-control option {
    background-color: var(--primary);
    color: var(--text-primary);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-check {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.form-check-input {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-cyan);
}

.form-row {
    display: grid;
    gap: var(--space-lg);
}

.form-row-2 {
    grid-template-columns: repeat(2, 1fr);
}

.form-row-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {

    .form-row-2,
    .form-row-3 {
        grid-template-columns: 1fr;
    }
}

.form-error {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: var(--space-xs);
}

/* ===== Tables ===== */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: background-color var(--transition-fast);
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--accent-blue);
    color: white;
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-warning {
    background: var(--warning);
    color: var(--primary-dark);
}

.badge-danger {
    background: var(--danger);
    color: white;
}

.badge-info {
    background: var(--info);
    color: white;
}

.badge-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
}

/* ===== Alerts ===== */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning);
    color: var(--warning);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--info);
    color: var(--info);
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-lg);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

/* ===== Hero Section ===== */
.hero {
    padding: var(--space-2xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
    animation: pulse 10s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: var(--space-lg);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-xl);
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }
}

/* ===== Footer ===== */
.footer {
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--glass-border);
    padding: var(--space-xl) 0;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-lg);
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
}

.footer-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-link:hover {
    color: var(--accent-cyan);
}

/* ===== Sidebar ===== */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: calc(100vh - 70px);
}

.sidebar {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    padding: var(--space-lg);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.sidebar-link.active {
    border-left: 3px solid var(--accent-cyan);
}

.sidebar-section {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.sidebar-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

@media (max-width: 1024px) {
    .layout-with-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }
}

/* ===== Calendar ===== */
.calendar {
    background: var(--glass-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.05);
}

.calendar-nav {
    display: flex;
    gap: var(--space-sm);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day-header {
    padding: var(--space-md);
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.02);
}

.calendar-day {
    min-height: 100px;
    padding: var(--space-sm);
    border: 1px solid var(--border-color);
    transition: background-color var(--transition-fast);
}

.calendar-day:hover {
    background: rgba(255, 255, 255, 0.05);
}

.calendar-day.today {
    background: rgba(0, 212, 255, 0.1);
}

.calendar-day.other-month {
    opacity: 0.5;
}

.calendar-day-number {
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.calendar-event {
    font-size: 0.75rem;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-xs);
    background: var(--accent-blue);
    color: white;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-event.public {
    background: var(--success);
}

.calendar-event.private {
    background: var(--accent-purple);
}

/* ===== Map Container ===== */
.map-container {
    height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

/* ===== Loading Spinner ===== */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 20, 25, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

/* ===== Utility Classes ===== */
.d-flex {
    display: flex;
}

.d-grid {
    display: grid;
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.align-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-column {
    flex-direction: column;
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.mt-sm {
    margin-top: var(--space-sm);
}

.mt-md {
    margin-top: var(--space-md);
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mt-xl {
    margin-top: var(--space-xl);
}

.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.mb-xl {
    margin-bottom: var(--space-xl);
}

.p-md {
    padding: var(--space-md);
}

.p-lg {
    padding: var(--space-lg);
}

.p-xl {
    padding: var(--space-xl);
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.w-100 {
    width: 100%;
}

/* ===== Responsive Utilities ===== */
@media (max-width: 768px) {
    .hidden-mobile {
        display: none !important;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .container {
        padding: 0 var(--space-md);
    }
}

@media (min-width: 769px) {
    .hidden-desktop {
        display: none !important;
    }
}

/* ===== Theme Toggle Button ===== */
.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-right: var(--space-md);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.theme-toggle i {
    font-size: 1.2rem;
    transition: all var(--transition-normal);
    position: absolute;
}

/* Dark mode: show sun icon, hide moon */
body:not(.light-mode) .theme-toggle #themeIconLight {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    color: #fbbf24;
}

body:not(.light-mode) .theme-toggle #themeIconDark {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

/* Light mode: show moon icon, hide sun */
body.light-mode .theme-toggle #themeIconLight {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

body.light-mode .theme-toggle #themeIconDark {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    color: #6366f1;
}

/* ===== Light Mode Theme ===== */
body.light-mode {
    /* Primary Colors */
    --primary-dark: #f8fafc;
    --primary: #ffffff;
    --primary-light: #f1f5f9;

    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    /* Borders & Shadows */
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.2);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(0, 0, 0, 0.08);

    /* Background */
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
}

/* Light mode specific overrides */
body.light-mode .header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .card {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: var(--shadow-sm);
}

body.light-mode .card:hover {
    box-shadow: var(--shadow-lg);
}

body.light-mode .nav-link:hover,
body.light-mode .nav-link.active {
    background: rgba(0, 0, 0, 0.05);
}

body.light-mode .form-control {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.15);
    color: var(--text-primary);
}

body.light-mode .form-control:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

body.light-mode .btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.15);
}

body.light-mode .btn-secondary:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.1);
}

body.light-mode .table th {
    background: rgba(0, 0, 0, 0.03);
}

body.light-mode .table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

body.light-mode .modal {
    background: var(--primary);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .footer {
    background: rgba(0, 0, 0, 0.03);
    border-top-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-right-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .sidebar-link:hover,
body.light-mode .sidebar-link.active {
    background: rgba(0, 0, 0, 0.05);
}

body.light-mode .loading-overlay {
    background: rgba(255, 255, 255, 0.95);
}

body.light-mode .calendar {
    background: rgba(255, 255, 255, 0.95);
}

body.light-mode .calendar-header {
    background: rgba(0, 0, 0, 0.02);
}

body.light-mode .calendar-day-header {
    background: rgba(0, 0, 0, 0.02);
}

body.light-mode .calendar-day:hover {
    background: rgba(0, 0, 0, 0.03);
}

body.light-mode .calendar-day.today {
    background: rgba(37, 99, 235, 0.1);
}

body.light-mode .theme-toggle {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.1);
}

body.light-mode .stat-card .stat-icon {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
}

body.light-mode .logo {
    color: var(--text-primary);
}

body.light-mode a {
    color: var(--accent-blue);
}

body.light-mode a:hover {
    color: var(--accent-purple);
}

body.light-mode .badge-secondary {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-secondary);
}

body.light-mode .hero::before {
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.1) 0%, transparent 50%);
}

body.light-mode .text-gradient {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-mode select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23475569' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-md) center;
    background-size: 1rem;
}

/* Smooth transitions for theme change */
body,
body .header,
body .card,
body .nav-link,
body .form-control,
body .btn,
body .table,
body .modal,
body .footer,
body .sidebar,
body .calendar,
body a {
    transition: background-color var(--transition-normal),
        border-color var(--transition-normal),
        color var(--transition-normal),
        box-shadow var(--transition-normal);
}

/* ===== Map Container ===== */
.map-container {
    width: 100%;
    height: 450px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--primary-dark);
}

/* Ensure Leaflet container inherits height */
.map-container .leaflet-container {
    width: 100%;
    height: 100%;
    background: var(--primary-dark);
}

/* Fix for Leaflet tile layer visibility */
.leaflet-tile-pane {
    opacity: 1 !important;
}

.leaflet-control-attribution {
    background: rgba(26, 35, 50, 0.8) !important;
    color: var(--text-muted) !important;
}

.leaflet-control-attribution a {
    color: var(--accent-cyan) !important;
}

/* ============================================
   MODERN UI/UX ENHANCEMENTS
   Mobile-first, Accessible, User-friendly
   ============================================ */

/* ===== Mobile Drawer Navigation ===== */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: var(--primary);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 0;
        border-left: 1px solid var(--glass-border);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        z-index: 999;
    }

    .nav.active {
        right: 0;
        display: flex;
    }

    .nav-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: var(--space-lg);
        border-bottom: 1px solid var(--border-color);
        background: rgba(255, 255, 255, 0.03);
    }

    .nav-drawer-close {
        background: rgba(255, 255, 255, 0.1);
        border: none;
        color: var(--text-primary);
        width: 40px;
        height: 40px;
        border-radius: var(--radius-full);
        cursor: pointer;
        font-size: 1.2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
    }

    .nav-drawer-close:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: rotate(90deg);
    }

    .nav-links-container {
        flex: 1;
        padding: var(--space-md);
        display: flex;
        flex-direction: column;
        gap: var(--space-xs);
    }

    .nav-link {
        padding: var(--space-md) var(--space-lg);
        border-radius: var(--radius-md);
        font-size: 1rem;
        display: flex;
        align-items: center;
        gap: var(--space-md);
    }

    .nav-link i {
        width: 24px;
        text-align: center;
    }

    .nav-link.active {
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(124, 58, 237, 0.2));
        color: var(--text-primary);
        border-left: 3px solid var(--accent-cyan);
    }

    .nav-user-section {
        padding: var(--space-lg);
        border-top: 1px solid var(--border-color);
        background: rgba(255, 255, 255, 0.03);
    }

    .nav-user-info {
        display: flex;
        align-items: center;
        gap: var(--space-md);
        margin-bottom: var(--space-md);
    }

    .nav-user-avatar {
        width: 48px;
        height: 48px;
        background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
        border-radius: var(--radius-full);
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 1.1rem;
    }

    .nav-user-details {
        flex: 1;
    }

    .nav-user-callsign {
        font-weight: 600;
        color: var(--text-primary);
    }

    .nav-user-role {
        font-size: 0.8rem;
        color: var(--text-secondary);
    }

    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 44px;
        height: 44px;
        gap: 5px;
        padding: 10px;
    }

    .nav-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        background: var(--text-primary);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}

/* ===== Skeleton Loading ===== */
.skeleton {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.05) 0%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0.05) 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    height: 120px;
    border-radius: var(--radius-lg);
}

.skeleton-text {
    height: 1rem;
    margin-bottom: var(--space-sm);
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
}

body.light-mode .skeleton {
    background: linear-gradient(90deg,
            rgba(0, 0, 0, 0.05) 0%,
            rgba(0, 0, 0, 0.1) 50%,
            rgba(0, 0, 0, 0.05) 100%);
    background-size: 200% 100%;
}

/* ===== Enhanced Form Styles ===== */
.form-group-floating {
    position: relative;
    margin-bottom: var(--space-lg);
}

.form-group-floating .form-control {
    padding-top: 1.5rem;
}

.form-group-floating .form-label-floating {
    position: absolute;
    top: 50%;
    left: var(--space-md);
    transform: translateY(-50%);
    transition: all 0.2s ease;
    pointer-events: none;
    color: var(--text-muted);
    background: transparent;
}

.form-group-floating .form-control:focus~.form-label-floating,
.form-group-floating .form-control:not(:placeholder-shown)~.form-label-floating {
    top: 0.5rem;
    transform: translateY(0);
    font-size: 0.75rem;
    color: var(--accent-cyan);
}

/* Password Toggle */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--space-sm);
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--text-primary);
}

/* Password Strength Indicator */
.password-strength {
    display: flex;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
}

.password-strength-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    transition: background 0.3s ease;
}

.password-strength[data-strength="1"] .password-strength-bar:nth-child(1) {
    background: var(--danger);
}

.password-strength[data-strength="2"] .password-strength-bar:nth-child(-n+2) {
    background: var(--warning);
}

.password-strength[data-strength="3"] .password-strength-bar:nth-child(-n+3) {
    background: #84cc16;
}

.password-strength[data-strength="4"] .password-strength-bar {
    background: var(--success);
}

.password-strength-text {
    font-size: 0.75rem;
    margin-top: var(--space-xs);
    color: var(--text-secondary);
}

/* Form Validation States */
.form-control.is-valid {
    border-color: var(--success);
}

.form-control.is-valid:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.validation-message {
    font-size: 0.8rem;
    margin-top: var(--space-xs);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.validation-message.success {
    color: var(--success);
}

.validation-message.error {
    color: var(--danger);
}

/* ===== Floating Action Button (FAB) ===== */
.fab {
    position: fixed;
    bottom: calc(var(--space-xl) + 60px);
    right: var(--space-lg);
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border: none;
    border-radius: var(--radius-full);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    display: none;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 99, 235, 0.5);
}

.fab:active {
    transform: scale(0.95);
}

.fab-menu {
    position: fixed;
    bottom: calc(var(--space-xl) + 130px);
    right: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 99;
}

.fab-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fab-menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.fab-menu-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-5px);
}

.fab-menu-item i {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .fab {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ===== Mobile Table Cards ===== */
@media (max-width: 768px) {
    .table-responsive-cards .table {
        display: block;
    }

    .table-responsive-cards thead {
        display: none;
    }

    .table-responsive-cards tbody {
        display: flex;
        flex-direction: column;
        gap: var(--space-md);
    }

    .table-responsive-cards tbody tr {
        display: flex;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        padding: var(--space-md);
        gap: var(--space-sm);
    }

    .table-responsive-cards tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: var(--space-sm) 0;
        border-bottom: 1px solid var(--border-color);
    }

    .table-responsive-cards tbody td:last-child {
        border-bottom: none;
    }

    .table-responsive-cards tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-secondary);
        font-size: 0.8rem;
        text-transform: uppercase;
    }
}

/* ===== Enhanced Cards ===== */
.card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.2);
}

.card-interactive {
    cursor: pointer;
}

.card-interactive:active {
    transform: translateY(-2px) scale(0.99);
}

/* ===== Getting Started Section ===== */
.getting-started {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.getting-started-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.getting-started-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.getting-started-title {
    flex: 1;
}

.getting-started-title h3 {
    margin-bottom: 0;
    font-size: 1.25rem;
}

.getting-started-title p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.getting-started-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

.getting-started-step {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.getting-started-step:hover {
    background: rgba(255, 255, 255, 0.1);
}

.getting-started-step.completed {
    opacity: 0.6;
}

.step-number {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.getting-started-step.completed .step-number {
    background: var(--success);
}

.getting-started-step.completed .step-number::before {
    content: "✓";
}

.step-content {
    flex: 1;
}

.step-content strong {
    display: block;
    margin-bottom: 2px;
}

.step-content small {
    color: var(--text-muted);
}

/* ===== Progress Bar ===== */
.progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
    border-radius: var(--radius-full);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Empty States ===== */
.empty-state {
    text-align: center;
    padding: var(--space-2xl);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(37, 99, 235, 0.1));
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent-cyan);
}

.empty-state h4 {
    margin-bottom: var(--space-sm);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== Tooltips ===== */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: var(--space-sm) var(--space-md);
    background: var(--primary-dark);
    color: var(--text-primary);
    font-size: 0.8rem;
    white-space: nowrap;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* ===== Accessibility Improvements ===== */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--accent-blue);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    z-index: 9999;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: var(--space-md);
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible) {
    outline: none;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.breadcrumb-item a {
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--accent-cyan);
}

.breadcrumb-separator {
    color: var(--text-muted);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== Button Micro-animations ===== */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* ===== Pulse Animation for Highlights ===== */
.pulse {
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(0, 212, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 212, 255, 0);
    }
}

/* ===== Bottom Navigation Bar (Mobile) ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    display: none;
    justify-content: space-around;
    padding: var(--space-sm) 0;
    padding-bottom: max(var(--space-sm), env(safe-area-inset-bottom));
    z-index: 100;
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
    }

    .main-content {
        padding-bottom: 80px;
    }
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: var(--space-sm);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    transition: color 0.2s ease;
    min-width: 60px;
}

.bottom-nav-item i {
    font-size: 1.2rem;
}

.bottom-nav-item.active {
    color: var(--accent-cyan);
}

.bottom-nav-item:hover {
    color: var(--text-primary);
}

body.light-mode .bottom-nav {
    background: rgba(255, 255, 255, 0.95);
    border-top-color: rgba(0, 0, 0, 0.1);
}

/* ===== Enhanced Stat Cards ===== */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    transform: translate(30%, -30%);
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: toast-slide-in 0.3s ease;
    min-width: 280px;
    max-width: 400px;
}

@keyframes toast-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.toast-exit {
    animation: toast-slide-out 0.3s ease forwards;
}

@keyframes toast-slide-out {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    background: var(--success);
}

.toast-danger .toast-icon {
    background: var(--danger);
}

.toast-warning .toast-icon {
    background: var(--warning);
}

.toast-info .toast-icon {
    background: var(--info);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--space-xs);
    transition: color 0.2s ease;
}

.toast-close:hover {
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .toast-container {
        left: var(--space-md);
        right: var(--space-md);
        top: auto;
        bottom: calc(80px + var(--space-md));
    }

    .toast {
        min-width: auto;
        max-width: none;
    }
}