/* ==========================================================================
   WebNote — UI/UX REVOLUTION V4
   Vibrant • Smooth • Premium • Modern • Delightful
   Inspired by modern productivity tools (Linear, Arc, Raycast)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & Color System
   -------------------------------------------------------------------------- */
:root {
    --wn-font: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Primary Palette */
    --wn-primary: #6366f1;
    --wn-primary-light: #818cf8;
    --wn-primary-dark: #4f46e5;
    --wn-primary-subtle: rgba(99, 102, 241, 0.12);
    --wn-primary-glow: rgba(99, 102, 241, 0.25);

    /* Vibrant Accents */
    --wn-pink: #ec4899;
    --wn-pink-subtle: rgba(236, 72, 153, 0.12);
    --wn-cyan: #06b6d4;
    --wn-cyan-subtle: rgba(6, 182, 212, 0.12);
    --wn-purple: #8b5cf6;
    --wn-purple-subtle: rgba(139, 92, 246, 0.12);
    --wn-blue: #3b82f6;
    --wn-blue-subtle: rgba(59, 130, 246, 0.12);
    --wn-amber: #f59e0b;
    --wn-amber-subtle: rgba(245, 158, 11, 0.12);
    --wn-green: #10b981;
    --wn-green-subtle: rgba(16, 185, 129, 0.12);
    --wn-rose: #f43f5e;
    --wn-rose-subtle: rgba(244, 63, 94, 0.12);

    /* Light Theme Surfaces & Text */
    --wn-bg: #f8f9fe;
    --wn-surface: rgba(255, 255, 255, 0.84);
    --wn-surface-solid: #ffffff;
    --wn-surface-subtle: rgba(241, 244, 252, 0.75);
    --wn-surface-hover: rgba(243, 246, 255, 0.9);
    --wn-border: rgba(226, 232, 245, 0.85);
    --wn-border-strong: rgba(203, 213, 235, 0.95);
    --wn-border-subtle: rgba(238, 242, 252, 0.7);

    --wn-text: #0f172a;
    --wn-text-secondary: #475569;
    --wn-text-muted: #8392a5;

    --wn-success: #10b981;
    --wn-warning: #f59e0b;
    --wn-danger: #f43f5e;

    /* Metrics & Spacing */
    --sidebar-width: 268px;
    --topbar-height: 64px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 26px;
    --radius-pill: 9999px;

    /* Shadows & Glow */
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 22px 50px rgba(15, 23, 42, 0.12);
    --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.2);

    /* Aurora Background Setup */
    --aurora-bg: radial-gradient(circle at 8% 8%, rgba(99, 102, 241, 0.09) 0%, transparent 40%),
                 radial-gradient(circle at 92% 12%, rgba(236, 72, 153, 0.07) 0%, transparent 36%),
                 radial-gradient(circle at 50% 95%, rgba(6, 182, 212, 0.06) 0%, transparent 42%),
                 #f8f9fe;
}

[data-bs-theme="dark"] {
    /* Dark Theme (Space Aurora Navy) */
    --wn-bg: #080a14;
    --wn-surface: rgba(18, 22, 38, 0.78);
    --wn-surface-solid: #111528;
    --wn-surface-subtle: rgba(25, 31, 52, 0.65);
    --wn-surface-hover: rgba(32, 40, 68, 0.75);
    --wn-border: rgba(255, 255, 255, 0.09);
    --wn-border-strong: rgba(255, 255, 255, 0.16);
    --wn-border-subtle: rgba(255, 255, 255, 0.05);

    --wn-text: #f8fafc;
    --wn-text-secondary: #cbd5e1;
    --wn-text-muted: #7e8b9f;

    --wn-primary: #818cf8;
    --wn-primary-light: #a5b4fc;
    --wn-primary-dark: #6366f1;
    --wn-primary-subtle: rgba(129, 140, 248, 0.15);
    --wn-primary-glow: rgba(129, 140, 248, 0.3);

    --wn-success: #34d399;
    --wn-warning: #fbbf24;
    --wn-danger: #fb7185;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 14px 34px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 28px rgba(129, 140, 248, 0.25);

    --aurora-bg: radial-gradient(circle at 10% 10%, rgba(99, 102, 241, 0.16) 0%, transparent 45%),
                 radial-gradient(circle at 90% 15%, rgba(236, 72, 153, 0.12) 0%, transparent 40%),
                 radial-gradient(circle at 50% 100%, rgba(6, 182, 212, 0.10) 0%, transparent 48%),
                 #080a14;
}

/* --------------------------------------------------------------------------
   1.5 Accent Theme Overrides (Settings -> Appearance -> Accent)
   Swaps the primary hue while keeping the rest of the V4 token system intact.
   -------------------------------------------------------------------------- */
:root[data-accent="purple"]  { --wn-primary: #8b5cf6; --wn-primary-light: #a78bfa; --wn-primary-dark: #7c3aed; --wn-primary-subtle: rgba(139, 92, 246, 0.12); --wn-primary-glow: rgba(139, 92, 246, 0.25); }
:root[data-accent="blue"]    { --wn-primary: #3b82f6; --wn-primary-light: #60a5fa; --wn-primary-dark: #2563eb; --wn-primary-subtle: rgba(59, 130, 246, 0.12); --wn-primary-glow: rgba(59, 130, 246, 0.25); }
:root[data-accent="cyan"]    { --wn-primary: #06b6d4; --wn-primary-light: #22d3ee; --wn-primary-dark: #0891b2; --wn-primary-subtle: rgba(6, 182, 212, 0.12); --wn-primary-glow: rgba(6, 182, 212, 0.25); }
:root[data-accent="pink"]    { --wn-primary: #ec4899; --wn-primary-light: #f472b6; --wn-primary-dark: #db2777; --wn-primary-subtle: rgba(236, 72, 153, 0.12); --wn-primary-glow: rgba(236, 72, 153, 0.25); }
:root[data-accent="green"]   { --wn-primary: #10b981; --wn-primary-light: #34d399; --wn-primary-dark: #059669; --wn-primary-subtle: rgba(16, 185, 129, 0.12); --wn-primary-glow: rgba(16, 185, 129, 0.25); }
:root[data-accent="orange"]  { --wn-primary: #f59e0b; --wn-primary-light: #fbbf24; --wn-primary-dark: #d97706; --wn-primary-subtle: rgba(245, 158, 11, 0.12); --wn-primary-glow: rgba(245, 158, 11, 0.25); }

[data-bs-theme="dark"][data-accent="purple"]  { --wn-primary: #a78bfa; --wn-primary-light: #c4b5fd; --wn-primary-dark: #8b5cf6; --wn-primary-subtle: rgba(167, 139, 250, 0.15); --wn-primary-glow: rgba(167, 139, 250, 0.3); }
[data-bs-theme="dark"][data-accent="blue"]    { --wn-primary: #60a5fa; --wn-primary-light: #93c5fd; --wn-primary-dark: #3b82f6; --wn-primary-subtle: rgba(96, 165, 250, 0.15); --wn-primary-glow: rgba(96, 165, 250, 0.3); }
[data-bs-theme="dark"][data-accent="cyan"]    { --wn-primary: #22d3ee; --wn-primary-light: #67e8f9; --wn-primary-dark: #06b6d4; --wn-primary-subtle: rgba(34, 211, 238, 0.15); --wn-primary-glow: rgba(34, 211, 238, 0.3); }
[data-bs-theme="dark"][data-accent="pink"]    { --wn-primary: #f472b6; --wn-primary-light: #f9a8d4; --wn-primary-dark: #ec4899; --wn-primary-subtle: rgba(244, 114, 182, 0.15); --wn-primary-glow: rgba(244, 114, 182, 0.3); }
[data-bs-theme="dark"][data-accent="green"]   { --wn-primary: #34d399; --wn-primary-light: #6ee7b7; --wn-primary-dark: #10b981; --wn-primary-subtle: rgba(52, 211, 153, 0.15); --wn-primary-glow: rgba(52, 211, 153, 0.3); }
[data-bs-theme="dark"][data-accent="orange"]  { --wn-primary: #fbbf24; --wn-primary-light: #fcd34d; --wn-primary-dark: #f59e0b; --wn-primary-subtle: rgba(251, 191, 36, 0.15); --wn-primary-glow: rgba(251, 191, 36, 0.3); }

.accent-swatch {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
    transition: transform 0.16s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.16s ease, box-shadow 0.16s ease;
}
.accent-swatch:hover { transform: scale(1.1); }
.accent-swatch i { opacity: 0; transition: opacity 0.14s ease; }
.accent-swatch.active { border-color: var(--wn-text); box-shadow: var(--shadow-md); }
.accent-swatch.active i { opacity: 1; }
.accent-swatch[data-swatch="indigo"] { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.accent-swatch[data-swatch="purple"] { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.accent-swatch[data-swatch="blue"]   { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.accent-swatch[data-swatch="cyan"]   { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.accent-swatch[data-swatch="pink"]   { background: linear-gradient(135deg, #ec4899, #db2777); }
.accent-swatch[data-swatch="green"]  { background: linear-gradient(135deg, #10b981, #059669); }
.accent-swatch[data-swatch="orange"] { background: linear-gradient(135deg, #f59e0b, #d97706); }

.theme-choice-btn {
    border: 1px solid var(--wn-border);
    background: var(--wn-surface-subtle);
    border-radius: var(--radius-md);
    padding: 0.6rem 0.5rem;
    text-align: center;
    color: var(--wn-text-secondary);
    transition: all 0.16s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
}
.theme-choice-btn:hover { background: var(--wn-surface-hover); color: var(--wn-text); }
.theme-choice-btn.active {
    background: linear-gradient(135deg, var(--wn-primary-subtle), transparent);
    border-color: var(--wn-primary);
    color: var(--wn-primary);
}

/* --------------------------------------------------------------------------
   2. Base & Aurora Ambient Background
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    font-family: var(--wn-font);
    background: var(--aurora-bg) !important;
    background-attachment: fixed !important;
    color: var(--wn-text);
    font-size: 14.5px;
    line-height: 1.6;
    letter-spacing: -0.015em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Smooth Scrollbar */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.28);
    border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

/* --------------------------------------------------------------------------
   3. Typography & Gradients
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    color: var(--wn-text);
    font-weight: 750;
    letter-spacing: -0.03em;
    line-height: 1.25;
    margin-top: 0;
}

h1 { font-size: 2.15rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1.02rem; }
h6 { font-size: 0.9rem; }

.gradient-text-primary {
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text-aurora {
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

a {
    color: var(--wn-primary);
    text-decoration: none;
    transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}
a:hover {
    color: var(--wn-primary-light);
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.84em;
    padding: 0.18em 0.45em;
    border-radius: var(--radius-sm);
    background-color: var(--wn-surface-subtle);
    color: var(--wn-primary);
    border: 1px solid var(--wn-border-subtle);
}

/* --------------------------------------------------------------------------
   4. Glassmorphism Utilities
   -------------------------------------------------------------------------- */
.glass-panel {
    background: var(--wn-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--wn-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.glass-card {
    background: var(--wn-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--wn-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s ease;
}

.glass-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--wn-border-strong);
}

.surface {
    background: var(--wn-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--wn-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.surface-subtle {
    background: var(--wn-surface-subtle);
    border: 1px solid var(--wn-border-subtle);
    border-radius: var(--radius-md);
}

/* --------------------------------------------------------------------------
   5. App Shell & Layout
   -------------------------------------------------------------------------- */
.app-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    transition: margin-left 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-content {
    flex: 1;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 1.75rem 2.25rem;
}

/* --------------------------------------------------------------------------
   6. Topbar (Floating Island Glass)
   -------------------------------------------------------------------------- */
.app-topbar {
    height: var(--topbar-height);
    background: var(--wn-surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--wn-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 1010;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
    max-width: 440px;
}

.search-input-wrapper input {
    width: 100%;
    height: 42px;
    padding: 0 3.2rem 0 2.5rem;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: var(--radius-pill);
    border: 1px solid var(--wn-border);
    background: var(--wn-surface-subtle);
    color: var(--wn-text);
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.search-input-wrapper input:focus {
    background: var(--wn-surface-solid);
    border-color: var(--wn-primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--wn-primary-glow), var(--shadow-sm);
}

.search-input-wrapper i.bi-search {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--wn-text-muted);
    font-size: 0.95rem;
    pointer-events: none;
}

.search-kbd-hint {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    background: var(--wn-surface);
    border: 1px solid var(--wn-border);
    color: var(--wn-text-muted);
    pointer-events: none;
}

/* User Pill in Topbar */
.user-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.75rem 0.35rem 0.35rem;
    background: var(--wn-surface-subtle);
    border: 1px solid var(--wn-border);
    border-radius: var(--radius-pill);
    color: var(--wn-text);
    transition: all 0.18s ease;
}

.user-pill-btn:hover {
    background: var(--wn-surface-hover);
    border-color: var(--wn-border-strong);
    color: var(--wn-text);
}

.user-avatar-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* --------------------------------------------------------------------------
   7. Sidebar (V4 Gradient Brand & Modern Nav)
   -------------------------------------------------------------------------- */
.app-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: var(--wn-surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid var(--wn-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1020;
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-header {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--wn-border);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--wn-text);
    text-decoration: none;
    letter-spacing: -0.03em;
}

.sidebar-brand-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 50%, #06b6d4 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}

.sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1rem;
}

.sidebar-section-title {
    font-size: 0.72rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wn-text-muted);
    padding: 0.9rem 0.75rem 0.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.85rem;
    color: var(--wn-text-secondary);
    font-size: 0.9rem;
    font-weight: 550;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
    margin-bottom: 3px;
}

.sidebar-nav-item-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.sidebar-nav-item i {
    font-size: 1.1rem;
    width: 22px;
    color: var(--wn-text-muted);
    text-align: center;
    transition: all 0.18s ease;
}

.sidebar-nav-item:hover {
    background: var(--wn-surface-hover);
    color: var(--wn-text);
    transform: translateX(3px);
}

.sidebar-nav-item:hover i {
    color: var(--wn-primary);
}

.sidebar-nav-item.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18) 0%, rgba(139, 92, 246, 0.12) 100%);
    color: var(--wn-primary);
    font-weight: 650;
    border-left: 3px solid var(--wn-primary);
    box-shadow: var(--shadow-sm);
}

.sidebar-nav-item.active i {
    color: var(--wn-primary);
}

.sidebar-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-pill);
    background: var(--wn-surface-subtle);
    color: var(--wn-text-muted);
    border: 1px solid var(--wn-border-subtle);
}

.sidebar-nav-item.active .sidebar-badge {
    background: var(--wn-primary);
    color: #ffffff;
    border-color: var(--wn-primary);
}

/* Storage Widget in Sidebar Footer */
.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--wn-border);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--wn-surface);
}

.storage-indicator {
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background: var(--wn-surface-subtle);
    border: 1px solid var(--wn-border);
}

.storage-progress-bar {
    height: 6px;
    border-radius: var(--radius-pill);
    background: rgba(148, 163, 184, 0.2);
    overflow: hidden;
    margin-top: 0.4rem;
}

.storage-progress-fill {
    height: 100%;
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg, #6366f1 0%, #ec4899 100%);
}

/* --------------------------------------------------------------------------
   8. Buttons System (Gradient Primary & Smooth Micro-interactions)
   -------------------------------------------------------------------------- */
.btn {
    font-family: var(--wn-font);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
}

.btn:active {
    transform: scale(0.98);
}

/* Gradient Primary Button */
.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
    color: #ffffff !important;
}

.btn-secondary, .btn-outline-secondary {
    background: var(--wn-surface);
    color: var(--wn-text);
    border: 1px solid var(--wn-border);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover, .btn-outline-secondary:hover {
    background: var(--wn-surface-hover);
    color: var(--wn-text);
    border-color: var(--wn-border-strong);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--wn-text-secondary);
    border-color: transparent;
    padding: 0.4rem 0.65rem;
    border-radius: var(--radius-md);
}

.btn-ghost:hover {
    background: var(--wn-surface-subtle);
    color: var(--wn-text);
}

.btn-danger, .btn-outline-danger {
    background: transparent;
    color: var(--wn-danger);
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.btn-danger:hover, .btn-outline-danger:hover {
    background: rgba(244, 63, 94, 0.12);
    color: var(--wn-danger);
    border-color: var(--wn-danger);
}

.btn-sm {
    font-size: 0.82rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    font-size: 1rem;
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius-lg);
}

/* --------------------------------------------------------------------------
   9. Forms & Inputs
   -------------------------------------------------------------------------- */
.form-control, .form-select {
    font-family: var(--wn-font);
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--wn-border);
    background: var(--wn-surface);
    color: var(--wn-text);
    padding: 0.55rem 0.85rem;
    transition: all 0.18s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--wn-primary);
    background: var(--wn-surface-solid);
    color: var(--wn-text);
    outline: none;
    box-shadow: 0 0 0 3px var(--wn-primary-glow);
}

.form-control::placeholder {
    color: var(--wn-text-muted);
}

.form-label {
    font-size: 0.84rem;
    font-weight: 650;
    color: var(--wn-text-secondary);
    margin-bottom: 0.4rem;
}

.form-check-input {
    border-color: var(--wn-border-strong);
    background: var(--wn-surface);
    border-radius: 6px;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--wn-primary);
    border-color: var(--wn-primary);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.35);
}

/* --------------------------------------------------------------------------
   10. Dashboard Hero Banner (Luminous Dusk / Twilight Artwork)
   -------------------------------------------------------------------------- */
.dashboard-hero {
    position: relative;
    border-radius: var(--radius-xl);
    padding: 2.25rem 2.5rem;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #1e1b4b 0%, #31104b 40%, #701a75 75%, #be185d 100%);
    box-shadow: 0 16px 40px rgba(49, 16, 75, 0.35), 0 0 30px rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Twilight Aurora Layers inside Hero */
.dashboard-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 60%;
    height: 160%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.4) 0%, rgba(139, 92, 246, 0.25) 45%, transparent 70%);
    pointer-events: none;
    filter: blur(40px);
}

.dashboard-hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: 20%;
    width: 40%;
    height: 100%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.3) 0%, transparent 65%);
    pointer-events: none;
    filter: blur(35px);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    margin-bottom: 0.4rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 640px;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Floating Stat Pills inside Hero */
.hero-stat-pills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.hero-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.15rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.hero-stat-pill:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-stat-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.hero-stat-val {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* --------------------------------------------------------------------------
   11. Quick Launch Action Tiles (4 Vibrant Tiles)
   -------------------------------------------------------------------------- */
.quick-action-tile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--wn-border);
    background: var(--wn-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--wn-text);
    text-decoration: none;
    height: 100%;
    transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.quick-action-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    color: var(--wn-text);
    border-color: var(--wn-border-strong);
}

/* Special Primary Quick Tile (Pink to Blue Gradient) */
.quick-action-tile-primary {
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 50%, #6366f1 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35) !important;
}

.quick-action-tile-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.5) !important;
    color: #ffffff !important;
}

.quick-action-tile-primary .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.quick-action-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   12. Note Cards & Grid System V4
   -------------------------------------------------------------------------- */
.note-card {
    background: var(--wn-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--wn-border);
    border-radius: var(--radius-lg);
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    text-decoration: none;
    color: var(--wn-text);
    box-shadow: var(--shadow-sm);
    transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
}

.note-card:hover {
    transform: translateY(-4px);
    border-color: var(--wn-border-strong);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.09), var(--shadow-glow);
    color: var(--wn-text);
}

[data-bs-theme="dark"] .note-card:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 20px rgba(129, 140, 248, 0.2);
    border-color: rgba(129, 140, 248, 0.35);
}

.note-card-accent-strip {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--wn-primary), var(--wn-purple));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.note-card-title {
    font-size: 1.05rem;
    font-weight: 750;
    color: var(--wn-text);
    margin-bottom: 0.5rem;
    line-height: 1.35;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s ease;
}

.note-card-title:hover {
    color: var(--wn-primary);
}

.note-card-snippet {
    font-size: 0.88rem;
    color: var(--wn-text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--wn-border-subtle);
    font-size: 0.8rem;
    color: var(--wn-text-muted);
}

/* Note Row (List View) */
.note-list-row {
    background: var(--wn-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--wn-border);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
    transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.note-list-row:hover {
    background: var(--wn-surface-hover);
    border-color: var(--wn-border-strong);
    transform: translateX(3px);
    box-shadow: var(--shadow-sm);
}

/* Category Pills & Badges */
.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-pill);
    background: var(--wn-surface-subtle);
    color: var(--wn-text-secondary);
    border: 1px solid var(--wn-border);
}

.category-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 0 6px currentColor;
}

.tag-badge {
    font-size: 0.76rem;
    font-weight: 550;
    color: var(--wn-text-secondary);
    background: var(--wn-surface-subtle);
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    border: 1px solid var(--wn-border-subtle);
    transition: all 0.15s ease;
}

.tag-badge:hover {
    background: var(--wn-primary-subtle);
    color: var(--wn-primary);
    border-color: rgba(99, 102, 241, 0.25);
    transform: translateY(-1px);
}

/* Priority Badges */
.priority-indicator-high {
    color: var(--wn-danger);
    background: rgba(244, 63, 94, 0.12);
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-pill);
    font-size: 0.74rem;
    font-weight: 700;
    border: 1px solid rgba(244, 63, 94, 0.25);
}

.priority-indicator-medium {
    color: var(--wn-warning);
    background: rgba(245, 158, 11, 0.12);
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-pill);
    font-size: 0.74rem;
    font-weight: 700;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.priority-indicator-low {
    color: var(--wn-success);
    background: rgba(16, 185, 129, 0.12);
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-pill);
    font-size: 0.74rem;
    font-weight: 700;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.color-dot {
    display: inline-block;
    border-radius: 50%;
    border: 1.5px solid var(--wn-border-strong);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.color-dot:hover, .color-dot.active {
    transform: scale(1.2);
    border-color: var(--wn-primary);
    outline: 2px solid var(--wn-primary);
    outline-offset: 1px;
}

/* Filter Tabs / Pills */
.filter-tab {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-pill);
    color: var(--wn-text-secondary);
    background: transparent;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.18s ease;
    border: 1px solid transparent;
}

.filter-tab:hover {
    background: var(--wn-surface-subtle);
    color: var(--wn-text);
}

.filter-tab.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.16) 0%, rgba(139, 92, 246, 0.14) 100%);
    color: var(--wn-primary);
    font-weight: 700;
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   13. Reading Canvas & Editor (Zen Mode)
   -------------------------------------------------------------------------- */
.reading-canvas {
    max-width: 820px;
    margin-inline: auto;
    width: 100%;
}

.reading-article {
    background: var(--wn-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--wn-border);
    border-radius: var(--radius-xl);
    padding: 2.75rem 3rem;
    box-shadow: var(--shadow-md);
}

.note-body-content {
    font-size: 1.08rem;
    line-height: 1.85;
    color: var(--wn-text);
    word-break: break-word;
}

.note-body-content p {
    margin-bottom: 1.25rem;
}

.note-body-content img {
    max-width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--wn-border);
    box-shadow: var(--shadow-sm);
}

/* Interactive Checklists */
.note-body-content input[type="checkbox"] {
    width: 1.2em;
    height: 1.2em;
    margin-right: 0.55rem;
    vertical-align: -0.15em;
    border-radius: 6px;
    border: 1.5px solid var(--wn-border-strong);
    accent-color: var(--wn-primary);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.note-body-content input[type="checkbox"]:active {
    transform: scale(0.9);
}

.note-body-content li:has(input[type="checkbox"]:checked) {
    color: var(--wn-text-muted);
    text-decoration: line-through;
    transition: color 0.18s ease;
}

/* Editor Workspace */
.editor-workspace {
    background: var(--wn-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--wn-border);
    border-radius: var(--radius-xl);
    padding: 2.25rem;
    min-height: 620px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
}

.editor-title-input {
    font-size: 1.85rem;
    font-weight: 800;
    border: none;
    background: transparent;
    color: var(--wn-text);
    padding: 0.4rem 0;
    width: 100%;
    margin-bottom: 0.85rem;
    outline: none;
    letter-spacing: -0.03em;
}

.editor-title-input::placeholder {
    color: var(--wn-text-muted);
}

#editor-container {
    min-height: 400px;
    font-size: 1.05rem;
    border: none !important;
    background: transparent;
    color: var(--wn-text);
}

/* --------------------------------------------------------------------------
   Editor: Quill re-skinned to match the WebNote V4 surface / dark-mode system
   Quill's default "snow" theme ships hard-coded white panels for its
   dropdowns and tooltips, which is what breaks the look on dark/aurora
   backgrounds. Everything below re-points those pieces at our tokens.
   -------------------------------------------------------------------------- */
.ql-toolbar.ql-snow {
    position: sticky;
    top: 0.75rem;
    z-index: 20;
    border: 1px solid var(--wn-border) !important;
    border-radius: var(--radius-md);
    background: var(--wn-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
    padding: 8px 10px !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 4px;
}

.ql-toolbar.ql-snow .ql-formats {
    margin-right: 10px !important;
    padding-right: 10px;
    border-right: 1px solid var(--wn-border);
}
.ql-toolbar.ql-snow .ql-formats:last-child {
    border-right: none;
    margin-right: 0 !important;
    padding-right: 0;
}

.ql-toolbar.ql-snow button {
    border-radius: var(--radius-sm);
    transition: background-color 0.14s ease, color 0.14s ease;
}
.ql-toolbar.ql-snow button:hover {
    background: var(--wn-surface-hover);
}
.ql-toolbar.ql-snow button:hover .ql-stroke {
    stroke: var(--wn-primary) !important;
}
.ql-toolbar.ql-snow button:hover .ql-fill {
    fill: var(--wn-primary) !important;
}
.ql-toolbar.ql-snow button.ql-active {
    background: var(--wn-primary-subtle);
}
.ql-toolbar.ql-snow button.ql-active .ql-stroke {
    stroke: var(--wn-primary) !important;
}
.ql-toolbar.ql-snow button.ql-active .ql-fill {
    fill: var(--wn-primary) !important;
}

.ql-toolbar.ql-snow .ql-stroke {
    stroke: var(--wn-text-secondary) !important;
}
.ql-toolbar.ql-snow .ql-fill {
    fill: var(--wn-text-secondary) !important;
}
.ql-toolbar.ql-snow .ql-picker {
    color: var(--wn-text-secondary) !important;
}
.ql-toolbar.ql-snow .ql-picker-label {
    border-radius: var(--radius-sm);
}
.ql-toolbar.ql-snow .ql-picker-label:hover,
.ql-toolbar.ql-snow .ql-picker-label.ql-active {
    color: var(--wn-primary) !important;
}
.ql-toolbar.ql-snow .ql-picker-label:hover .ql-stroke,
.ql-toolbar.ql-snow .ql-picker-label.ql-active .ql-stroke {
    stroke: var(--wn-primary) !important;
}

/* Dropdown panels (header, font, size, align) — the biggest visual clash on dark mode */
.ql-snow .ql-picker-options {
    background: var(--wn-surface-elevated, var(--wn-surface));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--wn-border-strong) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg);
    padding: 4px;
}
.ql-snow .ql-picker-item {
    border-radius: var(--radius-sm);
    color: var(--wn-text-secondary);
}
.ql-snow .ql-picker-item:hover,
.ql-snow .ql-picker-item.ql-selected {
    color: var(--wn-primary) !important;
    background: var(--wn-primary-subtle);
}

/* Color / background swatch pickers */
.ql-snow .ql-picker.ql-color .ql-picker-options,
.ql-snow .ql-picker.ql-background .ql-picker-options {
    padding: 8px;
}
.ql-snow .ql-picker.ql-color .ql-picker-item,
.ql-snow .ql-picker.ql-background .ql-picker-item {
    border: 1px solid var(--wn-border);
}

/* Link / image "insert" tooltip popup that appears inline in the editor */
.ql-snow .ql-tooltip {
    background: var(--wn-surface-elevated, var(--wn-surface));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--wn-border-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    color: var(--wn-text);
    padding: 8px 12px;
}
.ql-snow .ql-tooltip input[type="text"] {
    background: var(--wn-surface-subtle);
    border: 1px solid var(--wn-border);
    border-radius: var(--radius-sm);
    color: var(--wn-text);
    outline: none;
}
.ql-snow .ql-tooltip a.ql-action,
.ql-snow .ql-tooltip a.ql-remove {
    color: var(--wn-primary);
}
.ql-snow .ql-tooltip::before {
    color: var(--wn-text-muted);
}

.ql-container.ql-snow {
    border: none !important;
}

.ql-editor {
    padding: 0.5rem 0 !important;
    font-family: var(--wn-font);
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--wn-text);
}
.ql-editor.ql-blank::before {
    color: var(--wn-text-muted);
    font-style: normal;
    left: 0;
    right: 0;
}
.ql-editor blockquote {
    border-left: 3px solid var(--wn-primary);
    background: var(--wn-primary-subtle);
    padding: 0.6rem 1rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--wn-text-secondary);
}
.ql-editor pre.ql-syntax,
.ql-editor code {
    background: var(--wn-surface-subtle);
    border: 1px solid var(--wn-border);
    border-radius: var(--radius-sm);
    color: var(--wn-text);
}
.ql-editor a { color: var(--wn-primary); }
.ql-editor ::selection { background: var(--wn-primary-glow); }
.ql-editor img { border-radius: var(--radius-md); max-width: 100%; }

/* Footer: live word count / reading time / autosave state */
.editor-status-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.75rem;
    margin-top: 0.25rem;
    border-top: 1px solid var(--wn-border);
    font-size: 0.8rem;
    color: var(--wn-text-muted);
}
.editor-status-bar .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--wn-text-muted);
    display: inline-block;
    margin-right: 5px;
    transition: background-color 0.2s ease;
}
.editor-status-bar .status-dot.is-saving {
    background: var(--wn-warning, #f59e0b);
    animation: wn-pulse 1s ease-in-out infinite;
}
.editor-status-bar .status-dot.is-saved {
    background: var(--wn-success, #10b981);
}
@keyframes wn-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* Zen Mode */
.zen-mode-active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    background: var(--aurora-bg) !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 3.5rem 22% !important;
    overflow-y: auto;
}

/* --------------------------------------------------------------------------
   14. Modals & Command Palette (Frosted Glass Elevation)
   -------------------------------------------------------------------------- */
.modal-backdrop.show {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background-color: rgba(8, 10, 20, 0.45);
}

.modal-content {
    background: var(--wn-surface);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid var(--wn-border-strong);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    color: var(--wn-text);
    overflow: hidden;
}

.modal-header, .modal-footer {
    border-color: var(--wn-border-subtle);
}

/* Command Palette Card */
.command-palette-card {
    background: var(--wn-surface);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid var(--wn-border-strong);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), var(--shadow-glow);
    overflow: hidden;
}

.command-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--wn-text);
    text-decoration: none;
    transition: all 0.15s ease;
}

.command-item:hover, .command-item.selected {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.16) 0%, rgba(139, 92, 246, 0.12) 100%);
    color: var(--wn-primary);
    transform: translateX(4px);
}

.kbd-badge {
    font-size: 0.72rem;
    font-weight: 650;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: var(--wn-surface-subtle);
    border: 1px solid var(--wn-border);
    color: var(--wn-text-muted);
}

/* Floating Bulk Action Bar */
#bulkActionBar {
    animation: slideUpBulk 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    background: var(--wn-surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--wn-border-strong);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2), var(--shadow-glow);
    border-radius: var(--radius-pill);
}

@keyframes slideUpBulk {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* --------------------------------------------------------------------------
   15. Widgets: Calendar & Mini Panels
   -------------------------------------------------------------------------- */
.mini-calendar-table {
    width: 100%;
    text-align: center;
    font-size: 0.82rem;
    border-collapse: separate;
    border-spacing: 4px;
}

.mini-calendar-table th {
    color: var(--wn-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.3rem 0;
}

.mini-calendar-table td {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    vertical-align: middle;
    color: var(--wn-text-secondary);
    transition: all 0.15s ease;
    cursor: default;
}

.mini-calendar-table td.today {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.mini-calendar-table td.has-notes {
    position: relative;
    font-weight: 700;
    color: var(--wn-primary);
}

.mini-calendar-table td.has-notes::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--wn-pink);
}

/* --------------------------------------------------------------------------
   16. Mobile Bottom Dock (<= 768px)
   -------------------------------------------------------------------------- */
.mobile-bottom-dock {
    display: none;
}

@media (max-width: 768px) {
    .mobile-bottom-dock {
        display: flex;
        align-items: center;
        justify-content: space-around;
        position: fixed;
        bottom: 12px;
        left: 12px;
        right: 12px;
        height: 64px;
        background: var(--wn-surface);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: 1px solid var(--wn-border-strong);
        border-radius: var(--radius-pill);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
        z-index: 1030;
        padding: 0 0.5rem;
    }

    .mobile-dock-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        color: var(--wn-text-muted);
        text-decoration: none;
        font-size: 0.72rem;
        font-weight: 600;
        padding: 0.35rem 0.6rem;
        border-radius: var(--radius-pill);
        transition: all 0.15s ease;
    }

    .mobile-dock-item i {
        font-size: 1.15rem;
    }

    .mobile-dock-item.active {
        color: var(--wn-primary);
    }

    .mobile-dock-fab {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 50%, #6366f1 100%);
        color: #ffffff !important;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.35rem;
        box-shadow: 0 4px 16px rgba(236, 72, 153, 0.45);
        transform: translateY(-8px);
        transition: all 0.2s ease;
        border: 2px solid var(--wn-surface-solid);
    }

    .mobile-dock-fab:active {
        transform: translateY(-6px) scale(0.95);
    }

    /* Padding bottom on page content so content is not blocked by bottom dock */
    .page-content {
        padding-bottom: 85px !important;
    }
}

/* --------------------------------------------------------------------------
   17. Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.show {
        transform: translateX(0);
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.35);
    }

    .app-main {
        margin-left: 0;
    }

    .page-content {
        padding: 1.25rem 1rem;
    }

    .dashboard-hero {
        padding: 1.75rem 1.5rem;
    }

    .hero-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 575.98px) {
    .search-input-wrapper {
        max-width: 100%;
    }

    .hero-stat-pills-row {
        gap: 0.5rem;
    }

    .hero-stat-pill {
        padding: 0.4rem 0.8rem;
        font-size: 0.78rem;
    }
}

/* --------------------------------------------------------------------------
   17.5. Admin Workspace V4 Styling (Elevated Control Center)
   -------------------------------------------------------------------------- */
.admin-brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ef4444 0%, #f43f5e 50%, #e11d48 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-brand-icon:hover {
    transform: scale(1.05) rotate(-3deg);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45);
}

.admin-hero {
    position: relative;
    border-radius: var(--radius-xl);
    padding: 2.25rem 2rem;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(139, 92, 246, 0.08) 50%, rgba(99, 102, 241, 0.07) 100%), var(--wn-surface);
    border: 1px solid rgba(239, 68, 68, 0.18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

[data-bs-theme="dark"] .admin-hero {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.14) 0%, rgba(139, 92, 246, 0.12) 50%, rgba(99, 102, 241, 0.10) 100%), var(--wn-surface);
    border-color: rgba(239, 68, 68, 0.25);
}

.admin-hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
    display: inline-block;
    position: relative;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background-color: rgba(16, 185, 129, 0.4);
    animation: pulseGlow 1.8s infinite ease-out;
}

@keyframes pulseGlow {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(2.2); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

/* Admin KPI Stat Card */
.admin-stat-card {
    border-radius: var(--radius-lg);
    background: var(--wn-surface);
    border: 1px solid var(--wn-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 1.35rem 1.25rem;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.admin-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--wn-border-strong);
}

.admin-stat-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.admin-stat-val {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: var(--wn-text);
}

.admin-stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wn-text-muted);
}

.admin-stat-pill {
    font-size: 0.73rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* Admin Filter Ribbon */
.admin-filter-ribbon {
    background: var(--wn-surface);
    border: 1px solid var(--wn-border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Admin Glass Table */
.admin-glass-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-glass-table thead th {
    background: var(--wn-surface-subtle);
    color: var(--wn-text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--wn-border);
    white-space: nowrap;
}

.admin-glass-table tbody tr {
    transition: background-color 0.15s ease;
}

.admin-glass-table tbody tr:hover {
    background-color: var(--wn-surface-hover);
}

.admin-glass-table tbody td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--wn-border-subtle);
    vertical-align: middle;
}

.admin-glass-table tbody tr:last-child td {
    border-bottom: none;
}

/* Admin User Initial Avatar */
.admin-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* Admin Timeline Log Item */
.admin-log-row {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--wn-border-subtle);
    transition: background-color 0.15s ease;
}

.admin-log-row:hover {
    background-color: var(--wn-surface-hover);
}

.admin-log-row:last-child {
    border-bottom: none;
}

/* Admin Avatar with Status Dot */
.admin-avatar-pro {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    position: relative;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.admin-avatar-pro:hover {
    transform: scale(1.05);
}

.avatar-status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--wn-surface-solid);
}

.avatar-status-dot.online {
    background-color: #10b981;
}

.avatar-status-dot.offline {
    background-color: #94a3b8;
}

/* Banned Row State */
.table-row-banned {
    opacity: 0.65;
}

.table-row-banned:hover {
    opacity: 0.85;
}

/* Selected Row State */
.admin-glass-table tbody tr.row-selected {
    background-color: var(--wn-primary-subtle);
}

/* Quick Action Buttons */
.user-quick-action {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.user-row:hover .user-quick-action {
    opacity: 1;
}

/* Admin Pagination */
.admin-page-link {
    border-radius: 8px !important;
    border: 1px solid var(--wn-border) !important;
    background: var(--wn-surface) !important;
    color: var(--wn-text-secondary) !important;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.35rem 0.65rem !important;
    transition: all 0.15s ease;
    min-width: 32px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-page-link:hover {
    background: var(--wn-surface-hover) !important;
    border-color: var(--wn-primary) !important;
    color: var(--wn-primary) !important;
    transform: translateY(-1px);
}

.page-item.active .admin-page-link {
    background: var(--wn-primary) !important;
    border-color: var(--wn-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.page-item.disabled .admin-page-link {
    opacity: 0.4;
    pointer-events: none;
}

/* Password Strength Bar */
.password-strength-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--wn-border);
    overflow: hidden;
}

.password-strength-bar .strength-fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* Print Styles for Export */
@media print {
    .app-sidebar,
    .app-topbar,
    .admin-filter-ribbon,
    .admin-hero,
    .modal,
    .user-quick-action,
    .dropdown,
    nav[aria-label],
    .btn {
        display: none !important;
    }

    .app-main {
        margin-left: 0 !important;
    }

    .admin-glass-table {
        font-size: 11px;
    }

    .admin-stat-card {
        border: 1px solid #ddd;
        break-inside: avoid;
    }
}

/* --------------------------------------------------------------------------
   18. Accessibility & Reduced Motion
   -------------------------------------------------------------------------- */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--wn-primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --------------------------------------------------------------------------
   19. Modern Pro Toast Notification System
   -------------------------------------------------------------------------- */
.toast-container-pro {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 1099;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: 380px;
    width: calc(100vw - 2.5rem);
    pointer-events: none;
}

.toast-pro {
    pointer-events: auto;
    background: var(--wn-surface);
    border: 1px solid var(--wn-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-pro-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
}

.toast-pro-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.toast-pro-icon.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.toast-pro-icon.danger, .toast-pro-icon.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.toast-pro-icon.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.toast-pro-icon.info, .toast-pro-icon.primary {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

.toast-pro-body {
    flex-grow: 1;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--wn-text);
}

.toast-pro-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(0, 0, 0, 0.06);
}

.toast-pro-progress-bar {
    height: 100%;
    width: 100%;
    animation: toastProgressBar linear forwards;
}

.toast-pro.success .toast-pro-progress-bar { background: #10b981; }
.toast-pro.danger .toast-pro-progress-bar, .toast-pro.error .toast-pro-progress-bar { background: #ef4444; }
.toast-pro.warning .toast-pro-progress-bar { background: #f59e0b; }
.toast-pro.info .toast-pro-progress-bar, .toast-pro.primary .toast-pro-progress-bar { background: #6366f1; }

@keyframes toastProgressBar {
    from { width: 100%; }
    to { width: 0%; }
}

