/* ============================================================
   FIRM UI — Design System
   Identidade Firm Capital (bege · dourado · grafite)
   Estética reui: superfícies limpas, bordas sutis, respiro.
   ------------------------------------------------------------
   Uso: <link rel="stylesheet" href="firm-ui/firm-ui.css">
   Fontes: Geist + Geist Mono (Google Fonts)
   ============================================================ */

/* ---------- TOKENS ---------- */
:root {
  /* Superfícies (claro) */
  --bg:          #f3efe7;   /* fundo da página — bege papel */
  --bg-grain:    #efe9dd;   /* faixa/seção sutil */
  --surface:     #ffffff;   /* card */
  --surface-2:   #faf7f1;   /* hover / inset */
  --surface-3:   #f1ece2;   /* trilhos, thead */
  --border:      #e7e1d4;   /* hairline */
  --border-2:    #d9d1c0;   /* borda forte */

  /* Tinta */
  --ink:    #232017;        /* near-black quente */
  --ink-2:  #5b564b;        /* secundário */
  --ink-3:  #938c7d;        /* muted / placeholder */
  --ink-inv:#fbfaf6;        /* texto sobre escuro */

  /* Dourado — assinatura da marca */
  --gold:      #c5a47e;
  --gold-2:    #b18c61;     /* hover / borda */
  --gold-3:    #94774e;     /* texto dourado legível no claro */
  --gold-soft: #f1e8d8;     /* fundo tint */
  --gold-line: #e4d4b6;

  /* Primário (grafite) */
  --primary:    #2a2722;
  --primary-2:  #18160f;    /* hover */
  --on-primary: #fbfaf6;

  /* Estados (afinados ao bege) */
  --ok:#4f8a5b;    --ok-soft:#e6efe3;    --ok-ink:#356b43;
  --warn:#b9852b;  --warn-soft:#f5e9ce;  --warn-ink:#8a6118;
  --bad:#b4463c;   --bad-soft:#f4e0dc;   --bad-ink:#8d352c;
  --info:#4a6fa5;  --info-soft:#e3e9f3;  --info-ink:#355586;

  --ring: 0 0 0 3px rgba(197,164,126,.30);

  /* Sombras (quentes, suaves) */
  --sh-xs: 0 1px 2px rgba(38,34,26,.05);
  --sh-sm: 0 1px 3px rgba(38,34,26,.06), 0 1px 2px rgba(38,34,26,.04);
  --sh-md: 0 6px 16px -4px rgba(38,34,26,.09), 0 2px 6px -2px rgba(38,34,26,.06);
  --sh-lg: 0 18px 38px -10px rgba(38,34,26,.16), 0 6px 14px -6px rgba(38,34,26,.08);
  --sh-xl: 0 32px 60px -14px rgba(38,34,26,.24);

  /* Raios */
  --r-xs:6px; --r-sm:8px; --r:10px; --r-md:12px; --r-lg:16px; --r-xl:22px; --r-full:999px;

  /* Tipografia */
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Layout */
  --sidebar-w: 230px;
  --topbar-h: 52px;

  /* Gráficos (Chart.js via js/firm-charts.js — lidos em runtime) */
  --chart-strong:  rgb(45, 45, 45);
  --chart-medium:  rgb(74, 74, 74);
  --chart-soft:    rgb(107, 107, 107);
  --chart-softer:  rgb(154, 154, 154);
  --chart-gold:    rgb(197, 164, 126);
  --chart-gold-2:  rgb(182, 149, 104);
  --chart-gold-3:  rgb(212, 184, 150);
  --chart-fill:    rgb(232, 228, 219);
  --chart-taupe:   rgb(186, 174, 160);
  --chart-taupe-soft: rgba(186, 174, 160, 0.12);
  --chart-grid:        rgba(231, 225, 212, 0.7);
  --chart-grid-border: rgba(231, 225, 212, 0.9);
}

[data-theme="dark"] {
  --bg:        #15130e;
  --bg-grain:  #1a1812;
  --surface:   #1e1b15;
  --surface-2: #262219;
  --surface-3: #2c281e;
  --border:    #332e23;
  --border-2:  #46402f;

  --ink:    #f1ece1;
  --ink-2:  #b6ae9e;
  --ink-3:  #847c6c;
  --ink-inv:#1a1812;

  --gold:      #ceac84;
  --gold-2:    #ddc09a;
  --gold-3:    #ddc09a;
  --gold-soft: #2b2417;
  --gold-line: #4a3f2b;

  --primary:    #ece7dc;
  --primary-2:  #ffffff;
  --on-primary: #1a1812;

  --ok:#6fb07e;    --ok-soft:#1d281f;    --ok-ink:#9fd0aa;
  --warn:#d6a44e;  --warn-soft:#2a2315;  --warn-ink:#e6c179;
  --bad:#d4655a;   --bad-soft:#2c1c19;   --bad-ink:#e89a90;
  --info:#7a9fd0;  --info-soft:#1a2230;  --info-ink:#a8c2e6;

  --ring: 0 0 0 3px rgba(206,172,132,.28);

  --sh-xs: 0 1px 2px rgba(0,0,0,.4);
  --sh-sm: 0 1px 3px rgba(0,0,0,.5);
  --sh-md: 0 6px 16px -4px rgba(0,0,0,.55), 0 2px 6px -2px rgba(0,0,0,.4);
  --sh-lg: 0 18px 38px -10px rgba(0,0,0,.6);
  --sh-xl: 0 32px 60px -14px rgba(0,0,0,.7);

  /* Gráficos — séries claras sobre fundo escuro */
  --chart-strong:  rgb(236, 230, 218);
  --chart-medium:  rgb(199, 191, 175);
  --chart-soft:    rgb(160, 152, 136);
  --chart-softer:  rgb(120, 113, 99);
  --chart-gold:    rgb(206, 172, 132);
  --chart-gold-2:  rgb(221, 192, 154);
  --chart-gold-3:  rgb(184, 152, 113);
  --chart-fill:    rgb(44, 40, 30);
  --chart-taupe:   rgb(141, 130, 116);
  --chart-taupe-soft: rgba(141, 130, 116, 0.18);
  --chart-grid:        rgba(70, 64, 47, 0.55);
  --chart-grid-border: rgba(70, 64, 47, 0.85);
}

/* ---------- RESET / BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11","ss01";
  transition: background .35s ease, color .35s ease;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }

::selection { background: var(--gold-soft); color: var(--ink); }

/* Ícone base (sobrescrito por contextos que definem px) */
.ico { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -0.18em; display: inline-block; }
i[data-ico] { display: inline-flex; }

/* Scrollbar discreto */
* { scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--ink-3); background-clip: content-box; }

/* ---------- TIPOGRAFIA ---------- */
.h1 { font-size: clamp(1.4rem, 2.1vw, 1.7rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.12; }
.h2 { font-size: 1.18rem; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; }
.h3 { font-size: 1rem; font-weight: 600; letter-spacing: -.01em; }
.lead { color: var(--ink-2); font-size: .95rem; }
.muted { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* Micro-rótulo monospace — assinatura do sistema */
.eyebrow, .kicker {
  font-family: var(--font-mono);
  font-size: .64rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.kicker-gold { color: var(--gold-3); }

/* ---------- MOTIVO: COLCHETES (corner brackets) ---------- */
/* Eco do enquadramento do logotipo Firm Capital */
.bracket { position: relative; }
.bracket::before, .bracket::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 2px solid var(--gold); pointer-events: none;
}
.bracket::before { top: -6px; left: -6px; border-right: 0; border-bottom: 0; }
.bracket::after  { bottom: -6px; right: -6px; border-left: 0; border-top: 0; }
.bracket--ink::before, .bracket--ink::after { border-color: var(--ink); }
.bracket--lg::before, .bracket--lg::after { width: 22px; height: 22px; }

/* ---------- BOTÕES ---------- */
.btn {
  --bh: 32px;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  height: var(--bh); padding: 0 .8rem;
  border-radius: var(--r-sm); border: 1px solid transparent;
  background: var(--surface-2); color: var(--ink);
  font-weight: 500; font-size: .82rem; letter-spacing: -.01em;
  cursor: pointer; white-space: nowrap; user-select: none;
  transition: background .16s ease, border-color .16s ease, transform .12s ease, box-shadow .16s ease, color .16s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn .ico { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: var(--sh-sm); }
.btn-primary:hover { background: var(--primary-2); box-shadow: var(--sh-md); }

.btn-gold { background: var(--gold); color: #2a2117; box-shadow: var(--sh-sm); }
.btn-gold:hover { background: var(--gold-2); box-shadow: 0 6px 18px -6px rgba(177,140,97,.55); }

.btn-outline { background: transparent; border-color: var(--border-2); color: var(--ink); }
.btn-outline:hover { background: var(--surface-2); border-color: var(--ink-3); }

.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }

.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { filter: brightness(.94); }

.btn-sm { --bh: 27px; padding: 0 .6rem; font-size: .76rem; }
.btn-sm .ico { width: 14px; height: 14px; }
.btn-lg { --bh: 40px; padding: 0 1.2rem; font-size: .9rem; border-radius: var(--r); }
.btn-block { width: 100%; }
.btn-icon { width: var(--bh); padding: 0; }

/* ---------- INPUTS ---------- */
.field { display: flex; flex-direction: column; gap: .4rem; }
.field > label { font-size: .78rem; font-weight: 500; color: var(--ink-2); }
.field .hint { font-size: .76rem; color: var(--ink-3); }
.field .err  { font-size: .76rem; color: var(--bad-ink); }

.input, .select, .textarea {
  width: 100%; height: 34px; padding: 0 .7rem;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--border-2); border-radius: var(--r-sm);
  font-size: .84rem; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.textarea { height: auto; min-height: 108px; padding: .7rem .85rem; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--gold); box-shadow: var(--ring); }
.select { appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23938c7d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .7rem center; padding-right: 2.2rem; cursor: pointer; }

/* Input com ícone */
.input-group { position: relative; display: flex; align-items: center; }
.input-group .ico { position: absolute; left: .65rem; width: 15px; height: 15px; color: var(--ink-3); pointer-events: none; }
.input-group .input { padding-left: 2.1rem; }

/* Switch */
.switch { position: relative; display: inline-flex; width: 42px; height: 24px; cursor: pointer; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; }
.switch .track { position: absolute; inset: 0; background: var(--border-2); border-radius: 99px; transition: background .2s ease; }
.switch .thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; box-shadow: var(--sh-sm); transition: transform .2s ease; }
.switch input:checked + .track { background: var(--gold); }
.switch input:checked + .track + .thumb { transform: translateX(18px); }

/* Checkbox simples */
.check { width: 18px; height: 18px; border: 1.5px solid var(--border-2); border-radius: 5px; background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; transition: all .15s ease; }
.check[data-on="true"] { background: var(--gold); border-color: var(--gold); }
.check svg { width: 12px; height: 12px; color: #2a2117; opacity: 0; }
.check[data-on="true"] svg { opacity: 1; }

/* ---------- BADGES / TAGS / DOTS ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  height: 19px; padding: 0 .45rem; border-radius: var(--r-full);
  font-family: var(--font-mono); font-size: .62rem; font-weight: 500;
  letter-spacing: .03em; text-transform: uppercase;
  border: 1px solid transparent; white-space: nowrap;
}
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-neutral { background: var(--surface-3); color: var(--ink-2); border-color: var(--border); }
.badge-gold { background: var(--gold-soft); color: var(--gold-3); border-color: var(--gold-line); }
.badge-ok   { background: var(--ok-soft);   color: var(--ok-ink);   }
.badge-warn { background: var(--warn-soft); color: var(--warn-ink); }
.badge-bad  { background: var(--bad-soft);  color: var(--bad-ink);  }
.badge-info { background: var(--info-soft); color: var(--info-ink); }
.badge-solid{ background: var(--primary); color: var(--on-primary); }

/* ---------- CARDS ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--sh-sm);
}
.card-pad { padding: 1rem 1.1rem; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem 1.1rem; border-bottom: 1px solid var(--border);
}
.card-head .title { font-size: .9rem; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: .5rem; }
.card-head .title .ico { width: 16px; height: 16px; color: var(--gold-3); }
.card-body { padding: 1.1rem; }
.card-foot { padding: .7rem 1.1rem; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.card-hover { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); border-color: var(--border-2); }

/* ---------- STAT CARD ---------- */
.stat {
  position: relative; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: .7rem .8rem; overflow: hidden; display: flex; gap: .6rem; align-items: center;
  transition: transform .18s ease, box-shadow .18s ease;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.stat-ico { width: 34px; height: 34px; border-radius: var(--r-sm); display: grid; place-items: center;
  background: var(--gold-soft); color: var(--gold-3); border: 1px solid var(--gold-line); flex-shrink: 0; }
.stat-ico .ico { width: 16px; height: 16px; }
.stat-body { flex: 1; min-width: 0; }
.stat-label { font-family: var(--font-mono); font-size: .6rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .12rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-value { font-size: 1.4rem; font-weight: 600; letter-spacing: -.025em; font-variant-numeric: tabular-nums; line-height: 1.05; display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; }
.stat-value .trend { font-size: .72rem; }
.stat-foot { margin-top: .15rem; display: flex; align-items: center; gap: .4rem; font-size: .7rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trend { display: inline-flex; align-items: center; gap: .2rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.trend .ico { width: 14px; height: 14px; }
.trend.up { color: var(--ok-ink); }
.trend.down { color: var(--bad-ink); }

/* ---------- TABELA ---------- */
.tbl-wrap { width: 100%; overflow-x: auto; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .82rem; }
.tbl thead th {
  position: sticky; top: 0; background: var(--surface-3);
  text-align: left; padding: .5rem .8rem; font-family: var(--font-mono);
  font-size: .62rem; font-weight: 500; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-3); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.tbl thead th:first-child { border-top-left-radius: var(--r-sm); }
.tbl thead th:last-child  { border-top-right-radius: var(--r-sm); }
.tbl tbody td { padding: .5rem .8rem; border-bottom: 1px solid var(--border); color: var(--ink-2); vertical-align: middle; }
.tbl tbody tr { transition: background .12s ease; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .strong { color: var(--ink); font-weight: 600; }
.tbl .num { white-space: nowrap; }
.tbl .cell-sub { white-space: nowrap; }
.tbl-actions { display: flex; gap: .3rem; justify-content: flex-end; }

/* célula com avatar + texto */
.cell-user { display: flex; align-items: center; gap: .55rem; }
.cell-sub { font-size: .72rem; color: var(--ink-3); }

/* botão de ícone em tabela */
.icon-btn {
  width: 28px; height: 28px; display: inline-grid; place-items: center;
  border-radius: var(--r-sm); border: 1px solid transparent; background: transparent;
  color: var(--ink-3); cursor: pointer; transition: all .14s ease;
}
.icon-btn:hover { background: var(--surface-3); color: var(--gold-3); border-color: var(--border); }
.icon-btn .ico { width: 15px; height: 15px; }

/* ---------- AVATAR ---------- */
.avatar {
  width: 30px; height: 30px; border-radius: var(--r-sm); flex-shrink: 0;
  display: grid; place-items: center; font-weight: 600; font-size: .74rem;
  background: var(--gold-soft); color: var(--gold-3); border: 1px solid var(--gold-line);
  font-variant-numeric: tabular-nums;
}
.avatar-lg { width: 46px; height: 46px; font-size: 1rem; border-radius: var(--r-sm); }
.avatar-sm { width: 24px; height: 24px; font-size: .68rem; }
.avatar-ink { background: var(--primary); color: var(--on-primary); border-color: transparent; }

/* ---------- CHIPS / SEGMENTED / TABS ---------- */
.chip {
  display: inline-flex; align-items: center; gap: .4rem; height: 28px; padding: 0 .7rem;
  border-radius: var(--r-full); border: 1px solid var(--border-2); background: var(--surface);
  font-size: .78rem; color: var(--ink-2); cursor: pointer; transition: all .15s ease;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip[data-on="true"] { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold-3); font-weight: 500; }
.chip .count { font-family: var(--font-mono); font-size: .68rem; background: var(--surface-3); color: var(--ink-2); padding: .05rem .35rem; border-radius: 99px; }
.chip[data-on="true"] .count { background: var(--gold); color: #2a2117; }

.segmented { display: inline-flex; padding: 2px; background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--r-sm); gap: 2px; }
.segmented button { height: 26px; padding: 0 .7rem; border: 0; background: transparent; color: var(--ink-2); font-size: .8rem; font-weight: 500; border-radius: 6px; cursor: pointer; transition: all .15s ease; display: inline-flex; align-items: center; gap: .35rem; }
.segmented button .ico { width: 14px; height: 14px; }
.segmented button[data-on="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--sh-xs); }

.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); }
.tabs button { position: relative; padding: .55rem .8rem; background: transparent; border: 0; color: var(--ink-2); font-size: .84rem; font-weight: 500; cursor: pointer; transition: color .15s ease; }
.tabs button:hover { color: var(--ink); }
.tabs button[data-on="true"] { color: var(--ink); }
.tabs button[data-on="true"]::after { content: ""; position: absolute; left: .8rem; right: .8rem; bottom: -1px; height: 2px; background: var(--gold); border-radius: 2px; }

/* ---------- PROGRESS / METER ---------- */
.meter { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--gold); border-radius: 99px; }
.meter.ink > span { background: var(--primary); }

/* ---------- MODAL (padrão .scrim > .modal) ----------
   Escopado sob .scrim: o seletor solto `.modal` pertence ao bridge
   legado (firm-widgets.css, overlay fixed+flex). Sem o escopo, os
   dois padrões colidem e o modal legado encolhe a 520px grudado na
   borda da tela. */
.scrim { position: fixed; inset: 0; background: rgba(28,24,18,.5); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 1.5rem; z-index: 1000; opacity: 0; transition: opacity .2s ease; }
.scrim[data-open="true"] { opacity: 1; }
.scrim .modal { position: relative; inset: auto; width: 100%; max-width: 520px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--sh-xl); transform: translateY(8px) scale(.985); transition: transform .22s cubic-bezier(.2,.8,.2,1); overflow: hidden; padding: 0; display: block; backdrop-filter: none; }
.scrim[data-open="true"] .modal { transform: none; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.4rem 1.5rem 1rem; }
.modal-head .h3 { margin-bottom: .15rem; }
.scrim .modal-body { padding: 0 1.5rem 1.25rem; color: var(--ink-2); }
.modal-foot { padding: 1.1rem 1.5rem; background: var(--surface-2); border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .6rem; }

/* ---------- TOAST ---------- */
.toast {
  display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem;
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--gold);
  border-radius: var(--r); box-shadow: var(--sh-lg); font-size: .88rem; color: var(--ink);
  min-width: 280px; max-width: 380px;
}
.toast .ico { width: 18px; height: 18px; flex-shrink: 0; }
.toast.ok   { border-left-color: var(--ok); }   .toast.ok .ico   { color: var(--ok-ink); }
.toast.bad  { border-left-color: var(--bad); }   .toast.bad .ico  { color: var(--bad-ink); }
.toast.warn { border-left-color: var(--warn); }  .toast.warn .ico { color: var(--warn-ink); }
.toast.gold .ico { color: var(--gold-3); }

/* ---------- ALERT / CALLOUT ---------- */
.alert { display: flex; gap: .75rem; padding: 1rem 1.1rem; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface-2); }
.alert .ico { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert .title { font-weight: 600; font-size: .9rem; margin-bottom: .15rem; }
.alert .desc { font-size: .85rem; color: var(--ink-2); }
.alert.gold { background: var(--gold-soft); border-color: var(--gold-line); } .alert.gold .ico { color: var(--gold-3); }
.alert.info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 30%, transparent); } .alert.info .ico { color: var(--info-ink); }
.alert.warn { background: var(--warn-soft); } .alert.warn .ico { color: var(--warn-ink); }

/* ---------- DIVIDER / MISC ---------- */
.divider { height: 1px; background: var(--border); border: 0; }
.kbd { font-family: var(--font-mono); font-size: .72rem; padding: .1rem .4rem; border: 1px solid var(--border-2); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); color: var(--ink-2); }

/* ---------- UTIL ---------- */
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.between { justify-content: space-between; }
.center { justify-content: center; }
.wrap { flex-wrap: wrap; }
.gap-1 { gap: .35rem; } .gap-2 { gap: .6rem; } .gap-3 { gap: 1rem; } .gap-4 { gap: 1.5rem; }
.grow { flex: 1; }
.mono { font-family: var(--font-mono); }
.hide { display: none !important; }

/* Grids responsivos */
.grid { display: grid; gap: .8rem; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px)  { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px)  { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

@keyframes fui-in { from { transform: translateY(12px); } to { transform: none; } }
.animate-in { animation: fui-in .45s cubic-bezier(.2,.8,.2,1) both; }
@media (prefers-reduced-motion: reduce) { .animate-in { animation: none; } }
