/* Katalisa Life OS — Shell global (DS Jaivam.tech / IDV).
 *
 * CSS extraído de templates/base.html linhas 93-663 (Lote 6/C1).
 * Dark-first com tokens semânticos (--bento-*, --ds-*). Inclui:
 *   - :root tokens (cores, radius, shadows)
 *   - dark/light/system theme support
 *   - .shell-* classes (sidebar, header, footer, main)
 *   - sidebar collapse + width persist
 *   - utility classes (.card, .glow, .tech-panel, etc)
 *   - admin overrides + mobile breakpoints
 */

/* Alpine.js: x-cloak esconde elementos até Alpine inicializar (evita FOUC). */
[x-cloak] { display: none !important; }

        :root {
            color-scheme: dark light;
            --sidebar-w: 15rem;
            --sidebar-gap: 0.75rem;
            --header-h: 6.25rem;
            --footer-h: 2.5rem;
            /* DS tokens — dark-first (IDV Jaivam.tech foundation 01-fundacao.md) */
            /* Cantos angulares = padrão DS (tech aesthetic). 4px reservado pra badges numéricos. */
            --bento-radius: 0;
            --bento-radius-lg: 0;
            --bento-radius-sm: 0;
            --bento-radius-badge: 4px;        /* DS token radius.base — badges/tags numéricos */
            /* effect.shadow.card — elevação canônica de cards em dark */
            --bento-shadow: 0 10px 30px rgba(0,0,0,0.4);
            --bento-shadow-hover: 0 12px 36px rgba(145,44,238,0.18);
            --bento-shadow-slide: 0 20px 60px rgba(0,0,0,0.5);  /* effect.shadow.slide — modais/dropdowns */
            /* Dark (padrão) */
            --bento-bg-page: #050505;
            --bento-bg-card: #0F172A;
            --bento-bg-card-grad: linear-gradient(165deg, #0F172A, #0C1220);
            --bento-border: rgba(145, 44, 238, 0.18);
            --ds-text: #EEE9BF;
            --ds-text-muted: rgba(238,233,191,0.55);
            --ds-text-faint: rgba(238,233,191,0.30);
            /* Violet-tinta legível: #912CEE (signal) reprova AA como TEXTO em
               qualquer alpha (sólido = 3.69:1). Pra texto roxo legível usar este
               tom mais claro — 5.15:1 sobre #050505. Signal/borda continua #912CEE. */
            --ds-violet-ink: #A855F7;
            /* Spacing scale (DESIGN.md §spacing) — tokens consumíveis */
            --space-xs: 4px;
            --space-sm: 8px;
            --space-md: 12px;
            --space-base: 16px;
            --space-lg: 20px;
            --space-xl: 32px;
            /* ── Cores semânticas (theme-constant: não sobrescritas em dark/light) ──
               Centraliza o que antes vivia como #hex solto em templates/CSS.
               CRM-stage = semântica de domínio (aberta/ganha/perdida).
               Brand/feedback = sinais de marca e estado. */
            --ds-brand: #912CEE;              /* roxo neon — signal/ação/foco */
            --ds-brand-hover: #7A1FD4;        /* roxo deep — hover/pressed */
            --ds-success: #22C55E;            /* sinal/badge/texto */
            --ds-success-deep: #059669;       /* botões sólidos success */
            --ds-warning: #F59E0B;
            --ds-water: #0EA5E9;              /* hidratação: bolinhas de água (sky-500) */
            --ds-danger: #EF4444;             /* sinal danger */
            --ds-danger-rose: #E11D48;        /* botões sólidos / toasts destrutivos */
            --ds-danger-soft: #fb7185;        /* texto de delete em superfícies escuras */
            --ds-stage-open: #2563EB;         /* CRM: oportunidades abertas (blue-600) */
            --ds-stage-won: #047857;          /* CRM: ganhas (emerald-700) */
            --ds-stage-lost: #B91C1C;         /* CRM: perdidas (red-700) */
            --ds-blue-600: #2563EB;
            --ds-emerald-600: #059669;
            --ds-red-700: #B91C1C;
            --ds-amber-500: #f59e0b;
            --ds-slate-500: #64748b;          /* fallback neutro p/ cores dinâmicas */
        }
        html.light {
            --bento-bg-page: #F1F5F9;
            --bento-bg-card: #ffffff;
            --bento-bg-card-grad: linear-gradient(165deg, #ffffff, #F8FAFC);
            /* Border light: opacity 0.22 (era 0.15) — mais hierarquia visual entre
               cards/widgets em bg cinza claro. */
            --bento-border: rgba(145, 44, 238, 0.22);
            --bento-shadow: 0 1px 2px rgb(15 23 42 / .05), 0 4px 16px -6px rgb(15 23 42 / .10);
            --bento-shadow-hover: 0 1px 3px rgb(15 23 42 / .08), 0 14px 32px -10px rgb(15 23 42 / .18);
            --ds-text: #0F172A;
            --ds-text-muted: #475569;
            --ds-text-faint: #94A3B8;
            /* Violet-tinta legível no light: #7A1FD4 (~5.6:1 sobre branco). */
            --ds-violet-ink: #7A1FD4;
        }
        /* Manter compatibilidade com dark mode existente */
        html.dark {
            --bento-bg-page: #050505;
            --bento-bg-card: #0F172A;
            --bento-bg-card-grad: linear-gradient(165deg, #0F172A, #0C1220);
            --bento-border: rgba(145, 44, 238, 0.18);
            --ds-text: #EEE9BF;
            --ds-text-muted: rgba(238,233,191,0.55);
            --ds-text-faint: rgba(238,233,191,0.30);
            --ds-violet-ink: #A855F7;
        }
        /* Root font-size: escala TODO o app — Tailwind usa rem, então text-xs/sm/base/lg crescem junto */
        html { font-size: 16.5px; }
        html, body { height: 100%; }
        /* overflow-x: clip evita scroll lateral quando tooltips/dropdowns vazam
           do viewport sem quebrar position:sticky/fixed (vs overflow:hidden). */
        html, body { overflow-x: clip; }
        body { font-family: 'nexa', ui-sans-serif, system-ui, -apple-system, sans-serif; line-height: 1.5; background: var(--bento-bg-page) !important; color: var(--ds-text); }
        html.dark body, html:not(.light) body { background: var(--bento-bg-page) !important; color: var(--ds-text); }
        code, pre, kbd, samp, .font-mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
        /* DS §2 — labels/eyebrows usam mono uppercase tracking-widest.
           Para form label só aplica quando NÃO envolve input (evita uppercase no texto digitado). */
        .t-label, .form-label,
        form label:not(:has(input)):not(:has(select)):not(:has(textarea)) {
            font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            font-size: 0.6875rem;
        }
        /* kbd: mono e levemente espaçado, sem inflar texto */
        kbd {
            font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
            font-size: 0.6875rem;
            letter-spacing: 0.02em;
        }

        /* Tipografia — padrão acessível (mínimo 14px no corpo) */
        .t-meta { font-size: 0.8125rem; color: var(--ds-text-muted, rgba(238,233,191,0.45)); }
        .t-body { font-size: 0.9375rem; }
        .t-label { font-size: 0.8125rem; font-weight: 500; color: var(--ds-text-muted, rgba(238,233,191,0.55)); }
        html.light .t-meta { color: rgb(100 116 139); }
        html.light .t-label { color: rgb(71 85 105); }

        /* Pomodoro no calendário — cor por ESTADO (deriva dos timestamps via
           filtro pomodoro_cal_class, não de status.color). Aberto=azul,
           ativo=verde, finalizado=cinza. Tints via color-mix com tokens DS
           (theme-aware: finalizado/texto adaptam em dark/light sozinhos). */
        .pomo-cal-entry { transition: filter .12s; }
        .pomo-cal-entry:hover { filter: brightness(1.06); }
        .pomo-cal-open     { background: color-mix(in srgb, var(--ds-stage-open) 13%, transparent); color: var(--ds-stage-open); }
        .pomo-cal-active   { background: color-mix(in srgb, var(--ds-success) 16%, transparent); color: var(--ds-success-deep); }
        .pomo-cal-finished { background: color-mix(in srgb, var(--ds-text-faint) 20%, transparent); color: var(--ds-text-muted); }
        html.dark .pomo-cal-active { color: var(--ds-success); }

        /* DS utilities (Fase 0 — reuso de frontend).
           .label-micro : eyebrow/label micro (10px) mono uppercase. Mais
                          comprimido que .t-label (13px). Substitui a string
                          `font-mono text-[10px] uppercase tracking-widest
                          text-brand-beige/50` repetida ~40x.
           .ds-divider  : separador horizontal sutil tokenizado (substitui
                          rgba inline em base.html).
           .tabular-value: números alinhados (mono + tabular-nums) p/ valores. */
        .label-micro {
            font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
            font-size: 0.625rem;
            line-height: 1;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--ds-text-faint);
        }
        .ds-divider {
            border-top: 1px solid var(--bento-border);
            margin: 0 0.5rem;
        }
        .tabular-value {
            font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
            font-variant-numeric: tabular-nums;
        }

        /* Formulários — campos mais generosos */
        .k-input, .k-select, .k-textarea,
        form input[type="text"], form input[type="email"], form input[type="tel"],
        form input[type="url"], form input[type="date"], form input[type="number"],
        form input[type="datetime-local"], form input[type="password"],
        form select, form textarea {
            width: 100%;
            border-radius: 0.375rem;
            border: 1px solid rgb(203 213 225);
            background: white;
            padding: 0.625rem 0.875rem;
            font-size: 0.9375rem;
            line-height: 1.4;
            color: inherit;
            transition: border-color .15s, box-shadow .15s;
        }
        /* Custom select arrow — normaliza aparência cross-browser/OS */
        form select, .k-select {
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 0.625rem center;
            background-size: 1.125rem;
            padding-right: 2.25rem;
        }
        html.dark form select, html.dark .k-select {
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
        }
        form input:focus, form select:focus, form textarea:focus,
        .k-input:focus, .k-select:focus, .k-textarea:focus {
            outline: none;
            border-color: rgb(145 44 238);
            box-shadow: 0 0 0 3px rgb(145 44 238 / .18);
        }
        html.dark form input, html.dark form select, html.dark form textarea,
        html.dark .k-input, html.dark .k-select, html.dark .k-textarea {
            border-color: rgba(145,44,238,0.25);
            background-color: #0F172A;
            color: rgba(238,233,191,0.85);
        }
        /* ── Switch padrão (DS) ──────────────────────────────────────────────
           Toggle reutilizável: knob centralizado na vertical (top 50% +
           translateY) pra nunca "vazar". On = brand. Use a classe .ds-switch em
           qualquer <input type=checkbox>; o painel do Diário herda via .toggle-cell. */
        .ds-switch,
        .toggle-cell input[type="checkbox"] {
            appearance: none; -webkit-appearance: none;
            flex-shrink: 0; box-sizing: border-box;
            width: 2.4rem; height: 1.4rem;
            background: rgba(148, 163, 184, 0.45);
            border: none; border-radius: 999px;
            position: relative; cursor: pointer; padding: 0;
            vertical-align: middle;
            transition: background-color .18s ease;
        }
        .ds-switch::after,
        .toggle-cell input[type="checkbox"]::after {
            content: '';
            position: absolute; top: 50%; left: 0.15rem;
            width: 1.1rem; height: 1.1rem;
            background: #fff; border-radius: 999px;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
            transform: translateY(-50%);
            transition: transform .18s ease;
        }
        .ds-switch:checked,
        .toggle-cell input[type="checkbox"]:checked { background: var(--ds-brand); }
        .ds-switch:checked::after,
        .toggle-cell input[type="checkbox"]:checked::after { transform: translate(1rem, -50%); }
        .ds-switch:focus-visible,
        .toggle-cell input[type="checkbox"]:focus-visible {
            outline: 2px solid var(--ds-brand); outline-offset: 2px;
        }
        html.dark .ds-switch,
        html.dark .toggle-cell input[type="checkbox"] { background: rgba(148, 163, 184, 0.3); }
        /* :checked precisa de specificity >= a do override dark acima, senão o
           "on" não pinta de brand no tema escuro. */
        html.dark .ds-switch:checked,
        html.dark .toggle-cell input[type="checkbox"]:checked { background: var(--ds-brand); }

        /* Form labels — sentence case (não uppercase) — DS decisão: uppercase só pra eyebrows/badges */
        form label, .form-label {
            font-family: 'nexa', ui-sans-serif, system-ui, sans-serif !important;
            text-transform: none !important;
            letter-spacing: normal !important;
            font-size: 0.8125rem;
            font-weight: 500;
            color: rgb(71 85 105);
            margin-bottom: 0.375rem;
            display: block;
        }
        html.dark form label, html.dark .form-label { color: rgba(238,233,191,0.60); }

        /* Botões — sistema consistente */
        .btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.875rem; border-radius: 0; font-size: 0.875rem; font-weight: 500; transition: background-color .15s, color .15s, box-shadow .15s; cursor: pointer; line-height: 1.2; }
        .btn-primary   { background: rgb(145 44 238); color: white; box-shadow: 0 0 24px rgb(145 44 238 / .25); }
        .btn-primary:hover { background: rgb(122 31 212); box-shadow: 0 0 32px rgb(145 44 238 / .4); }
        .btn-success   { background: rgb(5 150 105); color: white; }
        .btn-success:hover { background: rgb(4 120 87); }
        .btn-danger    { background: rgb(225 29 72); color: white; }
        .btn-danger:hover { background: rgb(190 18 60); }
        .btn-secondary { background: rgb(226 232 240); color: rgb(51 65 85); }
        .btn-secondary:hover { background: rgb(203 213 225); }
        .btn-ghost     { background: transparent; color: rgb(71 85 105); }
        .btn-ghost:hover { background: rgb(241 245 249); color: rgb(15 23 42); }
        html.dark .btn-secondary { background: rgba(145,44,238,0.1); color: rgba(238,233,191,0.8); border: 1px solid rgba(145,44,238,0.2); }
        html.dark .btn-secondary:hover { background: rgba(145,44,238,0.18); color: #EEE9BF; }
        html.dark .btn-ghost { color: rgba(238,233,191,0.5); }
        html.dark .btn-ghost:hover { background: rgba(145,44,238,0.08); color: rgba(238,233,191,0.85); }
        .btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }

        /* === BENTO UI BASE === */
        .bento-card, .card {
            position: relative;
            background: var(--bento-bg-card-grad);
            border: 1px solid var(--bento-border);
            border-radius: var(--bento-radius);
            padding: var(--space-lg);    /* DS scale: 20px (--space-lg) symmetric */
            color: rgb(15 23 42);
            box-shadow: var(--bento-shadow);
            transition: transform .2s ease, box-shadow .22s ease, border-color .15s;
        }
        html.dark .bento-card, html.dark .card { color: rgb(226 232 240); }
        a.bento-card:hover, a.card:hover, button.bento-card:hover { transform: translateY(-2px); box-shadow: var(--bento-shadow-hover); }
        .card-header { font-size: 0.95rem; font-weight: 600; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.55rem; letter-spacing: -0.01em; }

        /* Bento sizing utilities */
        .bento-grid { display: grid; gap: 1rem; grid-template-columns: repeat(12, minmax(0, 1fr)); }
        @media (max-width: 767px) { .bento-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
        .bento-span-3 { grid-column: span 3 / span 3; }
        .bento-span-4 { grid-column: span 4 / span 4; }
        .bento-span-6 { grid-column: span 6 / span 6; }
        .bento-span-8 { grid-column: span 8 / span 8; }
        .bento-span-12 { grid-column: span 12 / span 12; }
        @media (max-width: 767px) {
            .bento-span-3, .bento-span-4, .bento-span-6, .bento-span-8 { grid-column: span 2 / span 2; }
        }

        /* KPI hero — Bento upgrade */
        .kpi-hero {
            position: relative;
            background: var(--bento-bg-card-grad);
            border: 1px solid var(--bento-border);
            border-radius: var(--bento-radius);
            padding: 1.25rem 1.375rem;
            display: flex; flex-direction: column; gap: 0.4rem;
            box-shadow: var(--bento-shadow);
            transition: transform .2s ease, box-shadow .22s ease;
        }
        .kpi-hero::after {
            content: ''; position: absolute; inset: 0; pointer-events: none;
            border-radius: inherit;
            background: radial-gradient(120% 80% at 100% 0%, rgb(145 44 238 / .06), transparent 55%);
        }
        html.dark .kpi-hero::after { background: radial-gradient(120% 80% at 100% 0%, rgb(145 44 238 / .14), transparent 55%); }
        .kpi-hero:hover { box-shadow: var(--bento-shadow-hover), 0 0 0 1px rgba(145,44,238,0.18); border-color: rgba(145,44,238,0.32); }
        .kpi-hero__label { display: flex; align-items: center; gap: 0.5rem; font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace; font-size: 0.6875rem; font-weight: 600; color: rgba(31, 10, 54, 0.82); text-transform: uppercase; letter-spacing: 0.1em; }
        html.dark .kpi-hero__label { color: rgba(238, 233, 191, 0.7); }
        .kpi-hero__label i { font-size: 1.15rem; }
        .kpi-hero__value { font-size: 1.75rem; font-weight: 700; color: rgb(15 23 42); line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace; margin-top: 0.625rem; word-break: break-word; }
        @media (min-width: 640px) { .kpi-hero__value { font-size: 2rem; } }
        @media (min-width: 1024px) { .kpi-hero__value { font-size: 2.25rem; } }
        @media (min-width: 1280px) { .kpi-hero__value { font-size: 2.5rem; } }
        html.dark .kpi-hero__value { color: rgb(241 245 249); }
        .kpi-hero__caption { font-size: 0.75rem; color: rgba(31, 10, 54, 0.55); margin-top: 0.25rem; }
        html.dark .kpi-hero__caption { color: rgba(238, 233, 191, 0.5); }

        /* KPI strip — Bento upgrade */
        .kpi-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; background: var(--bento-bg-card-grad); border: 1px solid var(--bento-border); border-radius: var(--bento-radius); overflow: hidden; box-shadow: var(--bento-shadow); }
        @media (min-width: 640px) { .kpi-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
        @media (min-width: 768px) { .kpi-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
        @media (min-width: 1024px) { .kpi-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
        .kpi-strip__item { padding: 0.95rem 1.15rem; border-right: 1px solid rgb(226 232 240 / .6); border-bottom: 1px solid rgb(226 232 240 / .6); display: flex; flex-direction: column; gap: 0.2rem; transition: background-color .15s; }
        .kpi-strip__item:hover { background: rgb(248 250 252 / .5); }
        html.dark .kpi-strip__item { border-color: rgb(30 41 59 / .6); }
        html.dark .kpi-strip__item:hover { background: rgb(30 41 59 / .3); }
        .kpi-strip__label { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace; font-size: 0.6875rem; font-weight: 600; color: rgba(31, 10, 54, 0.65); text-transform: uppercase; letter-spacing: 0.1em; }
        html.dark .kpi-strip__label { color: rgba(238, 233, 191, 0.6); }
        .kpi-strip__value { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace; font-size: 1.25rem; font-weight: 700; color: rgb(15 23 42); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
        html.dark .kpi-strip__value { color: rgb(226 232 240); }
        .kpi-strip__caption { font-size: 0.6875rem; color: rgba(31, 10, 54, 0.55); }
        html.dark .kpi-strip__caption { color: rgba(238, 233, 191, 0.45); }

        /* KPI chips — angular DS */
        .kpi-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
        .kpi-chip { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.875rem; background: var(--bento-bg-card); border: 1px solid var(--bento-border); border-radius: 0; font-size: 0.8125rem; color: rgb(51 65 85); transition: border-color .15s, background-color .15s, box-shadow .18s; }
        .kpi-chip:hover { border-color: rgba(145, 44, 238, 0.6); box-shadow: 0 0 20px rgba(145, 44, 238, 0.28); }
        html.dark .kpi-chip { background: rgba(15, 23, 42, 0.6); border-color: rgba(145, 44, 238, 0.18); color: rgba(238, 233, 191, 0.85); }
        html.dark .kpi-chip:hover { background: rgba(145, 44, 238, 0.06); border-color: rgba(145, 44, 238, 0.5); }
        .kpi-chip__num { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace; font-weight: 700; color: rgb(15 23 42); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
        html.dark .kpi-chip__num { color: rgb(241 245 249); }
        .kpi-chip__caption { font-size: 0.6875rem; color: rgba(31, 10, 54, 0.55); }

        /* List toolbar — padrão consistente em listas (Opp/Proj/Task/Conta) */
        .list-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.625rem; margin-bottom: 0.875rem; }
        .list-toolbar__group { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
        .list-toolbar__spacer { flex: 1 1 auto; min-width: 0.5rem; }
        .filter-chip { display: inline-flex; align-items: center; gap: 0.375rem; background: rgb(232 220 254); color: rgb(76 29 149); border: 1px solid rgb(196 181 253); border-radius: 999px; padding: 0.25rem 0.625rem 0.25rem 0.75rem; font-size: 0.75rem; font-weight: 500; }
        html.dark .filter-chip { background: rgba(145,44,238,0.15); color: rgba(238,233,191,0.85); border-color: rgba(145,44,238,0.35); }
        .filter-chip__remove { display: inline-flex; align-items: center; justify-content: center; width: 1rem; height: 1rem; border-radius: 999px; color: inherit; opacity: 0.6; transition: opacity .15s, background-color .15s; }
        .filter-chip__remove:hover { opacity: 1; background: rgb(255 255 255 / .4); }
        html.dark .filter-chip__remove:hover { background: rgba(145,44,238,0.2); }
        .kanban-board { background: rgba(145,44,238,0.06); border: 1px solid rgba(145,44,238,0.12); }
        html.light .kanban-board { background: rgb(226 232 240 / .6); border-color: transparent; }
        .view-toggle { display: inline-flex; align-items: center; gap: 0.125rem; border: 1px solid rgba(145,44,238,0.2); background: rgba(145,44,238,0.05); border-radius: 0; padding: 0.125rem; }
        html.light .view-toggle { border-color: rgb(226 232 240); background: white; }
        .view-toggle__btn { padding: 0.375rem 0.5rem; border-radius: 0; color: rgba(238,233,191,0.45); transition: background-color .15s, color .15s; }
        .view-toggle__btn:hover { background: rgba(145,44,238,0.1); color: rgba(238,233,191,0.8); }
        html.light .view-toggle__btn { color: rgb(100 116 139); }
        html.light .view-toggle__btn:hover { background: rgb(241 245 249); color: rgb(51 65 85); }
        .view-toggle__btn.active { background: rgb(145 44 238); color: white; box-shadow: 0 0 12px rgba(145,44,238,0.4); }
        .view-toggle__btn.active i { color: white; }
        html.light .view-toggle__btn.active { background: rgb(145 44 238); color: white; box-shadow: none; }
        html.light .view-toggle__btn.active i { color: white; }

        /* Definition-row — meta horizontal compacta para detail pages */
        .def-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0; background: var(--bento-bg-card); border: 1px solid var(--bento-border); overflow: hidden; }
        .def-row__item { flex: 1 1 11rem; min-width: 0; padding: 0.75rem 1rem; border-right: 1px solid var(--bento-border); display: flex; flex-direction: column; gap: 0.25rem; }
        .def-row__item:last-child { border-right: 0; }
        .def-row__label { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(145, 44, 238, 0.75); font-weight: 600; }
        .def-row__value { font-size: 0.9375rem; font-weight: 500; color: var(--ds-text); line-height: 1.3; word-break: break-word; font-variant-numeric: tabular-nums; }
        @media (max-width: 767px) {
          .def-row__item { flex-basis: 50%; border-right: 1px solid var(--bento-border); border-bottom: 1px solid var(--bento-border); }
          .def-row__item:nth-child(2n) { border-right: 0; }
        }
        @media (max-width: 479px) {
          .def-row__item { flex-basis: 100%; border-right: 0; }
        }

        /* Kanban */
        .kanban-card.sortable-ghost { opacity: .35; }
        .kanban-card.sortable-chosen { box-shadow: 0 0 0 2px rgb(145 44 238 / 0.6); }

        /* ============================================================
           IDV Phase 2 — Remap dark:slate utilities → IDV dark tokens
           Elimina necessidade de editar cada template individualmente
           ============================================================ */

        /* Backgrounds */
        html.dark .dark\:bg-slate-900,
        html.dark .dark\:bg-slate-950 { background-color: #0F172A !important; }
        html.dark .dark\:bg-slate-950\/95 { background-color: rgba(15,23,42,0.97) !important; }
        html.dark .dark\:bg-slate-900\/95 { background-color: rgba(15,23,42,0.95) !important; }
        html.dark .dark\:bg-slate-900\/60,
        html.dark .dark\:bg-slate-900\/40 { background-color: rgba(15,23,42,0.7) !important; }
        html.dark .dark\:bg-slate-800 { background-color: rgba(145,44,238,0.07) !important; }
        html.dark .dark\:bg-slate-800\/50 { background-color: rgba(145,44,238,0.06) !important; }
        html.dark .dark\:bg-slate-800\/40 { background-color: rgba(145,44,238,0.05) !important; }
        html.dark .dark\:bg-slate-800\/30 { background-color: rgba(145,44,238,0.04) !important; }
        html.dark .dark\:bg-slate-700 { background-color: rgba(145,44,238,0.12) !important; }

        /* Borders */
        html.dark .dark\:border-slate-800 { border-color: rgba(145,44,238,0.15) !important; }
        html.dark .dark\:border-slate-700 { border-color: rgba(145,44,238,0.22) !important; }
        html.dark .dark\:border-slate-600 { border-color: rgba(145,44,238,0.30) !important; }

        /* Dividers */
        html.dark .dark\:divide-slate-800 > :not([hidden]) ~ :not([hidden]) { border-color: rgba(145,44,238,0.10) !important; }
        html.dark .dark\:divide-slate-700 > :not([hidden]) ~ :not([hidden]) { border-color: rgba(145,44,238,0.14) !important; }

        /* Text */
        html.dark .dark\:text-slate-100 { color: #EEE9BF !important; }
        html.dark .dark\:text-slate-200 { color: rgba(238,233,191,0.85) !important; }
        html.dark .dark\:text-slate-300 { color: rgba(238,233,191,0.65) !important; }
        html.dark .dark\:text-slate-400 { color: rgba(238,233,191,0.45) !important; }
        html.dark .dark\:text-slate-500 { color: rgba(238,233,191,0.30) !important; }
        html.dark .dark\:text-slate-600 { color: rgba(238,233,191,0.22) !important; }
        html.dark .dark\:text-slate-700 { color: rgba(238,233,191,0.16) !important; }

        /* Hover backgrounds */
        html.dark .dark\:hover\:bg-slate-800:hover { background-color: rgba(145,44,238,0.09) !important; }
        html.dark .dark\:hover\:bg-slate-800\/50:hover { background-color: rgba(145,44,238,0.07) !important; }
        html.dark .dark\:hover\:bg-slate-800\/40:hover { background-color: rgba(145,44,238,0.06) !important; }
        html.dark .dark\:hover\:bg-slate-900:hover { background-color: rgba(15,23,42,0.8) !important; }
        html.dark .dark\:hover\:bg-slate-700:hover { background-color: rgba(145,44,238,0.12) !important; }

        /* Light-mode only bg-white → IDV card in dark mode */
        html.dark .bg-white:not([class*="rounded-full"]):not([class*="ring-"]) { background-color: #0F172A !important; }
        html.dark .bg-slate-50 { background-color: rgba(145,44,238,0.03) !important; }
        html.dark .bg-slate-100 { background-color: rgba(145,44,238,0.05) !important; }

        /* Light-mode text on dark — remap slate text to beige */
        html.dark .text-slate-900, html.dark .text-slate-800 { color: #EEE9BF !important; }
        html.dark .text-slate-700, html.dark .text-slate-600 { color: rgba(238,233,191,0.65) !important; }
        html.dark .text-slate-500 { color: rgba(238,233,191,0.40) !important; }
        html.dark .text-slate-400 { color: rgba(238,233,191,0.30) !important; }

        /* Light-mode borders on dark */
        html.dark .border-slate-200 { border-color: rgba(145,44,238,0.12) !important; }
        html.dark .border-slate-100 { border-color: rgba(145,44,238,0.08) !important; }
        html.dark .border-slate-300 { border-color: rgba(145,44,238,0.18) !important; }
        html.dark .divide-slate-100 > :not([hidden]) ~ :not([hidden]) { border-color: rgba(145,44,238,0.08) !important; }
        html.dark .divide-y > :not([hidden]) ~ :not([hidden]) { border-color: rgba(145,44,238,0.08) !important; }

        /* hover:bg-slate-X on dark */
        html.dark .hover\:bg-slate-50:hover,
        html.dark .hover\:bg-slate-100:hover { background-color: rgba(145,44,238,0.07) !important; }

        /* Table head on dark */
        html.dark thead, html.dark thead tr { background-color: rgba(145,44,238,0.06) !important; }

        /* Sidebar nav — IDV dark style */
        .nav-link { position: relative; display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.85rem; border-radius: 0; font-size: 0.875rem; color: rgba(238,233,191,0.6); transition: background-color .15s, color .15s; }
        .nav-link:hover { background: rgba(145,44,238,0.08); color: rgba(238,233,191,0.9); }
        .nav-link:hover i { color: rgb(145,44,238); }
        .nav-link:focus-visible { outline: 2px solid rgb(145 44 238); outline-offset: 2px; }
        /* .nav-link.active: marcador único (inset 3px + ::after dot) consolidado na
           linha ~566. Aqui só a cor do ícone (não duplicada na Zona 2). */
        .nav-link.active i, .nav-link.active i.ph-fill { color: rgb(145,44,238); }
        .nav-link i { font-size: 1.15rem; flex-shrink: 0; color: rgba(145,44,238,0.5); transition: color .15s; }
        /* Light mode overrides */
        html.light .nav-link { color: rgb(71 85 105); }
        html.light .nav-link:hover { background: rgb(241 245 249); color: rgb(15 23 42); }
        html.light .nav-link:hover i { color: rgb(71 85 105); }
        html.light .nav-link.active { background: linear-gradient(90deg, rgb(145 44 238 / .14), rgb(145 44 238 / .04)); color: rgb(122 31 212); font-weight: 600; box-shadow: inset 3px 0 0 #912CEE; }
        html.light .nav-link.active i { color: rgb(145 44 238); }
        html.light .nav-link i { color: rgb(100 116 139); }
        /* DS dropdown menu items */
        .ds-menu-item:hover { background: rgba(145,44,238,0.1) !important; color: #EEE9BF !important; }
        html.light .ds-menu-item:hover { background: rgb(241 245 249) !important; color: rgb(15 23 42) !important; }
        html.light .ds-menu-item { color: var(--ds-text) !important; }
        /* Dropdowns IDV (user/bell) — light mode overrides p/ inline styles dark */
        html.light #user-menu-dropdown,
        html.light #bell-panel,
        html.light .ds-dropdown {
            background: #ffffff !important;
            border-color: rgba(145,44,238,0.20) !important;
            box-shadow: 0 0 0 1px rgba(145,44,238,0.08), 0 16px 48px rgba(15,23,42,0.18) !important;
        }
        html.light #user-menu-dropdown > div[style*="border-bottom"],
        html.light .ds-dropdown > div[style*="border-bottom"] {
            background: rgba(145,44,238,0.04) !important;
            border-bottom-color: rgba(145,44,238,0.10) !important;
        }
        html.light #user-menu-dropdown div[style*="border-top"],
        html.light .ds-dropdown div[style*="border-top"] {
            border-top-color: rgba(145,44,238,0.10) !important;
        }
        html.light .ds-menu-item[style*="color:rgba(238,233,191"],
        html.light .ds-menu-item[style*="color: rgba(238,233,191"] { color: var(--ds-text) !important; }
        html.light #user-menu-dropdown div[style*="color:#EEE9BF"],
        html.light #user-menu-dropdown div[style*="color: #EEE9BF"] { color: var(--ds-text) !important; }
        html.light #user-menu-dropdown div[style*="color:rgba(238,233,191,0.45)"],
        html.light #user-menu-dropdown div[style*="color: rgba(238,233,191,0.45)"] { color: var(--ds-text-muted) !important; }
        html.light #user-menu-dropdown .text-\[10px\][style*="color:rgba(145,44,238,0.5)"] { color: rgb(145 44 238) !important; }
        body.sidebar-collapsed .sidebar-section-label { display: none !important; }
        body.sidebar-collapsed [data-section-body] { display: block !important; }
        .sidebar-section-toggle { cursor: pointer; background: transparent; border: 0; }
        .sidebar-section-toggle:hover { color: rgb(145 44 238) !important; }
        .sidebar-section-toggle:focus-visible { outline: 2px solid rgb(145 44 238); outline-offset: 2px; }
        body.sidebar-collapsed .nav-link { width: 2.5rem; height: 2.5rem; padding: 0; border-radius: 0; margin: 0 auto; gap: 0; justify-content: center; }
        body.sidebar-collapsed .nav-link.active { background: rgb(145 44 238); color: white; box-shadow: 0 0 20px rgb(145 44 238 / .45); }
        body.sidebar-collapsed .nav-link.active i, body.sidebar-collapsed .nav-link.active i.ph-fill { color: white; }
        body.sidebar-collapsed .nav-link i { font-size: 1.25rem; }
        body.sidebar-collapsed nav { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }

        /* Sidebar resize handle */
        .sidebar-resize-handle { position: absolute; top: 0; right: 0; bottom: 0; width: 6px; cursor: col-resize; z-index: 45; }
        .sidebar-resize-handle::after { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 3px; height: 38px; background: rgb(148 163 184); border-radius: 999px; opacity: 0; transition: opacity .15s, background-color .15s, height .15s; }
        .sidebar-resize-handle:hover::after, body.sidebar-resizing .sidebar-resize-handle::after { opacity: 1; height: 56px; background: rgb(145 44 238); }
        body.sidebar-collapsed .sidebar-resize-handle { display: none; }
        body.sidebar-resizing { cursor: col-resize !important; user-select: none; }
        body.sidebar-resizing .shell-sidebar, body.sidebar-resizing .shell-header,
        body.sidebar-resizing .shell-footer, body.sidebar-resizing .shell-main { transition: none !important; }
        @media (max-width: 767px) { .sidebar-resize-handle { display: none; } }

        /* A11y — skip link (visível só em foco) */
        .skip-link { position: absolute; top: -100px; left: 1rem; z-index: 100; background: rgb(145 44 238); color: white; padding: 0.5rem 0.75rem; border-radius: var(--bento-radius); font-size: .875rem; font-weight: 500; text-decoration: none; transition: top .15s; }

        /* Breadcrumb header — signature mono uppercase, IDV */
        .ds-breadcrumb { color: rgba(145,44,238,0.55); display: flex; align-items: center; gap: 0.4rem; }
        .ds-breadcrumb__section { color: rgba(145,44,238,0.7); }
        .ds-breadcrumb__sep { color: rgba(145,44,238,0.30); font-weight: 600; }
        .ds-breadcrumb__entry { color: var(--ds-text-muted); }
        html.light .ds-breadcrumb { color: rgba(145,44,238,0.5); }
        html.light .ds-breadcrumb__section { color: rgba(145,44,238,0.7); }
        .skip-link:focus { top: .75rem; outline: 2px solid white; outline-offset: 2px; }

        /* A11y — focus visible global pra elementos interativos sem ring custom */
        button:focus-visible, a:focus-visible, [role="button"]:focus-visible { outline: 2px solid rgb(145 44 238); outline-offset: 2px; }

        /* A11y — marcador visual em campos required (asterisco vermelho após label de input/select/textarea com atributo required). */
        form label:has(+ input[required])::after,
        form label:has(+ select[required])::after,
        form label:has(+ textarea[required])::after,
        form label:has(input[required])::after,
        form label:has(select[required])::after,
        form label:has(textarea[required])::after { content: " *"; color: rgb(239 68 68); margin-left: 2px; font-weight: 600; }

        /* Toasts */
        #toast-stack { position: fixed; bottom: calc(var(--footer-h) + .75rem); right: 1rem; z-index: 60; display: flex; flex-direction: column; gap: .5rem; max-width: 26rem; }
        /* Focus visible — IDV neon ring (keyboard nav) */
        a:focus-visible, button:focus-visible, [role="button"]:focus-visible,
        input:focus-visible, select:focus-visible, textarea:focus-visible,
        summary:focus-visible {
            outline: 2px solid rgb(145 44 238);
            outline-offset: 2px;
            box-shadow: 0 0 0 4px rgba(145,44,238,0.18);
        }
        /* Form fields handle focus via form input rule above; keep ring softer */
        form input:focus-visible, form select:focus-visible, form textarea:focus-visible,
        .k-input:focus-visible, .k-select:focus-visible, .k-textarea:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px rgb(145 44 238 / .22);
        }

        /* Tabela IDV — header consistente em todas as tabelas */
        table thead th { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500; color: var(--ds-text-muted); }
        html.dark table thead, html.dark table thead tr, html.dark table thead th { background: rgba(145,44,238,0.05) !important; }
        html.light table thead, html.light table thead tr, html.light table thead th { background: rgb(248 250 252) !important; }
        table tbody tr { transition: background-color .12s; }

        /* Empty state IDV — uniformiza "Nenhum X" entre páginas */
        .empty-state, .ds-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; padding: 2.5rem 1rem; text-align: center; color: var(--ds-text-faint); font-size: 0.875rem; font-style: italic; }
        .empty-state i, .ds-empty i { font-size: 2rem; color: var(--ds-text-faint); opacity: 0.5; }

        /* Modal aberto — borra shells fixos + main pra reforçar foco no diálogo */
        body.has-modal .shell-sidebar,
        body.has-modal .shell-header,
        body.has-modal .shell-footer,
        body.has-modal .ds-bottom-nav {
            filter: blur(3px) saturate(0.6);
            transition: filter .15s ease-out;
            pointer-events: none;
        }
        body.has-modal .shell-main > * {
            filter: blur(3px) saturate(0.6);
            transition: filter .15s ease-out;
        }

        /* Tooltip auto-theme: light mode override (stronger contrast vs page bg) */
        html.light .ds-tooltip__box {
            background: #0F172A !important;
            border-color: rgba(145, 44, 238, 0.60) !important;
            color: #EEE9BF !important;
            box-shadow: 0 8px 32px rgba(15, 23, 42, 0.40), 0 0 0 1px rgba(145, 44, 238, 0.20) !important;
        }

        .toast { padding: 0.75rem 1rem; border-radius: var(--bento-radius); font-size: 0.9375rem; box-shadow: var(--bento-shadow); display: flex; align-items: start; gap: 0.5rem; animation: toast-in .25s ease-out; border: 1px solid transparent; }
        .toast.toast-success { background: rgb(16 185 129 / 0.95); color: white; border-color: rgba(255,255,255,0.15); }
        .toast.toast-error   { background: rgb(244 63 94 / 0.95); color: white; border-color: rgba(255,255,255,0.15); }
        .toast.toast-warning { background: rgb(245 158 11 / 0.95); color: white; border-color: rgba(255,255,255,0.15); }
        .toast.toast-info    { background: var(--bento-bg-card); color: var(--ds-text); border-color: rgba(145,44,238,0.30); box-shadow: 0 10px 15px -3px rgb(0 0 0 / .35), 0 0 0 1px rgba(145,44,238,0.15), 0 0 24px rgba(145,44,238,0.08); }
        .toast button { opacity: .8; } .toast button:hover { opacity: 1; }
        @keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

        /* Alert inline — feedback persistente na página. Use {% include "_components/_alert.html" %}.
           Para feedback efêmero (pós-save/delete) use Django messages framework (.toast acima). */
        .alert { padding: 0.625rem 0.875rem; border-radius: var(--bento-radius); border-left: 4px solid; display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.875rem; color: var(--ds-text); transition: background-color .15s ease-out; }
        .alert i { font-size: 1.125rem; flex-shrink: 0; line-height: 1.4; }
        .alert .alert__body { flex: 1 1 auto; line-height: 1.5; }
        .alert .alert__body strong { font-weight: 600; }
        .alert .alert__close { opacity: .55; transition: opacity .15s; background: none; border: none; cursor: pointer; padding: 0 0.25rem; color: inherit; }
        .alert .alert__close:hover { opacity: 1; }
        .alert--success { border-left-color: rgb(16 185 129); background: rgb(16 185 129 / 0.08); }
        .alert--success i { color: rgb(16 185 129); }
        .alert--info { border-left-color: rgb(145 44 238); background: rgba(145, 44, 238, 0.08); }
        .alert--info i { color: rgb(145 44 238); }
        .alert--warning { border-left-color: rgb(245 158 11); background: rgb(245 158 11 / 0.08); }
        .alert--warning i { color: rgb(245 158 11); }
        .alert--error { border-left-color: rgb(244 63 94); background: rgb(244 63 94 / 0.08); }
        .alert--error i { color: rgb(244 63 94); }
        html.light .alert { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }

        /* Shell — sidebar split em 3 caixinhas flutuantes */
        .shell-sidebar { position: fixed; top: var(--sidebar-gap); left: var(--sidebar-gap); bottom: var(--sidebar-gap); width: var(--sidebar-w); z-index: 40; display: flex; flex-direction: column; gap: var(--sidebar-gap); transition: width .18s ease-out; background: transparent !important; border: none !important; box-shadow: none !important; overflow: visible; }
        .shell-sidebar > .sidebar-box { background: var(--bento-bg-card); border: 1px solid var(--bento-border); border-radius: var(--bento-radius); box-shadow: var(--bento-shadow); overflow: hidden; }
        html.dark .shell-sidebar > .sidebar-box { box-shadow: var(--bento-shadow); }
        .shell-sidebar > .sidebar-box--nav { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; -ms-overflow-style: none; }
        .shell-sidebar > .sidebar-box--nav::-webkit-scrollbar { width: 0; height: 0; display: none; }
        .shell-sidebar > .sidebar-box.sidebar-user { overflow: visible; }
        .shell-header { position: fixed; top: var(--sidebar-gap); right: var(--sidebar-gap); left: calc(var(--sidebar-w) + (var(--sidebar-gap) * 2)); height: var(--header-h); z-index: 30; transition: left .18s ease-out; background: var(--bento-bg-card); border: 1px solid var(--bento-border); border-radius: var(--bento-radius); box-shadow: var(--bento-shadow); }
        html.dark .shell-header { box-shadow: var(--bento-shadow); }
        .shell-footer { position: fixed; bottom: var(--sidebar-gap); right: var(--sidebar-gap); left: calc(var(--sidebar-w) + (var(--sidebar-gap) * 2)); height: var(--footer-h); z-index: 30; transition: left .18s ease-out; background: var(--bento-bg-card); border: 1px solid var(--bento-border); border-radius: var(--bento-radius); box-shadow: var(--bento-shadow); }
        html.dark .shell-footer { box-shadow: var(--bento-shadow); }
        .shell-main   { margin-left: calc(var(--sidebar-w) + (var(--sidebar-gap) * 2)); margin-right: var(--sidebar-gap); padding-top: calc(var(--header-h) + var(--sidebar-gap)); padding-bottom: calc(var(--footer-h) + var(--sidebar-gap)); min-height: 100vh; transition: margin-left .18s ease-out; }

        /* Masks que cobrem gaps acima do header e abaixo do footer */
        body::before, body::after { content: ''; position: fixed; left: 0; right: 0; height: var(--sidebar-gap); background: var(--bento-bg-page); z-index: 29; pointer-events: none; }
        body::before { top: 0; }
        body::after { bottom: 0; }

        /* Sidebar collapsed (desktop only) — só ícones, default no DS Jaivam.tech radical */
        body.sidebar-collapsed { --sidebar-w: 4rem; }
        body.sidebar-collapsed .sidebar-label,
        body.sidebar-collapsed .sidebar-brand-text,
        body.sidebar-collapsed .sidebar-user-meta { display: none !important; }
        body.sidebar-collapsed .sidebar-brand { justify-content: center; width: 100%; }
        body.sidebar-collapsed .sidebar-box.px-5 { padding-left: 0 !important; padding-right: 0 !important; justify-content: center; }
        body.sidebar-collapsed .nav-link { justify-content: center; padding-left: 0; padding-right: 0; }
        body.sidebar-collapsed .sidebar-foot { justify-content: center !important; }
        body.sidebar-collapsed .sidebar-section-label { display: none !important; }
        /* Collapsed: reduz gap entre brand/nav/foot pra strip mais coesa.
           Em expanded mantém o gap do bento layout. */
        body.sidebar-collapsed .shell-sidebar { gap: 0.25rem; }

        /* Sidebar collapsed: estado fixo, sem hover-expand (toggle só por clique). */

        /* Active nav link: glow lateral roxo + bg */
        .nav-link { position: relative; }
        .nav-link.active {
          color: var(--ds-text);
          font-weight: 600;
          background: linear-gradient(90deg, rgba(145,44,238,0.18), rgba(145,44,238,0.06));
          box-shadow: inset 3px 0 0 #912CEE, 0 0 24px -8px rgba(145, 44, 238, 0.40);
        }
        .nav-link.active::after {
          content: '';
          position: absolute;
          right: -1px; top: 50%; transform: translateY(-50%);
          width: 6px; height: 6px;
          background: #912CEE;
          border-radius: 50%;
          box-shadow: 0 0 12px #912CEE;
        }
        body.sidebar-collapsed .nav-link.active::after { display: none; }

        /* Sidebar foot (collapse btn box) */
        .sidebar-foot { flex: 0 0 auto; }
        .sidebar-collapse-btn { color: rgba(145,44,238,0.55); border-radius: 0; }
        .sidebar-collapse-btn:hover { color: #912CEE; background: rgba(145,44,238,0.10); }
        html.light .sidebar-collapse-btn { color: rgb(100 116 139); }
        html.light .sidebar-collapse-btn:hover { color: #912CEE; background: rgba(145,44,238,0.06); }

        /* === Forms — DS input/select/textarea (DESIGN.md §5 Inputs / Fields) === */
        .form-input,
        .form-select,
        .form-textarea {
            width: 100%;
            background: var(--bento-bg-card);
            color: var(--ds-text);
            border: 1px solid rgba(145, 44, 238, 0.25);   /* roxo low-alpha no dark */
            border-radius: 6px;                            /* DS rounded.input */
            padding: 10px 14px;                            /* DS component.input */
            font-size: 0.9375rem;                          /* 15px (body) */
            line-height: 1.5;
            transition: border-color .15s, box-shadow .15s;
        }
        .form-input::placeholder,
        .form-textarea::placeholder { color: var(--ds-text-faint); }
        .form-input:focus, .form-input:focus-visible,
        .form-select:focus, .form-select:focus-visible,
        .form-textarea:focus, .form-textarea:focus-visible {
            outline: none;
            border-color: #912CEE;
            box-shadow: 0 0 0 4px rgba(145, 44, 238, 0.18);  /* DS focus halo */
        }
        html.light .form-input,
        html.light .form-select,
        html.light .form-textarea { border-color: rgba(148, 163, 184, 0.5); }  /* slate no light */

        @media (max-width: 767px) {
            .shell-sidebar { top: 0; left: 0; bottom: 0; border-radius: 0; transform: translateX(-100%); transition: transform .2s ease-out; z-index: 50; box-shadow: none; }
            .shell-sidebar.open { transform: translateX(0); }
            .shell-header { top: 0; left: 0; right: 0; border-radius: 0; box-shadow: none; border: none; border-bottom: 1px solid var(--bento-border); }
            .shell-footer { bottom: 0; left: 0; right: 0; border-radius: 0; box-shadow: none; border: none; border-top: 1px solid var(--bento-border); }
            .shell-main { margin-left: 0; margin-right: 0; padding-top: var(--header-h); padding-bottom: var(--footer-h); }
            body::before, body::after { display: none; }
            #sidebar-backdrop { position: fixed; inset: 0; z-index: 40; background: rgb(0 0 0 / .4); }
            body.sidebar-collapsed { --sidebar-w: 15rem; }  /* mobile ignora collapse */
        }
