/* ═══════════════════════════════════════════════════════════════════════════
   INGOO UI (H5) — tema do Ingoo Financeiro
   ───────────────────────────────────────────────────────────────────────────
   Fonte dos tokens: INGOO-H5 `src/shared/styles/design-tokens.css`
   (--orange #fa6900, --grey #1c1f23, Poppins) e `PrimaryBtn/index.vue`.

   Os mesmos valores vestem rj.ingooapp.com.br (theme-h5.ts),
   operacao.superappingoo.com.br e crm.superappingoo.com.br.
   Quatro sistemas, um vocabulário.

   Carregada DEPOIS do <style> da página: vence na cascata sem !important e sai
   daqui com uma linha.

   Como no painel de Operação: MODO CLARO = identidade do H5, modo escuro
   intocado. Quem preferir o escuro clica no botão de tema e fica nele.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. Tokens do modo claro ──────────────────────────────────────────────
   A página inteira já lê estas variáveis; é daqui que vem a maior parte da
   mudança. O bloco escuro do <style> não é tocado por nada deste arquivo.  */
html[data-theme="light"] {
  --bg:     #F8F8F8;                 /* H5 bgPage */
  --bg2:    #FFFFFF;
  --bg3:    #F2F2F3;                 /* H5 fill   */
  --card:   #FFFFFF;
  --card-h: #FBFBFB;
  --border: rgba(28, 31, 35, 0.15);
  --text:   #1C1F23;                 /* --grey */
  --muted:  rgba(28, 31, 35, 0.64);  /* --color-text-2 */
  --muted2: rgba(28, 31, 35, 0.52);  /* --color-text-3 */
  --orange: #FA6900;                 /* o :root escuro usa #ff6b00 */
  --green:  #0F7B3A;
  --red:    #6A0103;
  --yellow: #B26A00;
  --blue:   #002C6B;

  /* auxiliares desta folha */
  --h5-border-soft: rgba(28, 31, 35, 0.10);
  --h5-fill:        rgba(28, 31, 35, 0.04);
  --h5-orange-1:    rgba(250, 105, 0, 0.10);
  --h5-orange-2:    rgba(250, 105, 0, 0.20);
  --h5-orange-4:    rgba(250, 105, 0, 0.40);
  --h5-shadow1:     0 1px 2px 0 rgba(0, 0, 0, 0.08);
  --h5-shadow2:     0 4px 8px 0 rgba(0, 0, 0, 0.08);
  --h5-shadow3:     0 8px 16px 0 rgba(0, 0, 0, 0.08);
  --h5-panel:       0 10px 40px rgba(0, 0, 0, 0.12);
  --h5-radius:      12px;
  --h5-radius-md:   8px;
}

/* ── 2. Tipografia — vale nos dois temas ─────────────────────────────────── */
body,
input, select, textarea, button {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── 3. Ícones — valem nos dois temas ─────────────────────────────────────
   Substituíram os emojis. Traço em currentColor: herdam a cor de onde estão —
   cinza na barra parada, laranja no item ativo — e desenham igual em qualquer
   sistema, ao contrário do emoji.                                          */
.ico-svg { display: inline-flex; align-items: center; justify-content: center; line-height: 0; vertical-align: -.18em; flex-shrink: 0; }
.ico-svg svg { display: block; }
.sb-item .ic { display: inline-flex; align-items: center; justify-content: center; width: 18px; flex-shrink: 0; }
/* O botão de tema passou a ter SVG dentro: vira flex para o desenho ficar no
   meio, como o emoji ficava sozinho.
   CUIDADO: nada de `display` no `.menu-btn` aqui. Ele é `display:none` no
   desktop e só aparece no mobile; declarar display nesta folha (que carrega
   depois) fazia ele reaparecer no desktop e empurrar a barra lateral para
   fora do grid. Lá o alinhamento já vem do próprio <style> da página. */
.lg { display: inline-flex; align-items: center; justify-content: center; }
.btn.sm .ico-svg { vertical-align: 0; }
/* A lupa do campo de busca era um ::before com emoji; agora é desenho. */
.search::before {
  content: '';
  width: 14px; height: 14px;
  background: currentColor;
  opacity: .45;
  -webkit-mask: var(--ico-lupa) center / contain no-repeat;
          mask: var(--ico-lupa) center / contain no-repeat;
}
:root {
  --ico-lupa: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.6-3.6'/%3E%3C/svg%3E");
}

/* ══════════════════════════════════════════════════════════════════════════
   Daqui para baixo, só o modo claro.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── 4. Botões ────────────────────────────────────────────────────────────
   PrimaryBtn do H5: laranja, branco 700, sombra laranja, recuo no toque.
   No escuro o texto do botão é preto (#0a0a0a) e continua assim.          */
html[data-theme="light"] .btn {
  color: #fff;
  border-radius: var(--h5-radius-md);
  box-shadow: 0 4px 9px var(--h5-orange-4);
  transition: background .15s, box-shadow .15s, transform .12s;
}
html[data-theme="light"] .btn:hover {
  background: rgba(250, 105, 0, .86);
  box-shadow: 0 6px 14px var(--h5-orange-4);
}
html[data-theme="light"] .btn:active { transform: scale(.97); }
html[data-theme="light"] .btn.green { color: #fff; box-shadow: 0 4px 9px rgba(15, 123, 58, .28); }
html[data-theme="light"] .btn.red   { box-shadow: 0 4px 9px rgba(106, 1, 3, .28); }
html[data-theme="light"] .btn.blue  { box-shadow: 0 4px 9px rgba(0, 44, 107, .28); }
html[data-theme="light"] .btn.ghost {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--h5-shadow1);
}
html[data-theme="light"] .btn.ghost:hover {
  background: var(--h5-orange-1);
  border-color: var(--orange);
  color: var(--orange);
}

/* ── 5. Barra lateral ─────────────────────────────────────────────────── */
html[data-theme="light"] .sidebar { border-right: 1px solid var(--h5-border-soft); }
html[data-theme="light"] .sb-item { border-radius: var(--h5-radius-md); color: var(--muted); }
html[data-theme="light"] .sb-item:hover { background: var(--h5-fill); color: var(--text); }
html[data-theme="light"] .sb-item.active { background: var(--h5-orange-1); color: var(--orange); font-weight: 650; }

/* ── 6. Cartões, KPIs e tabelas ───────────────────────────────────────── */
html[data-theme="light"] .card,
html[data-theme="light"] .kpi {
  border: 1px solid var(--h5-border-soft);
  border-radius: var(--h5-radius);
  box-shadow: var(--h5-shadow1);
}
html[data-theme="light"] .kpi[onclick]:hover { box-shadow: var(--h5-shadow2); }
html[data-theme="light"] th { color: var(--muted); }

/* ── 7. Campos ─────────────────────────────────────────────────────────── */
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--h5-radius-md);
  color: var(--text);
}
html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus {
  border-color: rgba(250, 105, 0, .5);
  box-shadow: 0 0 0 3px var(--h5-orange-1);
}

/* ── 8. Modal, pílulas e filtros ──────────────────────────────────────── */
html[data-theme="light"] .modal { border-radius: var(--h5-radius); box-shadow: var(--h5-panel); }
html[data-theme="light"] .filter-pill { border-radius: 999px; }
html[data-theme="light"] .filter-pill.active { background: var(--orange); color: #fff; }
