/* ZCORP Obsidian Design System — Global Styles
   Single entry point. Import this file in consuming projects.
   All rules live in the imported partials below. */

/* SEM @layer, de proposito. O CSS do DS fica fora de camadas, como na v1.
   Motivo: o Tailwind v3 (CDN cdn.tailwindcss.com) injeta o preflight fora de camada
   (button{background:none}, input{padding:0}, *{border-width:0}) e esse reset vencia o DS
   quando o DS estava em @layer: botoes voltage ficavam pretos, texto colava na borda do campo,
   cards perdiam a borda. Fora de camada o DS vence o preflight do v3 e do v4.
   Para sobrescrever uma propriedade de uma classe ds-* com Tailwind v4, use o modificador !
   (ex.: p-3!) ou CSS do projeto depois de styles.css. */

@layer base;
/* ZCORP Obsidian — Color Tokens */

:root {
  /* ── Base Surfaces ── */
  --color-void:     #0A0A0B;
  --color-obsidian: #131316;
  --color-onyx:     #1C1C20;
  --color-graphite: #222228;

  /* ── Ink / Text ── */
  --color-ink-primary:   #F5F5F7;
  --color-ink-secondary: #9B9BA3;
  --color-ink-tertiary:  #7A7A84; /* was #5A5A63 — bumped for 4.5:1 AA contrast on --color-void at small sizes */
  --color-ink-disabled:  #33333A;

  /* ── Strokes ── */
  --stroke-inner:       rgba(255, 255, 255, 0.06);
  --stroke-inner-hover: rgba(255, 255, 255, 0.10);
  --stroke-outer:       rgba(0, 0, 0, 0.40);
  --stroke-divider:     rgba(255, 255, 255, 0.05);

  /* ── Fills (white overlays for hover / subtle zones) ── */
  --color-void-raised: #0D0D0F; /* frame / pressed-field background, between void and obsidian */
  --fill-faint:  rgba(255, 255, 255, 0.015); /* table row hover */
  --fill-subtle: rgba(255, 255, 255, 0.03);  /* pill containers, ghost hover */
  --fill-hover:  rgba(255, 255, 255, 0.04);  /* list/nav item hover, neutral chip bg */

  /* ── Voltage (single accent) ── */
  --color-voltage:       oklch(0.92 0.20 125);
  --color-voltage-hover: oklch(0.96 0.21 125);
  --color-voltage-soft:  oklch(0.92 0.20 125 / 0.12);
  --color-voltage-glow:  oklch(0.92 0.20 125 / 0.35);
  --color-voltage-ink:   #0A0A0B;

  /* ── Signal colors ── */
  --color-signal-danger:       oklch(0.70 0.20 25);
  --color-signal-danger-soft:  oklch(0.70 0.20 25 / 0.14);
  --color-signal-danger-glow:  oklch(0.70 0.20 25 / 0.35);
  --color-signal-warn:         oklch(0.85 0.17 85);
  --color-signal-warn-soft:    oklch(0.85 0.17 85 / 0.12);
  --color-signal-warn-glow:    oklch(0.85 0.17 85 / 0.35);
  --color-signal-success:      oklch(0.80 0.15 155);
  --color-signal-success-soft: oklch(0.80 0.15 155 / 0.12);
  --color-signal-success-glow: oklch(0.80 0.15 155 / 0.35);
  --color-signal-calm:         oklch(0.75 0.08 230);
  --color-signal-calm-soft:    oklch(0.75 0.08 230 / 0.12);
  --color-signal-calm-glow:    oklch(0.75 0.08 230 / 0.35);

  /* ── v2: overlays, foco, texto sobre cor ── */
  --color-scrim:       rgba(5, 5, 7, 0.78);              /* fundo atras de modal/drawer */
  --color-on-danger:   #FFFFFF;                          /* texto sobre botao danger */
  --fill-strong:       rgba(255, 255, 255, 0.06);        /* item destacado (teclado) em menus */
  --stroke-focus:      oklch(0.92 0.20 125 / 0.60);      /* foco discreto dentro de dialogos */
  --stroke-lift:       rgba(255, 255, 255, 0.14);        /* borda do item levantado (arrastar) */

  /* ── Transparencias fixas (numero = milesimos de opacidade). Usadas por componentes; nao use em telas. ── */
  --white-a000: rgba(255, 255, 255, 0);
  --white-a015: rgba(255, 255, 255, 0.015);
  --white-a020: rgba(255, 255, 255, 0.02);
  --white-a025: rgba(255, 255, 255, 0.025);
  --white-a030: rgba(255, 255, 255, 0.03);
  --white-a040: rgba(255, 255, 255, 0.04);
  --white-a045: rgba(255, 255, 255, 0.045);
  --white-a050: rgba(255, 255, 255, 0.05);
  --white-a060: rgba(255, 255, 255, 0.06);
  --white-a070: rgba(255, 255, 255, 0.07);
  --white-a080: rgba(255, 255, 255, 0.08);
  --white-a090: rgba(255, 255, 255, 0.09);
  --white-a180: rgba(255, 255, 255, 0.18);
  --white-a300: rgba(255, 255, 255, 0.3);
  --white-a400: rgba(255, 255, 255, 0.4);
  --white-a450: rgba(255, 255, 255, 0.45);
  --white-a500: rgba(255, 255, 255, 0.5);
  --white-a550: rgba(255, 255, 255, 0.55);
  --white-a600: rgba(255, 255, 255, 0.6);
  --black-a100: rgba(0, 0, 0, 0.1);
  --black-a140: rgba(0, 0, 0, 0.14);
  --black-a160: rgba(0, 0, 0, 0.16);
  --black-a300: rgba(0, 0, 0, 0.3);
  --black-a400: rgba(0, 0, 0, 0.4);
  --black-a450: rgba(0, 0, 0, 0.45);
  --black-a600: rgba(0, 0, 0, 0.6);
  --black-a700: rgba(0, 0, 0, 0.7);
  --black-a750: rgba(0, 0, 0, 0.75);
  --color-glass: rgba(28, 28, 32, 0.45); /* vidro: menus e gavetas */
  --color-avatar-hi: #2a2a30; /* placeholder de avatar */
  --color-avatar-lo: #16161a;
  --color-sidebar-hi: #0C0C0E; /* fundo do sidebar */
  --color-sidebar-lo: #09090B;

  /* ── Semantic aliases ── */
  --color-bg-base:  var(--color-void);
  --color-fg-1:     var(--color-ink-primary);
  --color-fg-2:     var(--color-ink-secondary);
  --color-fg-3:     var(--color-ink-tertiary);
  --color-accent:   var(--color-voltage);
}

/* ZCORP Obsidian — Font Face
   Versao FIXA (@fontsource/inter 5.2.6), nunca @latest.
   Para nao depender de CDN em producao: npm i @fontsource/inter@5.2.6 e importe
   "@fontsource/inter/300.css" ... "700.css" no main.tsx; depois apague este arquivo do seu import
   ou deixe-o: o navegador usa a primeira fonte "Inter" que carregar. Ver INTEGRATION.md. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 300; font-display: swap; src: url("fonts/inter-300.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/inter-700.woff2") format("woff2"); }

/* ZCORP Obsidian — Typography Tokens */

:root {
  --font-sans:    "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Inter", sans-serif;
  --font-head:    "Inter", sans-serif;
  --font-body:    "Inter", sans-serif;
  --font-mono:    ui-monospace, "SF Mono", Menlo, monospace; /* code blocks only */
  --font-features: "cv11" 1, "ss01" 1; /* Inter: single-storey a + open digits. Set to normal to revert. */
  --font-num:     var(--font-sans); /* numbers: Inter tabular, as in the reference. To revert to monospace numbers, set to var(--font-mono) */
}

/* ── Global base ── */
/* Bug 12: controles nativos (date, time, select, scrollbar) no tema escuro */
:root { color-scheme: dark; }
input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"], input[type="week"] { color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-sans);
  font-feature-settings: var(--font-features);
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-ink-primary);
  background-color: var(--color-void);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Resets de elementos (body, h1-h6, p, a, ul) ficam em tokens/base.css, dentro de @layer base. */

/* ── Global scrollbar ── */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--stroke-inner-hover) transparent;
}
*::-webkit-scrollbar { width: 5px; height: 5px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--stroke-inner-hover); border-radius: 3px; }
*::-webkit-scrollbar-thumb:hover { background: var(--stroke-lift); }
*::-webkit-scrollbar-corner { background: transparent; }

/* ── Type scale ── */
.ds-display-xl { font-size: 56px; line-height: 0.95; font-weight: 700; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; color: var(--color-ink-primary); }
.ds-display-lg { font-size: 44px; line-height: 0.98; font-weight: 700; letter-spacing: -0.03em;  font-variant-numeric: tabular-nums; color: var(--color-ink-primary); }
.ds-head-lg    { font-size: 24px; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em;  color: var(--color-ink-primary); }
.ds-head-md    { font-size: 18px; line-height: 1.20; font-weight: 600; letter-spacing: -0.015em; color: var(--color-ink-primary); }
.ds-head-sm    { font-size: 15px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em;  color: var(--color-ink-primary); }
.ds-body-md    { font-size: 14px; line-height: 1.45; font-weight: 400; color: var(--color-ink-primary); }
.ds-body-sm    { font-size: 13px; line-height: 1.45; font-weight: 400; color: var(--color-ink-secondary); }
.ds-label-md   { font-size: 12px; line-height: 1; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-ink-secondary); }
.ds-label-sm   { font-size: 10px; line-height: 1; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-ink-tertiary); }
/* Numbers: Inter with tabular figures. Tracking comes from the size class (.ds-display-* etc.). */
.ds-mono, .ds-num { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-feature-settings: var(--font-features), "tnum" 1; color: inherit; }
button, input, select, textarea { font-feature-settings: inherit; }

@layer base {
/* ZCORP Obsidian: resets de elementos.
   Ficam em @layer base de proposito: utilitarios do Tailwind v4 (p-4, m-2, text-*) e o CSS do projeto vencem estes resets.
   As classes ds-* continuam fora de camada. */
body { margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-size: inherit; font-weight: inherit; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }

} /* resets: so estes ficam em camada */
/* ZCORP Obsidian — Spacing Tokens
   The component CSS uses direct pixel values inline.
   These tokens exist for consuming projects that need
   systematic spacing in their own CSS. */

:root {
  --space-1:  4px;
  --space-2:  8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Semantic aliases */
  --space-xs:  var(--space-1);
  --space-sm:  var(--space-2);
  --space-md:  var(--space-4);
  --space-lg:  var(--space-6);
  --space-xl:  var(--space-8);
  --space-2xl: var(--space-12);
  --space-3xl: var(--space-16);
}

/* ZCORP Obsidian — Shadow & Elevation Tokens */

:root {
  /* ── Elevation ── */
  --elev-2:
    0 1px 0 0 rgba(255, 255, 255, 0.05) inset,
    0 -1px 0 0 rgba(0, 0, 0, 0.50) inset,
    0 8px 24px -8px rgba(0, 0, 0, 0.60),
    0 2px 6px rgba(0, 0, 0, 0.30);

  --elev-3:
    0 1px 0 0 rgba(255, 255, 255, 0.06) inset,
    0 -1px 0 0 rgba(0, 0, 0, 0.60) inset,
    0 24px 48px -16px rgba(0, 0, 0, 0.70);

  /* v2 */
  --elev-overlay:
    0 1px 0 0 rgba(255, 255, 255, 0.08) inset,
    0 32px 80px -16px rgba(0, 0, 0, 0.80),
    0 16px 40px -16px rgba(0, 0, 0, 0.50);
  --elev-lift:
    0 1px 0 0 rgba(255, 255, 255, 0.08) inset,
    0 28px 56px -12px rgba(0, 0, 0, 0.85),
    0 8px 20px -6px rgba(0, 0, 0, 0.55);
}

/* ZCORP Obsidian — Border & Radius Tokens */

:root {
  --radius-sm:   10px;   /* inputs, small controls */
  --radius-md:   14px;   /* buttons, popovers */
  --radius-lg:   24px;   /* cards, panels */
  --radius-xl:   32px;   /* hero surfaces */
  --radius-pill: 999px;  /* chips, pill buttons */
}

/* ZCORP Obsidian — Layout Tokens: z-index scale + breakpoint reference.
   CSS custom properties cannot be used inside @media queries — the
   --bp-* values below are documentation; hardcode the px value in
   your @media rule and keep it in sync with this file by hand. */

:root {
  --z-base: 0; /* @kind other */
  --z-dropdown: 40; /* @kind other */
  --z-sticky: 50; /* @kind other */
  --z-overlay: 60; /* @kind other */
  --z-modal: 80; /* @kind other */
  --z-toast: 100; /* @kind other */
  --z-tooltip: 110; /* @kind other */

  /* v2: arrastar (estado levantado). Usam as propriedades rotate/scale, que somam
     ao transform inline das libs de drag em vez de brigar com ele. */
  --drag-rotate: -1.5deg; /* @kind other */
  --drag-scale: 1.02; /* @kind other */
  --kcol-min: 264px; /* @kind other */

  --bp-sm: 640px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;
}

/* ZCORP Obsidian — Motion Tokens */

:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); /* @kind other */
  --dur-fast: 150ms; /* @kind other */
  --dur-base: 240ms; /* @kind other */
  --dur-enter: 900ms; /* @kind other */ /* one-time entrance: charts draw, numbers count */
}

/* Entrance (added by motion.js once, on load). Never loops. */
.ds-enter .ds-bars-bar { transform-origin: bottom; animation: ds-grow var(--dur-enter) var(--ease-out) both; }
.ds-enter .ds-bars-bar:nth-child(2) { animation-delay: 40ms; } .ds-enter .ds-bars-bar:nth-child(3) { animation-delay: 80ms; } .ds-enter .ds-bars-bar:nth-child(4) { animation-delay: 120ms; } .ds-enter .ds-bars-bar:nth-child(5) { animation-delay: 160ms; } .ds-enter .ds-bars-bar:nth-child(6) { animation-delay: 200ms; } .ds-enter .ds-bars-bar:nth-child(7) { animation-delay: 240ms; }
.ds-enter .ds-hbar-fill, .ds-enter .ds-seg { transform-origin: left; animation: ds-grow-x var(--dur-enter) var(--ease-out) both; }
@keyframes ds-grow { from { transform: scaleY(0.04); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ds-grow-x { from { transform: scaleX(0.02); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ds-enter .ds-bars-bar, .ds-enter .ds-hbar-fill, .ds-enter .ds-seg { animation: none; } }

/* ZCORP Obsidian — Surface Classes */

/* ── Canvas ── */
.ds-surface-void {
  background-color: var(--color-void);
  background-image: radial-gradient(ellipse 80% 50% at 50% -10%, var(--white-a025), transparent 60%);
}

/* ── Card ── */
.ds-surface-card {
  position: relative;
  background-color: var(--color-obsidian);
  background-image: radial-gradient(ellipse 120% 80% at 50% 0%, var(--white-a045) 0%, transparent 55%);
  border: 1px solid var(--stroke-outer);
  border-radius: var(--radius-lg);
  box-shadow: var(--elev-2);
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-fast);
}
.ds-surface-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, var(--white-a080) 0%, var(--white-a000) 35%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.ds-surface-card--interactive:hover {
  transform: translateY(-1px);
  box-shadow: var(--elev-3);
  border-color: var(--white-a080);
}

/* ── Card, subtle wash (listas, tabelas — hierarquia menor que o hero) ── */
.ds-surface-card--subtle {
  background-image: radial-gradient(ellipse 120% 80% at 50% 0%, var(--white-a020) 0%, transparent 55%);
}

/* ── Glass (contêineres secundários, menus, popovers, gavetas) ── */
.ds-surface-glass {
  background: var(--color-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--stroke-inner);
  border-radius: var(--radius-md);
}

/* ── Well (recessed) ── */
.ds-surface-well {
  background: var(--color-void);
  border: 1px solid var(--stroke-inner);
  border-radius: var(--radius-md);
}

/* ── Voltage surface ── */
.ds-surface-voltage {
  background: linear-gradient(180deg, var(--color-voltage-hover) 0%, var(--color-voltage) 100%);
  color: var(--color-voltage-ink);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 1px var(--color-voltage) inset, 0 8px 24px -6px var(--color-voltage-glow);
}

/* ── Grain texture overlay ── */
.ds-surface-grain::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.5'/></svg>");
  opacity: 0.05;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* ── Hairline divider ── */
.ds-divider-hairline {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--stroke-divider) 20%, var(--stroke-divider) 80%, transparent);
}

/* ── Photo grade: one consistent treatment for every real photo (avatars, gallery, covers) ── */
.ds-photo-grade { position: relative; overflow: hidden; isolation: isolate; }
.ds-photo-grade > img { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.35) contrast(1.06) brightness(0.92); }
.ds-photo-grade::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 45%, var(--black-a450) 100%), color-mix(in oklch, var(--color-voltage) 6%, transparent); mix-blend-mode: normal; box-shadow: inset 0 0 0 1px var(--stroke-inner-hover); border-radius: inherit; }
.ds-avatar-photo { width: 40px; height: 40px; border-radius: var(--radius-pill); flex-shrink: 0; }
.ds-avatar-photo > img { filter: grayscale(0.2) contrast(1.05); }
.ds-avatar-photo::after { background: none; }

/* ZCORP Obsidian — Component CSS */

/* ═══════════════════════════════════════════════════
   BUTTON
═══════════════════════════════════════════════════ */
.ds-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: -0.005em;
  height: 40px; padding: 0 18px; border-radius: var(--radius-md);
  transition: all var(--dur-fast) var(--ease-out);
  cursor: pointer; white-space: nowrap; border: none;
}
.ds-btn:active { transform: scale(0.98); }
.ds-btn-voltage {
  background: linear-gradient(180deg, var(--color-voltage-hover) 0%, var(--color-voltage) 55%, color-mix(in oklch, var(--color-voltage) 82%, var(--color-void)) 100%);
  color: var(--color-voltage-ink);
  box-shadow:
    0 1px 0 var(--white-a550) inset,
    0 -2px 6px var(--black-a140) inset,
    0 8px 24px -6px var(--color-voltage-glow);
}
.ds-btn-voltage:hover { filter: brightness(1.05); box-shadow: 0 1px 0 var(--white-a600) inset, 0 -2px 6px var(--black-a140) inset, 0 10px 28px -6px var(--color-voltage-glow); }
.ds-btn-ghost {
  background: transparent; color: var(--color-ink-primary);
  border: 1px solid var(--stroke-inner);
}
.ds-btn-ghost:hover { background: var(--white-a030); border-color: var(--stroke-inner-hover); }
.ds-btn-danger {
  background: var(--color-signal-danger); color: var(--color-on-danger);
  box-shadow: 0 1px 0 var(--white-a300) inset, 0 6px 20px -4px var(--color-signal-danger-glow);
}
.ds-btn-pill { border-radius: var(--radius-pill); height: 44px; padding: 0 24px; }
.ds-btn-icon { width: 40px; padding: 0; }
.ds-btn-sm   { height: 34px; padding: 0 14px; font-size: 12px; }

/* ═══════════════════════════════════════════════════
   CHIP / BADGE
═══════════════════════════════════════════════════ */
.ds-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px; border-radius: var(--radius-pill); white-space: nowrap; flex-shrink: 0;
  font-size: 11px; font-weight: 500; letter-spacing: 0.02em;
  background: var(--white-a040);
  border: 1px solid var(--stroke-inner);
  color: var(--color-ink-primary);
}
.ds-chip-voltage {
  background: var(--color-voltage-soft); border-color: transparent; color: var(--color-voltage);
}
.ds-chip-voltage::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--color-voltage); box-shadow: 0 0 6px var(--color-voltage-glow);
}
.ds-chip-dot::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; box-shadow: 0 0 6px currentColor;
}
.ds-chip-priority-critical { background: color-mix(in oklch, var(--color-signal-danger) 14%, transparent); border-color: transparent; color: var(--color-signal-danger); }
.ds-chip-priority-high     { background: color-mix(in oklch, var(--color-signal-warn) 14%, transparent);   border-color: transparent; color: var(--color-signal-warn); }
.ds-chip-priority-medium   { background: var(--color-voltage-soft); border-color: transparent; color: var(--color-voltage); }
.ds-chip-priority-low      { background: color-mix(in oklch, var(--color-signal-calm) 14%, transparent);   border-color: transparent; color: var(--color-signal-calm); }
.ds-chip-client {
  height: 22px; padding: 0 8px 0 6px;
  background: var(--white-a030); border: 1px solid var(--stroke-inner);
  color: var(--color-ink-secondary); font-weight: 500;
}
.ds-chip-client .ds-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--color-voltage); }

/* ═══════════════════════════════════════════════════
   SEMANTIC STATUS BADGE
   Uso: <span class="badge badge-success">Pago</span>
═══════════════════════════════════════════════════ */
.ds-badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 20px; padding: 0 8px; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 10px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
  background: var(--white-a040);
  border: 1px solid var(--stroke-inner);
  color: var(--color-ink-secondary);
}
.ds-badge::before {
  content: ''; width: 4px; height: 4px; border-radius: 50%; flex-shrink: 0;
  background: currentColor; box-shadow: 0 0 5px currentColor;
}
.ds-badge-success {
  background: var(--color-signal-success-soft);
  border-color: oklch(0.80 0.15 155 / 0.25);
  color: var(--color-signal-success);
}
.ds-badge-danger {
  background: var(--color-signal-danger-soft);
  border-color: oklch(0.70 0.20 25 / 0.25);
  color: var(--color-signal-danger);
}
.ds-badge-warn {
  background: var(--color-signal-warn-soft);
  border-color: oklch(0.85 0.17 85 / 0.25);
  color: var(--color-signal-warn);
}
.ds-badge-calm {
  background: var(--color-signal-calm-soft);
  border-color: oklch(0.75 0.08 230 / 0.25);
  color: var(--color-signal-calm);
}

/* ═══════════════════════════════════════════════════
   FIELD + INPUT SYSTEM
═══════════════════════════════════════════════════ */
.ds-field { display: flex; flex-direction: column; gap: 8px; }
.ds-field-label {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--color-ink-secondary);
}
.ds-field-label .ds-req { color: var(--color-voltage); font-size: 14px; line-height: 0; transform: translateY(2px); }
.ds-field-label .ds-opt { color: var(--color-ink-tertiary); font-size: 10px; letter-spacing: 0.12em; font-weight: 500; }
.ds-field-hint {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--color-ink-tertiary); font-weight: 400; min-height: 16px;
}
.ds-field[data-state="error"]   .ds-field-hint { color: var(--color-signal-danger); }
.ds-field[data-state="success"] .ds-field-hint { color: var(--color-signal-success); }

.ds-ctrl {
  position: relative; display: flex; align-items: center;
  height: 44px;
  background: var(--color-void);
  border: 1px solid var(--stroke-inner);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}
.ds-ctrl:hover { border-color: var(--stroke-inner-hover); }
.ds-ctrl:focus-within {
  border-color: var(--color-voltage);
  box-shadow: 0 0 0 3px var(--color-voltage-soft);
  background: var(--color-void-raised);
}
.ds-ctrl--error         { border-color: var(--color-signal-danger) !important; }
.ds-ctrl--error:focus-within { box-shadow: 0 0 0 3px var(--color-signal-danger-soft); }
.ds-ctrl--success       { border-color: var(--color-signal-success); }
.ds-ctrl--disabled      { background: var(--color-void); border-color: var(--stroke-inner); opacity: 0.5; cursor: not-allowed; }
.ds-ctrl--disabled input,
.ds-ctrl--disabled textarea,
.ds-ctrl--disabled select { cursor: not-allowed; }

.ds-ctrl > input,
.ds-ctrl > textarea,
.ds-ctrl > select {
  flex: 1; min-width: 0;
  background: transparent; border: 0; outline: 0;
  color: var(--color-ink-primary);
  font-family: var(--font-body); font-size: 14px; font-weight: 400;
  height: 100%; padding: 0 14px;
  letter-spacing: -0.005em;
}
.ds-ctrl > input::placeholder,
.ds-ctrl > textarea::placeholder { color: var(--color-ink-tertiary); }
.ds-ctrl--prefix { padding-left: 14px; }
.ds-ctrl--prefix .ds-prefix { color: var(--color-ink-tertiary); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.ds-ctrl--prefix .ds-prefix + input { padding-left: 8px; }
.ds-ctrl .ds-suffix { padding: 0 12px 0 8px; color: var(--color-ink-tertiary); display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }

.ds-ctrl-float { position: relative; height: 56px; padding-top: 10px; }
.ds-ctrl-float > input { padding: 18px 14px 6px; height: 100%; }
.ds-ctrl-float > label {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--color-ink-tertiary); font-size: 14px; font-weight: 400;
  pointer-events: none; transition: all var(--dur-fast) var(--ease-out);
}
.ds-ctrl-float:focus-within > label,
.ds-ctrl-float[data-filled="true"] > label {
  top: 14px; transform: translateY(0);
  font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--color-ink-tertiary);
}
.ds-ctrl-float:focus-within > label { color: var(--color-voltage); }
.ds-ctrl-textarea { height: auto; align-items: stretch; }
.ds-ctrl-textarea > textarea {
  resize: none; padding: 12px 14px; height: auto; min-height: 84px;
  font-family: var(--font-body); line-height: 1.55;
  /* Custom scrollbar — matches obsidian palette */
  scrollbar-width: thin;
  scrollbar-color: var(--white-a080) transparent;
}
.ds-ctrl-textarea > textarea::-webkit-scrollbar { width: 5px; }
.ds-ctrl-textarea > textarea::-webkit-scrollbar-track { background: transparent; margin: 6px 0; }
.ds-ctrl-textarea > textarea::-webkit-scrollbar-thumb {
  background: var(--white-a090); border-radius: 3px;
}
.ds-ctrl-textarea > textarea::-webkit-scrollbar-thumb:hover {
  background: var(--white-a180);
}
/* Counter is now rendered outside .ds-ctrl — these rules kept for legacy compat only */
.ds-textarea-count {
  font-family: var(--font-num); font-size: 11px; color: var(--color-ink-tertiary);
  font-variant-numeric: tabular-nums;
}
.ds-textarea-count.ds-warn { color: var(--color-signal-warn); }

/* Select */
.ds-ctrl-select .ds-chevron { padding: 0 12px; color: var(--color-ink-tertiary); transition: transform var(--dur-fast); }
.ds-ctrl-select[data-open="true"] .ds-chevron { transform: rotate(180deg); color: var(--color-voltage); }
.ds-ctrl-select > button {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: transparent; border: 0; outline: 0; cursor: pointer;
  height: 100%; padding: 0 14px; text-align: left;
  color: var(--color-ink-primary); font-size: 14px;
}
.ds-ctrl-select[data-placeholder="true"] > button { color: var(--color-ink-tertiary); }
.ds-popover {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--color-onyx); border: 1px solid var(--stroke-inner); border-radius: var(--radius-md);
  padding: 6px; box-shadow: 0 1px 0 0 var(--white-a060) inset, 0 16px 40px -8px var(--black-a700);
  z-index: var(--z-dropdown); max-height: 280px; overflow-y: auto;
}
.ds-popover-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px; font-size: 13px; color: var(--color-ink-primary);
  cursor: pointer; transition: background var(--dur-fast);
}
.ds-popover-item:hover { background: var(--fill-hover); }
/* Bug 4: .ds-popover-item funciona em <button> e <div> sem reset do projeto */
:where(button.ds-popover-item, a.ds-popover-item) { width: 100%; border: 0; background: transparent; font: inherit; text-align: left; text-decoration: none; }
/* Lista solta (portal, Radix): sem posicao absoluta presa ao .ds-ctrl-select */
.ds-popover--static { position: relative; top: auto; left: auto; right: auto; }
.ds-popover-item[data-selected="true"] { background: var(--color-voltage-soft); color: var(--color-voltage); }
.ds-popover-item[data-selected="true"] .ds-check { opacity: 1; }
.ds-popover-item .ds-check { margin-left: auto; opacity: 0; color: var(--color-voltage); }

/* ═══════════════════════════════════════════════════
   CHECKBOX / RADIO / TOGGLE
═══════════════════════════════════════════════════ */
.ds-chk {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  background: var(--color-void); border: 1px solid var(--stroke-inner-hover); border-radius: 5px;
  transition: all var(--dur-fast) var(--ease-out); cursor: pointer; flex-shrink: 0;
}
.ds-chk svg { opacity: 0; transform: scale(0.6); transition: all var(--dur-fast) var(--ease-out); color: var(--color-voltage-ink); }
.ds-chk[data-checked="true"] {
  background: var(--color-voltage); border-color: var(--color-voltage);
  box-shadow: 0 0 12px -2px var(--color-voltage-glow);
}
.ds-chk[data-checked="true"] svg { opacity: 1; transform: scale(1); }
.ds-chk[data-indeterminate="true"] { background: var(--color-voltage-soft); border-color: var(--color-voltage); }
.ds-chk[data-indeterminate="true"]::after { content: ''; width: 8px; height: 2px; border-radius: 1px; background: var(--color-voltage); }

.ds-rad {
  width: 18px; height: 18px;
  background: var(--color-void); border: 1px solid var(--stroke-inner-hover);
  border-radius: 50%; transition: all var(--dur-fast); position: relative; flex-shrink: 0; cursor: pointer;
}
.ds-rad[data-checked="true"] { border-color: var(--color-voltage); }
.ds-rad[data-checked="true"]::after {
  content: ''; position: absolute; inset: 3px;
  background: var(--color-voltage); border-radius: 50%; box-shadow: 0 0 8px var(--color-voltage-glow);
}

.ds-toggle {
  width: 38px; height: 22px;
  background: var(--white-a060); border: 1px solid var(--stroke-inner);
  border-radius: var(--radius-pill); position: relative; cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out); flex-shrink: 0;
}
.ds-toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--color-ink-secondary); transition: all var(--dur-base) var(--ease-out);
  box-shadow: 0 1px 3px var(--black-a400);
}
.ds-toggle[data-on="true"] {
  background: var(--color-voltage); border-color: var(--color-voltage);
  box-shadow: 0 0 14px -2px var(--color-voltage-glow);
}
.ds-toggle[data-on="true"]::after { left: 18px; background: var(--color-voltage-ink); }
.ds-toggle-row { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.ds-toggle-row:hover .ds-toggle { border-color: var(--stroke-inner-hover); }

/* ═══════════════════════════════════════════════════
   DATE PICKER / CALENDAR
═══════════════════════════════════════════════════ */
.ds-cal {
  background: var(--color-onyx); border: 1px solid var(--stroke-inner); border-radius: 16px;
  padding: 14px;
  box-shadow: 0 16px 40px -8px var(--black-a700), 0 1px 0 0 var(--white-a050) inset;
  width: 288px;
}
.ds-cal-header { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 12px; }
.ds-cal-header button {
  color: var(--color-ink-secondary); width: 28px; height: 28px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
}
.ds-cal-header button:hover { background: var(--white-a040); color: var(--color-ink-primary); }
.ds-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ds-cal-dow { text-align: center; font-size: 10px; font-weight: 500; letter-spacing: 0.1em; color: var(--color-ink-tertiary); padding: 4px 0 10px; text-transform: uppercase; }
.ds-cal-day {
  height: 32px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums;
  color: var(--color-ink-primary); border-radius: 8px; cursor: pointer;
  transition: all var(--dur-fast);
}
.ds-cal-day:hover { background: var(--white-a040); }
.ds-cal-day[data-out="true"]      { color: var(--color-ink-tertiary); }
.ds-cal-day[data-today="true"]    { color: var(--color-voltage); font-weight: 600; }
.ds-cal-day[data-selected="true"] { background: var(--color-voltage); color: var(--color-voltage-ink); font-weight: 600; box-shadow: 0 0 14px -2px var(--color-voltage-glow); }
.ds-cal-day[data-range="true"]    { background: var(--color-voltage-soft); color: var(--color-voltage); border-radius: 0; }
.ds-cal-day[data-range-start="true"] { border-radius: 8px 0 0 8px; background: var(--color-voltage); color: var(--color-voltage-ink); }
.ds-cal-day[data-range-end="true"]   { border-radius: 0 8px 8px 0; background: var(--color-voltage); color: var(--color-voltage-ink); }

/* ═══════════════════════════════════════════════════
   NAV ICON (compact sidebar icon)
═══════════════════════════════════════════════════ */
.ds-nav-icon {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  color: var(--color-ink-tertiary); transition: all var(--dur-fast) var(--ease-out); position: relative;
}
.ds-nav-icon:hover { color: var(--color-ink-primary); background: var(--white-a040); }
.ds-nav-icon[data-active="true"] { color: var(--color-voltage); background: var(--color-voltage-soft); }
.ds-nav-icon[data-active="true"]::before {
  content: ''; position: absolute; left: -8px; top: 10px; bottom: 10px; width: 2px; border-radius: 2px;
  background: var(--color-voltage); box-shadow: 0 0 8px var(--color-voltage-glow);
}

/* ═══════════════════════════════════════════════════
   AVATAR
═══════════════════════════════════════════════════ */
.ds-avatar-placeholder {
  background: linear-gradient(135deg, var(--color-graphite) 0%, var(--color-obsidian) 100%);
  position: relative; overflow: hidden;
}
.ds-avatar-placeholder::after {
  content: attr(data-initial);
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-weight: 600; color: var(--color-ink-secondary); font-size: 14px;
}
.ds-avatar-stack { display: flex; }
.ds-avatar-stack > * + * { margin-left: -8px; }
.ds-avatar-sm {
  width: 22px; height: 22px; border-radius: 999px;
  background: linear-gradient(135deg, var(--color-graphite) 0%, var(--color-obsidian) 100%);
  border: 2px solid var(--color-obsidian);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 600; color: var(--color-ink-secondary); letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════════
   CODE BLOCK
═══════════════════════════════════════════════════ */
pre.ds-code {
  background: var(--color-void); border: 1px solid var(--stroke-inner); border-radius: var(--radius-md);
  padding: 16px 18px; font-family: var(--font-mono); font-size: 12px; line-height: 1.6;
  color: var(--color-ink-secondary); overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--white-a080) transparent;
}
pre.ds-code::-webkit-scrollbar { height: 5px; }
pre.ds-code::-webkit-scrollbar-track { background: transparent; }
pre.ds-code::-webkit-scrollbar-thumb { background: var(--white-a090); border-radius: 3px; }
pre.ds-code::-webkit-scrollbar-thumb:hover { background: var(--white-a180); }
pre.ds-code .ds-k { color: var(--color-signal-warn); }
pre.ds-code .ds-s { color: var(--color-voltage); }
pre.ds-code .ds-c { color: var(--color-ink-tertiary); }
pre.ds-code .ds-t { color: var(--color-signal-calm); }
pre.ds-code .ds-a { color: var(--color-ink-primary); }

/* ═══════════════════════════════════════════════════
   v2 · Numero com semantica (bug 9)
   Use SO em numeros (contadores, totais, deltas). Texto corrido continua em ink;
   status em palavra continua em .ds-badge. Contraste AA nas 4 cores sobre obsidian.
═══════════════════════════════════════════════════ */
.ds-tone-success { color: var(--color-signal-success); }
.ds-tone-danger  { color: var(--color-signal-danger); }
.ds-tone-warn    { color: var(--color-signal-warn); }
.ds-tone-calm    { color: var(--color-signal-calm); }
.ds-tone-muted   { color: var(--color-ink-tertiary); }

/* ZCORP Obsidian — Kanban Component CSS */

/* ── Kanban Card ── */
.ds-kcard {
  position: relative;
  background-color: var(--color-obsidian);
  background-image: radial-gradient(ellipse 140% 70% at 50% 0%, var(--fill-hover) 0%, transparent 60%);
  border: 1px solid var(--stroke-outer);
  border-radius: 16px;
  padding: 16px 18px 14px;
  box-shadow: var(--elev-2);
  /* Bug 5: SEM transicao de transform. As libs de arrastar (@hello-pangea/dnd, dnd-kit)
     escrevem transform inline a cada frame; uma transicao no mesmo campo cria atraso e tremor. */
  transition: box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
  cursor: grab;
  touch-action: manipulation;
}
.ds-kcard::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(180deg, var(--stroke-inner-hover) 0%, transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
/* Hover sem mover: so borda e sombra */
.ds-kcard:hover { border-color: var(--stroke-inner-hover); box-shadow: var(--elev-3); }
.ds-kcard:active { cursor: grabbing; }

/* Estado levantado (arrastando). Vale para card de kanban e item de calendario.
   rotate/scale sao propriedades proprias e SOMAM ao transform inline da lib. */
.ds-kcard.is-dragging, .ds-kcard[data-dragging="true"], .ds-lifted {
  rotate: var(--drag-rotate); scale: var(--drag-scale);
  box-shadow: var(--elev-lift); border-color: var(--stroke-lift);
  cursor: grabbing; z-index: var(--z-tooltip);
}
/* Espaco que fica no lugar de onde o card saiu */
.ds-drop-placeholder {
  border: 1px dashed var(--stroke-inner-hover); border-radius: 16px;
  background: var(--fill-faint); min-height: 72px;
}
@media (prefers-reduced-motion: reduce) {
  .ds-kcard.is-dragging, .ds-kcard[data-dragging="true"], .ds-lifted { rotate: none; scale: none; }
}

/* Priority rail — left-edge 2px signal */
.ds-kcard-rail {
  position: absolute; left: -1px; top: 16px; bottom: 16px;
  width: 2px; border-radius: 2px;
  background: var(--color-ink-tertiary);
}
.ds-kcard[data-priority="critical"] .ds-kcard-rail { background: var(--color-signal-danger); box-shadow: 0 0 8px color-mix(in oklch, var(--color-signal-danger) 40%, transparent); }
.ds-kcard[data-priority="high"]     .ds-kcard-rail { background: var(--color-signal-warn);   box-shadow: 0 0 6px color-mix(in oklch, var(--color-signal-warn) 35%, transparent); }
.ds-kcard[data-priority="medium"]   .ds-kcard-rail { background: var(--color-voltage);       box-shadow: 0 0 6px var(--color-voltage-glow); }
.ds-kcard[data-priority="low"]      .ds-kcard-rail { background: var(--color-signal-calm); }
.ds-kcard[data-blocked="true"] { border-color: color-mix(in oklch, var(--color-signal-danger) 40%, var(--stroke-outer)); }

/* Checklist progress */
.ds-kcard-checklist {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; padding: 10px 12px;
  background: var(--color-void); border: 1px solid var(--stroke-inner); border-radius: 10px;
}
.ds-kcard-checklist .ds-bar {
  flex: 1; height: 3px; border-radius: 2px;
  background: var(--white-a060); overflow: hidden; position: relative;
}
.ds-kcard-checklist .ds-bar > span {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--color-voltage); box-shadow: 0 0 8px var(--color-voltage-glow); border-radius: 2px;
}
.ds-kcard-checklist .ds-count { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 11px; color: var(--color-ink-secondary); }
.ds-kcard-checklist .ds-count b { color: var(--color-ink-primary); font-weight: 600; }

/* Meta row */
.ds-meta-row { display: flex; align-items: center; gap: 14px; color: var(--color-ink-tertiary); font-size: 11px; font-weight: 500; }
.ds-meta-row > span { display: inline-flex; align-items: center; gap: 4px; }
.ds-meta-row .ds-hot { color: var(--color-signal-warn); }

/* Quadro: colunas fluidas que dividem a largura (bug 6).
   Abaixo de --kcol-min por coluna, o quadro rola na horizontal. */
.ds-kboard {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: minmax(var(--kcol-min), 1fr);
  gap: 16px; align-items: start; overflow-x: auto; padding-bottom: 4px;
}

/* Coluna. Fora de .ds-kboard mantem 296px (compatibilidade com v1). */
.ds-kcol {
  width: var(--kcol-w, 296px); min-width: 0;
  display: flex; flex-direction: column; gap: 12px;
  max-height: var(--kcol-max-h, calc(100dvh - 220px));
  background: var(--fill-faint); border: 1px solid var(--stroke-inner); border-radius: 18px;
  padding: 14px; transition: background var(--dur-fast), border-color var(--dur-fast);
}
.ds-kboard > .ds-kcol { width: auto; }
.ds-kcol.is-over, .ds-kcol[data-over="true"] { background: var(--color-voltage-soft); border-color: var(--color-voltage); }
.ds-kcol-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px; flex-shrink: 0; }
/* Corpo rolavel: coluna longa nao estica a pagina */
.ds-kcol-body {
  flex: 1; min-height: 96px; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 10px; margin: 0 -4px; padding: 0 4px 2px;
}
.ds-kcol-empty {
  display: grid; place-items: center; min-height: 96px; padding: 16px; text-align: center;
  border: 1px dashed var(--stroke-inner-hover); border-radius: 14px;
  color: var(--color-ink-tertiary); font-size: 12px;
}

/* ZCORP Obsidian — Sidebar Component CSS */

.ds-sidebar {
  background: linear-gradient(180deg, var(--color-sidebar-hi) 0%, var(--color-sidebar-lo) 100%);
  border: 1px solid var(--stroke-inner); border-radius: 22px;
  padding: 18px 12px; position: relative;
  box-shadow: 0 1px 0 0 var(--white-a040) inset, 0 24px 48px -16px var(--black-a600);
}
.ds-sidebar::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(180deg, var(--white-a070) 0%, transparent 30%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.ds-sidebar--collapsed { width: 60px; }
.ds-sidebar--expanded  { width: 232px; }

.ds-sb-logo {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(180deg, var(--color-voltage-hover), var(--color-voltage));
  color: var(--color-voltage-ink); font-weight: 700; font-size: 16px;
  box-shadow: 0 1px 0 var(--white-a400) inset, 0 4px 16px -4px var(--color-voltage-glow);
  margin: 0 auto 22px;
}

.ds-sb-group-label {
  font-size: 9px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--color-ink-tertiary); padding: 0 12px; margin: 12px 0 8px;
}

.ds-sb-item {
  position: relative; display: flex; align-items: center; gap: 12px;
  height: 42px; padding: 0 10px; border-radius: 12px;
  color: var(--color-ink-tertiary);
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
  cursor: pointer; overflow: hidden;
}
.ds-sb-item .ds-sb-icon {
  width: 20px; height: 20px; flex-shrink: 0; display: grid; place-items: center;
  transition: transform var(--dur-base) var(--ease-out);
}
.ds-sb-item .ds-sb-label { font-size: 13px; font-weight: 500; letter-spacing: -0.005em; white-space: nowrap; }
.ds-sb-item .ds-sb-badge {
  margin-left: auto; font-family: var(--font-num); font-variant-numeric: tabular-nums;
  font-size: 10px; font-weight: 600; height: 18px; min-width: 18px; padding: 0 5px;
  border-radius: 6px; background: var(--white-a060); color: var(--color-ink-secondary);
  display: flex; align-items: center; justify-content: center;
}
.ds-sb-item:hover { color: var(--color-ink-primary); background: var(--white-a030); }
.ds-sb-item:hover .ds-sb-icon { color: var(--color-voltage); }
.ds-sb-item .ds-sb-icon::after {
  content: ''; position: absolute; inset: 8px auto 8px 10px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--color-voltage); filter: blur(12px); opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out); pointer-events: none; z-index: 0;
}
.ds-sb-item:hover .ds-sb-icon::after { opacity: 0.25; }
.ds-sb-item[data-active="true"] {
  color: var(--color-ink-primary);
  background: linear-gradient(90deg, var(--color-voltage-soft) 0%, transparent 100%);
}
.ds-sb-item[data-active="true"] .ds-sb-icon { color: var(--color-voltage); }
.ds-sb-item[data-active="true"] .ds-sb-icon::after { opacity: 0.35; }
.ds-sb-item[data-active="true"]::before {
  content: ''; position: absolute; left: 0; top: 10px; bottom: 10px;
  width: 2px; border-radius: 0 2px 2px 0;
  background: var(--color-voltage); box-shadow: 0 0 10px var(--color-voltage-glow);
}
.ds-sb-item[data-active="true"] .ds-sb-badge {
  background: var(--color-voltage); color: var(--color-voltage-ink);
  box-shadow: 0 0 8px -2px var(--color-voltage-glow);
}
.ds-sidebar--collapsed .ds-sb-item { justify-content: center; padding: 0; width: 100%; }
.ds-sidebar--collapsed .ds-sb-item .ds-sb-label,
.ds-sidebar--collapsed .ds-sb-item .ds-sb-badge,
.ds-sidebar--collapsed .ds-sb-group-label { display: none; }
.ds-sidebar--collapsed .ds-sb-user { padding: 4px 0; justify-content: center; }

.ds-sb-tooltip {
  position: absolute; left: calc(100% + 14px); top: 50%;
  transform: translateY(-50%) translateX(-6px);
  padding: 6px 10px; border-radius: 8px;
  background: var(--color-onyx); border: 1px solid var(--stroke-inner);
  font-size: 12px; font-weight: 500; color: var(--color-ink-primary);
  white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity var(--dur-fast), transform var(--dur-fast);
  z-index: 50; box-shadow: 0 8px 24px -8px var(--black-a600);
}
.ds-sidebar--collapsed .ds-sb-item:hover .ds-sb-tooltip { opacity: 1; transform: translateY(-50%) translateX(0); }

.ds-sb-user {
  display: flex; align-items: center; gap: 10px; padding: 8px;
  border-radius: 12px; transition: background var(--dur-fast); cursor: pointer;
}
.ds-sb-user:hover { background: var(--white-a030); }
.ds-sb-user .ds-av {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--color-avatar-hi) 0%, var(--color-avatar-lo) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: var(--color-ink-secondary);
  border: 1px solid var(--stroke-inner);
}

/* ZCORP Obsidian — Modal (v2: funciona em portal no body, sem CSS do projeto)

   Dois jeitos de montar:
   A) Overlay contem o modal (HTML puro, nosso React):
      <div class="ds-modal-overlay"><div class="ds-modal" role="dialog">...</div></div>
      O overlay e fixed, cobre a tela e centraliza o filho.
   B) Overlay e conteudo irmaos (Radix Dialog.Overlay + Dialog.Content em Portal):
      <Dialog.Overlay className="ds-modal-overlay" />
      <Dialog.Content className="ds-modal ds-modal--fixed">...</Dialog.Content>
      O .ds-modal--fixed se centraliza sozinho.
   Demonstracao dentro de um card (nao cobre a tela): .ds-modal-overlay--contained
   no overlay e position: relative no pai. */

.ds-modal-overlay {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  display: grid; place-items: center; padding: 16px; overflow-y: auto;
  background: var(--color-scrim);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.ds-modal-overlay--contained { position: absolute; z-index: auto; border-radius: inherit; }

.ds-modal {
  position: relative; width: min(480px, 100%);
  max-height: calc(100dvh - 32px); display: flex; flex-direction: column;
  background-color: var(--color-obsidian);
  background-image: radial-gradient(ellipse 120% 60% at 50% 0%, var(--fill-strong) 0%, transparent 50%);
  border: 1px solid var(--stroke-outer); border-radius: 22px;
  box-shadow: var(--elev-overlay);
  overflow: hidden;
}
.ds-modal--sm { width: min(400px, 100%); }
.ds-modal--md { width: min(560px, 100%); }
.ds-modal--lg { width: min(720px, 100%); }
.ds-modal--fixed {
  position: fixed; z-index: var(--z-modal); left: 50%; top: 50%;
  translate: -50% -50%; max-width: calc(100vw - 32px);
}
.ds-modal::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(180deg, var(--stroke-lift) 0%, transparent 30%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}

.ds-modal-header { padding: 24px 26px 16px; display: flex; align-items: flex-start; gap: 16px; flex-shrink: 0; }
.ds-modal-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: var(--fill-hover); border: 1px solid var(--stroke-inner); color: var(--color-ink-secondary);
}
.ds-modal-icon--voltage { background: var(--color-voltage-soft); border-color: transparent; color: var(--color-voltage); box-shadow: 0 0 16px -4px var(--color-voltage-glow); }
.ds-modal-icon--danger  { background: var(--color-signal-danger-soft); border-color: transparent; color: var(--color-signal-danger); box-shadow: 0 0 16px -4px var(--color-signal-danger-glow); }

.ds-modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 1;
  width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; padding: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-ink-tertiary); cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.ds-modal-close:hover { background: var(--fill-hover); color: var(--color-ink-primary); }

.ds-modal-body { padding: 0 26px 20px; overflow-y: auto; flex: 1; min-height: 0; overscroll-behavior: contain; }
.ds-modal-footer {
  padding: 16px 20px 20px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-shrink: 0;
  border-top: 1px solid var(--stroke-divider); background: var(--color-void-raised);
}
.ds-modal-footer--start   { justify-content: flex-start; }
.ds-modal-footer--between { justify-content: space-between; }

/* Entrada e saida. Radix poe data-state="open|closed" e espera o fim da animacao para desmontar.
   Usa as propriedades opacity/scale (nao transform), entao nao briga com o translate de centralizacao. */
@keyframes ds-fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes ds-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes ds-pop-in   { from { opacity: 0; scale: 0.96; } to { opacity: 1; scale: 1; } }
@keyframes ds-pop-out  { from { opacity: 1; scale: 1; } to { opacity: 0; scale: 0.97; } }
.ds-modal-overlay, .ds-modal-overlay[data-state="open"] { animation: ds-fade-in var(--dur-base) var(--ease-out); }
.ds-modal, .ds-modal[data-state="open"] { animation: ds-pop-in var(--dur-base) var(--ease-out); }
.ds-modal-overlay[data-state="closed"] { animation: ds-fade-out var(--dur-fast) ease-in forwards; }
.ds-modal[data-state="closed"] { animation: ds-pop-out var(--dur-fast) ease-in forwards; }
@media (prefers-reduced-motion: reduce) {
  .ds-modal-overlay, .ds-modal, .ds-modal[data-state], .ds-modal-overlay[data-state] { animation: none; }
}

/* ZCORP Obsidian — Extra Component CSS: Tabs, Toast, Table */

/* ═══════════════════════════════════════════════════
   TABS
═══════════════════════════════════════════════════ */
.ds-tabs {
  display: flex; gap: 2px;
  background: var(--color-void); border: 1px solid var(--stroke-inner);
  border-radius: var(--radius-md); padding: 4px; width: fit-content;
}
.ds-tab {
  height: 34px; padding: 0 16px; border-radius: 10px;
  font-size: 13px; font-weight: 500; color: var(--color-ink-secondary);
  cursor: pointer; transition: all var(--dur-fast) var(--ease-out);
  display: flex; align-items: center; gap: 8px; white-space: nowrap; border: none; background: none;
}
.ds-tab:hover { color: var(--color-ink-primary); background: var(--white-a030); }
.ds-tab[data-active="true"] {
  color: var(--color-ink-primary);
  background: var(--color-obsidian);
  box-shadow: 0 1px 0 0 var(--white-a050) inset, 0 1px 3px var(--black-a300);
}
.ds-tab .ds-tab-badge {
  font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums;
  background: var(--white-a060); color: var(--color-ink-secondary);
  border-radius: 4px; padding: 2px 6px;
}
.ds-tab[data-active="true"] .ds-tab-badge { background: var(--color-voltage-soft); color: var(--color-voltage); }

/* Underline variant */
.ds-tabs--line {
  background: transparent; border: none; border-bottom: 1px solid var(--stroke-divider);
  border-radius: 0; padding: 0; gap: 0; width: 100%;
}
.ds-tabs--line .ds-tab { border-radius: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ds-tabs--line .ds-tab[data-active="true"] {
  background: transparent; box-shadow: none;
  border-bottom-color: var(--color-voltage); color: var(--color-ink-primary);
}

/* ═══════════════════════════════════════════════════
   TOAST
═══════════════════════════════════════════════════ */
.ds-toast-stack {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: var(--z-toast); pointer-events: none;
}
.ds-toast {
  display: flex; align-items: flex-start; gap: 14px; position: relative; overflow: hidden;
  min-width: 340px; max-width: 420px;
  background-color: var(--color-obsidian);
  background-image: radial-gradient(ellipse 120% 80% at 50% 0%, var(--fill-hover) 0%, transparent 55%);
  border: 1px solid var(--stroke-outer);
  border-radius: var(--radius-lg); padding: 16px 18px 17px;
  box-shadow: var(--elev-overlay);
  animation: toast-in var(--dur-base) var(--ease-out);
}
.ds-toast::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(180deg, var(--stroke-inner-hover) 0%, transparent 32%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
@keyframes toast-in {
  from { opacity: 0; translate: 0 14px; scale: 0.96; }
  to   { opacity: 1; translate: 0 0; scale: 1; }
}
.ds-toast-icon-chip {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--fill-hover); border: 1px solid var(--stroke-inner); color: var(--color-ink-secondary);
}
.ds-toast-body { flex: 1; min-width: 0; padding-top: 2px; }
.ds-toast-title { font-size: 13px; font-weight: 600; color: var(--color-ink-primary); line-height: 1.3; letter-spacing: -0.005em; }
.ds-toast-desc  { font-size: 12px; color: var(--color-ink-secondary); margin-top: 3px; line-height: 1.45; }
.ds-toast-close {
  background: none; border: none; border-radius: 6px; margin-top: 1px; margin-right: -4px;
  color: var(--color-ink-tertiary); cursor: pointer; flex-shrink: 0;
  transition: color var(--dur-fast), background var(--dur-fast); padding: 4px;
}
.ds-toast-close:hover { color: var(--color-ink-primary); background: var(--fill-hover); }
.ds-toast--success .ds-toast-icon-chip { background: var(--color-signal-success-soft); border-color: transparent; color: var(--color-signal-success); box-shadow: 0 0 16px -4px var(--color-signal-success-glow); }
.ds-toast--warn    .ds-toast-icon-chip { background: var(--color-signal-warn-soft);    border-color: transparent; color: var(--color-signal-warn);    box-shadow: 0 0 16px -4px var(--color-signal-warn-glow); }
.ds-toast--danger  .ds-toast-icon-chip { background: var(--color-signal-danger-soft);  border-color: transparent; color: var(--color-signal-danger);  box-shadow: 0 0 16px -4px var(--color-signal-danger-glow); }
.ds-toast--voltage .ds-toast-icon-chip { background: var(--color-voltage-soft);        border-color: transparent; color: var(--color-voltage);        box-shadow: 0 0 16px -4px var(--color-voltage-glow); }
.ds-toast-progress {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--color-ink-tertiary); opacity: 0.4; transform-origin: left;
  animation: toast-progress linear forwards;
}
.ds-toast--success .ds-toast-progress { background: var(--color-signal-success); opacity: 0.6; }
.ds-toast--warn    .ds-toast-progress { background: var(--color-signal-warn);    opacity: 0.6; }
.ds-toast--danger  .ds-toast-progress { background: var(--color-signal-danger);  opacity: 0.6; }
.ds-toast--voltage .ds-toast-progress { background: var(--color-voltage);       opacity: 0.6; }
@keyframes toast-progress { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ═══════════════════════════════════════════════════
   TABLE
═══════════════════════════════════════════════════ */
.ds-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ds-table th {
  text-align: left; padding: 10px 14px;
  font-size: 10px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--color-ink-tertiary);
  border-bottom: 1px solid var(--stroke-divider); white-space: nowrap;
}
.ds-table td {
  padding: 12px 14px; border-bottom: 1px solid var(--stroke-divider);
  color: var(--color-ink-primary); vertical-align: middle;
}
.ds-table tr:last-child td { border-bottom: none; }
.ds-table tbody tr { transition: background var(--dur-fast); }
.ds-table tbody tr:hover td { background: var(--white-a020); }
.ds-table--striped tbody tr:nth-child(even) td { background: var(--white-a015); }
.ds-table--compact th,
.ds-table--compact td { padding: 8px 12px; }

/* ═══════════════════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════════════════ */
.ds-empty-state {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 56px 32px; gap: 6px;
}
.ds-empty-state-icon {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  background: var(--white-a040); border: 1px solid var(--stroke-inner);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-ink-tertiary); margin-bottom: 14px;
}
.ds-empty-state-title { font-size: 15px; font-weight: 600; color: var(--color-ink-primary); letter-spacing: -0.01em; }
.ds-empty-state-desc  { font-size: 13px; color: var(--color-ink-secondary); max-width: 320px; line-height: 1.5; margin: 0; }
.ds-empty-state-action { margin-top: 16px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
/* Premium empty state: dotted atmosphere + glowing icon */
.ds-empty-state--field { position: relative; isolation: isolate; overflow: hidden; border-radius: inherit; }
.ds-empty-state--field::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(circle, var(--stroke-inner-hover) 1px, transparent 1.4px); background-size: 7px 7px; -webkit-mask-image: radial-gradient(ellipse 55% 50% at 50% 36%, #000 15%, transparent 70%); mask-image: radial-gradient(ellipse 55% 50% at 50% 36%, #000 15%, transparent 70%); }
.ds-empty-state-icon--glow { width: 56px; height: 56px; border-radius: var(--radius-pill); color: var(--color-voltage); background: var(--color-void); border: 1px solid color-mix(in oklch, var(--color-voltage) 30%, transparent); box-shadow: 0 0 0 6px var(--color-voltage-soft), 0 0 32px -4px var(--color-voltage-glow); margin-bottom: 20px; }
.ds-empty-state-title--lg { font-size: 20px; letter-spacing: -0.02em; }
/* Syncing indicator: the only allowed looping motion (loading) */
.ds-live-label--pulse::before { animation: live-pulse 1.6s var(--ease-out) infinite; }
@keyframes live-pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--color-voltage-glow); } 50% { opacity: .55; box-shadow: 0 0 0 4px transparent; } }
@media (prefers-reduced-motion: reduce) { .ds-live-label--pulse::before { animation: none; } }

/* ═══════════════════════════════════════════════════
   SKELETON
═══════════════════════════════════════════════════ */
.ds-skel {
  display: inline-block;
  background: linear-gradient(100deg, var(--color-onyx) 40%, var(--color-graphite) 50%, var(--color-onyx) 60%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.6s ease-in-out infinite;
}
@keyframes skel-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ═══════════════════════════════════════════════════
   STAGGER ENTRANCE — rows/bars fading up on mount
   Apply via inline style="animation-delay:Nms" per index.
═══════════════════════════════════════════════════ */
@keyframes stagger-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ds-table tbody tr { animation: stagger-in 0.32s var(--ease-out) both; }
.ds-stagger-in { animation: stagger-in 0.32s var(--ease-out) both; }

/* ZCORP Obsidian — Overlays v2: Drawer, Menu/Select/Combobox (padrao Radix), Toast com acao.
   Tudo funciona em portal no body sem CSS do projeto.
   Estados lidos do Radix: data-state="open|closed|checked", data-highlighted, data-disabled,
   data-side="top|bottom|left|right". Equivalentes manuais: aria-selected, aria-disabled. */

/* ═══════════════════════════════════════════════════
   DRAWER (peca 1)
   Radix: <Dialog.Overlay className="ds-modal-overlay" />
          <Dialog.Content className="ds-drawer ds-drawer--md">...
═══════════════════════════════════════════════════ */
.ds-drawer {
  position: fixed; z-index: var(--z-modal); top: 0; right: 0; bottom: 0;
  width: min(480px, calc(100vw - 16px));
  display: flex; flex-direction: column;
  background-color: var(--color-obsidian);
  background-image: radial-gradient(ellipse 120% 40% at 50% 0%, var(--fill-hover) 0%, transparent 60%);
  border: 1px solid var(--stroke-outer);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg); border-right: 0;
  box-shadow: var(--elev-overlay);
  overflow: hidden;
}
.ds-drawer--md { width: min(640px, calc(100vw - 16px)); }
.ds-drawer--lg { width: min(960px, calc(100vw - 16px)); }
.ds-drawer::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(90deg, var(--stroke-lift) 0%, transparent 18%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.ds-drawer-header {
  display: flex; align-items: flex-start; gap: 16px; flex-shrink: 0;
  padding: 22px 24px 18px; border-bottom: 1px solid var(--stroke-divider);
}
.ds-drawer-title { flex: 1; min-width: 0; }
.ds-drawer-close {
  width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; padding: 0; flex-shrink: 0;
  display: grid; place-items: center; color: var(--color-ink-tertiary); cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.ds-drawer-close:hover { background: var(--fill-hover); color: var(--color-ink-primary); }
.ds-drawer-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 24px 24px; }
.ds-drawer-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-shrink: 0;
  padding: 16px 24px; border-top: 1px solid var(--stroke-divider); background: var(--color-void-raised);
}
.ds-drawer-footer--between { justify-content: space-between; }
@keyframes ds-drawer-in  { from { translate: 100% 0; } to { translate: 0 0; } }
@keyframes ds-drawer-out { from { translate: 0 0; } to { translate: 100% 0; } }
.ds-drawer, .ds-drawer[data-state="open"] { animation: ds-drawer-in var(--dur-base) var(--ease-out); }
.ds-drawer[data-state="closed"] { animation: ds-drawer-out var(--dur-fast) ease-in forwards; }
/* Celular: vira folha de baixo para cima, cantos so em cima */
@media (max-width: 640px) {
  .ds-drawer, .ds-drawer--md, .ds-drawer--lg {
    top: auto; left: 0; right: 0; width: 100%; max-height: 92dvh;
    border-right: 1px solid var(--stroke-outer); border-bottom: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  @keyframes ds-drawer-in  { from { translate: 0 100%; } to { translate: 0 0; } }
  @keyframes ds-drawer-out { from { translate: 0 0; } to { translate: 0 100%; } }
}

/* ═══════════════════════════════════════════════════
   MENU / SELECT / COMBOBOX (peca 3)
   Gatilho:  .ds-select-trigger  (Radix Select.Trigger, ou <button> do combobox)
   Conteudo: .ds-menu            (Select.Content, DropdownMenu.Content, ContextMenu.Content, Popover.Content)
   Item:     .ds-menu-item       (Select.Item, DropdownMenu.Item, ...)
═══════════════════════════════════════════════════ */
.ds-select-trigger {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; height: 44px; padding: 0 12px 0 14px;
  background: var(--color-void); border: 1px solid var(--stroke-inner); border-radius: var(--radius-sm);
  font: inherit; font-size: 14px; color: var(--color-ink-primary); text-align: left; cursor: pointer;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background var(--dur-fast);
}
.ds-select-trigger:hover { border-color: var(--stroke-inner-hover); }
.ds-select-trigger[data-state="open"], .ds-select-trigger[aria-expanded="true"], .ds-select-trigger:focus-visible {
  outline: none; border-color: var(--color-voltage); box-shadow: 0 0 0 3px var(--color-voltage-soft); background: var(--color-void-raised);
}
.ds-select-trigger[data-placeholder] { color: var(--color-ink-tertiary); }
.ds-select-trigger[data-disabled], .ds-select-trigger:disabled { opacity: 0.5; cursor: not-allowed; }
.ds-select-trigger[aria-invalid="true"] { border-color: var(--color-signal-danger); }
.ds-select-trigger > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-select-chevron { flex-shrink: 0; color: var(--color-ink-tertiary); transition: rotate var(--dur-fast); }
.ds-select-trigger[data-state="open"] .ds-select-chevron, .ds-select-trigger[aria-expanded="true"] .ds-select-chevron { rotate: 180deg; color: var(--color-voltage); }
.ds-select-trigger--sm { height: 34px; font-size: 13px; }
.ds-select-trigger--pill { border-radius: var(--radius-pill); }

.ds-menu {
  z-index: var(--z-dropdown);
  min-width: max(180px, var(--radix-select-trigger-width, var(--radix-popper-anchor-width, 0px)));
  max-height: min(320px, var(--radix-select-content-available-height, var(--radix-popper-available-height, 320px)));
  overflow-y: auto; overscroll-behavior: contain;
  padding: 6px; display: flex; flex-direction: column; gap: 1px;
  background: var(--color-onyx); border: 1px solid var(--stroke-inner); border-radius: var(--radius-md);
  box-shadow: var(--elev-overlay);
  transform-origin: var(--radix-select-content-transform-origin, var(--radix-popper-transform-origin, top));
}
/* Radix Select (position="popper") usa um viewport interno */
.ds-menu [data-radix-select-viewport] { display: flex; flex-direction: column; gap: 1px; }
@keyframes ds-menu-in { from { opacity: 0; scale: 0.97; } to { opacity: 1; scale: 1; } }
.ds-menu[data-state="open"], .ds-menu:not([data-state]) { animation: ds-menu-in var(--dur-fast) var(--ease-out); }
.ds-menu[data-state="closed"] { animation: ds-fade-out 100ms ease-in forwards; }

.ds-menu-item {
  position: relative; display: flex; align-items: center; gap: 10px;
  width: 100%; min-height: 36px; padding: 8px 10px; border: 0; border-radius: 8px;
  background: transparent; font: inherit; font-size: 13px; color: var(--color-ink-primary); text-align: left; text-decoration: none;
  cursor: pointer; outline: none; user-select: none;
}
.ds-menu-item:hover, .ds-menu-item[data-highlighted], .ds-menu-item[data-active="true"] { background: var(--fill-strong); }
.ds-menu-item[data-state="checked"], .ds-menu-item[aria-selected="true"] { color: var(--color-voltage); }
.ds-menu-item[data-state="checked"][data-highlighted], .ds-menu-item[aria-selected="true"][data-active="true"] { background: var(--color-voltage-soft); }
.ds-menu-item[data-disabled], .ds-menu-item[aria-disabled="true"] { color: var(--color-ink-disabled); cursor: not-allowed; background: transparent; }
.ds-menu-item--danger { color: var(--color-signal-danger); }
.ds-menu-item--danger[data-highlighted], .ds-menu-item--danger:hover { background: var(--color-signal-danger-soft); }
.ds-menu-icon { flex-shrink: 0; width: 16px; height: 16px; display: grid; place-items: center; color: var(--color-ink-tertiary); }
.ds-menu-item[data-state="checked"] .ds-menu-icon, .ds-menu-item[aria-selected="true"] .ds-menu-icon { color: currentColor; }
.ds-menu-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ds-menu-text > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-menu-desc { font-size: 12px; color: var(--color-ink-tertiary); line-height: 1.35; }
.ds-menu-check { flex-shrink: 0; margin-left: auto; color: var(--color-voltage); opacity: 0; }
.ds-menu-item[data-state="checked"] .ds-menu-check, .ds-menu-item[aria-selected="true"] .ds-menu-check { opacity: 1; }
.ds-menu-kbd { margin-left: auto; font-size: 11px; color: var(--color-ink-tertiary); font-family: var(--font-num); }
.ds-menu-label { padding: 8px 10px 4px; font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-ink-tertiary); }
.ds-menu-sep { height: 1px; margin: 5px 4px; background: var(--stroke-divider); flex-shrink: 0; }
.ds-menu-empty { padding: 14px 10px; font-size: 13px; color: var(--color-ink-tertiary); text-align: center; }
.ds-menu-loading { padding: 10px; display: flex; flex-direction: column; gap: 8px; }

/* Combobox: campo de busca no topo do menu */
.ds-menu-search {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  margin: -2px -2px 4px; padding: 0 10px; height: 38px;
  border-bottom: 1px solid var(--stroke-divider); color: var(--color-ink-tertiary);
}
.ds-menu-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none; font: inherit; font-size: 13px; color: var(--color-ink-primary); }
.ds-menu-search input::placeholder { color: var(--color-ink-tertiary); }

/* ═══════════════════════════════════════════════════
   TOAST v2 (peca 4): acao, posicao, empilhamento, saida
═══════════════════════════════════════════════════ */
.ds-toast-action {
  flex-shrink: 0; align-self: center; height: 30px; padding: 0 12px; margin-left: 2px;
  border: 1px solid var(--stroke-inner-hover); border-radius: var(--radius-pill);
  background: var(--fill-hover); font: inherit; font-size: 12px; font-weight: 600; color: var(--color-ink-primary);
  cursor: pointer; transition: background var(--dur-fast), border-color var(--dur-fast);
}
.ds-toast-action:hover { background: var(--fill-strong); border-color: var(--stroke-lift); }
.ds-toast > * { pointer-events: auto; }
.ds-toast--compact { min-width: 0; padding: 12px 14px; align-items: center; }
.ds-toast-stack--top-right    { top: 24px; bottom: auto; }
.ds-toast-stack--top-center   { top: 24px; bottom: auto; right: auto; left: 50%; translate: -50% 0; align-items: center; }
.ds-toast-stack--bottom-center{ right: auto; left: 50%; translate: -50% 0; align-items: center; }
.ds-toast-stack--bottom-left  { right: auto; left: 24px; }
@keyframes ds-toast-out { to { opacity: 0; scale: 0.96; } }
.ds-toast[data-state="closed"], .ds-toast[data-visible="false"] { animation: ds-toast-out var(--dur-fast) ease-in forwards; }
@media (max-width: 640px) {
  .ds-toast-stack { left: 12px; right: 12px; bottom: 12px; translate: none; align-items: stretch; }
  .ds-toast { min-width: 0; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ds-drawer, .ds-drawer[data-state], .ds-menu, .ds-menu[data-state], .ds-toast[data-state="closed"] { animation: none; }
}
 /* depois de extras: modificadores v2 do toast */
/* ZCORP Obsidian — Premium Patterns
   Extracted 1:1 from the ZCORP Dashboard (the original reference screen).
   These are the details that make the system look premium. Use them by name —
   do not rebuild them with ad-hoc styles. Snippets: PATTERNS.md */

/* ── P1 · Card header: title left, quiet menu right ── */
.ds-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.ds-card-menu { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin: -6px -6px -6px 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--color-ink-tertiary); cursor: pointer; transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); }
.ds-card-menu:hover { color: var(--color-ink-primary); background: var(--fill-hover); }

/* ── P2 · Hero KPI: 10px label over 56px number, decimals dimmed ── */
.ds-kpi-label { display: block; margin-bottom: 8px; }
.ds-kpi-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ds-kpi-row > :first-child { white-space: nowrap; min-width: 0; }
.ds-kpi-row > svg { flex-shrink: 0; }
.ds-kpi-dim { color: var(--color-ink-tertiary); }
.ds-kpi-unit { margin-left: 6px; font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-ink-secondary); font-family: var(--font-body); }

/* ── P3 · Live label: "● Active" status line under data ── */
.ds-live-label { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; line-height: 1; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-ink-tertiary); }
.ds-live-label::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.ds-live-label--on { color: var(--color-voltage); }
.ds-live-label--on::before { box-shadow: 0 0 6px var(--color-voltage-glow); }

/* ── P4 · Glow card: voltage light leaking from bottom-right corner ── */
.ds-surface-card--glow { background-image: radial-gradient(ellipse 140% 90% at 100% 100%, var(--color-voltage-soft), transparent 55%), radial-gradient(ellipse 120% 80% at 50% 0%, var(--white-a045) 0%, transparent 55%); }

/* ── P5 · Well row: list item recessed inside a card ── */
.ds-well-list { display: flex; flex-direction: column; gap: 12px; }
.ds-well-row { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--color-void); border: 1px solid var(--stroke-inner); border-radius: var(--radius-md); transition: border-color var(--dur-fast) var(--ease-out); }
a.ds-well-row, button.ds-well-row, .ds-well-row[role="button"] { cursor: pointer; color: inherit; text-decoration: none; }
a.ds-well-row:hover, button.ds-well-row:hover, .ds-well-row[role="button"]:hover { border-color: var(--stroke-inner-hover); }
.ds-well-row-body { flex: 1; min-width: 0; line-height: 1.2; }
.ds-well-row-body .ds-label-sm { margin-top: 4px; }
.ds-well-row-chev { flex-shrink: 0; color: var(--color-ink-tertiary); }

/* ── P6 · Activity bars: neutral pills, one voltage peak with glow ── */
.ds-bars { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-rows: 100%; align-items: end; gap: 12px; height: 140px; padding: 0 4px; margin-top: var(--bars-tip-space, 36px); }
.ds-bars-bar { min-width: 0; border-radius: var(--radius-pill); background: var(--stroke-inner); }
.ds-bars-bar--peak { position: relative; background: linear-gradient(180deg, var(--color-voltage-hover) 0%, var(--color-voltage) 55%, color-mix(in oklch, var(--color-voltage) 80%, var(--color-void)) 100%); box-shadow: inset 0 1px 0 var(--white-a550), 0 0 18px -2px var(--color-voltage-glow); }
.ds-bars-tip { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); padding: 4px 8px; border-radius: 6px; background: var(--color-voltage); color: var(--color-voltage-ink); font-family: var(--font-num); font-size: 11px; font-weight: 600; white-space: nowrap; }
.ds-bars-axis { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; padding: 0 4px; margin-top: 12px; text-align: center; }
.ds-bars-axis > * { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-bars-axis > .is-peak { color: var(--color-voltage); }

/* ── P7 · Ring gauge: thick track, glowing voltage arc ── */
.ds-ring { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.ds-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ds-ring-track { fill: none; stroke: var(--stroke-inner); }
.ds-ring-value { fill: none; stroke: var(--color-voltage); stroke-linecap: round; filter: drop-shadow(0 0 6px var(--color-voltage-glow)); transition: stroke-dasharray var(--dur-base) var(--ease-out); }
.ds-ring-center { position: relative; }
.ds-ring-cap { fill: var(--color-ink-primary); }
/* Valor 0: a ponta redonda do traco desenharia um ponto solto */
.ds-ring[data-empty] .ds-ring-value, .ds-ring[data-empty] .ds-ring-cap,
.ds-ring-value[stroke-dasharray^="0 "], .ds-ring-value[stroke-dasharray^="0.0 "] { display: none; }

/* ── P8 · Segment track: proportional segments, active one glows ── */
.ds-seg-track { display: flex; align-items: center; gap: 8px; padding: 12px; }
.ds-seg { height: 8px; border-radius: var(--radius-pill); background: var(--stroke-inner); }
.ds-seg--on { background: linear-gradient(180deg, var(--color-voltage-hover) 0%, var(--color-voltage) 55%, color-mix(in oklch, var(--color-voltage) 80%, var(--color-void)) 100%); box-shadow: inset 0 1px 0 var(--white-a550), 0 0 14px -2px var(--color-voltage-glow); }

/* ── P9 · Identity pill: avatar + name + meta in the top bar ── */
.ds-identity-pill { display: inline-flex; align-items: center; gap: 12px; height: 44px; padding: 0 16px 0 6px; border-radius: var(--radius-pill); background: var(--fill-subtle); border: 1px solid var(--stroke-inner); }
.ds-identity-pill-meta { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-ink-tertiary); margin-top: 2px; }

/* ── P10 · Page head: eyebrow label + title, actions right ── */
.ds-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 28px 0 24px; }
.ds-page-head .ds-label-sm { display: block; margin-bottom: 8px; }
.ds-page-head-actions { display: flex; align-items: center; gap: 12px; }

/* ── P11 · Card grid: the dashboard rhythm ── */
.ds-card-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.ds-card-pad { padding: 24px; }

/* ═══ v2 — extracted from the original reference shots ═══ */

/* ── P12 · App shell + stage: THE background. Void rail/topbar, one raised rounded stage holding all cards ── */
.ds-app-shell { display: grid; grid-template-columns: 72px minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; background: var(--color-void); padding: 0 16px 16px 0; box-sizing: border-box; }
.ds-app-rail { grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 0; }
.ds-app-rail-logo { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--stroke-divider); color: var(--color-voltage); font-weight: 700; font-size: 22px; letter-spacing: -0.04em; box-sizing: content-box; }
.ds-app-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; padding: 0 8px 0 4px; }
.ds-app-stage { position: relative; min-width: 0; padding: 16px; border-radius: var(--radius-xl); background-color: var(--color-void-raised); background-image: radial-gradient(ellipse 70% 50% at 0% 0%, var(--fill-hover), transparent 60%); border: 1px solid var(--stroke-divider); box-shadow: inset 0 1px 0 var(--stroke-divider); }
.ds-app-backdrop { min-height: 100vh; padding: 48px; box-sizing: border-box; background-color: var(--color-onyx); background-image: radial-gradient(ellipse 90% 70% at 50% 0%, var(--color-graphite), var(--color-void) 85%); }
.ds-app-backdrop > .ds-app-shell { min-height: 0; border-radius: var(--radius-xl); border: 1px solid var(--stroke-inner); box-shadow: var(--elev-3); }

/* ── P13 · Hatch: diagonal texture for "potential / target" areas ── */
.ds-hatch { background-image: repeating-linear-gradient(135deg, var(--stroke-inner-hover) 0 1px, transparent 1px 5px); }
.ds-bars--hatch .ds-bars-bar { position: relative; background: repeating-linear-gradient(135deg, var(--stroke-inner-hover) 0 1px, transparent 1px 5px), var(--fill-subtle); box-shadow: none; }
.ds-bars--hatch .ds-bars-bar::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: var(--fill, 78%); border-radius: inherit; background: linear-gradient(180deg, color-mix(in oklch, var(--color-ink-tertiary) 75%, transparent), color-mix(in oklch, var(--color-ink-tertiary) 45%, transparent)); box-shadow: inset 0 1px 0 var(--stroke-inner-hover); }
.ds-bars--hatch .ds-bars-bar--peak::after { background: linear-gradient(180deg, var(--color-voltage-hover) 0%, var(--color-voltage) 55%, color-mix(in oklch, var(--color-voltage) 80%, var(--color-void)) 100%); box-shadow: inset 0 1px 0 var(--white-a550), 0 0 18px -2px var(--color-voltage-glow); }
.ds-bars--hatch .ds-bars-tip { bottom: auto; top: calc(100% - var(--fill, 78%) - 30px); z-index: 1; }
.ds-seg--hatch { background: repeating-linear-gradient(135deg, var(--stroke-inner-hover) 0 1px, transparent 1px 5px), var(--fill-subtle); }

/* ── P14 · Gloss: 3D voltage (light top edge, deeper base, glow) ── */
.ds-gloss { background: linear-gradient(180deg, var(--color-voltage-hover) 0%, var(--color-voltage) 55%, color-mix(in oklch, var(--color-voltage) 80%, var(--color-void)) 100%); color: var(--color-voltage-ink); box-shadow: inset 0 1px 0 var(--white-a550), inset 0 -2px 6px var(--black-a160), 0 8px 24px -6px var(--color-voltage-glow); }
.ds-btn-voltage.ds-gloss:hover { filter: brightness(1.04); }

/* ── P15 · Glass controls: dropdown pill + glass button ── */
.ds-pill-select { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 12px; border-radius: var(--radius-pill); background: var(--fill-hover); border: 1px solid var(--stroke-inner); color: var(--color-ink-secondary); font: 500 11px/1 var(--font-body); white-space: nowrap; cursor: pointer; transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out); }
.ds-pill-select:hover { color: var(--color-ink-primary); border-color: var(--stroke-inner-hover); }
.ds-btn-glass { background: linear-gradient(180deg, var(--color-graphite), var(--color-onyx)); color: var(--color-ink-primary); border: 1px solid var(--stroke-inner); box-shadow: inset 0 1px 0 var(--stroke-inner-hover), 0 4px 12px -4px var(--black-a600); }
.ds-btn-glass:hover { border-color: var(--stroke-inner-hover); }

/* ── P16 · Split headline: weight contrast (Light + Bold), optional faded words ── */
.ds-hl { font-size: 44px; line-height: 1.02; letter-spacing: -0.035em; color: var(--color-ink-primary); margin: 0; }
.ds-hl--xl { font-size: 64px; letter-spacing: -0.045em; }
.ds-hl--md { font-size: 32px; letter-spacing: -0.03em; }
.ds-hl-light { font-weight: 300; }
.ds-hl-strong { font-weight: 700; }
.ds-hl-fade { color: var(--color-ink-tertiary); }

/* ── P17 · Voltage hero card: full voltage surface, dark ink, dark chip ── */
.ds-chip-ink { background: var(--color-void); border-color: transparent; color: var(--color-ink-primary); }
.ds-chip-ink::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--color-voltage); box-shadow: 0 0 6px var(--color-voltage-glow); }
.ds-on-voltage-label { font-size: 14px; font-weight: 500; color: color-mix(in oklch, var(--color-voltage-ink) 72%, transparent); }

/* ── P18 · Tint card: voltage-tinted container for the "featured" metric ── */
.ds-surface-card--tint { background-image: linear-gradient(180deg, color-mix(in oklch, var(--color-voltage) 10%, transparent), transparent 75%); border-color: color-mix(in oklch, var(--color-voltage) 20%, transparent); }
.ds-track-dashed { flex: 1; border-top: 1px dashed color-mix(in oklch, var(--color-voltage) 45%, transparent); }

/* ── P19 · Dot field: dotted atmosphere (maps, empty regions, hero art) ── */
.ds-dot-field { background-image: radial-gradient(circle, var(--stroke-inner-hover) 1px, transparent 1.4px); background-size: 7px 7px; -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, #000 35%, transparent 75%); mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, #000 35%, transparent 75%); }

/* ── P20 · Split: side-by-side metrics separated by hairlines ── */
.ds-split { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: center; }
.ds-split > * { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ds-split > * + * { border-left: 1px solid var(--stroke-divider); }

/* ── P21 · Area chart: voltage fill fading down + glowing line ── */
.ds-area-line { fill: none; stroke: var(--color-voltage); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px var(--color-voltage-glow)); }
.ds-area-line--ghost { stroke: var(--color-ink-tertiary); filter: none; stroke-dasharray: 2 3; }
.ds-area-stop-top { stop-color: var(--color-voltage); stop-opacity: 0.55; }
.ds-area-stop-bottom { stop-color: var(--color-voltage); stop-opacity: 0; }

/* ── P23 · Frame: THE ZCORP background (from the official dashboard).
   Page .ds-surface-void → one .ds-surface-card.ds-surface-frame wrapping rail + content → .ds-surface-card cards inside. ── */
.ds-surface-frame { background: var(--color-void-raised); }
.ds-frame-layout { display: flex; gap: 20px; padding: 20px; }
.ds-frame-rail { width: 56px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; }
.ds-frame-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

/* ── P24 · Horizontal bars (rankings, keywords): hatched track, one glossy leader ── */
.ds-hbar-list { display: flex; flex-direction: column; gap: 14px; }
.ds-hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: baseline; }
.ds-hbar-label { font-size: 13px; color: var(--color-ink-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-hbar-value { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; color: var(--color-ink-primary); }
.ds-hbar-track { grid-column: 1 / -1; height: 10px; border-radius: var(--radius-pill); background: repeating-linear-gradient(135deg, var(--stroke-inner-hover) 0 1px, transparent 1px 5px), var(--fill-subtle); }
.ds-hbar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, color-mix(in oklch, var(--color-ink-tertiary) 45%, transparent), color-mix(in oklch, var(--color-ink-tertiary) 75%, transparent)); box-shadow: inset 0 1px 0 var(--stroke-inner-hover); }
.ds-hbar--lead .ds-hbar-label { color: var(--color-ink-primary); }
.ds-hbar--lead .ds-hbar-value { color: var(--color-voltage); }
.ds-hbar--lead .ds-hbar-fill { background: linear-gradient(90deg, color-mix(in oklch, var(--color-voltage) 80%, var(--color-void)) 0%, var(--color-voltage) 60%, var(--color-voltage-hover) 100%); box-shadow: inset 0 1px 0 var(--white-a500), 0 0 14px -2px var(--color-voltage-glow); }

/* ── P25 · Currency mark: small, dimmed, top-aligned symbol before a hero number ── */
.ds-kpi-cur { font-size: 0.42em; font-weight: 600; letter-spacing: 0; color: var(--color-ink-secondary); vertical-align: 0.95em; margin-right: 0.12em; }

/* ── P26 · Status step: leading status disc for timelines/checklists ── */
.ds-step-disc { width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--radius-pill); display: grid; place-items: center; background: var(--fill-hover); border: 1px solid var(--stroke-inner); color: var(--color-ink-tertiary); }
.ds-step-disc--done { background: var(--color-signal-success-soft); border-color: transparent; color: var(--color-signal-success); }
.ds-step-disc--now { background: var(--color-void); border-color: color-mix(in oklch, var(--color-voltage) 35%, transparent); color: var(--color-voltage); box-shadow: 0 0 0 4px var(--color-voltage-soft); }

/* ZCORP Obsidian v2: pecas 5 a 15. So tokens, zero cor escrita a mao.
   Estados: data-active, data-today, data-weekend, data-outside, data-drop, data-empty, aria-disabled, aria-busy, aria-invalid. */

/* ═══ 5 · FAIXA DE SEMANA ═══ */
.ds-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.ds-week-day {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0;
  padding: 12px 6px 10px; min-height: 44px; font: inherit; color: var(--color-ink-primary); text-align: center; cursor: pointer;
  background: var(--color-void); border: 1px solid var(--stroke-inner); border-radius: var(--radius-md);
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.ds-week-day:hover { border-color: var(--stroke-inner-hover); background: var(--color-void-raised); }
.ds-week-day[data-weekend] .ds-week-dow { color: var(--color-ink-disabled); }
.ds-week-dow { font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-ink-tertiary); }
.ds-week-num { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 600; line-height: 1; }
.ds-week-count { font-size: 11px; color: var(--color-ink-tertiary); }
.ds-week-load { width: 100%; height: 3px; border-radius: var(--radius-pill); background: var(--stroke-inner); overflow: hidden; }
.ds-week-load > i { display: block; height: 100%; width: calc(var(--load, 0) * 100%); border-radius: inherit; background: var(--color-ink-secondary); }
.ds-week-day[data-today] .ds-week-num { color: var(--color-voltage); }
.ds-week-day[data-today]::after { content: ''; position: absolute; top: 6px; right: 6px; width: 5px; height: 5px; border-radius: var(--radius-pill); background: var(--color-voltage); box-shadow: 0 0 6px var(--color-voltage-glow); }
.ds-week-day[data-active] { background: var(--color-onyx); border-color: var(--color-voltage); box-shadow: 0 0 0 3px var(--color-voltage-soft); }
.ds-week-day[data-active] .ds-week-load > i { background: var(--color-voltage); }
.ds-week-day[data-over="high"] .ds-week-load > i { background: var(--color-signal-warn); }
.ds-week-day[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.ds-week-day:focus-visible { outline: 2px solid var(--stroke-lift); outline-offset: 2px; }
@media (max-width: 640px) { .ds-week { gap: 4px; } .ds-week-day { padding: 10px 2px 8px; } .ds-week-count { display: none; } }

/* ═══ 6 · CALENDARIO DO MES ═══ */
.ds-mcal { display: flex; flex-direction: column; min-width: 0; }
.ds-mcal-dow, .ds-mcal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ds-mcal-dow > * { padding: 0 8px 10px; font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-ink-tertiary); }
.ds-mcal-grid { gap: 1px; background: var(--stroke-divider); border: 1px solid var(--stroke-divider); border-radius: var(--radius-md); overflow: hidden; }
.ds-mcal-cell {
  position: relative; min-width: 0; min-height: 116px; padding: 8px; display: flex; flex-direction: column; gap: 4px;
  background: var(--color-obsidian); transition: background var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.ds-mcal-cell[data-weekend] { background: var(--color-void-raised); }
.ds-mcal-cell[data-outside] { background: var(--color-void); }
.ds-mcal-cell[data-outside] .ds-mcal-num { color: var(--color-ink-disabled); }
.ds-mcal-num { align-self: flex-start; min-width: 24px; height: 24px; padding: 0 6px; display: grid; place-items: center; border: 0; background: transparent; font: inherit; font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 600; color: var(--color-ink-secondary); border-radius: var(--radius-pill); cursor: pointer; }
.ds-mcal-num:hover { background: var(--fill-hover); color: var(--color-ink-primary); }
.ds-mcal-cell[data-today] .ds-mcal-num { background: var(--color-voltage); color: var(--color-voltage-ink); }
.ds-mcal-cell[data-drop], .ds-mcal-cell.is-over { background: var(--color-voltage-soft); box-shadow: inset 0 0 0 1px var(--color-voltage), inset 0 0 24px -6px var(--color-voltage-glow); z-index: 1; }
.ds-mcal-items { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.ds-mcal-item {
  position: relative; display: flex; align-items: center; gap: 6px; min-width: 0; width: 100%; height: 24px; padding: 0 6px 0 10px;
  font: inherit; font-size: 11px; color: var(--color-ink-primary); text-align: left; cursor: grab;
  background: var(--fill-subtle); border: 1px solid var(--stroke-inner); border-radius: 6px;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); /* sem transform: arrastar */
}
.ds-mcal-item::before { content: ''; position: absolute; left: 3px; top: 5px; bottom: 5px; width: 2px; border-radius: 2px; background: var(--color-ink-tertiary); }
.ds-mcal-item[data-priority="critical"]::before { background: var(--color-signal-danger); }
.ds-mcal-item[data-priority="high"]::before { background: var(--color-signal-warn); }
.ds-mcal-item[data-priority="medium"]::before { background: var(--color-voltage); }
.ds-mcal-item[data-priority="low"]::before { background: var(--color-signal-calm); }
.ds-mcal-item:hover { border-color: var(--stroke-inner-hover); background: var(--fill-hover); }
.ds-mcal-item[data-done] { color: var(--color-ink-tertiary); text-decoration: line-through; }
.ds-mcal-item-time { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 10px; color: var(--color-ink-tertiary); flex-shrink: 0; }
.ds-mcal-item-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-mcal-more { align-self: flex-start; padding: 2px 6px; border: 0; background: transparent; font: inherit; font-size: 11px; font-weight: 500; color: var(--color-ink-tertiary); cursor: pointer; border-radius: 6px; }
.ds-mcal-more:hover { color: var(--color-ink-primary); background: var(--fill-hover); }
@media (max-width: 640px) {
  .ds-mcal-cell { min-height: 56px; padding: 4px; align-items: center; }
  .ds-mcal-item { width: 6px; height: 6px; padding: 0; border-radius: var(--radius-pill); background: var(--color-voltage); border: 0; font-size: 0; }
  .ds-mcal-item::before, .ds-mcal-more { display: none; }
  .ds-mcal-items { flex-direction: row; flex-wrap: wrap; gap: 3px; justify-content: center; flex: 0; }
  .ds-mcal-dow > * { padding: 0 2px 8px; text-align: center; }
}

/* ═══ 8 · FUNIL POR ETAPA ═══ */
.ds-funnel { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ds-funnel-tile {
  display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px 16px; min-height: 44px; font: inherit; text-align: left; cursor: pointer;
  color: var(--color-ink-primary); background: var(--color-void); border: 1px solid var(--stroke-inner); border-radius: var(--radius-md);
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), opacity var(--dur-fast);
}
.ds-funnel-tile:hover { border-color: var(--stroke-inner-hover); background: var(--color-void-raised); }
.ds-funnel-label { font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-ink-tertiary); }
.ds-funnel-value { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 28px; font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; }
.ds-funnel-sub { font-size: 12px; color: var(--color-ink-secondary); font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.ds-funnel-bar { height: 4px; margin-top: 4px; border-radius: var(--radius-pill); background: var(--stroke-inner); overflow: hidden; }
.ds-funnel-bar > i { display: block; height: 100%; width: calc(var(--pct, 0) * 100%); border-radius: inherit; background: var(--color-ink-tertiary); transition: width var(--dur-base) var(--ease-out); }
.ds-funnel-tile[data-active="true"] { background: var(--color-onyx); border-color: var(--color-voltage); box-shadow: 0 0 0 3px var(--color-voltage-soft); }
.ds-funnel-tile[data-active="true"] .ds-funnel-bar > i { background: var(--color-voltage); }
.ds-funnel-tile[data-active="false"] { opacity: 0.6; }
.ds-funnel-tile[data-empty] .ds-funnel-value { color: var(--color-ink-disabled); }
.ds-funnel-tile:focus-visible { outline: 2px solid var(--stroke-lift); outline-offset: 2px; }

/* ═══ 9 · LINHA DO TEMPO ═══ */
.ds-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ds-timeline-item { position: relative; display: flex; gap: 14px; padding-bottom: 18px; }
.ds-timeline-item:last-child { padding-bottom: 0; }
.ds-timeline-item:not(:last-child)::before { content: ''; position: absolute; left: 15px; top: 36px; bottom: 4px; width: 1px; background: var(--stroke-divider); }
.ds-timeline-body { flex: 1; min-width: 0; padding-top: 5px; display: flex; flex-direction: column; gap: 3px; }
.ds-timeline-title { font-size: 13px; color: var(--color-ink-primary); line-height: 1.35; }
.ds-timeline-meta { font-size: 12px; color: var(--color-ink-tertiary); }
.ds-timeline-time { flex-shrink: 0; padding-top: 7px; font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 11px; color: var(--color-ink-tertiary); }
.ds-timeline-item[data-state="pending"] .ds-timeline-title { color: var(--color-ink-secondary); }
.ds-timeline-item[data-state="error"] .ds-step-disc { background: var(--color-signal-danger-soft); border-color: transparent; color: var(--color-signal-danger); }

/* ═══ 10 · FILTRO EM PILULA ═══ */
.ds-filter-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.ds-filter-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; min-height: 34px; padding: 0 14px; font: inherit; font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer;
  color: var(--color-ink-secondary); background: transparent; border: 1px solid var(--stroke-inner); border-radius: var(--radius-pill);
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.ds-filter-chip:hover { color: var(--color-ink-primary); border-color: var(--stroke-inner-hover); background: var(--fill-faint); }
.ds-filter-chip[data-active="true"], .ds-filter-chip[aria-pressed="true"] { color: var(--color-ink-primary); background: var(--fill-strong); border-color: var(--stroke-lift); }
.ds-filter-chip-count { min-width: 20px; height: 18px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: var(--radius-pill); background: var(--fill-hover); font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 11px; font-weight: 600; color: var(--color-ink-secondary); }
.ds-filter-chip[data-active="true"] .ds-filter-chip-count, .ds-filter-chip[aria-pressed="true"] .ds-filter-chip-count { background: var(--color-ink-primary); color: var(--color-void); }
.ds-filter-chip:disabled, .ds-filter-chip[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.ds-filter-chip:focus-visible { outline: 2px solid var(--stroke-lift); outline-offset: 2px; }
@media (max-width: 640px) { .ds-filter-bar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; } }

/* ═══ 11 · CABECALHO DA MOLDURA (titulo + acoes, sem quebrar) ═══ */
.ds-frame-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: nowrap; min-height: 64px; padding: 8px 4px 16px; }
.ds-frame-head-title { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 auto; }
.ds-frame-head-title > :first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-frame-head-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; flex-wrap: nowrap; white-space: nowrap; }
.ds-identity-pill--compact { height: 40px; padding: 0 14px 0 4px; gap: 10px; }
.ds-identity-pill--compact .ds-identity-pill-meta { display: none; }
@media (max-width: 720px) {
  .ds-identity-pill--compact { padding: 0; width: 40px; justify-content: center; }
  .ds-identity-pill--compact .ds-identity-pill-text { display: none; }
  .ds-frame-head-actions { gap: 8px; }
}

/* ═══ 12 · LINHA DE TABELA RICA ═══ */
.ds-cell-entity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ds-cell-entity-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ds-cell-entity-text > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-money { font-family: var(--font-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ds-money-cents { color: var(--color-ink-tertiary); }
.ds-row-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; opacity: 0; transition: opacity var(--dur-fast) var(--ease-out); }
.ds-table tr:hover .ds-row-actions, .ds-table tr:focus-within .ds-row-actions, .ds-row-actions:focus-within, tr[data-selected] .ds-row-actions { opacity: 1; }
.ds-row-action { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--color-ink-tertiary); cursor: pointer; transition: background var(--dur-fast), color var(--dur-fast); }
.ds-row-action:hover { background: var(--fill-hover); color: var(--color-ink-primary); }
.ds-row-action--danger:hover { background: var(--color-signal-danger-soft); color: var(--color-signal-danger); }
.ds-row-action:focus-visible { outline: 2px solid var(--stroke-lift); outline-offset: 1px; }
.ds-table tr[data-selected] td { background: var(--fill-faint); }
.ds-table tr[aria-busy="true"] { opacity: 0.5; pointer-events: none; }
@media (hover: none) { .ds-row-actions { opacity: 1; } }

/* ═══ 13 · PAINEL FLUTUANTE ═══ */
.ds-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: var(--z-sticky); width: 48px; height: 48px; display: grid; place-items: center; padding: 0; cursor: pointer;
  color: var(--color-ink-primary); background: linear-gradient(180deg, var(--color-graphite), var(--color-onyx)); border: 1px solid var(--stroke-inner); border-radius: var(--radius-pill); box-shadow: var(--elev-3);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.ds-fab:hover { border-color: var(--stroke-inner-hover); box-shadow: var(--elev-lift); }
.ds-fab[aria-expanded="true"] { border-color: var(--stroke-lift); }
.ds-fab:focus-visible { outline: 2px solid var(--stroke-lift); outline-offset: 3px; }
.ds-float-panel {
  position: fixed; right: 24px; bottom: 84px; z-index: var(--z-sticky); width: min(340px, calc(100vw - 32px)); max-height: min(480px, 70dvh); display: flex; flex-direction: column;
  background-color: var(--color-obsidian); background-image: radial-gradient(ellipse 120% 40% at 50% 0%, var(--fill-hover) 0%, transparent 60%);
  border: 1px solid var(--stroke-outer); border-radius: var(--radius-lg); box-shadow: var(--elev-overlay); overflow: hidden;
  transform-origin: bottom right; animation: ds-menu-in var(--dur-fast) var(--ease-out);
}
.ds-float-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--stroke-divider); flex-shrink: 0; }
.ds-float-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ds-float-item { position: relative; padding: 10px 12px 10px 16px; background: var(--color-void); border: 1px solid var(--stroke-inner); border-radius: var(--radius-md); font-size: 13px; color: var(--color-ink-primary); }
.ds-float-item::before { content: ''; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; background: var(--color-ink-tertiary); }
.ds-float-item[data-tone="success"]::before { background: var(--color-signal-success); }
.ds-float-item[data-tone="warn"]::before { background: var(--color-signal-warn); }
.ds-float-item[data-tone="danger"]::before { background: var(--color-signal-danger); }
.ds-float-item[data-tone="calm"]::before { background: var(--color-signal-calm); }
.ds-float-empty { padding: 28px 16px; text-align: center; font-size: 13px; color: var(--color-ink-tertiary); }
@media (max-width: 640px) { .ds-fab { right: 16px; bottom: 16px; } .ds-float-panel { right: 16px; bottom: 76px; } }

/* ═══ 14 · BARRA SEGMENTADA COM LEGENDA e HBAR COM ROTULO (suporte aos componentes React) ═══ */
.ds-seg-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 4px 12px 0; font-size: 12px; color: var(--color-ink-secondary); }
.ds-seg-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.ds-seg-legend i { width: 8px; height: 8px; border-radius: var(--radius-pill); background: var(--stroke-inner-hover); }
.ds-seg-legend i[data-on] { background: var(--color-voltage); }

/* ═══ 7 · ARRASTAR: contêiner do card no portal (receita dnd) ═══ */
.ds-kboard [data-rfd-draggable-context-id], .ds-mcal [data-rfd-draggable-context-id] { transition: none; }
/* provided.placeholder da lib: cria o espaco vazio com o mesmo visual do .ds-drop-placeholder */
[data-rfd-placeholder-context-id] { border-radius: 16px; }

@media (prefers-reduced-motion: reduce) {
  .ds-week-day, .ds-mcal-cell, .ds-funnel-tile, .ds-funnel-bar > i, .ds-filter-chip, .ds-row-actions { transition: none; }
  .ds-float-panel { animation: none; }
}

/* ═══ 37 · EYEBROW: rotulo voltage pequeno em cima do titulo de secao ═══ */
.ds-eyebrow { display: block; font-size: 12px; line-height: 1; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-voltage); }
.ds-section-head { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

/* ═══ 38 · CELULAR: a rail some e entra a barra de baixo ═══ */
.ds-bottom-nav { display: none; }
@media (max-width: 768px) {
  .ds-frame-layout { padding: 12px; gap: 12px; }
  .ds-frame-rail { display: none; }
  .ds-bottom-nav {
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: var(--z-sticky); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 6px;
    background: linear-gradient(180deg, var(--color-graphite), var(--color-onyx)); border: 1px solid var(--stroke-inner); border-radius: var(--radius-pill); box-shadow: var(--elev-3);
  }
  .ds-bottom-nav > * { min-height: 44px; display: grid; place-items: center; gap: 2px; border: 0; background: transparent; border-radius: var(--radius-pill); color: var(--color-ink-tertiary); font: inherit; font-size: 10px; cursor: pointer; }
  .ds-bottom-nav > [aria-current="page"] { color: var(--color-ink-primary); background: var(--fill-strong); }
  .ds-frame-main { padding-bottom: 76px; }
}
 /* pecas 5 a 15 (v2) */
/* ZCORP Obsidian — Accessibility Utilities
   Focus-visible rings, screen-reader-only, keyboard enhancements.
   Loaded last so specificity works correctly. */

/* ── SCREEN READER ONLY ─────────────────────────────────────────── */
.ds-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border-width: 0 !important;
}

/* ── FOCUS RING BASE ─────────────────────────────────────────────── */
/* Browsers that support :focus-visible get a clean ring,
   not a ring on every mouse click. */

:focus-visible {
  outline: 2px solid var(--color-voltage);
  outline-offset: 2px;
}

/* ── BUTTON ──────────────────────────────────────────────────────── */
.ds-btn:focus-visible {
  outline: 2px solid var(--color-voltage);
  outline-offset: 3px;
  box-shadow:
    0 1px 0 var(--white-a400) inset,
    0 -1px 0 var(--black-a100) inset,
    0 6px 20px -4px var(--color-voltage-glow),
    0 0 0 4px var(--color-voltage-soft);
}

/* ── TABS ────────────────────────────────────────────────────────── */
.ds-tab:focus-visible {
  outline: 2px solid var(--color-voltage);
  outline-offset: 2px;
  border-radius: 10px;
}

/* ── CHECKBOX & RADIO ────────────────────────────────────────────── */
/* The native inputs are visually hidden (position:absolute, 1×1px).
   When they receive :focus-visible, we ring the adjacent visual span. */
input[type="checkbox"]:focus-visible + .ds-chk,
input[type="radio"]:focus-visible    + .ds-rad {
  outline: 2px solid var(--color-voltage);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px var(--color-voltage-soft);
}

/* ── TOGGLE SWITCH ───────────────────────────────────────────────── */
button[role="switch"]:focus-visible {
  outline: 2px solid var(--color-voltage);
  outline-offset: 3px;
  border-radius: var(--radius-pill);
}

/* ── CTRL (Input / Textarea / Select) ───────────────────────────── */
/* .ds-ctrl already handles :focus-within — suppress double-ring on child buttons */
.ds-ctrl button:focus-visible,
.ds-ctrl input:focus-visible,
.ds-ctrl textarea:focus-visible,
.ds-ctrl select:focus-visible {
  outline: none;
}

/* ── SELECT POPOVER — keyboard-active item ───────────────────────── */
.ds-popover-item[data-active="true"]:not([data-selected="true"]) {
  background: var(--fill-strong);
  color: var(--color-ink-primary);
}

/* ── SIDEBAR LINKS ───────────────────────────────────────────────── */
a.ds-sb-item:focus-visible {
  outline: 2px solid var(--color-voltage);
  outline-offset: -2px;
  border-radius: var(--radius-sm);
}

/* ── BREADCRUMB LINKS ────────────────────────────────────────────── */
nav[aria-label="Breadcrumb"] a:focus-visible {
  outline: 2px solid var(--color-voltage);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── PAGINATION ──────────────────────────────────────────────────── */
nav[aria-label="Pagination"] button:focus-visible {
  outline: 2px solid var(--color-voltage);
  outline-offset: 2px;
}

/* ── DIALOGOS (bug 3) ─────────────────────────────────────────────── */
/* O container do dialogo recebe foco do Radix ao abrir: sem anel nele. */
.ds-modal:focus, .ds-drawer:focus, [role="dialog"]:focus, [role="alertdialog"]:focus { outline: none; }
/* Dentro do dialogo: anel fino e mais suave, inclusive em botoes. */
:is(.ds-modal, .ds-drawer, [role="dialog"], [role="alertdialog"]) :is(:focus-visible, .ds-btn:focus-visible, .ds-tab:focus-visible) {
  outline: 1.5px solid var(--stroke-focus); outline-offset: 2px; box-shadow: none;
}

/* ── REDUCED MOTION ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration:       0.01ms !important;
    animation-iteration-count: 1     !important;
    transition-duration:      0.01ms !important;
    scroll-behavior:          auto   !important;
  }
}

