/* Indica+ — visual "vidro fosco" sobre foto quente.
   Layout: barra em pílula no topo, palco de vidro com o conteúdo, dock lateral (notebook) e dock inferior.
   Celular: topo em duas linhas, dock fixo embaixo. */
:root {
  --gd-ink: #25201e;
  --gd-muted: #4a3e37;
  --gd-line: rgb(74 49 33 / 15%);
  --gd-grid: rgb(74 49 33 / 19%);
  --gd-rim: rgb(255 253 246 / 55%);
  --gd-edge-light: rgb(255 254 247 / 84%);
  --gd-edge-shade: rgb(57 40 28 / 19%);
  --gd-gloss: rgb(255 251 242 / 40%);
  --gd-frame: rgb(244 236 227 / 74%);
  --gd-rail: rgb(244 234 224 / 84%);
  --gd-card: rgb(252 247 241 / 70%);
  --gd-card-light: rgb(255 252 248 / 45%);
  --gd-raised: rgb(255 251 246 / 92%);
  --gd-inner: rgb(255 251 246 / 55%);
  --gd-surface: #f6ece2;
  --gd-track: rgb(81 49 32 / 14%);
  --gd-primary: #261e1b;
  --gd-primary-ink: #fffaf5;
  --gd-pick: #fff9f3;
  --gd-pick-ink: #241b17;
  --gd-coral: #a43c27;
  --gd-teal: #09644f;
  --gd-sage: #4f7a2c;
  --gd-ochre: #8f5c00;
  --gd-graph-ink: #40332d;
  --gd-focus: #194b48;
  --gd-dark-shadow: 35 21 14;
  --gd-bg: #050506;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-plate: "Barlow Condensed", "Arial Narrow", sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --gd-ink: #fff6e9;
  --gd-muted: #e0d0c2;
  --gd-line: rgb(243 221 198 / 19%);
  --gd-grid: rgb(243 221 198 / 19%);
  --gd-rim: rgb(255 236 212 / 31%);
  --gd-edge-light: rgb(255 242 225 / 49%);
  --gd-edge-shade: rgb(11 6 5 / 30%);
  --gd-gloss: rgb(255 237 213 / 13%);
  --gd-frame: rgb(42 31 29 / 58%);
  --gd-rail: rgb(45 32 30 / 66%);
  --gd-card: rgb(47 36 34 / 60%);
  --gd-card-light: rgb(106 88 81 / 30%);
  --gd-raised: rgb(80 67 61 / 86%);
  --gd-inner: rgb(78 61 56 / 52%);
  --gd-surface: #3b302c;
  --gd-track: rgb(245 226 212 / 16%);
  --gd-primary: #f3ddca;
  --gd-primary-ink: #231a16;
  --gd-pick: #f9eee0;
  --gd-pick-ink: #241b17;
  --gd-coral: #ff9177;
  --gd-teal: #75dac0;
  --gd-sage: #b5dd8c;
  --gd-ochre: #f1be58;
  --gd-graph-ink: #e7d9cd;
  --gd-focus: #f9bf9b;
  --gd-dark-shadow: 10 4 3;
  --gd-bg: #050506;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--gd-bg); color: var(--gd-ink);
  font: 550 13.5px/1.45 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:where(h1, h2, h3, p, figure, dl, dd) { margin: 0; }
:where(button, a, input, select, textarea):focus-visible { outline: 2px solid var(--gd-focus); outline-offset: 3px; }
svg { flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--gd-muted); }
.small { font-size: 11.5px; }

/* ---------- Fundo animado (fundo.js) ---------- */
.msb-root {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(60% 50% at 50% 55%, #2a2b33, transparent 70%), #050506;
  transition: background .8s ease;
}
.msb-root[data-scene="prism"] { background: linear-gradient(120deg, #0f1420, #2b3a52 50%, #0f1420); }
.msb-root[data-scene="waves"] { background: radial-gradient(80% 60% at 50% 60%, #33192f, transparent 70%), #120a12; }
.msb-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.2s ease; }
.msb-root[data-sky="webgl"] .msb-canvas { opacity: 1; }
.msb-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,5,6,.45), transparent 22%, transparent 72%, rgba(5,5,6,.55)); }
@media (prefers-reduced-motion: reduce) { .msb-root, .msb-canvas { transition: none; } }

/* ---------- Vidro: topo e dock ---------- */
.gd-surround {
  width: min(calc(100% - 100px), 1320px);
  margin-inline: auto;
  padding-block: calc(env(safe-area-inset-top, 0px) + 22px) 10px;
}
.gd-top, .gd-dock {
  border: 1px solid var(--gd-rim);
  background: linear-gradient(165deg, var(--gd-gloss), transparent 32% 73%, var(--gd-gloss)), var(--gd-rail);
  box-shadow: inset 1px 1px 1px var(--gd-edge-light), inset -1px -1px 1px var(--gd-edge-shade),
    inset 0 -2px 5px var(--gd-gloss), 0 7px 20px rgb(var(--gd-dark-shadow) / 17%);
  backdrop-filter: blur(15px) saturate(1.35);
  -webkit-backdrop-filter: blur(15px) saturate(1.35);
}
.gd-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 420px) minmax(0, 1fr);
  align-items: center; gap: 12px;
  min-height: 60px; border-radius: 999px; padding: 6px 9px 6px 13px;
}
.gd-brand { display: flex; align-items: center; gap: 10px; min-width: 0; padding-left: 3px; }
.gd-logo {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  background: var(--gd-pick); color: var(--gd-pick-ink);
  box-shadow: inset 0 0 0 1px var(--gd-gloss), 0 2px 7px rgb(var(--gd-dark-shadow) / 12%);
}
.gd-logo svg { width: 20px; height: 20px; }
.gd-logo-img { display: block; height: 40px; width: auto; flex: none; }
.gd-auth-card .gd-logo-img { height: 48px; }
/* Marca INDICA+ */
.ix-mark {
  position: relative; display: inline-flex; align-items: flex-start;
  font-size: 13px; font-weight: 800; letter-spacing: .17em; line-height: 1; padding: 2px 0 8px;
}
.ix-word { display: block; }
.ix-plus {
  display: block; font-size: 1.75em; font-weight: 800; letter-spacing: 0; line-height: .62;
  margin: 0 0 0 .1em; transform: translateY(-.16em);
  background: linear-gradient(135deg, #d9841f, #f5c12c); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ix-swoosh { position: absolute; left: -1px; right: 0; top: 0; bottom: -2px; width: auto; height: auto; overflow: visible; pointer-events: none; }
.gd-auth-card .ix-mark { font-size: 15px; }
.gd-brand small { margin-top: 2px; }
.gd-brand > div { border-left: 1px solid var(--gd-line); padding-left: 10px; min-width: 0; }
.gd-brand strong { display: block; font-size: 12px; letter-spacing: .17em; line-height: 1.1; font-weight: 800; }
.gd-brand small { display: block; margin-top: 3px; font-size: 10.5px; color: var(--gd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gd-ask {
  display: flex; align-items: center; gap: 10px; min-height: 44px; max-width: 100%;
  border: 1px solid var(--gd-line); border-radius: 999px; background: var(--gd-inner);
  box-shadow: inset 0 1px 0 var(--gd-gloss); padding: 4px 14px 4px 6px; text-align: left;
}
.gd-ask:hover, .gd-icon-button:hover { background: var(--gd-raised); }
.gd-ask-orb {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gd-primary); color: var(--gd-primary-ink);
}
.gd-ask-orb svg { width: 15px; height: 15px; }
.gd-prompt { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; font-weight: 700; color: var(--gd-muted); animation: gd-prompt-in .7s steps(30, end) both; }
@keyframes gd-prompt-in { from { clip-path: inset(0 100% 0 0); } }
.gd-kbd { margin-left: auto; font-size: 10px; font-weight: 800; color: var(--gd-muted); border: 1px solid var(--gd-line); border-radius: 6px; padding: 2px 6px; }
.gd-top-actions { display: flex; justify-content: flex-end; gap: 6px; }
.gd-icon-button {
  position: relative; min-width: 44px; min-height: 44px; display: inline-grid; place-items: center;
  border-radius: 999px; border: 1px solid var(--gd-line); padding: 0; background: var(--gd-inner);
}
.gd-icon-button svg { width: 17px; height: 17px; stroke-width: 1.8; }
.gd-notices { background: var(--gd-raised); }
.gd-notices i {
  position: absolute; min-width: 16px; height: 16px; inset: 4px 3px auto auto; border-radius: 99px; padding: 0 4px;
  background: var(--gd-coral); color: #fff; font: 800 9.5px/16px var(--font); font-style: normal; text-align: center;
  box-shadow: 0 0 0 2px var(--gd-surface);
}

/* ---------- Palco ---------- */
.gd-stage-wrap { position: relative; margin-top: 11px; }
.gd-stage {
  border: 1px solid var(--gd-rim); border-radius: 34px;
  background: linear-gradient(148deg, var(--gd-gloss), transparent 19% 77%, color-mix(in srgb, var(--gd-gloss) 48%, transparent)), var(--gd-frame);
  box-shadow: inset 1px 1px 1px var(--gd-edge-light), inset -1px -1px 1px var(--gd-edge-shade), inset 0 0 7px var(--gd-gloss),
    0 1px 3px rgb(var(--gd-dark-shadow) / 17%), 0 22px 72px rgb(var(--gd-dark-shadow) / 22%);
  backdrop-filter: blur(14px) saturate(1.24);
  -webkit-backdrop-filter: blur(14px) saturate(1.24);
}
.gd-stage-in { padding: clamp(19px, 2.15vw, 35px) clamp(25px, 3.2vw, 49px) 62px; min-height: 560px; }
.gd-view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 22px; margin-bottom: 20px; flex-wrap: wrap; }
.gd-view-head h1 { font-size: clamp(29px, 3.35vw, 47px); font-weight: 760; line-height: 1.03; letter-spacing: -.055em; text-wrap: balance; }
.gd-view-head p { color: var(--gd-muted); font-size: 13px; margin-top: 8px; }
.gd-view-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }

.gd-period {
  display: inline-flex; align-items: center; padding: 3px; border-radius: 999px;
  border: 1px solid var(--gd-rim); background: var(--gd-inner); box-shadow: inset 0 1px 0 var(--gd-gloss);
}
.gd-period button {
  min-height: 36px; min-width: 40px; border: 0; border-radius: 999px; background: transparent;
  padding: 0 11px; font-size: 11.5px; font-weight: 750; white-space: nowrap; display: inline-grid; place-items: center;
}
.gd-period button svg { width: 15px; height: 15px; }
.gd-period button[aria-pressed="true"], .gd-period .gd-period-label { background: var(--gd-primary); color: var(--gd-primary-ink); }
.gd-period .gd-period-label { min-height: 36px; display: inline-grid; place-items: center; padding: 0 14px; border-radius: 999px; font-size: 11.5px; font-weight: 800; text-transform: capitalize; min-width: 92px; }
.gd-period button:not([aria-pressed="true"]):hover:not(:disabled) { background: var(--gd-raised); }
.gd-period button:disabled { opacity: .35; cursor: default; }

.gd-primary, .gd-secondary, .gd-danger {
  display: inline-flex; justify-content: center; align-items: center; gap: 7px;
  min-height: 42px; padding: 7px 15px; font-size: 12px; font-weight: 790; line-height: 1.2;
  border-radius: 999px; border: 1px solid transparent; text-decoration: none; white-space: nowrap;
}
.gd-primary { background: var(--gd-primary); color: var(--gd-primary-ink); }
.gd-secondary { background: var(--gd-raised); border-color: var(--gd-rim); color: var(--gd-ink); }
.gd-danger { background: var(--gd-coral); color: #fff; }
.gd-primary:hover:not(:disabled) { filter: brightness(1.17); }
.gd-secondary:hover:not(:disabled) { background: var(--gd-surface); }
.gd-primary svg, .gd-secondary svg, .gd-danger svg { width: 14px; height: 14px; }
:is(.gd-primary, .gd-secondary, .gd-danger):disabled { opacity: .55; cursor: progress; }
.gd-block { width: 100%; }
.gd-sm { min-height: 34px; padding: 5px 11px; font-size: 11px; }
.gd-text-danger { color: var(--gd-coral); }

/* ---------- Painéis e métricas ---------- */
.gd-content { min-width: 0; display: grid; gap: 12px; }
.gd-panel, .gd-metric, .gd-summary {
  min-width: 0; border: 1px solid var(--gd-rim); border-radius: 20px;
  background: linear-gradient(144deg, var(--gd-card-light), transparent 66%), var(--gd-card);
  box-shadow: inset 0 1px 1px var(--gd-edge-light), inset 0 -1px 1px var(--gd-edge-shade), 0 6px 18px rgb(var(--gd-dark-shadow) / 9%);
}
.gd-panel { padding: 15px 16px; }
.gd-panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 7px 12px; margin-bottom: 12px; }
.gd-panel-head h2 { font-size: 14.5px; font-weight: 800; letter-spacing: -.024em; }
.gd-panel-head p { font-size: 11px; color: var(--gd-muted); margin-top: 3px; }
.gd-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 6px; background: var(--gd-inner); }
.gd-summary .gd-metric { border-radius: 15px; }
.gd-metric { display: flex; flex-direction: column; justify-content: space-between; min-height: 112px; padding: 11px 12px; }
.gd-metric[data-tone="teal"] {
  --gd-coral: #ffc8b8; --gd-teal: #b8f1dd; --gd-muted: #e4f5ef;
  color: #fff; border-color: rgb(196 248 231 / 55%);
  background: radial-gradient(ellipse at 5% -20%, #3a9381, transparent 68%), linear-gradient(145deg, #1e7461, #08443a);
  box-shadow: inset 0 1px 2px rgb(214 252 240 / 45%), 0 6px 14px rgb(19 78 64 / 17%);
}
.gd-metric-head { display: flex; justify-content: space-between; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 740; }
.gd-metric-icon, .gd-list-icon {
  display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 10px;
  background: var(--gd-inner); box-shadow: inset 0 1px 0 var(--gd-gloss);
}
.gd-metric-icon svg, .gd-list-icon svg { width: 14px; height: 14px; }
.gd-metric[data-tone="teal"] .gd-metric-icon { background: rgb(235 255 247 / 16%); }
.gd-metric-value { display: block; font-size: clamp(24px, 2.35vw, 35px); line-height: 1.05; margin: 3px 0 7px; letter-spacing: -.05em; font-weight: 800; }
.gd-summary .gd-metric-value { font-size: clamp(22px, 2vw, 31px); }
.gd-caption { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--gd-muted); font-size: 10.5px; font-weight: 680; }
.gd-delta {
  display: inline-flex; align-items: center; gap: 2px; color: var(--gd-teal); font-weight: 850;
  border-radius: 6px; padding: 2px 4px; background: color-mix(in srgb, var(--gd-teal) 12%, transparent);
}
.gd-delta[data-attention="true"] { color: var(--gd-coral); background: color-mix(in srgb, var(--gd-coral) 11%, transparent); }
.gd-delta[data-flat="true"] { color: var(--gd-muted); background: var(--gd-inner); }
.gd-delta svg { width: 11px; height: 11px; stroke-width: 2.4; }

.gd-unit { border-radius: 6px; padding: 4px 6px; background: var(--gd-raised); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.gd-balance-number { font-size: clamp(42px, 4.6vw, 64px); font-weight: 820; letter-spacing: -.07em; line-height: 1; }
.gd-balance-change { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 8px; color: var(--gd-muted); font-size: 10.5px; font-weight: 680; }
.gd-balance-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 14px 0 12px; }
.gd-streams { display: flex; border-radius: 12px; background: var(--gd-inner); padding: 8px 2px; }
.gd-streams div { flex: 1; min-width: 0; padding: 0 8px; }
.gd-streams div + div { border-left: 1px solid var(--gd-line); }
.gd-streams span, .gd-streams strong { display: block; }
.gd-streams span { font-size: 10px; color: var(--gd-muted); }
.gd-streams strong { font-size: 13px; font-weight: 820; margin-top: 3px; }

.gd-command-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 1.05fr); align-items: stretch; }
.gd-command-grid > .gd-wide { grid-column: 1 / 3; }
.gd-command-grid > .gd-full { grid-column: 1 / -1; }
.gd-side { display: grid; gap: 12px; align-content: start; min-width: 0; }
.gd-command-grid > .gd-panel.gd-wide { align-self: start; }

/* Barras empilhadas */
.gd-app [data-tone="ink"], [data-tone="ink"] { --gd-series: var(--gd-graph-ink); }
[data-tone="coral"] { --gd-series: var(--gd-coral); }
[data-tone="teal"] { --gd-series: var(--gd-teal); }
[data-tone="sage"] { --gd-series: var(--gd-sage); }
[data-tone="ochre"] { --gd-series: var(--gd-ochre); }
.gd-legend { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--gd-muted); }
.gd-legend span { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 740; }
.gd-legend i, .gd-ring-list i { width: 8px; height: 8px; border-radius: 50%; background: var(--gd-series); display: inline-block; }
.gd-stack-meta { display: flex; justify-content: space-between; align-items: center; min-height: 20px; gap: 4px; flex-wrap: wrap; }
.gd-chart-readout { font-size: 10.5px; font-weight: 830; white-space: nowrap; }
.gd-stack-plot { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 4px; height: 160px; margin-top: 6px; }
.gd-stack-column { display: flex; flex-direction: column; align-items: center; min-width: 0; border: 0; border-radius: 8px; background: transparent; padding: 3px 0 0; }
.gd-stack-column:is(:focus-visible, :hover, [aria-pressed="true"]) { background: var(--gd-inner); }
.gd-stack-track { display: flex; justify-content: center; align-items: end; flex: 1; width: 100%; border-bottom: 1px solid var(--gd-line); }
.gd-stack-bar { display: flex; flex-direction: column; transform-origin: center bottom; width: min(62%, 44px); min-width: 8px; border-radius: 7px 7px 3px 3px; overflow: hidden; }
.gd-stack-bar i { display: block; flex-basis: 0; background: var(--gd-series); min-height: 2px; }
.gd-stack-bar i:last-child { background: repeating-linear-gradient(138deg, var(--gd-series) 0 4px, color-mix(in srgb, var(--gd-series) 76%, white) 4px 6px); }
.gd-stack-label { font-size: 9.5px; color: var(--gd-muted); margin-top: 7px; white-space: nowrap; }
.gd-stack-num { font-size: 10px; font-weight: 800; margin-bottom: 3px; }

/* Anel de situação */
.gd-ring-wrap { display: grid; gap: 8px; }
.gd-ring { position: relative; width: min(100%, 150px); aspect-ratio: 1; justify-self: center; }
.gd-ring svg { display: block; width: 100%; height: 100%; }
.gd-ring-seg { stroke: var(--gd-series); transition: opacity .2s ease; }
.gd-ring-seg[data-muted="true"] { opacity: .25; }
.gd-ring-total { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; pointer-events: none; }
.gd-ring-total strong { font-size: 26px; line-height: 1; letter-spacing: -.05em; font-weight: 850; }
.gd-ring-total span { font-size: 10px; margin-top: 4px; color: var(--gd-muted); }
.gd-ring-list { display: grid; gap: 2px; }
.gd-ring-list button {
  display: grid; grid-template-columns: 98px minmax(0, 1fr) 28px; gap: 7px; align-items: center;
  min-height: 32px; text-align: left; background: transparent; border: 0; border-radius: 8px; padding: 3px 6px;
}
.gd-ring-list button:is(:hover, [aria-pressed="true"]) { background: var(--gd-inner); }
.gd-ring-list button > span:first-child { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 740; white-space: nowrap; }
.gd-ring-list strong { text-align: right; font-weight: 850; font-size: 11.5px; }
.gd-track { display: block; height: 5px; border-radius: 999px; overflow: hidden; background: var(--gd-track); }
.gd-track .gd-fill { display: block; height: 100%; border-radius: inherit; background: var(--gd-series); transform-origin: left center; }

/* Aprovações */
.gd-approval { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gd-approval .gd-list-icon { width: 38px; height: 38px; color: var(--gd-teal); background: color-mix(in srgb, var(--gd-teal) 12%, var(--gd-inner)); }
.gd-approval[data-attention="true"] .gd-list-icon { color: var(--gd-coral); background: color-mix(in srgb, var(--gd-coral) 12%, var(--gd-inner)); }
.gd-approval div { flex: 1; min-width: 0; }
.gd-approval strong, .gd-approval small { display: block; }
.gd-approval strong { font-size: 12.5px; font-weight: 810; }
.gd-approval small { margin-top: 3px; font-size: 10.5px; color: var(--gd-muted); }

/* Tabela */
.gd-table-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; max-width: 100%; }
.gd-search, .gd-filter {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--gd-line); border-radius: 12px;
  background: var(--gd-inner); min-height: 40px; padding: 0 10px; min-width: 0;
}
.gd-search svg, .gd-filter svg { width: 14px; height: 14px; color: var(--gd-muted); }
.gd-search input { flex: 1; min-width: 0; width: 180px; border: 0; background: transparent; min-height: 38px; font-size: 16px; }
@media (min-width: 761px) { .gd-search input { font-size: 12px; } }
.gd-search input::placeholder { color: var(--gd-muted); opacity: 1; }
.gd-filter select { border: 0; background: transparent; padding: 6px 0; min-width: 0; font-size: 12px; max-width: 190px; }
.gd-filter select option { color: var(--gd-ink); background: var(--gd-surface); }
.gd-search:focus-within, .gd-filter:focus-within { outline: 2px solid var(--gd-focus); }
.gd-search input:focus-visible, .gd-filter select:focus-visible { outline: none; }
.gd-table-scroll { max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
.gd-table-scroll table { width: 100%; border-spacing: 0; }
.gd-table-scroll th, .gd-table-scroll td { padding: 9px 10px; text-align: right; white-space: nowrap; }
.gd-table-scroll :is(th, td):first-child { text-align: left; }
.gd-table-scroll th { background: var(--gd-inner); font-size: 10.5px; color: var(--gd-muted); font-weight: 800; }
.gd-table-scroll th:first-child { border-radius: 8px 0 0 8px; }
.gd-table-scroll th:last-child { border-radius: 0 8px 8px 0; }
.gd-table-scroll td { font-size: 12px; }
.gd-table-scroll td:first-child { font-weight: 750; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.gd-table-scroll tr + tr td { border-top: 1px solid var(--gd-line); }
.gd-table-scroll button.gd-link { border: 0; background: none; padding: 0; font-weight: 780; text-decoration: underline; text-decoration-color: var(--gd-line); text-underline-offset: 3px; }
.gd-rank { display: inline-grid; place-items: center; width: 21px; height: 21px; border-radius: 7px; background: var(--gd-raised); font-size: 10px; font-weight: 850; margin-right: 8px; }

/* Selo de situação */
.gd-status {
  --c: var(--gd-graph-ink);
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 790; white-space: nowrap;
  background: color-mix(in srgb, var(--c) 12%, var(--gd-inner)); color: var(--c);
}
.gd-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.gd-status[data-s="nova"] { --c: var(--gd-graph-ink); }
.gd-status[data-s="analise"], .gd-status[data-s="pendente"] { --c: var(--gd-ochre); }
.gd-status[data-s="aprovada"], .gd-status[data-s="ativo"] { --c: var(--gd-sage); }
.gd-status[data-s="negada"] { --c: var(--gd-coral); }
.gd-status[data-s="inativo"] { --c: var(--gd-muted); }
.gd-status[data-s="venda"] { background: var(--gd-teal); color: var(--gd-primary-ink); }
:root:not([data-theme="dark"]) .gd-status[data-s="venda"] { color: #fff; }

/* Linhas de indicação */
.gd-rows { display: grid; gap: 6px; }
.gd-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%;
  text-align: left; border-radius: 14px; padding: 9px 12px; border: 1px solid var(--gd-rim);
  background: var(--gd-card); box-shadow: inset 0 1px 0 var(--gd-gloss);
}
.gd-row:hover { background: var(--gd-raised); }
.gd-row-who strong, .gd-row-who span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd-row-who strong { font-size: 13px; font-weight: 800; }
.gd-row-who span { font-size: 11px; color: var(--gd-muted); margin-top: 2px; }
@media (max-width: 440px) {
  .gd-row { grid-template-columns: auto minmax(0, 1fr); }
  .gd-row > .gd-status { grid-column: 2; justify-self: start; margin-top: -4px; }
}
.gd-empty { padding: 22px 6px; color: var(--gd-muted); font-size: 12.5px; text-align: center; display: grid; gap: 10px; justify-items: center; }

/* Placa Mercosul */
.plate {
  display: inline-grid; grid-template-rows: auto 1fr; min-width: 96px; flex-shrink: 0;
  border: 2px solid #1b1f27; border-radius: 7px; overflow: hidden; background: #f7f8fb; color: #10141c;
  font-family: var(--font-plate); line-height: 1; box-shadow: 0 2px 6px rgb(var(--gd-dark-shadow) / 18%);
}
.plate::before { content: "BRASIL"; background: #0b3a8f; color: #fff; font: 800 7px/1 var(--font); letter-spacing: .25em; text-align: center; padding: 2px 0; }
.plate b { font-weight: 700; font-size: 1.15rem; letter-spacing: .1em; padding: 4px 8px 3px; text-align: center; }
.plate.lg { min-width: 196px; }
.plate.lg::before { font-size: 9px; padding: 3px 0; }
.plate.lg b { font-size: 2.15rem; padding: 6px 14px 4px; }

/* ---------- Formulários ---------- */
.gd-form { display: grid; gap: 14px; }
.gd-field { display: grid; gap: 6px; font-weight: 750; font-size: 12px; }
.gd-field .hint { font-weight: 550; color: var(--gd-muted); font-size: 11px; }
.gd-input {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 14px; font-size: 16px; font-weight: 600;
  border: 1px solid var(--gd-line); background: var(--gd-inner); box-shadow: inset 0 1px 0 var(--gd-gloss);
}
textarea.gd-input { min-height: 88px; resize: vertical; }
select.gd-input option { background: var(--gd-surface); color: var(--gd-ink); }
.gd-input::placeholder { color: var(--gd-muted); opacity: .8; }
.gd-input:focus { outline: 2px solid var(--gd-focus); outline-offset: 0; background: var(--gd-raised); }
.gd-input-plate { font-family: var(--font-plate); font-weight: 700; font-size: 26px !important; letter-spacing: .16em; text-transform: uppercase; text-align: center; }
.gd-err { color: var(--gd-coral); font-size: 12px; font-weight: 700; min-height: 1px; }
.gd-err:empty { display: none; }
.gd-drop {
  position: relative; display: grid; place-items: center; gap: 6px; padding: 18px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--gd-line); border-radius: 14px; background: var(--gd-inner); color: var(--gd-muted); font-weight: 700; font-size: 12px;
}
.gd-drop svg { width: 20px; height: 20px; }
.gd-drop.has-file { border-style: solid; border-color: var(--gd-teal); color: var(--gd-teal); background: color-mix(in srgb, var(--gd-teal) 10%, var(--gd-inner)); }
.gd-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.gd-switch { display: flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; font-size: 12.5px; }
.gd-switch input { width: 20px; height: 20px; accent-color: var(--gd-teal); }
.gd-form-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
.gd-sep { border-top: 1px solid var(--gd-line); padding-top: 14px; display: grid; gap: 12px; }
.gd-row-actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }

.gd-cards { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gd-person-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.gd-person-head strong { font-size: 14px; font-weight: 820; letter-spacing: -.02em; }
.gd-person-meta { font-size: 11px; color: var(--gd-muted); margin-top: 3px; overflow-wrap: anywhere; }
.gd-mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 12px 0; border-radius: 12px; background: var(--gd-inner); padding: 8px 4px; }
.gd-mini div { padding: 0 6px; min-width: 0; }
.gd-mini div + div { border-left: 1px solid var(--gd-line); }
.gd-mini span, .gd-mini strong { display: block; }
.gd-mini span { font-size: 9.5px; color: var(--gd-muted); }
.gd-mini strong { font-size: 14px; font-weight: 830; margin-top: 2px; }

/* Aviso de WhatsApp */
.gd-aviso { display: grid; gap: 10px; width: 100%; max-width: 440px; padding: 12px 14px; border-radius: 16px; text-align: left; font-size: 12px; }
.gd-aviso.ok { background: color-mix(in srgb, var(--gd-teal) 14%, var(--gd-inner)); color: var(--gd-teal); }
.gd-aviso.warn { background: color-mix(in srgb, var(--gd-ochre) 14%, var(--gd-inner)); color: var(--gd-ochre); }
.gd-bubble { background: var(--gd-raised); color: var(--gd-ink); border-radius: 12px 12px 12px 3px; padding: 10px 12px; display: grid; gap: 6px; }
.gd-bubble pre { margin: 0; font: 600 12px/1.5 var(--font); white-space: pre-wrap; overflow-wrap: anywhere; }
.gd-eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: var(--gd-muted); }
.gd-success { display: grid; gap: 12px; justify-items: center; text-align: center; padding: 26px 12px; }
.gd-check { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: var(--gd-teal); color: var(--gd-primary-ink); }
:root:not([data-theme="dark"]) .gd-check { color: #fff; }
.gd-check svg { width: 28px; height: 28px; stroke-width: 2.6; }
.gd-success h2 { font-size: 26px; font-weight: 800; letter-spacing: -.045em; }

/* ---------- Dock ---------- */
.gd-dock { position: absolute; z-index: 5; display: flex; align-items: center; gap: 3px; padding: 4px; border-radius: 999px; }
.gd-dock-side { flex-direction: column; left: -25px; top: clamp(70px, 14vh, 140px); }
.gd-dock-bottom { left: 50%; bottom: -24px; translate: -50% 0; }
.gd-dock button {
  z-index: 1; position: relative; display: flex; gap: 6px; justify-content: center; align-items: center;
  min-width: 44px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 0; background: transparent;
  font-size: 11.5px; font-weight: 800; white-space: nowrap;
}
.gd-dock-side button { padding: 0; }
.gd-dock button svg { width: 17px; height: 17px; stroke-width: 1.9; }
.gd-dock button[aria-current="page"] { color: var(--gd-pick-ink); }
.gd-dock button:not([aria-current="page"]):hover { background: var(--gd-inner); }
.gd-dock .gd-badge { position: absolute; top: 3px; right: 3px; min-width: 15px; height: 15px; border-radius: 99px; background: var(--gd-coral); color: #fff; font-size: 9px; line-height: 15px; padding: 0 4px; }
.gd-dock-bottom .gd-badge { position: static; }
.gd-dock-indicator {
  position: absolute; inset: 0 auto auto 0; pointer-events: none; visibility: hidden; border-radius: 999px;
  background: var(--gd-pick); box-shadow: inset 0 1px 0 white, 0 2px 7px rgb(var(--gd-dark-shadow) / 16%);
}
.gd-dock-indicator[data-ready="true"] { visibility: visible; transition: transform .36s cubic-bezier(.24,.89,.26,1), width .36s cubic-bezier(.24,.89,.26,1), height .36s cubic-bezier(.24,.89,.26,1); }
.gd-dock-side .gd-dock-text, .gd-dock-short { display: none; }
.gd-dock-tip {
  display: none; position: absolute; left: calc(100% + 8px); pointer-events: none; color: var(--gd-ink); background: var(--gd-surface);
  padding: 6px 9px; border: 1px solid var(--gd-rim); border-radius: 8px; box-shadow: 0 3px 8px rgb(var(--gd-dark-shadow) / 17%);
}
.gd-dock-side button:is(:hover, :focus-visible) .gd-dock-tip { display: inline; }

.gd-footer { padding: 36px 3px 6px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.gd-footer > * {
  border-radius: 999px; padding: 5px 10px; color: var(--gd-ink); font-size: 10.5px; font-weight: 740;
  background: var(--gd-raised); min-height: 24px; display: inline-flex; align-items: center; gap: 5px; text-decoration: none;
}
.gd-footer a:hover { text-decoration: underline; }
.gd-footer svg { width: 11px; height: 11px; }
.gd-footer .gd-demo { background: var(--gd-ochre); color: #1b1410; }

/* ---------- Diálogos ---------- */
.gd-dialog {
  width: 100%; max-width: min(calc(100% - 24px), 520px); max-height: calc(100dvh - 24px);
  border-radius: 24px; border: 1px solid var(--gd-rim); color: var(--gd-ink); padding: 0;
  background: var(--gd-surface); box-shadow: 0 20px 80px rgb(var(--gd-dark-shadow) / 38%);
}
.gd-dialog::backdrop { background: rgb(30 21 17 / 43%); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.gd-dialog-in { padding: 18px; display: grid; gap: 14px; }
.gd-dialog-in > header { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.gd-dialog-in h2 { font-size: 22px; font-weight: 820; letter-spacing: -.045em; }
.gd-quick { display: grid; gap: 5px; max-height: 50dvh; overflow-y: auto; }
.gd-quick button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px; text-align: left;
  border: 1px solid var(--gd-line); border-radius: 12px; background: var(--gd-inner);
}
.gd-quick button:hover { background: var(--gd-raised); }
.gd-quick button > svg { width: 16px; height: 16px; color: var(--gd-muted); }
.gd-quick button div { flex: 1; min-width: 0; }
.gd-quick strong, .gd-quick small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd-quick small { color: var(--gd-muted); margin-top: 2px; font-size: 11px; }
.gd-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.gd-facts div { border: 1px solid var(--gd-line); border-radius: 12px; padding: 9px 10px; min-width: 0; }
.gd-facts dt { font-size: 10.5px; color: var(--gd-muted); }
.gd-facts dd { margin-top: 3px; font-weight: 790; overflow-wrap: anywhere; }
.gd-facts .wide { grid-column: 1 / -1; }
.gd-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; }
.gd-pick button { border: 1px solid var(--gd-line); border-radius: 999px; padding: 9px 8px; background: var(--gd-inner); font-size: 11.5px; font-weight: 790; }
.gd-pick button[aria-pressed="true"] { background: var(--gd-primary); color: var(--gd-primary-ink); border-color: transparent; }
.gd-crlv img { border-radius: 12px; border: 1px solid var(--gd-line); max-height: 300px; object-fit: contain; width: 100%; background: var(--gd-inner); }
.gd-confirm { border-radius: 14px; padding: 12px; background: color-mix(in srgb, var(--gd-coral) 14%, var(--gd-inner)); display: grid; gap: 10px; }

/* ---------- Login ---------- */
.gd-auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px max(14px, env(safe-area-inset-right, 0px)) 24px max(14px, env(safe-area-inset-left, 0px)); }
.gd-auth-card { width: 100%; max-width: 430px; padding: 22px; display: grid; gap: 16px; border-radius: 28px; backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); }
.gd-auth-card .gd-panel-head { margin: 0; align-items: center; }
.gd-auth-card h1 { font-size: 34px; font-weight: 780; letter-spacing: -.055em; line-height: 1.03; }
.gd-tabs { display: grid; grid-template-columns: 1fr 1fr; }
.gd-tabs button { min-height: 38px; }
.gd-demo-box { border-radius: 16px; padding: 12px; display: grid; gap: 8px; background: var(--gd-inner); border: 1px dashed var(--gd-line); }

.gd-toast {
  position: fixed; left: 50%; translate: -50% 0; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); z-index: 100;
  background: var(--gd-primary); color: var(--gd-primary-ink); padding: 11px 18px; border-radius: 999px;
  font-weight: 750; font-size: 12.5px; box-shadow: 0 10px 30px rgb(var(--gd-dark-shadow) / 30%); max-width: calc(100% - 32px); text-align: center;
}

/* ---------- Entrada animada ---------- */
@media (prefers-reduced-motion: no-preference) {
  [data-enter] { animation: gd-enter .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 45ms + 30ms); }
  @keyframes gd-enter { from { opacity: 0; transform: translateY(16px); } }
  .gd-content.is-in { animation: gd-blur-in .32s ease-out; }
  @keyframes gd-blur-in { from { opacity: .55; filter: blur(5px); } }
  .gd-stack-bar { animation: gd-grow .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 40ms + 170ms); }
  @keyframes gd-grow { from { transform: scaleY(0); } }
  .gd-fill { animation: gd-grow-x .6s cubic-bezier(.2,.8,.2,1) both .2s; }
  @keyframes gd-grow-x { from { transform: scaleX(0); } }
  .gd-ring-draw { animation: gd-ring .8s cubic-bezier(.2,.8,.2,1) both .16s; }
  @keyframes gd-ring { from { stroke-dasharray: 0 100; } }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1060px) {
  .gd-surround { width: calc(100% - 74px); }
  .gd-command-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .gd-command-grid > .gd-wide, .gd-command-grid > .gd-full { grid-column: 1 / -1; }
  .gd-form-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .gd-surround { width: calc(100% - 22px); padding-top: calc(env(safe-area-inset-top, 0px) + 10px); padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px)); }
  .gd-top { grid-template-columns: minmax(0, 1fr) auto; padding: 7px 8px 8px 9px; gap: 7px 10px; border-radius: 24px; }
  .gd-ask { grid-area: 2 / 1 / 3 / -1; min-height: 42px; }
  .gd-kbd { display: none; }
  .gd-top-actions { grid-area: 1 / 2; }
  .gd-top-actions .gd-icon-button { min-width: 42px; min-height: 42px; }
  .gd-stage { border-radius: 24px; }
  .gd-stage-in { padding: 16px 13px 18px; min-height: 0; }
  .gd-view-head { align-items: flex-start; flex-direction: column; gap: 10px; margin-bottom: 14px; }
  .gd-view-head p { font-size: 12px; margin-top: 6px; }
  .gd-view-actions { justify-content: flex-start; }
  .gd-command-grid, .gd-cards { grid-template-columns: minmax(0, 1fr); }
  .gd-dock-side { display: none; }
  .gd-dock-bottom { position: fixed; inset: auto 10px calc(9px + env(safe-area-inset-bottom, 0px)); translate: none; justify-content: space-between; }
  .gd-dock-bottom button { flex: 1; flex-direction: column; gap: 2px; padding: 3px 4px; min-height: 50px; line-height: 1.2; font-size: 10px; }
  .gd-dock-bottom button svg { width: 17px; height: 17px; }
  .gd-dock-bottom .gd-dock-text { display: none; }
  .gd-dock-bottom .gd-dock-short { display: inline; }
  .gd-dock-bottom .gd-badge { position: absolute; top: 2px; right: calc(50% - 20px); }
  .gd-footer { padding-top: 12px; }
  .gd-period button, .gd-period .gd-period-label { min-height: 40px; }
  .gd-primary, .gd-secondary, .gd-danger { min-height: 44px; }
  .gd-sm { min-height: 36px; }
  .gd-dialog { margin: auto auto 0; border-radius: 24px 24px 0 0; max-width: 100%; max-height: 92dvh; }
  .gd-dialog-in { padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
  .gd-toast { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 420px) {
  .gd-panel { padding: 13px; }
  .gd-metric { padding: 10px; min-height: 104px; }
  .gd-summary { gap: 5px; padding: 5px; }
  .gd-stack-label { font-size: 8.5px; }
  .gd-table-scroll th, .gd-table-scroll td { padding-inline: 6px; }
  .gd-table-scroll td:first-child { max-width: 130px; }
  .col-opt { display: none; }
  .gd-search input { width: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .gd-top, .gd-stage, .gd-dock, .gd-panel, .gd-metric, .gd-summary { background: var(--gd-surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
