:root {
    --bg0: #0f110e;
    --bg1: #151812;
    --bg2: #1a1e17;
    --bg3: #20261c;
    --bg4: #272f22;
    --surface: rgba(255, 255, 255, 0.04);
    --surface2: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.07);
    --border2: rgba(255, 255, 255, 0.12);
    --accent: #5a9e7c;
    --accent2: #d4955a;
    --accent-glow: rgba(90, 158, 124, 0.18);
    --ok: #6ab187;
    --warn: #d4955a;
    --err: #c0635a;
    --info: #5a9e7c;
    --text1: #e8ede4;
    --text2: #8fa898;
    --text3: #556659;
    --text4: #344038;
    --radius: 14px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --sidebar-w: 230px;
    --header-h: 56px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
    --glow: 0 0 16px var(--accent-glow);
    --font-head: 'Bricolage Grotesque', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'Fira Code', monospace;
}

body.light {
    --bg0: #f5f2ec;
    --bg1: #ede9e0;
    --bg2: #e4dfd3;
    --bg3: #d8d1c4;
    --bg4: #ccc4b5;
    --surface: rgba(255, 255, 255, 0.6);
    --surface2: rgba(255, 255, 255, 0.85);
    --border: rgba(0, 0, 0, 0.07);
    --border2: rgba(0, 0, 0, 0.12);
    --text1: #1a2018;
    --text2: #3a4e38;
    --text3: #627258;
    --text4: #8a9e84;
    --accent-glow: rgba(90, 158, 124, 0.14);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg0);
    color: var(--text1);
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.5;
    transition: background 0.3s, color 0.3s;
    overflow: hidden;
}


/* ═══════════════════════════════════════════════════
   BACKGROUND MESH
═══════════════════════════════════════════════════ */

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse 700px 500px at 10% 20%, rgba(90, 158, 124, 0.06) 0%, transparent 60%), radial-gradient(ellipse 500px 400px at 90% 80%, rgba(212, 149, 90, 0.04) 0%, transparent 60%), radial-gradient(ellipse 400px 300px at 60% 10%, rgba(192, 99, 90, 0.025) 0%, transparent 60%), repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(255, 255, 255, 0.01) 40px), repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(255, 255, 255, 0.01) 40px);
    pointer-events: none;
    z-index: 0;
}

body.light::before {
    background: radial-gradient(ellipse 700px 500px at 10% 20%, rgba(90, 158, 124, 0.05) 0%, transparent 60%), radial-gradient(ellipse 500px 400px at 90% 80%, rgba(212, 149, 90, 0.04) 0%, transparent 60%);
}


/* ═══════════════════════════════════════════════════
   LANDING SCREEN  — REDESIGNED
═══════════════════════════════════════════════════ */

#landing {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg0);
    overflow: hidden;
    transition: opacity 0.46s cubic-bezier(0.4, 0, 0.2, 1), transform 0.46s cubic-bezier(0.4, 0, 0.2, 1);
}

#landing.out {
    opacity: 0;
    transform: scale(1.04);
    pointer-events: none;
}


/* ── Animated background orbs ── */

.land-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    animation: orbFloat 8s ease-in-out infinite;
}

.land-orb-1 {
    width: 600px;
    height: 600px;
    top: -200px;
    left: -150px;
    background: radial-gradient(circle, rgba(90, 158, 124, 0.12) 0%, transparent 70%);
    animation-duration: 10s;
}

.land-orb-2 {
    width: 500px;
    height: 500px;
    bottom: -180px;
    right: -100px;
    background: radial-gradient(circle, rgba(212, 149, 90, 0.09) 0%, transparent 70%);
    animation-duration: 12s;
    animation-delay: -4s;
}

.land-orb-3 {
    width: 350px;
    height: 350px;
    top: 40%;
    left: 55%;
    background: radial-gradient(circle, rgba(106, 177, 135, 0.07) 0%, transparent 70%);
    animation-duration: 9s;
    animation-delay: -2s;
}

@keyframes orbFloat {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(20px, -30px) scale(1.05);
    }
    66% {
        transform: translate(-15px, 20px) scale(0.97);
    }
}


/* ── Grid overlay ── */

.land-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
    pointer-events: none;
}


/* ── Floating tab preview chips ── */

.land-tab-preview {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 10px;
    padding: 8px 14px;
    backdrop-filter: blur(12px);
    pointer-events: none;
    animation: chipFloat 0.8s cubic-bezier(0.4, 0, 0.2, 1) both, chipBob 6s ease-in-out infinite;
}

.ltp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    opacity: 0.8;
}

.ltp-url {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text3);
    letter-spacing: 0.3px;
}

.land-tp-1 {
    top: 18%;
    left: 7%;
    animation-delay: 0.5s, 0s;
    animation-duration: 0.8s, 7s;
}

.land-tp-2 {
    top: 28%;
    right: 7%;
    animation-delay: 0.7s, 0s;
    animation-duration: 0.8s, 8s;
}

.land-tp-3 {
    bottom: 22%;
    left: 6%;
    animation-delay: 0.9s, 0s;
    animation-duration: 0.8s, 6.5s;
}

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

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


/* ── Main content ── */

.land-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-align: center;
    padding: 0 24px;
}


/* Eyebrow */

.land-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(90, 158, 124, 0.08);
    border: 1px solid rgba(90, 158, 124, 0.22);
    padding: 6px 16px;
    border-radius: 40px;
    margin-bottom: 32px;
    animation: fadeSlideUp 0.6s 0.05s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.land-eyebrow-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent);
    animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 6px var(--accent);
    }
    50% {
        opacity: 0.5;
        box-shadow: 0 0 12px var(--accent);
    }
}


/* Logo */

.land-logo {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
    animation: fadeSlideUp 0.7s 0.12s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.land-logo-icon {
    width: 72px;
    height: 72px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(90, 158, 124, 0.22) 0%, rgba(90, 158, 124, 0.06) 100%);
    border: 1.5px solid rgba(90, 158, 124, 0.4);
    border-radius: 22px;
    font-size: 30px;
    color: var(--accent);
    box-shadow: 0 0 0 8px rgba(90, 158, 124, 0.05), 0 8px 32px rgba(90, 158, 124, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: iconPulse 3s ease-in-out infinite;
    flex-shrink: 0;
}

.land-logo-ring {
    position: absolute;
    inset: -6px;
    border: 1px solid rgba(90, 158, 124, 0.15);
    border-radius: 28px;
    animation: ringPulse 3s ease-in-out infinite;
}

@keyframes ringPulse {
    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 0.2;
        transform: scale(1.06);
    }
}

@keyframes iconPulse {
    0%,
    100% {
        box-shadow: 0 0 0 8px rgba(90, 158, 124, 0.05), 0 8px 32px rgba(90, 158, 124, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(90, 158, 124, 0.04), 0 8px 40px rgba(90, 158, 124, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
}

.land-logo-text {
    font-family: var(--font-head);
    font-size: 64px;
    font-weight: 800;
    letter-spacing: -3px;
    line-height: 1;
    background: linear-gradient(135deg, #e8ede4 0%, #a8d4bc 50%, #5a9e7c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* Headline */

.land-headline {
    font-family: var(--font-head);
    font-size: 22px;
    font-weight: 500;
    color: var(--text2);
    line-height: 1.5;
    letter-spacing: -0.3px;
    margin-bottom: 36px;
    animation: fadeSlideUp 0.7s 0.2s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.land-headline-accent {
    font-weight: 700;
    background: linear-gradient(90deg, var(--text1) 0%, #9ecfb4 70%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* Pills row */

.land-pills {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 40px;
    padding: 6px 4px;
    margin-bottom: 40px;
    animation: fadeSlideUp 0.7s 0.28s cubic-bezier(0.4, 0, 0.2, 1) both;
    backdrop-filter: blur(8px);
}

.land-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 18px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text2);
    transition: color 0.2s;
}

.land-pill:hover {
    color: var(--text1);
}

.land-pill i {
    font-size: 12px;
    color: var(--accent);
}

.land-pill-sep {
    width: 1px;
    height: 16px;
    background: var(--border2);
    flex-shrink: 0;
}


/* CTAs */

.land-ctas {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 32px;
    animation: fadeSlideUp 0.7s 0.36s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.land-cta-primary {
    padding: 13px 30px !important;
    font-size: 15px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    letter-spacing: -0.2px;
    box-shadow: 0 4px 20px rgba(90, 158, 124, 0.4), 0 0 0 1px rgba(90, 158, 124, 0.5) !important;
}

.land-cta-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 28px rgba(90, 158, 124, 0.5), 0 0 0 1px rgba(90, 158, 124, 0.6) !important;
}

.land-cta-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 24px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--text2);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: -0.1px;
}

.land-cta-ghost:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text1);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.land-ghost-arrow {
    font-size: 10px;
    color: var(--text4);
    transition: transform 0.2s;
}

.land-cta-ghost:hover .land-ghost-arrow {
    transform: translateX(3px);
    color: var(--text2);
}


/* Trust line */

.land-trust {
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeSlideUp 0.7s 0.44s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.land-trust-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.4px;
    color: var(--text4);
}

.land-trust-item i {
    font-size: 9px;
    color: var(--text4);
}

.land-trust-dot {
    color: var(--text4);
    font-size: 12px;
    opacity: 0.4;
}

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


/* Light mode adjustments */

body.light .land-grid {
    background-image: linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}

body.light .land-tab-preview {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.08);
}

body.light .land-pills {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.08);
}

body.light .land-cta-ghost {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text2);
}

body.light .land-cta-ghost:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text1);
}


/* Responsive */

@media (max-width: 600px) {
    .land-logo-text {
        font-size: 44px;
        letter-spacing: -2px;
    }
    .land-logo-icon {
        width: 54px;
        height: 54px;
        font-size: 22px;
        border-radius: 16px;
    }
    .land-headline {
        font-size: 17px;
    }
    .land-pills {
        flex-wrap: wrap;
        border-radius: 16px;
        padding: 8px;
        gap: 4px;
    }
    .land-pill-sep {
        display: none;
    }
    .land-pill {
        padding: 5px 12px;
        font-size: 12px;
    }
    .land-ctas {
        flex-direction: column;
        width: 100%;
    }
    .land-cta-primary,
    .land-cta-ghost {
        width: 100%;
        justify-content: center;
    }
    .land-trust {
        flex-direction: column;
        gap: 6px;
    }
    .land-trust-dot {
        display: none;
    }
    .land-tp-1,
    .land-tp-2,
    .land-tp-3 {
        display: none;
    }
}


/* ═══════════════════════════════════════════════════
   HOMEPAGE CONTENT  (features + guide shown before app)
   NEW: #landing-content replaces the #landing screen
        once "Learn More" is clicked, and remains until
        the user hits "Open Vault".
═══════════════════════════════════════════════════ */

#landing-content {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: var(--bg0);
    overflow-y: auto;
    animation: fadeSlideUp 0.45s cubic-bezier(0.4, 0, 0.2, 1) both;
}

#landing-content.show {
    display: block;
}

.lc-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px 0;
    max-width: 1000px;
    margin: 0 auto;
}

.lc-logo {
    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(120deg, var(--text1) 0%, #9ecfb4 60%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.lc-logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: rgba(90, 158, 124, 0.15);
    border: 1px solid rgba(90, 158, 124, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    -webkit-text-fill-color: initial;
}

.lc-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}


/* ── Features Section ── */

.features-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 44px 32px 40px;
}

.features-heading {
    font-family: var(--font-head);
    font-size: 28px;
    font-weight: 700;
    color: var(--text1);
    letter-spacing: -0.5px;
    text-align: center;
    margin-bottom: 8px;
}

.features-sub {
    font-size: 14px;
    color: var(--text3);
    text-align: center;
    margin-bottom: 36px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.feature-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.2s, transform 0.22s;
}

.feature-card:hover {
    border-color: rgba(90, 158, 124, 0.3);
    transform: translateY(-3px);
}

.feature-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(90, 158, 124, 0.1);
    border: 1px solid rgba(90, 158, 124, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    color: var(--accent);
}

.feature-card-title {
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 600;
    color: var(--text1);
}

.feature-card-desc {
    font-size: 12px;
    color: var(--text3);
    line-height: 1.7;
}


/* ── Section Divider ── */

.section-divider {
    height: 1px;
    background: var(--border);
    max-width: 1000px;
    margin: 0 32px 44px;
}


/* ── Guide Section ── */

.guide-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 32px 64px;
}

.guide-heading {
    font-family: var(--font-head);
    font-size: 28px;
    font-weight: 700;
    color: var(--text1);
    letter-spacing: -0.5px;
    text-align: center;
    margin-bottom: 8px;
}

.guide-sub {
    font-size: 14px;
    color: var(--text3);
    text-align: center;
    margin-bottom: 40px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    max-width: 680px;
    margin: 0 auto;
}


/* Vertical connector */

.guide-steps::before {
    content: '';
    position: absolute;
    left: 21px;
    top: 44px;
    bottom: 44px;
    width: 2px;
    background: linear-gradient(to bottom, rgba(90, 158, 124, 0.6), rgba(90, 158, 124, 0.08));
    border-radius: 2px;
}

.guide-step {
    display: flex;
    gap: 20px;
    padding: 18px 18px 18px 0;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: background 0.15s;
    border-radius: var(--radius);
}

.guide-step:hover {
    background: var(--surface);
}

.guide-step-num {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--bg3);
    border: 2px solid var(--border2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--text3);
    transition: all 0.25s;
    margin-left: 0;
}

.guide-step.active .guide-step-num,
.guide-step:hover .guide-step-num {
    background: rgba(90, 158, 124, 0.14);
    border-color: var(--accent);
    color: var(--accent);
}

.guide-step-content {
    flex: 1;
    padding-top: 10px;
}

.guide-step-title {
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 600;
    color: var(--text1);
    margin-bottom: 4px;
}

.guide-step-body {
    font-size: 13px;
    color: var(--text3);
    line-height: 1.7;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s;
    opacity: 0;
}

.guide-step.active .guide-step-body {
    max-height: 300px;
    opacity: 1;
}

.guide-step-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(90, 158, 124, 0.1);
    border: 1px solid rgba(90, 158, 124, 0.2);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 3px 9px;
    border-radius: 20px;
    margin-top: 8px;
}

.guide-cta {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 12px;
}


/* ═══════════════════════════════════════════════════
   MAIN APP SHELL
═══════════════════════════════════════════════════ */

#app {
    display: none;
    height: 100vh;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

#app.show {
    display: flex;
    flex-direction: column;
    animation: appReveal 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

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


/* ═══════════════════════════════════════════════════
   TOP HEADER BAR
═══════════════════════════════════════════════════ */

.top-bar {
    height: var(--header-h);
    display: flex;
    align-items: center;
    padding: 0 18px;
    gap: 12px;
    background: rgba(13, 16, 12, 0.88);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    position: relative;
    z-index: 100;
}

body.light .top-bar {
    background: rgba(237, 233, 224, 0.88);
}

.top-logo {
    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(120deg, var(--text1) 0%, #9ecfb4 60%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-logo-icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(90, 158, 124, 0.22), rgba(212, 149, 90, 0.12));
    border: 1px solid rgba(90, 158, 124, 0.3);
    border-radius: 7px;
    font-size: 12px;
    flex-shrink: 0;
    -webkit-text-fill-color: initial;
}

.top-logo:hover {
    opacity: 0.8;
}

.top-divider {
    width: 1px;
    height: 22px;
    background: var(--border2);
}

.top-tabs {
    display: flex;
    gap: 4px;
    align-items: center;
}

.top-tab {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--text3);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: all 0.18s;
    letter-spacing: 0.1px;
    position: relative;
}

.top-tab:hover {
    color: var(--text1);
    background: var(--surface);
}

.top-tab.active {
    color: var(--text1);
    background: var(--surface2);
}

.top-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 14px;
    right: 14px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.top-spacer {
    flex: 1;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text2);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.18s;
}

.icon-btn:hover {
    background: var(--surface2);
    color: var(--text1);
    border-color: var(--border2);
}


/* ═══════════════════════════════════════════════════
   APP BODY / SIDEBAR
═══════════════════════════════════════════════════ */

.app-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: rgba(10, 13, 9, 0.72);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    overflow-x: hidden;
}

body.light .sidebar {
    background: rgba(210, 203, 191, 0.72);
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border2);
    border-radius: 4px;
}

.sb-section {
    padding: 16px 14px 8px;
}

.sb-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text4);
    margin-bottom: 6px;
    padding-left: 8px;
}

.sb-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text2);
    font-size: 13px;
    font-weight: 400;
    transition: all 0.15s;
    position: relative;
}

.sb-item i {
    font-size: 13px;
    width: 16px;
    text-align: center;
    color: var(--text3);
    transition: color 0.15s;
}

.sb-item:hover {
    background: var(--surface);
    color: var(--text1);
}

.sb-item:hover i {
    color: var(--accent);
}

.sb-item.active {
    background: rgba(90, 158, 124, 0.09);
    color: var(--text1);
}

.sb-item.active i {
    color: var(--accent);
}

.sb-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--accent);
    border-radius: 0 2px 2px 0;
}

.sb-badge {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 10px;
    background: var(--bg3);
    color: var(--text3);
    padding: 1px 7px;
    border-radius: 20px;
    min-width: 22px;
    text-align: center;
}

.sb-item.active .sb-badge {
    background: rgba(90, 158, 124, 0.15);
    color: var(--accent);
}

.sb-sep {
    height: 1px;
    background: var(--border);
    margin: 8px 14px;
}

.sb-recent-list {
    padding: 0 8px 8px;
}

.sb-sess-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
    overflow: hidden;
}

.sb-sess-item:hover {
    background: var(--surface);
}

.sb-sess-icon {
    font-size: 12px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    background: rgba(90, 158, 124, 0.1);
    color: var(--accent);
    flex-shrink: 0;
}

.sb-sess-name {
    font-size: 12px;
    color: var(--text2);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sb-sess-cnt {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text4);
    flex-shrink: 0;
}

.sb-sync {
    padding: 12px 18px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text4);
    border-top: 1px solid var(--border);
    margin-top: auto;
}


/* ═══════════════════════════════════════════════════
   MAIN CONTENT AREA
═══════════════════════════════════════════════════ */

.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 0;
}

.main-content::-webkit-scrollbar {
    width: 5px;
}

.main-content::-webkit-scrollbar-track {
    background: transparent;
}

.main-content::-webkit-scrollbar-thumb {
    background: var(--border2);
    border-radius: 4px;
}


/* ═══════════════════════════════════════════════════
   VIEW PANELS
═══════════════════════════════════════════════════ */

.view {
    display: none;
    padding: 24px 24px 40px;
    animation: viewIn 0.25s ease both;
}

.view.active {
    display: block;
}

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

.view-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.view-title {
    font-family: var(--font-head);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text1);
}

.view-count {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text3);
    background: var(--bg3);
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.view-spacer {
    flex: 1;
}

.search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-wrap i {
    position: absolute;
    left: 11px;
    color: var(--text3);
    font-size: 12px;
    pointer-events: none;
}

.search-input {
    font-family: var(--font-body);
    font-size: 13px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text1);
    padding: 7px 12px 7px 32px;
    outline: none;
    width: 200px;
    transition: all 0.2s;
}

.search-input::placeholder {
    color: var(--text4);
}

.search-input:focus {
    border-color: var(--accent);
    background: var(--surface2);
    box-shadow: 0 0 0 3px rgba(90, 158, 124, 0.1);
    width: 240px;
}


/* ═══════════════════════════════════════════════════
   SESSION CARDS GRID
═══════════════════════════════════════════════════ */

.lib-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.sc {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    animation: cardIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

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

.sc::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cc, var(--accent)), transparent);
    opacity: 0.6;
    transition: opacity 0.2s;
}

.sc:hover {
    transform: translateY(-3px);
    border-color: var(--border2);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(90, 158, 124, 0.1);
}

.sc:hover::before {
    opacity: 1;
}

.sc.archived {
    opacity: 0.72;
}

.sc.archived:hover {
    opacity: 1;
}

.sc-body {
    padding: 16px 16px 12px;
    flex: 1;
}

.sc-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 11px;
}

.sc-icon-wrap {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(90, 158, 124, 0.1);
    border: 1px solid rgba(90, 158, 124, 0.18);
    color: var(--accent);
    font-size: 17px;
    transition: all 0.15s;
}

.sc:hover .sc-icon-wrap {
    background: rgba(90, 158, 124, 0.16);
}

.sc-acts {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.18s;
}

.sc:hover .sc-acts {
    opacity: 1;
}

.sca {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text3);
    cursor: pointer;
    font-size: 11px;
    transition: all 0.15s;
}

.sca:hover {
    background: var(--bg4);
    color: var(--text1);
    border-color: var(--border2);
}

.sca.arc:hover {
    color: var(--warn);
    border-color: rgba(212, 149, 90, 0.3);
    background: rgba(212, 149, 90, 0.08);
}

.sca.shr:hover {
    color: #5aab7c;
    border-color: rgba(90, 171, 124, 0.3);
    background: rgba(90, 171, 124, 0.08);
}

.sca.del:hover {
    color: var(--err);
    border-color: rgba(192, 99, 90, 0.3);
    background: rgba(192, 99, 90, 0.08);
}

.sc-name {
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 600;
    color: var(--text1);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
}

.sc-meta {
    font-size: 11px;
    color: var(--text3);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 12px;
}

.sc-meta i {
    font-size: 10px;
}

.sc-favs {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.sc-fav {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: var(--bg3);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sc-fav img {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

.sc-fav-more {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text3);
    padding: 0 7px;
    height: 22px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 5px;
    display: flex;
    align-items: center;
}

.sc-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.sc-grp-pill {
    font-size: 10px;
    font-weight: 500;
    padding: 3px 9px;
    border-radius: 20px;
    border: 1px solid;
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sc-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.1);
}

body.light .sc-footer {
    background: rgba(0, 0, 0, 0.03);
}

.sc-footer-meta {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text4);
    letter-spacing: 0.3px;
}

.sc-restore {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    background: rgba(90, 158, 124, 0.1);
    border: 1px solid rgba(90, 158, 124, 0.22);
    color: var(--accent);
    padding: 5px 12px;
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s;
}

.sc-restore:hover {
    background: rgba(90, 158, 124, 0.18);
    border-color: var(--accent);
}

.sc-restore i {
    font-size: 10px;
}

.new-sc {
    border: 1.5px dashed var(--border2);
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    min-height: 180px;
}

.new-sc::before {
    display: none;
}

.new-sc:hover {
    border-color: var(--accent);
    background: rgba(90, 158, 124, 0.04);
    transform: translateY(-2px);
}

.new-plus {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(90, 158, 124, 0.1);
    border: 1px solid rgba(90, 158, 124, 0.22);
    color: var(--accent);
    font-size: 18px;
    transition: all 0.2s;
}

.new-sc:hover .new-plus {
    background: rgba(90, 158, 124, 0.18);
    transform: scale(1.08);
}

.new-label {
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 600;
    color: var(--text2);
}

.new-sub {
    font-size: 12px;
    color: var(--text4);
    text-align: center;
}

.empty-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 80px 20px;
    color: var(--text4);
    text-align: center;
}

.empty-view i {
    font-size: 36px;
    color: var(--text4);
    margin-bottom: 4px;
}

.empty-view h3 {
    font-family: var(--font-head);
    font-size: 17px;
    font-weight: 600;
    color: var(--text3);
}

.empty-view p {
    font-size: 13px;
    max-width: 300px;
    line-height: 1.6;
}


/* ═══════════════════════════════════════════════════
   SORT & TOOLBAR
═══════════════════════════════════════════════════ */

.lib-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.btn-sort {
    font-family: var(--font-mono);
    font-size: 11px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text2);
    padding: 6px 13px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}

.btn-sort:hover {
    background: var(--surface2);
    border-color: var(--border2);
    color: var(--text1);
}


/* ═══════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════ */

.btn {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    padding: 9px 20px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.18s;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.btn-p {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 10px rgba(90, 158, 124, 0.28);
    position: relative;
    overflow: hidden;
}

.btn-p::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
    transform: skewX(-20deg);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    60%,
    100% {
        left: 150%;
    }
}

.btn-p:hover {
    background: #4e8c6c;
    box-shadow: 0 4px 16px rgba(90, 158, 124, 0.38);
    transform: translateY(-1px);
}

.btn-s {
    background: var(--surface);
    border: 1px solid var(--border2);
    color: var(--text2);
}

.btn-s:hover {
    background: var(--surface2);
    color: var(--text1);
}

.btn-d {
    background: rgba(192, 99, 90, 0.1);
    border: 1px solid rgba(192, 99, 90, 0.25);
    color: var(--err);
}

.btn-d:hover {
    background: rgba(192, 99, 90, 0.18);
    border-color: var(--err);
}


/* ═══════════════════════════════════════════════════
   MODALS
═══════════════════════════════════════════════════ */

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop.open {
    display: flex;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal {
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.28s cubic-bezier(0.34, 1.3, 0.64, 1) both;
    overflow: hidden;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.93) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 22px 24px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.modal-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(90, 158, 124, 0.1);
    border: 1px solid rgba(90, 158, 124, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 16px;
    flex-shrink: 0;
}

.modal-title {
    font-family: var(--font-head);
    font-size: 17px;
    font-weight: 700;
    color: var(--text1);
    letter-spacing: -0.2px;
    margin-bottom: 2px;
}

.modal-desc {
    font-size: 12px;
    color: var(--text3);
}

.modal-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.field-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text3);
    margin-bottom: 6px;
    display: block;
}

.field-input {
    font-family: var(--font-body);
    font-size: 13px;
    width: 100%;
    background: var(--bg1);
    border: 1px solid var(--border2);
    border-radius: var(--radius-sm);
    color: var(--text1);
    padding: 9px 12px;
    outline: none;
    transition: all 0.18s;
    resize: vertical;
}

.field-input::placeholder {
    color: var(--text4);
}

.field-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(90, 158, 124, 0.1);
}

.field-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.field-textarea {
    min-height: 110px;
    font-size: 12px;
    font-family: var(--font-mono);
    line-height: 1.7;
}

.icon-row-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.icon-opt {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    border-radius: 8px;
    border: 1.5px solid transparent;
    cursor: pointer;
    background: var(--bg3);
    color: var(--text2);
    transition: all 0.15s;
}

.icon-opt:hover {
    background: var(--bg4);
    color: var(--text1);
    transform: scale(1.1);
}

.icon-opt.on {
    border-color: var(--accent);
    background: rgba(90, 158, 124, 0.1);
    color: var(--accent);
}


/* ═══════════════════════════════════════════════════
   DETAIL PANEL (right drawer)
═══════════════════════════════════════════════════ */

.detail-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 480px;
    background: var(--bg1);
    border-left: 1px solid var(--border);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.28);
}

.detail-panel.open {
    transform: translateX(0);
}

.dp-header {
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--bg2);
}

.dp-header-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

#dp-icon {
    font-size: 22px;
    flex-shrink: 0;
    margin-top: 2px;
}

.dp-title-wrap {
    flex: 1;
    min-width: 0;
}

#dp-name {
    font-family: var(--font-head);
    font-size: 17px;
    font-weight: 700;
    color: var(--text1);
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#dp-meta {
    font-size: 11px;
    color: var(--text3);
    margin-top: 3px;
    font-family: var(--font-mono);
}

.dp-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text3);
    cursor: pointer;
    font-size: 12px;
    flex-shrink: 0;
    transition: all 0.15s;
}

.dp-close:hover {
    background: var(--bg4);
    color: var(--text1);
}

.dp-header-acts {
    display: flex;
    gap: 8px;
}

#dp-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

#dp-body::-webkit-scrollbar {
    width: 4px;
}

#dp-body::-webkit-scrollbar-track {
    background: transparent;
}

#dp-body::-webkit-scrollbar-thumb {
    background: var(--border2);
    border-radius: 4px;
}

.dp-group {
    border-bottom: 1px solid var(--border);
}

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

.dp-grp-hd {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 10px;
    cursor: pointer;
    transition: background 0.12s;
}

.dp-grp-hd:hover {
    background: var(--surface);
}

.dp-grp-name {
    font-family: var(--font-head);
    font-size: 13px;
    font-weight: 600;
    color: var(--text1);
    flex: 1;
}

.dp-grp-cnt {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text3);
    background: var(--bg3);
    padding: 2px 8px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.dp-grp-acts {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s;
}

.dp-grp-hd:hover .dp-grp-acts {
    opacity: 1;
}

.dp-gact {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 5px;
    cursor: pointer;
    font-size: 10px;
    color: var(--text3);
    transition: all 0.15s;
}

.dp-gact:hover {
    background: var(--bg4);
    color: var(--text1);
}

.dp-gact.del:hover {
    background: rgba(192, 99, 90, 0.1);
    color: var(--err);
    border-color: rgba(192, 99, 90, 0.3);
}

.dp-grp-chevron {
    font-size: 10px;
    color: var(--text4);
    transition: transform 0.2s;
}

.dp-group.collapsed .dp-grp-chevron {
    transform: rotate(-90deg);
}

.dp-group.collapsed .dp-grp-body {
    display: none;
}

.dp-subgrp-hd {
    padding: 8px 14px 6px 24px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text4);
    display: flex;
    align-items: center;
    gap: 6px;
}

.dp-subgrp-hd i {
    font-size: 9px;
}

.dp-tab-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: background 0.12s;
}

.dp-tab-row:last-child {
    border-bottom: none;
}

.dp-tab-row:hover {
    background: var(--surface);
}

.dp-tab-fav {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    flex-shrink: 0;
    object-fit: contain;
}

.dp-tab-fb {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: var(--bg3);
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--text4);
    font-size: 9px;
    flex-shrink: 0;
}

.dp-tab-info {
    flex: 1;
    min-width: 0;
}

.dp-tab-title {
    font-size: 12px;
    color: var(--text1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 400;
}

.dp-tab-url {
    font-size: 10px;
    color: var(--text3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--font-mono);
}

.dp-tab-acts {
    display: flex;
    gap: 4px;
    opacity: 0;
    flex-shrink: 0;
    transition: opacity 0.15s;
}

.dp-tab-row:hover .dp-tab-acts {
    opacity: 1;
}

.dp-tact {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 5px;
    cursor: pointer;
    font-size: 10px;
    color: var(--text3);
    transition: all 0.15s;
}

.dp-tact:hover {
    background: var(--bg4);
    color: var(--text1);
}

.dp-tact.del:hover {
    background: rgba(192, 99, 90, 0.1);
    color: var(--err);
    border-color: rgba(192, 99, 90, 0.3);
}


/* ═══════════════════════════════════════════════════
   DUP MODAL / CONFIRM
═══════════════════════════════════════════════════ */

.dup-opts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dup-opt {
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg3);
    cursor: pointer;
    transition: all 0.15s;
}

.dup-opt:hover {
    border-color: var(--accent);
    background: rgba(90, 158, 124, 0.06);
    transform: translateX(3px);
}

.dup-opt-t {
    font-size: 13px;
    font-weight: 500;
    color: var(--text1);
    margin-bottom: 2px;
}

.dup-opt-d {
    font-size: 11px;
    color: var(--text3);
}

.conf-body {
    padding: 20px 24px;
}

.conf-body p {
    font-size: 13px;
    color: var(--text3);
    margin-top: 6px;
    line-height: 1.6;
}

#conf-t {
    font-family: var(--font-head);
    font-size: 17px;
    font-weight: 700;
    color: var(--text1);
}


/* ═══════════════════════════════════════════════════
   POPUP GUIDE MODAL
═══════════════════════════════════════════════════ */

.popup-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.popup-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg3);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.step-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(90, 158, 124, 0.12);
    border: 1px solid rgba(90, 158, 124, 0.25);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-text {
    font-size: 12px;
    color: var(--text2);
    line-height: 1.5;
}

.step-text strong {
    color: var(--text1);
    font-weight: 600;
}


/* ═══════════════════════════════════════════════════
   TOASTS
═══════════════════════════════════════════════════ */

#toasts {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.toast {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 16px;
    background: var(--bg3);
    border: 1px solid var(--border2);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text1);
    box-shadow: var(--shadow);
    animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
    backdrop-filter: blur(10px);
    max-width: 300px;
}

.toast.out {
    animation: toastOut 0.3s ease forwards;
}

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

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateX(20px) scale(0.95);
    }
}

.toast.ok {
    border-color: rgba(106, 177, 135, 0.3);
}

.toast.ok i {
    color: var(--ok);
}

.toast.err {
    border-color: rgba(192, 99, 90, 0.3);
}

.toast.err i {
    color: var(--err);
}

.toast.warn {
    border-color: rgba(212, 149, 90, 0.3);
}

.toast.warn i {
    color: var(--warn);
}

.toast.info i {
    color: var(--info);
}


/* ═══════════════════════════════════════════════════
   TRASH ACTION BAR
═══════════════════════════════════════════════════ */

.danger-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(192, 99, 90, 0.06);
    border: 1px solid rgba(192, 99, 90, 0.15);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.danger-bar i {
    color: var(--err);
    font-size: 14px;
}

.danger-bar span {
    flex: 1;
    font-size: 12px;
    color: var(--text3);
}


/* ═══════════════════════════════════════════════════
   SCROLLBAR GLOBAL
═══════════════════════════════════════════════════ */

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border2);
    border-radius: 4px;
}


/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */

@media (max-width: 700px) {
    .sidebar {
        display: none;
    }
    .lib-grid {
        grid-template-columns: 1fr;
    }
    .detail-panel {
        width: 100%;
    }
    .search-input {
        width: 150px;
    }
    .top-logo {
        font-size: 15px;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .guide-steps::before {
        display: none;
    }
    .lc-topbar {
        padding: 16px 18px 0;
    }
    .features-section,
    .guide-section {
        padding-left: 18px;
        padding-right: 18px;
    }
    .section-divider {
        margin-left: 18px;
        margin-right: 18px;
    }
}