/* 
   ===== Telmi AI · Glassmorphism Design System ===== 
   Theme: Deep Space / Neon / Glass
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* --- Palette: Deep Space & Neon --- */
    --bg-deep: #050508;
    --bg-gradient-start: #0f0c29;
    --bg-gradient-mid: #302b63;
    --bg-gradient-end: #24243e;

    --primary: #8b5cf6;
    /* Violet */
    --primary-glow: #7c3aed;
    --secondary: #06b6d4;
    /* Cyan */
    --accent: #10b981;
    /* Emerald/Mint */

    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --text-faint: rgba(255, 255, 255, 0.4);

    /* --- Glass Effect --- */
    --glass-surface: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.15);
    --glass-blur: 16px;
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    /* --- Spacing & Radius --- */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 9999px;

    --header-height: 70px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    /* Modern, geometric sans */
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Animated Background Mesh */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 15% 50%, rgba(76, 29, 149, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.15) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

a {
    color: inherit;
    text-decoration: none;
    transition: 0.2s;
}

ul {
    list-style: none;
}

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

h1 {
    font-size: 2.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.25rem;
}

.text-gradient {
    /* Use strong primary/secondary colors for visibility */
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-muted {
    color: var(--text-muted);
}

.text-small {
    font-size: 0.875rem;
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Components: Cards (Glass) --- */
.glass-panel {
    background: var(--glass-surface);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--glass-shadow);
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Card Variants */
/* Card Variants */
.glass-card-note {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-color: rgba(139, 92, 246, 0.2);
}

.glass-card-calendar {
    /* Schedule: True Blue */
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-color: rgba(59, 130, 246, 0.2);
}

.glass-card-alert {
    /* Reminder: Deep Blue / Indigo - Distinct but Blue */
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(37, 99, 235, 0.05) 100%);
    border-color: rgba(37, 99, 235, 0.2);
    animation: PulseBorder 3s infinite;
}

@keyframes PulseBorder {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.2);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

/* --- Components: Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

/* Primary Button: Gradient Glow */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Ghost/Glass Button */
.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-main);
}

.btn-ghost-danger {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.btn-ghost-danger:hover {
    background: rgba(248, 113, 113, 0.2) !important;
    border-color: #f87171;
}

.btn-ghost-surface {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-ghost-surface:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* --- Components: Inputs --- */
.input-group {
    margin-bottom: 20px;
}

.label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: 0.2s;
}

.input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.input::placeholder {
    color: var(--text-faint);
}

/* --- Components: Badges & Pills (Comic Flag Style) --- */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 16px;
    border-radius: 4px;
    /* Soft square */
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transform: skewX(-12deg);
    /* Comic/Action Skew */
    border: 1px solid var(--glass-border);
    border-left-width: 4px;
    /* Flag Pole / Spine */
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
    /* Pop shadow */
    transition: transform 0.2s, box-shadow 0.2s;
}

.badge:hover {
    transform: skewX(-12deg) translateY(-2px);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.15);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
    border-left-color: #34d399;
    text-shadow: 0 0 10px rgba(52, 211, 153, 0.4);
}

.badge-warn {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
    border-left-color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

.badge-error {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
    border-left-color: #f87171;
    text-shadow: 0 0 10px rgba(248, 113, 113, 0.4);
}

/* --- Login Page Specifics --- */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(circle at center, rgba(48, 43, 99, 0.1) 0%, var(--bg-deep) 70%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-brand {
    margin-bottom: 30px;
    animation: float 6s ease-in-out infinite;
}

.login-logo {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.4));
}

.login-title {
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* --- Layout: App Shell --- */
.app-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.app-sidebar {
    width: 280px;
    background: rgba(0, 0, 0, 0.3);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 20px;
    flex-shrink: 0;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-sidebar.sidebar-collapsed {
    margin-left: -280px;
}

/* Floating Expand Button (Global) */
.floating-expand-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 44px;
    height: 44px;
    z-index: 9000;
    background: rgba(20, 20, 35, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-muted);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
}

.floating-expand-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    color: white;
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.app-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: none;
    background: transparent;
    pointer-events: none;
    /* Let clicks pass through transparent areas */
}

/* View Section Switching */
.view-section {
    display: none;
    flex: 1;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.view-section.active {
    display: flex;
}

/* Re-enable pointer events for children */
.app-header>* {
    pointer-events: auto;
}

/* Sidebar Nav */
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    margin-bottom: 2px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    transition: 0.2s;
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background: rgba(139, 92, 246, 0.15);
    color: var(--primary);
}

/* Chat Interface */
.chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Message Bubbles */
.bubble {
    padding: 12px 16px;
    padding-bottom: 22px;
    /* Space for timestamp */
    border-radius: 18px;
    max-width: 85%;
    width: fit-content;
    min-width: 85px;
    /* Ensure space for time+ticks */
    line-height: 1.5;
    font-size: 0.95rem;
    position: relative;
    /* For absolute timestamp */
    word-wrap: break-word;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bubble.user {
    background: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    margin-left: auto;
}

.bubble.assistant {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    margin-right: auto;
}

.bubble.system {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-left: 4px solid #f87171;
    text-shadow: 0 0 10px rgba(248, 113, 113, 0.3);
    font-size: 0.85rem;
    font-weight: 600;
    align-self: flex-start;
    width: fit-content;
    max-width: 90%;
    margin: 4px 0 8px 5px;
    text-align: left;
    border-radius: 4px;
    transform: skewX(-6deg);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
    font-family: 'Outfit', sans-serif;
}

.bubble-meta {
    font-size: 0.65rem;
    opacity: 0.6;
    position: absolute;
    top: 4px;
}

.bubble.user .bubble-meta {
    left: 10px;
    /* Name on top-left for user */
    display: none;
    /* Usually hide "ME" label to be clean */
}

.bubble.assistant .bubble-meta {
    right: 10px;
    /* Name on top-right for assistant */
    display: none;
    /* Clean look */
}

/* Timestamp: Opposite corner to bubble alignment */
.bubble-time {
    font-size: 0.65rem;
    opacity: 0.7;
    position: absolute;
    bottom: 4px;
}

.bubble.user .bubble-time {
    right: 12px;
    /* Swap to Right */
    left: auto;
    color: rgba(255, 255, 255, 0.9);
}

.bubble.assistant .bubble-time {
    left: 12px;
    /* Swap to Left */
    right: auto;
    color: var(--text-muted);
}

/* Date Divider */
.date-divider {
    display: flex;
    justify-content: center;
    margin: 16px 0;
    width: 100%;
    align-self: center;
}

.date-divider span {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Chat Input Bar */
.chat-input-wrapper {
    padding: 20px 24px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 14px;
    color: white;
    resize: none;
    max-height: 150px;
    transition: 0.2s;
}

.chat-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    outline: none;
}

/* Upsert Mode: Gradient Border/Glow */
.chat-input.upsert-mode {
    border-color: transparent;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), linear-gradient(135deg, var(--primary), var(--secondary));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.bubble.memory-success {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-left: 4px solid #34d399;
    /* Flag pole style */
    text-shadow: 0 0 10px rgba(52, 211, 153, 0.4);
    align-self: flex-start;
    text-align: left;
    max-width: 90%;
    font-size: 0.9rem;
    padding: 12px 20px;
    border-radius: 4px;
    /* Square off for flag look */
    transform: skewX(-5deg);
    /* Slight skew like the badge */
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 8px;
    /* Add spacing */
    margin-left: 5px;
    /* Offset for skew */
}

/* Utilities */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.4s ease;
}

.w-full {
    width: 100%;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Mobile Tweaks */
@media (max-width: 768px) {

    /* Lock body scroll to prevent "taller than screen" bounce */
    html,
    body {
        height: 100%;
        overflow: hidden;
        position: fixed;
        /* iOS Safari fix */
        width: 100%;
    }

    .app-shell {
        flex-direction: column;
        height: 100%;
        width: 100%;
    }

    /* Hide Side Nav */
    .app-sidebar {
        display: none;
    }

    /* Header visible on mobile for Group Context */
    .app-header {
        display: flex;
        height: 60px;
        padding: 0 16px;
        z-index: 1000;
        /* High Z-level */
        position: fixed;
        /* Always stick */
        top: 0;
        left: 0;
        right: 0;
        /* Add background to obscure scrolling content behind it */
        background: linear-gradient(to bottom, rgba(5, 5, 8, 0.9) 0%, rgba(5, 5, 8, 0) 100%);
        pointer-events: none;
        /* Let clicks pass, but children auto */
    }

    .app-header>* {
        pointer-events: auto;
    }

    /* Adjust Main Content for Bottom Nav & Header */
    .app-main {
        padding-top: 60px;
        /* Space for fixed header */
        padding-bottom: 80px;
        /* Space for bottom nav */
        height: 100%;
        width: 100%;
    }

    /* Mobile Bottom Nav */
    /* Mobile Bottom Nav */
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(70px + env(safe-area-inset-bottom));
        /* Height + Safe Area */
        min-height: 70px;
        background: rgba(5, 5, 8, 0.85);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--glass-border);
        justify-content: space-around;
        align-items: flex-start;
        /* Align top so padding pushes items up/center relative to 70px block if needed, or Center if padding handles it */
        align-items: center;
        padding-top: 0;
        padding-bottom: env(safe-area-inset-bottom);
        /* Push content up */
        z-index: 100;
        padding-left: 10px;
        padding-right: 10px;
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
    }

    .mobile-nav .nav-item {
        flex-direction: column;
        gap: 4px;
        padding: 8px;
        font-size: 0.7rem;
        background: transparent !important;
        /* Remove bg active style */
        color: var(--text-muted);
        opacity: 0.7;
    }

    .mobile-nav .nav-item.active {
        color: var(--primary);
        opacity: 1;
        transform: translateY(-2px);
    }

    .mobile-nav .nav-item i {
        font-size: 1.4rem;
        margin-bottom: 2px;
    }

    .bubble {
        max-width: 90%;
    }

    /* Adjust chat area */
    .chat-area {
        padding: 16px;
        /* Mask to fade out top 20% */
        mask-image: linear-gradient(to bottom, transparent 0%, black 20%);
        -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%);
    }

    .chat-input-wrapper {
        bottom: calc(70px + env(safe-area-inset-bottom));
        /* Lift above nav + safe area */
        padding: 12px;
    }

    /* Hide sidebar expand button on mobile */
    .floating-expand-btn {
        display: none !important;
    }
}

/* Desktop: Hide Mobile Nav */
@media (min-width: 769px) {
    .mobile-nav {
        display: none;
    }
}

/* Markdown Code Blocks */
.bubble pre {
    background: #282c34;
    /* Atom One Dark bg match */
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 10px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.bubble code {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9em;
}

/* Inline code strings */
.bubble p code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
    color: #e06c75;
}

/* Assistant Lists */
.bubble ul,
.bubble ol {
    margin-left: 20px;

    /* System Bubble Style (Neon Badge Look) */
    .bubble.system {
        background: rgba(255, 255, 255, 0.1);
        color: var(--text-muted);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-left: 4px solid rgba(255, 255, 255, 0.4);
        border-radius: 4px;
        font-size: 0.8rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        padding: 8px 16px;
        width: fit-content;
        margin-right: auto;
        margin-left: 10px;
        /* Offset for skew */
        margin-top: 8px;
        margin-bottom: 8px;
        transform: skewX(-12deg);
        box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    }

    .bubble.system .bubble-meta {
        display: none;
    }
}

/* --- Range Slider Gradient --- */
.input-range-gradient {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    outline: none;
    margin: 10px 0;
    transition: background 0.3s;
}

.input-range-gradient:hover {
    background: rgba(255, 255, 255, 0.15);
}

.input-range-gradient::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    border: 2px solid white;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: -6px;
    /* Center thumb on track if needed, usually auto for webkit unless track has height */
}

/* Firefox Support */
.input-range-gradient::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    border: 2px solid white;
}

/* --- Gradient Toggle Switch --- */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    /* Wider for pill shape */
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--glass-border);
    /* Muted off state */
    transition: .4s;
    border-radius: 34px;
}

.toggle-switch .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked+.slider {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

.toggle-switch input:focus+.slider {
    box-shadow: 0 0 1px var(--primary);
}

.toggle-switch input:checked+.slider:before {
    transform: translateX(24px);
}

.glass-card-task {
    /* No border-left */
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(14, 165, 233, 0.15) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Badge Counter --- */
.nav-item {
    position: relative;
    /* For badge positioning */
}

.badge-counter {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff3b30;
    /* iOS Red */
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 4px;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 10;
}