/* ===== HIGH-TECH CYBERPUNK THEME ===== */
:root {
    --bg-primary: #050508;
    --bg-secondary: #0a0a12;
    --bg-card: #0d0d18;
    --bg-hover: #13131f;
    --bg-glass: rgba(13, 13, 24, 0.75);
    --accent-primary: #00f0ff;
    --accent-secondary: #ff006e;
    --accent-gold: #ffbe0b;
    --accent-cyan: #00f0ff;
    --accent-magenta: #ff006e;
    --text-primary: #e0e0ff;
    --text-secondary: #8892b0;
    --text-muted: #5a6278;
    --border-color: rgba(0, 240, 255, 0.12);
    --border-glow: rgba(0, 240, 255, 0.3);
    --success: #00ff88;
    --warning: #ffbe0b;
    --danger: #ff006e;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 30px rgba(0, 240, 255, 0.15);
    --shadow-neon: 0 0 20px rgba(0, 240, 255, 0.4), 0 0 40px rgba(0, 240, 255, 0.1);
    --radius: 12px;
    --radius-sm: 6px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --font-mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
    --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ===== LIGHT MODE (High-tech white) ===== */
[data-theme="light"] {
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f0f2f5;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --accent-primary: #0066ff;
    --accent-secondary: #ff006e;
    --accent-gold: #ff9500;
    --accent-cyan: #0066ff;
    --text-primary: #0a0a1a;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border-color: rgba(0, 102, 255, 0.15);
    --border-glow: rgba(0, 102, 255, 0.25);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 30px rgba(0, 102, 255, 0.1);
    --shadow-neon: 0 0 20px rgba(0, 102, 255, 0.2), 0 0 40px rgba(0, 102, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.4s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== SCANLINE OVERLAY ===== */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 240, 255, 0.015) 2px,
        rgba(0, 240, 255, 0.015) 4px
    );
    pointer-events: none;
    z-index: 9999;
    opacity: 0.6;
}

/* ===== FLOATING EMOJIS (OPTIMIZED) ===== */
.floating-emojis {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    contain: strict;
}

.float-emoji {
    position: absolute;
    font-size: 20px;
    opacity: 0.04;
    will-change: transform;
    animation: floatUp linear infinite;
    filter: grayscale(0.5) drop-shadow(0 0 8px var(--accent-primary));
}

@keyframes floatUp {
    0% { transform: translateY(100vh) rotate(0deg) scale(0.8); opacity: 0; }
    10% { opacity: 0.06; }
    90% { opacity: 0.06; }
    100% { transform: translateY(-20vh) rotate(360deg) scale(1.2); opacity: 0; }
}

/* ===== LOGIN PAGE - CYBERPUNK PREMIUM ===== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(0, 240, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 0, 110, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, var(--bg-primary) 0%, #08080f 50%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.login-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 0, 110, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridMove 15s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}

.login-card {
    background: var(--bg-glass);
    backdrop-filter: blur(30px) saturate(1.2);
    -webkit-backdrop-filter: blur(30px) saturate(1.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 48px;
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow-neon), var(--shadow);
    animation: cardEntry 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary), var(--accent-gold), var(--accent-primary));
    border-radius: calc(var(--radius) + 2px);
    z-index: -1;
    opacity: 0.3;
    animation: borderRotate 3s linear infinite;
    background-size: 400% 400%;
}

@keyframes borderRotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes cardEntry {
    0% { opacity: 0; transform: translateY(40px) scale(0.95) rotateX(10deg); }
    100% { opacity: 1; transform: translateY(0) scale(1) rotateX(0deg); }
}

.logo {
    text-align: center;
    margin-bottom: 32px;
}

.logo-svg {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    animation: logoFloat 3s ease-in-out infinite, logoGlow 2s ease-in-out infinite alternate;
    display: block;
    filter: drop-shadow(0 0 15px var(--accent-primary));
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes logoGlow {
    0% { filter: drop-shadow(0 0 10px var(--accent-primary)); }
    100% { filter: drop-shadow(0 0 25px var(--accent-primary)) drop-shadow(0 0 40px var(--accent-secondary)); }
}

.logo h1 {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 4px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-gold), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s ease-in-out infinite;
    background-size: 200% auto;
    text-shadow: none;
}

@keyframes shimmer {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

.logo p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 8px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-family: var(--font-mono);
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
    font-weight: 700;
    position: relative;
    overflow: hidden;
    font-family: var(--font-mono);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 6px;
    z-index: -1;
}

.tab-btn.active, .tab-btn:hover {
    color: var(--bg-primary);
}

.tab-btn.active::before, .tab-btn:hover::before {
    opacity: 1;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeInUp 0.5s ease;
}

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

.form-group {
    margin-bottom: 18px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: var(--font-mono);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.15), 0 0 20px rgba(0, 240, 255, 0.1);
    transform: translateY(-1px);
}

.remember-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

.remember-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
    cursor: pointer;
    flex-shrink: 0;
}

/* ===== APP LAYOUT ===== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR (FIXED) ===== */
.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
}

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

.sidebar-header {
    padding: 20px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.05), rgba(255, 0, 110, 0.05));
}

.sidebar-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header .logo-svg {
    width: 36px;
    height: 36px;
    animation: none;
    margin: 0;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px var(--accent-primary));
}

.logo-text {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    font-family: var(--font-mono);
}

.sidebar-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: var(--transition);
    line-height: 1;
    display: none;
    flex-shrink: 0;
}

.sidebar-close:hover {
    background: rgba(255, 0, 110, 0.1);
    color: var(--accent-secondary);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) var(--bg-primary);
}

.nav-section {
    margin-bottom: 20px;
}

.nav-label {
    display: block;
    padding: 0 12px;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 800;
    font-family: var(--font-mono);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 13px;
    margin-bottom: 3px;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    border: 1px solid transparent;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(to bottom, var(--accent-primary), var(--accent-gold));
    border-radius: 0 4px 4px 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 0 10px var(--accent-primary);
}

.nav-item:hover, .nav-item.active {
    background: rgba(0, 240, 255, 0.06);
    color: var(--accent-primary);
    border-color: rgba(0, 240, 255, 0.15);
    transform: translateX(4px);
}

.nav-item.active::before {
    opacity: 1;
}

.nav-item.active {
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1), inset 0 0 20px rgba(0, 240, 255, 0.03);
    background: rgba(0, 240, 255, 0.08);
}

.nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    line-height: 1;
    filter: drop-shadow(0 0 4px currentColor);
}

.nav-item:hover .nav-icon {
    transform: scale(1.2) rotate(5deg);
}

.nav-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    background: linear-gradient(0deg, rgba(0, 240, 255, 0.03), transparent);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    color: var(--bg-primary);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3), 0 0 40px rgba(255, 0, 110, 0.1);
    flex-shrink: 0;
    animation: avatarPulse 3s ease-in-out infinite;
}

@keyframes avatarPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 240, 255, 0.3); }
    50% { box-shadow: 0 0 30px rgba(0, 240, 255, 0.5), 0 0 50px rgba(255, 0, 110, 0.2); }
}

.user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.user-role {
    font-size: 11px;
    color: var(--accent-primary);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logout-btn {
    display: block;
    text-align: center;
    padding: 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 12px;
    border-radius: 8px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    font-family: var(--font-mono);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
}

.logout-btn:hover {
    background: rgba(255, 0, 110, 0.1);
    color: var(--accent-secondary);
    border-color: var(--accent-secondary);
    box-shadow: 0 0 15px rgba(255, 0, 110, 0.15);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.35s ease;
    width: calc(100% - 280px);
    position: relative;
}

.main-content::before {
    content: '';
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 10% 20%, rgba(0, 240, 255, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 80%, rgba(255, 0, 110, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.top-bar {
    height: 64px;
    background: rgba(10, 10, 18, 0.8);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(20px) saturate(1.2);
    gap: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-size: 22px;
    cursor: pointer;
    display: none;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
    line-height: 1;
    flex-shrink: 0;
    text-shadow: 0 0 10px var(--accent-primary);
}

.menu-toggle:hover {
    background: rgba(0, 240, 255, 0.1);
    transform: scale(1.1);
}

.top-bar-center {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.mode-badge {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--bg-primary);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
    animation: badgePulse 2s ease-in-out infinite;
    white-space: nowrap;
    font-family: var(--font-mono);
    text-transform: uppercase;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 15px rgba(0, 240, 255, 0.3); }
    50% { box-shadow: 0 0 30px rgba(0, 240, 255, 0.5), 0 0 50px rgba(255, 0, 110, 0.2); }
}

.time-display {
    color: var(--accent-primary);
    font-size: 12px;
    font-family: var(--font-mono);
    letter-spacing: 1px;
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.icon-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.icon-btn:hover {
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.theme-toggle {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    color: var(--accent-primary);
    font-size: 16px;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 8px;
    transition: var(--transition);
    line-height: 1;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: rgba(0, 240, 255, 0.1);
    transform: rotate(15deg) scale(1.1);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.content-area {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    min-width: 0;
    position: relative;
    z-index: 1;
}

/* ===== SIDEBAR OVERLAY ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ===== STICKY BANNER ===== */
.sticky-banner {
    position: sticky;
    top: 64px;
    z-index: 40;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(255, 0, 110, 0.1));
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: var(--radius);
    padding: 16px 22px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(16px);
    animation: bannerSlide 0.5s ease;
    box-shadow: 0 4px 24px rgba(0, 240, 255, 0.1);
}

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

.sticky-banner.hidden {
    display: none;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.banner-icon {
    font-size: 26px;
    animation: wiggle 2s ease-in-out infinite;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px var(--accent-gold));
}

@keyframes wiggle {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.banner-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--font-mono);
}

.banner-text span {
    color: var(--accent-primary);
    font-weight: 800;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.banner-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 6px;
    transition: var(--transition);
    line-height: 1;
    flex-shrink: 0;
}

.banner-close:hover {
    background: rgba(255, 0, 110, 0.1);
    color: var(--accent-secondary);
    transform: rotate(90deg);
}

/* ===== SECTIONS ===== */
.section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.section.active {
    display: block;
}

.section-header {
    margin-bottom: 28px;
    position: relative;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-gold));
    box-shadow: 0 0 10px var(--accent-primary);
}

.section-header h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.5px;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}

.section-header p {
    color: var(--text-secondary);
    font-size: 14px;
    font-family: var(--font-mono);
}

/* ===== CHAT ===== */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 220px);
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-glow), var(--shadow);
    position: relative;
}

.chat-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    opacity: 0.5;
    animation: scanline 3s linear infinite;
}

@keyframes scanline {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}

.message {
    max-width: 75%;
    padding: 16px 20px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.7;
    animation: messageSlide 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    word-break: break-word;
}

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

.message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(255, 0, 110, 0.1));
    color: var(--text-primary);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.1);
}

.message.assistant {
    align-self: flex-start;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.message-time {
    font-size: 10px;
    opacity: 0.5;
    margin-top: 8px;
    display: block;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
}

.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 16px 20px;
    align-self: flex-start;
    background: var(--bg-hover);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color);
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
    box-shadow: 0 0 10px var(--accent-primary);
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; box-shadow: 0 0 15px var(--accent-primary); }
}

.chat-input-area {
    padding: 18px 22px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    flex-shrink: 0;
    position: relative;
}

.chat-input-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.chat-input-wrapper input {
    flex: 1;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    min-width: 0;
    font-family: var(--font-sans);
}

.chat-input-wrapper input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.15), 0 0 20px rgba(0, 240, 255, 0.1);
}

.chat-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ===== FORMS ===== */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 700px;
    box-shadow: var(--shadow-glow), var(--shadow);
    position: relative;
    overflow: hidden;
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-gold), var(--accent-secondary));
    opacity: 0.6;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: var(--accent-primary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: var(--font-mono);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.15), 0 0 20px rgba(0, 240, 255, 0.1);
    transform: translateY(-1px);
}

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

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition-bounce);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-mono);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    line-height: 1.4;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.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;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--bg-primary);
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.3), 0 0 40px rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 40px rgba(0, 240, 255, 0.4), 0 0 60px rgba(0, 240, 255, 0.15);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-secondary);
    border: 1.5px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(0, 240, 255, 0.08);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.1);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 11px;
}

.btn-full {
    width: 100%;
}

.btn-danger {
    background: rgba(255, 0, 110, 0.1);
    color: var(--accent-secondary);
    border: 1.5px solid var(--accent-secondary);
}

.btn-danger:hover {
    background: var(--accent-secondary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 0, 110, 0.3);
}

.btn-success {
    background: rgba(0, 255, 136, 0.1);
    color: var(--success);
    border: 1.5px solid var(--success);
}

.btn-success:hover {
    background: var(--success);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3);
}

/* ===== CRUD LISTS ===== */
.crud-container {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
}

.crud-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 88px;
    box-shadow: var(--shadow-glow), var(--shadow);
    position: relative;
    overflow: hidden;
}

.crud-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-gold));
}

.crud-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.crud-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.crud-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(to bottom, var(--accent-primary), var(--accent-gold));
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 0 10px var(--accent-primary);
}

.crud-item:hover {
    border-color: rgba(0, 240, 255, 0.3);
    transform: translateX(6px) scale(1.01);
    box-shadow: var(--shadow-glow), var(--shadow);
}

.crud-item:hover::before {
    opacity: 1;
}

.crud-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 10px;
}

.crud-item-title {
    font-weight: 800;
    font-size: 15px;
    word-break: break-word;
    min-width: 0;
    color: var(--text-primary);
}

.crud-item-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 11px;
    color: var(--text-muted);
    flex-wrap: wrap;
    font-family: var(--font-mono);
}

.crud-item-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.crud-item-actions .btn {
    padding: 7px 14px;
    font-size: 10px;
}

.priority-high { color: var(--danger); text-shadow: 0 0 8px rgba(255, 0, 110, 0.3); }
.priority-medium { color: var(--warning); text-shadow: 0 0 8px rgba(255, 190, 11, 0.3); }
.priority-low { color: var(--success); text-shadow: 0 0 8px rgba(0, 255, 136, 0.3); }

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    white-space: nowrap;
    font-family: var(--font-mono);
    text-transform: uppercase;
}

.badge-recurring {
    background: rgba(255, 190, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(255, 190, 11, 0.3);
}

/* ===== ADMIN ===== */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-gold), var(--accent-secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 0 10px var(--accent-primary);
}

.stat-card:hover {
    border-color: rgba(0, 240, 255, 0.3);
    transform: translateY(-4px);
    box-shadow: var(--shadow-neon);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-value {
    font-size: 42px;
    font-weight: 900;
    color: var(--accent-primary);
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
    font-family: var(--font-mono);
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: var(--shadow-neon), var(--shadow);
    animation: modalSlide 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-gold));
}

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

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--accent-primary);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    transition: var(--transition);
    padding: 2px 8px;
    border-radius: 8px;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255, 0, 110, 0.1);
    color: var(--accent-secondary);
    transform: rotate(90deg);
}

.modal-body {
    padding: 22px 26px;
    overflow-y: auto;
    max-height: 65vh;
}

/* ===== ENHANCED REMINDER POPUP ===== */
.reminder-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    padding: 20px;
}

.reminder-popup-overlay.active {
    display: flex;
}

.reminder-popup {
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    border-radius: var(--radius);
    width: 100%;
    max-width: 440px;
    padding: 0;
    box-shadow: 
        0 0 40px rgba(0, 240, 255, 0.3),
        0 0 80px rgba(0, 240, 255, 0.1),
        0 20px 60px rgba(0, 0, 0, 0.5);
    animation: popupOpen 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
    transform-origin: center top;
    position: relative;
}

.reminder-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-gold), var(--accent-secondary));
    animation: borderGlow 2s ease-in-out infinite alternate;
}

@keyframes borderGlow {
    0% { opacity: 0.5; box-shadow: 0 0 10px var(--accent-primary); }
    100% { opacity: 1; box-shadow: 0 0 30px var(--accent-primary), 0 0 50px var(--accent-gold); }
}

@keyframes popupOpen {
    0% { opacity: 0; transform: perspective(800px) rotateX(-30deg) scale(0.8) translateY(-40px); }
    60% { transform: perspective(800px) rotateX(5deg) scale(1.02) translateY(5px); }
    100% { opacity: 1; transform: perspective(800px) rotateX(0deg) scale(1) translateY(0); }
}

.popup-header {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    padding: 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.popup-header::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.03) 10px,
        rgba(255,255,255,0.03) 20px
    );
    animation: scanSlide 2s linear infinite;
}

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

.popup-header-icon {
    font-size: 52px;
    margin-bottom: 10px;
    animation: bellRing 1.5s ease-in-out infinite;
    display: block;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 15px rgba(255,255,255,0.5));
}

@keyframes bellRing {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(20deg); }
    20% { transform: rotate(-20deg); }
    30% { transform: rotate(15deg); }
    40% { transform: rotate(-15deg); }
    50% { transform: rotate(10deg); }
    60% { transform: rotate(-10deg); }
    70% { transform: rotate(5deg); }
    80% { transform: rotate(-5deg); }
    90% { transform: rotate(0deg); }
}

.popup-header h3 {
    font-size: 22px;
    font-weight: 900;
    color: white;
    margin: 0;
    position: relative;
    z-index: 1;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.popup-body {
    padding: 28px;
    text-align: center;
    position: relative;
}

.popup-badge {
    display: none;
    background: rgba(255, 190, 11, 0.15);
    color: var(--warning);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 14px;
    animation: badgePop 0.4s ease;
    border: 1px solid rgba(255, 190, 11, 0.3);
    font-family: var(--font-mono);
    text-transform: uppercase;
}

@keyframes badgePop {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.popup-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    word-break: break-word;
    line-height: 1.3;
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

.popup-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 18px;
    word-break: break-word;
    padding: 14px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.popup-time {
    font-size: 13px;
    color: var(--accent-primary);
    font-weight: 800;
    margin-bottom: 22px;
    letter-spacing: 1px;
    font-family: var(--font-mono);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.popup-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.popup-actions .btn {
    padding: 12px 24px;
    font-size: 12px;
}

/* ===== ALERTS ===== */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 700;
    animation: alertSlide 0.4s ease;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
}

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

.alert-error {
    background: rgba(255, 0, 110, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
    box-shadow: 0 0 15px rgba(255, 0, 110, 0.1);
}

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.1);
}

/* ===== SPINNER ===== */
.spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
    box-shadow: 0 0 10px var(--accent-primary);
}

.spinner.active {
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== UTILITIES ===== */
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 28px; }

.empty-state {
    text-align: center;
    padding: 48px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 52px;
    margin-bottom: 16px;
    opacity: 0.3;
    animation: emptyFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 0 10px var(--accent-primary));
}

@keyframes emptyFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ===== WELCOME HERO ===== */
.welcome-hero {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(255, 0, 110, 0.05));
    border-radius: var(--radius);
    padding: 36px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    animation: heroEntry 0.8s ease;
    box-shadow: var(--shadow-glow);
}

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

.welcome-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.08) 0%, transparent 70%);
    animation: pulse 6s ease-in-out infinite;
}

.welcome-hero h1 {
    font-size: 30px;
    font-weight: 900;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    word-break: break-word;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}

.welcome-hero p {
    font-size: 15px;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
    font-family: var(--font-mono);
}

/* ===== QUICK ACTIONS GRID ===== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.quick-action-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
    user-select: none;
}

.quick-action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.05), rgba(255, 0, 110, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quick-action-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-neon);
}

.quick-action-card:hover::before {
    opacity: 1;
}

.quick-action-icon {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 8px currentColor);
}

.quick-action-card:hover .quick-action-icon {
    transform: scale(1.3) rotate(-5deg);
}

.quick-action-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== PARTICLE BG ===== */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--accent-primary);
    border-radius: 50%;
    opacity: 0.4;
    animation: particleFloat linear infinite;
    will-change: transform;
    box-shadow: 0 0 6px var(--accent-primary);
}

@keyframes particleFloat {
    0% { transform: translateY(100vh) translateX(0); opacity: 0; }
    10% { opacity: 0.4; }
    90% { opacity: 0.4; }
    100% { transform: translateY(-10vh) translateX(50px); opacity: 0; }
}

/* ===== ANIMATED CALENDAR WIDGET ===== */
.calendar-widget-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-glow), var(--shadow);
    animation: calendarEntry 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
}

.calendar-widget-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-gold), var(--accent-secondary));
    opacity: 0.6;
}

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

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

.cal-nav {
    background: var(--bg-hover);
    border: 2px solid var(--border-color);
    color: var(--accent-primary);
    width: 44px;
    height: 44px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 800;
}

.cal-nav:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--bg-primary);
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.cal-title {
    text-align: center;
}

.cal-month {
    display: block;
    font-size: 24px;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    font-family: var(--font-mono);
}

.cal-year {
    display: block;
    font-size: 14px;
    color: var(--accent-primary);
    margin-top: 4px;
    font-family: var(--font-mono);
    letter-spacing: 2px;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}

.cal-day-label {
    text-align: center;
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 10px 4px;
    font-family: var(--font-mono);
}

.cal-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 4px;
    border-radius: 10px;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    min-height: 64px;
}

.cal-cell:hover {
    border-color: var(--accent-primary);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.2);
    z-index: 2;
    background: rgba(0, 240, 255, 0.05);
}

.cal-empty {
    background: transparent;
    cursor: default;
    pointer-events: none;
}

.cal-empty:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
    background: transparent;
}

.cal-today {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--bg-primary);
    animation: todayPulse 2s ease-in-out infinite;
    border: 2px solid var(--accent-primary);
}

@keyframes todayPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(0, 240, 255, 0); }
}

.cal-today .cal-day-num {
    color: var(--bg-primary);
    font-weight: 900;
}

.cal-has-event {
    border-color: rgba(0, 240, 255, 0.3);
}

.cal-has-event:hover {
    border-color: var(--accent-primary);
}

.cal-day-num {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
    font-family: var(--font-mono);
}

.cal-dots {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2px;
}

.cal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
    animation: dotAppear 0.4s ease backwards;
    box-shadow: 0 0 4px var(--accent-primary);
}

.cal-dot-more {
    background: var(--text-muted);
    width: 4px;
    height: 4px;
    box-shadow: none;
}

@keyframes dotAppear {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.cal-event-mini {
    font-size: 9px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: none;
    font-family: var(--font-mono);
}

@media (min-width: 768px) {
    .cal-event-mini {
        display: block;
    }
}

.cal-events-list {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    animation: slideUp 0.5s ease;
}

.cal-events-list h4 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cal-event-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    animation: slideUp 0.4s ease backwards;
}

.cal-event-item:hover {
    border-color: var(--accent-primary);
    transform: translateX(6px);
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.1);
}

.cal-event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    padding: 10px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-gold));
    border-radius: 10px;
    color: var(--bg-primary);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.cal-event-day {
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
    font-family: var(--font-mono);
}

.cal-event-month {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
    font-family: var(--font-mono);
}

.cal-event-info {
    flex: 1;
    min-width: 0;
}

.cal-event-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
    word-break: break-word;
}

.cal-event-time, .cal-event-loc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    font-family: var(--font-mono);
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .crud-container {
        grid-template-columns: 1fr;
    }
    .crud-form {
        position: static;
    }
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .quick-actions {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 300px;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-close {
        display: block;
    }
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    .main-content::before {
        left: 0;
    }
    .menu-toggle {
        display: block;
    }
    .form-grid, .form-grid-2 {
        grid-template-columns: 1fr;
    }
    .admin-stats {
        grid-template-columns: 1fr;
    }
    .chat-container {
        height: calc(100vh - 160px);
    }
    .message {
        max-width: 90%;
    }
    .login-card {
        margin: 16px;
        padding: 28px 20px;
    }
    .top-bar {
        padding: 0 16px;
    }
    .content-area {
        padding: 16px;
    }
    .welcome-hero {
        padding: 24px;
    }
    .welcome-hero h1 {
        font-size: 24px;
    }
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    .reminder-popup {
        max-width: 90vw;
    }
    .calendar-widget-container {
        padding: 16px;
    }
    .cal-cell {
        min-height: 48px;
        padding: 4px 2px;
    }
    .cal-day-num {
        font-size: 12px;
    }
    .cal-event-item {
        padding: 12px;
        gap: 12px;
    }
    .cal-event-date {
        min-width: 44px;
        padding: 8px;
    }
    .cal-event-day {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .quick-actions {
        grid-template-columns: 1fr;
    }
    .mode-badge {
        display: none;
    }
    .time-display {
        display: none;
    }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--accent-secondary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .floating-emojis, .particles {
        display: none;
    }
}
