/* =====================================================================
   Tesouraria — Design system
   Toda cor do sistema é um token. Componentes nunca usam hex direto.
   ===================================================================== */

:root {
  color-scheme: light;
  /* marca */
  --brand: #3949c7;
  --brand-strong: #2b39a3;
  --brand-soft: #eceefb;
  --brand-ink: #ffffff;

  /* superfícies */
  --page: #f6f6f3;
  --surface: #ffffff;
  --surface-2: #fafaf8;
  --surface-3: #f1f0ec;
  --sidebar: #15172a;
  --sidebar-2: #1f2238;
  --sidebar-ink: #c9cbe0;
  --sidebar-ink-strong: #ffffff;
  --sidebar-muted: #7d80a0;

  /* tinta */
  --ink: #16161a;
  --ink-2: #52514e;
  --ink-3: #898781;
  --line: #e6e5df;
  --line-strong: #d3d2ca;
  --focus: rgba(57, 73, 199, .35);

  /* tons (tags, alertas, KPIs) — bg / fg / dot */
  --good-bg: #e6f5e6;     --good-fg: #0b6b0b;     --good-dot: #0ca30c;
  --warning-bg: #fff4d6;  --warning-fg: #7a5200;  --warning-dot: #f0a500;
  --serious-bg: #fdece4;  --serious-fg: #9a3b12;  --serious-dot: #ec835a;
  --critical-bg: #fbe8e8; --critical-fg: #a12222; --critical-dot: #d03b3b;
  --info-bg: #e7f0fc;     --info-fg: #1c5cab;     --info-dot: #2a78d6;
  --violet-bg: #eeecfb;   --violet-fg: #4a3aa7;   --violet-dot: #6a5ad0;
  --neutral-bg: #efeee9;  --neutral-fg: #3b3a37;  --neutral-dot: #6b6a65;
  --muted-bg: #f4f4f1;    --muted-fg: #75746e;    --muted-dot: #a9a8a1;

  /* paleta categórica (categorias, centros, contas) */
  --cat-azul: #2a78d6; --cat-laranja: #eb6834; --cat-agua: #1baf7a; --cat-amarelo: #eda100;
  --cat-magenta: #e87ba4; --cat-verde: #008300; --cat-violeta: #4a3aa7; --cat-vermelho: #e34948; --cat-cinza: #898781;

  /* gráficos */
  --chart-grid: #e1e0d9;
  --chart-axis: #898781;

  /* forma */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 17, 30, .05);
  --shadow: 0 1px 2px rgba(16, 17, 30, .05), 0 4px 14px rgba(16, 17, 30, .05);
  --shadow-lg: 0 10px 40px rgba(16, 17, 30, .18);

  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --sidebar-w: 252px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --brand: #6876f0; --brand-strong: #8692ff; --brand-soft: #23264a; --brand-ink: #ffffff;
    --page: #0f0f12; --surface: #18181c; --surface-2: #1d1d22; --surface-3: #25252b;
    --sidebar: #0b0c16; --sidebar-2: #171a2c;
    --ink: #f3f3f1; --ink-2: #c3c2b7; --ink-3: #8c8b85; --line: #2b2b31; --line-strong: #3a3a41;
    --good-bg: #12301a; --good-fg: #7fdc86; --good-dot: #0ca30c;
    --warning-bg: #3a2c08; --warning-fg: #ffd36b; --warning-dot: #fab219;
    --serious-bg: #3d1e12; --serious-fg: #ffad8a; --serious-dot: #ec835a;
    --critical-bg: #3e1616; --critical-fg: #ff9a9a; --critical-dot: #e05555;
    --info-bg: #142a47; --info-fg: #8fbdf6; --info-dot: #3987e5;
    --violet-bg: #251f4d; --violet-fg: #b4abff; --violet-dot: #9085e9;
    --neutral-bg: #2a2a2f; --neutral-fg: #d6d5ce; --neutral-dot: #a9a8a1;
    --muted-bg: #222226; --muted-fg: #94938d; --muted-dot: #6b6a65;
    --cat-azul: #3987e5; --cat-laranja: #d95926; --cat-agua: #199e70; --cat-amarelo: #c98500;
    --cat-magenta: #d55181; --cat-verde: #0a9a0a; --cat-violeta: #9085e9; --cat-vermelho: #e66767; --cat-cinza: #8c8b85;
    --chart-grid: #2c2c2a; --chart-axis: #8c8b85;
    --shadow-sm: none; --shadow: 0 0 0 1px rgba(255,255,255,.02); --shadow-lg: 0 10px 40px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #6876f0; --brand-strong: #8692ff; --brand-soft: #23264a; --brand-ink: #ffffff;
  --page: #0f0f12; --surface: #18181c; --surface-2: #1d1d22; --surface-3: #25252b;
  --sidebar: #0b0c16; --sidebar-2: #171a2c;
  --ink: #f3f3f1; --ink-2: #c3c2b7; --ink-3: #8c8b85; --line: #2b2b31; --line-strong: #3a3a41;
  --good-bg: #12301a; --good-fg: #7fdc86; --good-dot: #0ca30c;
  --warning-bg: #3a2c08; --warning-fg: #ffd36b; --warning-dot: #fab219;
  --serious-bg: #3d1e12; --serious-fg: #ffad8a; --serious-dot: #ec835a;
  --critical-bg: #3e1616; --critical-fg: #ff9a9a; --critical-dot: #e05555;
  --info-bg: #142a47; --info-fg: #8fbdf6; --info-dot: #3987e5;
  --violet-bg: #251f4d; --violet-fg: #b4abff; --violet-dot: #9085e9;
  --neutral-bg: #2a2a2f; --neutral-fg: #d6d5ce; --neutral-dot: #a9a8a1;
  --muted-bg: #222226; --muted-fg: #94938d; --muted-dot: #6b6a65;
  --cat-azul: #3987e5; --cat-laranja: #d95926; --cat-agua: #199e70; --cat-amarelo: #c98500;
  --cat-magenta: #d55181; --cat-verde: #0a9a0a; --cat-violeta: #9085e9; --cat-vermelho: #e66767; --cat-cinza: #8c8b85;
  --chart-grid: #2c2c2a; --chart-axis: #8c8b85;
  --shadow-sm: none; --shadow: 0 0 0 1px rgba(255,255,255,.02); --shadow-lg: 0 10px 40px rgba(0,0,0,.6);
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--ink);
  background: var(--page); -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 16px; } h3 { font-size: 14px; }
p { margin: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--ink-3); }
.ink-2 { color: var(--ink-2); }
.small { font-size: 12px; }
.strong { font-weight: 600; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[data-lucide], svg.lucide { width: 16px; height: 16px; stroke-width: 2; flex-shrink: 0; }
.ico-lg svg, svg.ico-lg { width: 20px; height: 20px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ------------------------------------------------------------------ layout */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--sidebar); color: var(--sidebar-ink);
  display: flex; flex-direction: column; padding: 18px 12px; gap: 4px; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: var(--sidebar-ink-strong); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, #5b6bff, #3949c7 55%, #2a2f8f); color: #fff; box-shadow: 0 4px 14px rgba(57, 73, 199, .45);
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: -.01em; line-height: 1.15; }
.brand-sub { font-size: 11.5px; color: var(--sidebar-muted); font-weight: 500; }
.nav-group { font-size: 10.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--sidebar-muted); padding: 14px 10px 6px; }
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--sidebar-ink);
  font-weight: 500; font-size: 13.5px; text-decoration: none !important; transition: background .12s, color .12s;
}
.nav-link:hover { background: var(--sidebar-2); color: var(--sidebar-ink-strong); }
.nav-link.ativo { background: rgba(104, 118, 240, .18); color: #fff; box-shadow: inset 2px 0 0 #7d8bff; }
.nav-link.ativo svg { color: #9aa5ff; }
.nav-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 11px; font-weight: 700;
  display: inline-grid; place-items: center; font-variant-numeric: tabular-nums;
}
.nav-badge.tone-warning { background: var(--warning-dot); color: #2b1d00; }
.nav-badge.tone-critical { background: var(--critical-dot); color: #fff; }
.nav-badge.tone-info { background: var(--info-dot); color: #fff; }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.07); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.user-chip .nome { color: #fff; font-weight: 600; font-size: 13px; line-height: 1.2; }
.user-chip .papel { font-size: 11.5px; color: var(--sidebar-muted); }
.sidebar .btn-icon { color: var(--sidebar-ink); }
.sidebar .btn-icon:hover { background: var(--sidebar-2); color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 28px;
  background: color-mix(in srgb, var(--page) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.topbar .busca { position: relative; flex: 1; max-width: 460px; }
.topbar .busca input { padding-left: 36px; background: var(--surface); }
.topbar .busca svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.topbar .acoes { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar .menu-toggle { display: none; }
.content { padding: 24px 28px 48px; max-width: 1480px; width: 100%; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--ink-3); margin-top: 4px; }
.page-head .acoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; }
.breadcrumb a { color: var(--ink-3); }
.breadcrumb svg { width: 13px; height: 13px; }

.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main-side { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.span-2 { grid-column: span 2; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 8px; }
.row-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: 4px } .mt-2 { margin-top: 8px } .mt-3 { margin-top: 12px } .mt-4 { margin-top: 16px } .mt-6 { margin-top: 24px }
.mb-2 { margin-bottom: 8px } .mb-3 { margin-bottom: 12px } .mb-4 { margin-bottom: 16px }

/* ------------------------------------------------------------------ cartões */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.card-head h2 { display: flex; align-items: center; gap: 8px; }
.card-head h2 svg { color: var(--ink-3); }
.card-head .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.card-body { padding: 16px 18px 18px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.section-title { font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* KPI tile */
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; text-decoration: none !important; color: inherit; transition: border-color .15s, transform .15s; }
a.kpi:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.kpi-top { display: flex; align-items: center; gap: 10px; }
.kpi-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; }
.kpi-ico svg { width: 18px; height: 18px; }
.kpi-label { font-size: 12.5px; color: var(--ink-2); font-weight: 550; }
.kpi-value { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--kpi-accent, transparent); }

/* ------------------------------------------------------------------ tons */
.tone-good     { --t-bg: var(--good-bg);     --t-fg: var(--good-fg);     --t-dot: var(--good-dot); }
.tone-warning  { --t-bg: var(--warning-bg);  --t-fg: var(--warning-fg);  --t-dot: var(--warning-dot); }
.tone-serious  { --t-bg: var(--serious-bg);  --t-fg: var(--serious-fg);  --t-dot: var(--serious-dot); }
.tone-critical { --t-bg: var(--critical-bg); --t-fg: var(--critical-fg); --t-dot: var(--critical-dot); }
.tone-info     { --t-bg: var(--info-bg);     --t-fg: var(--info-fg);     --t-dot: var(--info-dot); }
.tone-violet   { --t-bg: var(--violet-bg);   --t-fg: var(--violet-fg);   --t-dot: var(--violet-dot); }
.tone-neutral  { --t-bg: var(--neutral-bg);  --t-fg: var(--neutral-fg);  --t-dot: var(--neutral-dot); }
.tone-muted    { --t-bg: var(--muted-bg);    --t-fg: var(--muted-fg);    --t-dot: var(--muted-dot); }
.tone-brand    { --t-bg: var(--brand-soft);  --t-fg: var(--brand);       --t-dot: var(--brand); }
.kpi-ico[class*="tone-"] { background: var(--t-bg); color: var(--t-fg); }
.kpi[class*="tone-"] { --kpi-accent: var(--t-dot); }

/* Tag de status (fundo suave + ícone) */
.tag {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--t-bg, var(--neutral-bg)); color: var(--t-fg, var(--neutral-fg));
  line-height: 1; vertical-align: middle;
}
.tag svg { width: 13px; height: 13px; stroke-width: 2.4; }
.tag-lg { height: 28px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.tag-lg svg { width: 15px; height: 15px; }
.tag.tone-muted { text-decoration: none; }
.tag-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--t-dot); }

/* Chip de cadastro (categoria/centro/conta): ponto com a cor da paleta */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px 0 7px; border-radius: 6px; font-size: 12px;
  font-weight: 550; color: var(--ink-2); background: var(--surface-3); white-space: nowrap; max-width: 100%;
}
.chip > span { overflow: hidden; text-overflow: ellipsis; }
.chip i.dot { width: 8px; height: 8px; border-radius: 2px; background: var(--c, var(--cat-cinza)); flex-shrink: 0; }
.chip.mono-code { font-family: var(--mono); font-size: 11.5px; }
.c-azul { --c: var(--cat-azul); } .c-laranja { --c: var(--cat-laranja); } .c-agua { --c: var(--cat-agua); }
.c-amarelo { --c: var(--cat-amarelo); } .c-magenta { --c: var(--cat-magenta); } .c-verde { --c: var(--cat-verde); }
.c-violeta { --c: var(--cat-violeta); } .c-vermelho { --c: var(--cat-vermelho); } .c-cinza { --c: var(--cat-cinza); }
.swatch { width: 14px; height: 14px; border-radius: 4px; background: var(--c); display: inline-block; flex-shrink: 0; }
.bar-c { background: var(--c); }

/* Forma de pagamento: ícone + rótulo, sem cor (cor é reservada para status) */
.forma { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.forma svg { color: var(--ink-3); }

/* avatar */
.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700;
  color: #fff; background: var(--c, var(--cat-cinza)); flex-shrink: 0; letter-spacing: .02em;
}
.avatar.sm { width: 22px; height: 22px; font-size: 9.5px; }
.avatar.lg { width: 36px; height: 36px; font-size: 13px; }

/* ------------------------------------------------------------------ botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; font-size: 13.5px;
  cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .12s, border-color .12s, box-shadow .12s;
  box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn-success { background: var(--good-dot); border-color: var(--good-dot); color: #fff; }
.btn-success:hover { background: #0a8a0a; border-color: #0a8a0a; }
.btn-danger { background: var(--surface); border-color: var(--critical-dot); color: var(--critical-fg); }
.btn-danger:hover { background: var(--critical-bg); border-color: var(--critical-dot); }
.btn-warning { background: var(--warning-dot); border-color: var(--warning-dot); color: #2b1d00; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-3); border-color: transparent; color: var(--ink); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; gap: 5px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-lg { height: 42px; padding: 0 18px; font-size: 14.5px; }
.btn-icon { width: 34px; padding: 0; background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn-icon:hover { background: var(--surface-3); border-color: transparent; }
.btn-icon.btn-sm { width: 30px; }
.btn-block { width: 100%; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: 9px 0 0 9px; margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 9px 9px 0; }
.btn-group .btn.ativo { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); z-index: 1; }

/* ------------------------------------------------------------------ formulários */
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 16px; }
.col-2 { grid-column: span 2; } .col-3 { grid-column: span 3; } .col-4 { grid-column: span 4; } .col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; } .col-7 { grid-column: span 7; } .col-8 { grid-column: span 8; } .col-9 { grid-column: span 9; } .col-12 { grid-column: span 12; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.field > label .req { color: var(--critical-dot); }
.hint { font-size: 12px; color: var(--ink-3); }
.hint.erro { color: var(--critical-fg); }
.hint.ok { color: var(--good-fg); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=month], input[type=number], input[type=search],
input[type=tel], select, textarea {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface);
  color: var(--ink); font: inherit; font-size: 14px; transition: border-color .12s, box-shadow .12s;
}
textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
select { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23898781' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--focus); }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input[readonly] { background: var(--surface-2); }
.input-sm { height: 32px !important; font-size: 13px !important; }
.input-group { display: flex; align-items: stretch; }
.input-group > .addon {
  display: grid; place-items: center; padding: 0 11px; border: 1px solid var(--line-strong); background: var(--surface-3);
  color: var(--ink-3); font-weight: 600; font-size: 13px; border-radius: 9px 0 0 9px; border-right: 0;
}
.input-group > .addon.end { border-radius: 0 9px 9px 0; border-left: 0; border-right: 1px solid var(--line-strong); }
.input-group > input { border-radius: 0 9px 9px 0; }
.input-group > input:not(:last-child) { border-radius: 0; }
.input-group > .btn { border-radius: 0 9px 9px 0; height: 38px; margin-left: -1px; }
input.money { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
input.codigo { font-family: var(--mono); font-size: 13px; letter-spacing: .02em; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-weight: 500; }
.check input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--brand); }
input[type=checkbox] { accent-color: var(--brand); width: 16px; height: 16px; cursor: pointer; }
.fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.fieldset-title { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 13.5px; margin-bottom: 14px; }
.fieldset-title .num-step { width: 22px; height: 22px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 11.5px; font-weight: 700; }

/* Seletor de cor restrito à paleta */
.color-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.color-pick label { cursor: pointer; }
.color-pick input { position: absolute; opacity: 0; pointer-events: none; }
.color-pick .sw { width: 26px; height: 26px; border-radius: 7px; background: var(--c); display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.color-pick input:checked + .sw { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); }
.color-pick input:focus-visible + .sw { outline: 2px solid var(--brand); outline-offset: 3px; }

/* Segmentado (radio como botões) */
.segmented { display: inline-flex; background: var(--surface-3); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.segmented input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.segmented input:focus-visible + span { outline: 2px solid var(--brand); }

/* ------------------------------------------------------------------ tabelas */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.tbl th {
  text-align: left; font-size: 11.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3);
  padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0;
}
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tr[data-href] { cursor: pointer; }
.tbl .num, .tbl th.num { text-align: right; }
.tbl td.w-check, .tbl th.w-check { width: 40px; padding-right: 0; }
.tbl tfoot td { background: var(--surface-2); font-weight: 650; border-top: 1px solid var(--line); border-bottom: 0; }
.tbl .linha-vencida td:first-child { box-shadow: inset 3px 0 0 var(--critical-dot); }
.tbl .linha-hoje td:first-child { box-shadow: inset 3px 0 0 var(--warning-dot); }
.cell-main { font-weight: 600; color: var(--ink); line-height: 1.3; }
.cell-sub { font-size: 12px; color: var(--ink-3); line-height: 1.35; margin-top: 2px; }
.cod { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.valor-neg { color: var(--critical-fg); }
.valor-pos { color: var(--good-fg); }
.prazo { font-size: 11.5px; font-weight: 600; }
.prazo.atrasado { color: var(--critical-fg); }
.prazo.hoje { color: var(--warning-fg); }
.prazo.proximo { color: var(--ink-2); }

/* ------------------------------------------------------------------ abas */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a {
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 12px; font-weight: 600; font-size: 13px; color: var(--ink-3);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important;
}
.tabs a:hover { color: var(--ink); }
.tabs a.ativo { color: var(--brand); border-bottom-color: var(--brand); }
.tabs .count { font-size: 11px; background: var(--surface-3); color: var(--ink-2); padding: 1px 7px; border-radius: 10px; font-variant-numeric: tabular-nums; }
.tabs a.ativo .count { background: var(--brand-soft); color: var(--brand); }
.tabs a.tab-alerta .count { background: var(--critical-bg); color: var(--critical-fg); }

/* filtros */
.filtros { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.filtros select, .filtros input { height: 32px; font-size: 13px; width: auto; min-width: 140px; }
.filtros input[type=search] { min-width: 240px; flex: 1; max-width: 360px; }
.filtros input[type=date] { min-width: 130px; }
.filtro-toggle { display: none; }
.so-mobile-bloco { display: none !important; }
.bulk-bar { display: none; align-items: center; gap: 12px; padding: 10px 16px; background: var(--brand-soft); border-bottom: 1px solid var(--line); font-weight: 600; color: var(--brand); }
.bulk-bar.ativo { display: flex; }

/* ------------------------------------------------------------------ alertas / flash */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); background: var(--t-bg); color: var(--t-fg); font-size: 13.5px; border: 1px solid color-mix(in srgb, var(--t-dot) 30%, transparent); }
.alert svg { margin-top: 2px; }
.alert .titulo { font-weight: 650; }
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 100; max-width: 420px; }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--t-dot); border-radius: 10px; box-shadow: var(--shadow-lg); animation: entrar .25s ease-out; font-size: 13.5px; }
.toast svg { color: var(--t-dot); margin-top: 2px; }
.toast .fechar { margin-left: auto; background: none; border: 0; color: var(--ink-3); cursor: pointer; padding: 0; }
@keyframes entrar { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ modal */
dialog.modal { border: 0; padding: 0; border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
dialog.modal.wide { width: min(760px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(10, 11, 22, .55); backdrop-filter: blur(2px); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal-head .kpi-ico { flex-shrink: 0; }
.modal-head h2 { font-size: 16px; }
.modal-head .sub { font-size: 12.5px; color: var(--ink-3); }
.modal-head .btn-icon { margin-left: auto; }
.modal-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); }

/* ------------------------------------------------------------------ detalhes / listas de definição */
.dl { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; font-size: 13.5px; }
.dl dt { color: var(--ink-3); font-weight: 500; }
.dl dd { margin: 0; min-width: 0; word-break: break-word; }
.hero-valor { font-size: 30px; font-weight: 750; letter-spacing: -.025em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.composicao { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; font-size: 13px; }
.composicao .total { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 700; }

/* Fluxo de aprovação (stepper) */
.stepper { display: flex; align-items: flex-start; gap: 0; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; gap: 6px; font-size: 12px; color: var(--ink-3); }
.step::before { content: ""; position: absolute; top: 15px; left: -50%; right: 50%; height: 2px; background: var(--line); z-index: 0; }
.step:first-child::before { display: none; }
.step .bola { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-3); position: relative; z-index: 1; border: 2px solid var(--surface); }
.step .bola svg { width: 15px; height: 15px; }
.step.feito .bola { background: var(--good-dot); color: #fff; }
.step.feito::before, .step.atual::before { background: var(--good-dot); }
.step.atual .bola { background: var(--t-dot, var(--brand)); color: #fff; box-shadow: 0 0 0 4px var(--t-bg, var(--brand-soft)); }
.step.erro .bola { background: var(--critical-dot); color: #fff; }
.step .rot { font-weight: 600; color: var(--ink-2); }
.step .quando { font-size: 11px; }

/* Linha do tempo */
.timeline { display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding-bottom: 14px; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--t-bg); color: var(--t-fg); }
.tl-ico svg { width: 14px; height: 14px; }
.tl-txt { font-size: 13px; padding-top: 4px; }
.tl-txt .quem { font-weight: 600; }
.tl-txt .quando { color: var(--ink-3); font-size: 12px; }
.tl-txt .detalhe { margin-top: 4px; color: var(--ink-2); }
.tl-txt .bolha { margin-top: 6px; padding: 8px 12px; border-radius: 4px 10px 10px 10px; background: var(--surface-3); color: var(--ink); white-space: pre-wrap; }

/* Anexos */
.anexos { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.anexo { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.anexo .kpi-ico { width: 36px; height: 36px; flex-shrink: 0; }
.anexo .nome { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.anexo .meta { font-size: 11.5px; color: var(--ink-3); }
.anexo .acoes { margin-left: auto; display: flex; }
.dropzone { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 20px; text-align: center; color: var(--ink-3); cursor: pointer; transition: border-color .15s, background .15s; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dropzone:hover, .dropzone.sobre { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.dropzone svg { width: 24px; height: 24px; }
.dropzone .arquivos { font-size: 12.5px; color: var(--ink); font-weight: 600; }

/* Boleto / PIX */
.codigo-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.codigo-box .linha { font-family: var(--mono); font-size: 13.5px; letter-spacing: .02em; word-break: break-all; color: var(--ink); }
.barcode-svg { width: 100%; height: 56px; background: #fff; border-radius: 6px; padding: 6px; }
.qr-box { width: 168px; height: 168px; background: #fff; border-radius: 10px; padding: 8px; display: grid; place-items: center; }
.qr-box img, .qr-box svg { width: 100%; height: 100%; image-rendering: pixelated; }
.leitura { display: flex; gap: 8px; align-items: center; font-size: 12.5px; padding: 8px 10px; border-radius: 8px; background: var(--t-bg); color: var(--t-fg); }

/* Barras horizontais simples (ranking) */
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.hbar + .hbar { margin-top: 12px; }
.hbar .rot { font-size: 13px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.hbar .rot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .val { font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }
.hbar .trilho { grid-column: span 2; height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.hbar .trilho i { display: block; height: 100%; border-radius: 4px; background: var(--c, var(--brand)); }
.hbar .trilho.duplo { position: relative; }
.hbar .trilho.duplo i.prev { opacity: .28; position: absolute; inset: 0 auto 0 0; }
.hbar .trilho.duplo i.real { position: absolute; inset: 0 auto 0 0; }

/* Barra empilhada (pipeline) */
.stackbar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; background: var(--surface); }
.stackbar i { display: block; height: 100%; background: var(--t-dot); min-width: 3px; }
.legenda { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12.5px; color: var(--ink-2); }
.legenda span { display: inline-flex; align-items: center; gap: 6px; }
.legenda i { width: 10px; height: 10px; border-radius: 3px; background: var(--t-dot, var(--c)); }
.chart-box { position: relative; height: 260px; }
.chart-box.sm { height: 200px; }

/* Calendário */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal .dow { padding: 8px 10px; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); background: var(--surface-2); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal .dia { min-height: 118px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; background: var(--surface); }
.cal .dia.fora { background: var(--surface-2); }
.cal .dia.fora .n { color: var(--ink-3); opacity: .6; }
.cal .dia.fds { background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); }
.cal .dia .topo { display: flex; justify-content: space-between; align-items: center; }
.cal .dia .n { font-size: 12.5px; font-weight: 650; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal .dia.hoje .n { background: var(--brand); color: #fff; }
.cal .dia .tot { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; font-weight: 600; }
.cal-ev { display: flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 3px 6px; border-radius: 5px; background: var(--t-bg); color: var(--t-fg); text-decoration: none !important; min-width: 0; font-weight: 550; }
.cal-ev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev i { width: 6px; height: 6px; border-radius: 50%; background: var(--t-dot); flex-shrink: 0; }
.cal-ev.prov { background: transparent; border: 1px dashed var(--line-strong); color: var(--ink-2); }
.cal-ev.prov i { background: var(--c); border-radius: 2px; }
.cal .mais { font-size: 11px; color: var(--ink-3); padding-left: 6px; }

/* Estado vazio */
.vazio { padding: 48px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--ink-3); }
.vazio .kpi-ico { width: 48px; height: 48px; border-radius: 14px; margin-bottom: 4px; }
.vazio .kpi-ico svg { width: 22px; height: 22px; }
.vazio h3 { color: var(--ink); font-size: 15px; }

/* Conta bancária (cartão) */
.conta-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; }
.conta-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--c); opacity: .09; }
.conta-card .saldo { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.conta-card .mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; font-size: 11.5px; color: var(--ink-3); }
.conta-card .mini b { display: block; font-size: 12.5px; color: var(--ink); font-variant-numeric: tabular-nums; }
.conta-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--c); color: #fff; }

/* Login */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero { background: radial-gradient(120% 90% at 10% 10%, #3a47c5 0%, #1c2063 45%, #0f1130 100%); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-hero::after { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; bottom: -160px; border-radius: 50%; border: 70px solid rgba(255,255,255,.04); }
.auth-hero h1 { font-size: 34px; letter-spacing: -.03em; max-width: 460px; line-height: 1.15; }
.auth-hero p { color: #c8cbf2; max-width: 440px; margin-top: 14px; font-size: 15px; }
.auth-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 520px; position: relative; z-index: 1; }
.auth-feats div { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: #e1e3ff; background: rgba(255,255,255,.06); padding: 10px 12px; border-radius: 10px; }
.auth-feats svg { color: #9aa5ff; }
.auth-form { display: grid; place-items: center; padding: 32px; background: var(--surface); }
.auth-form form { width: min(380px, 100%); display: flex; flex-direction: column; gap: 16px; }

/* utilidades de status inline */
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--t-dot); display: inline-block; }
.pill-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--t-bg); color: var(--t-fg); font-size: 11.5px; font-weight: 700; }
.divider-v { width: 1px; align-self: stretch; background: var(--line); }
.kbd { font-family: var(--mono); font-size: 11px; padding: 1px 5px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--ink-3); background: var(--surface-2); }

/* ------------------------------------------------------------------ lista em cartões (aprovações) */
.lista-itens { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item:hover { background: var(--surface-2); }
.item-vencido { box-shadow: inset 3px 0 0 var(--critical-dot); }
.item-check { display: grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; cursor: pointer; }
.item-check input { width: 18px; height: 18px; }
.item-info { flex: 1; min-width: 0; color: inherit; text-decoration: none !important; }
.item-topo { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.item-topo .cell-main { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-valor { font-weight: 700; font-size: 15px; }
.item-acoes { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }
.so-mobile { display: none; }
.remessa-head { display: flex; align-items: center; gap: 10px; padding: 8px 4px; font-size: 13.5px; }

/* ------------------------------------------------------------------ responsivo */
@media (max-width: 1200px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main-side { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: var(--sidebar-w); transform: translateX(-100%); transition: transform .2s; }
  .sidebar.aberta { transform: none; box-shadow: var(--shadow-lg); }
  .topbar .menu-toggle { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .content { padding: 18px 16px 40px; }
  .g-2, .g-3 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .form-grid > [class*="col-"] { grid-column: span 12; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dd { margin-bottom: 8px; }
  .cal .dia { min-height: 70px; }
  .cal-ev span { display: none; }
}
@media (max-width: 700px) {
  body { font-size: 15px; }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px; gap: 6px; }
  .kpi-value { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .kpi-sub { display: none; }
  .kpi-ico { width: 28px; height: 28px; }
  .page-head h1 { font-size: 20px; }
  .page-head .acoes { width: 100%; }
  .page-head .acoes > .btn, .page-head .acoes > form, .page-head .acoes > form .btn { flex: 1 1 auto; }
  .topbar .busca { display: none; }
  .topbar .acoes .btn-primary { padding: 0 12px; }
  .item { flex-wrap: wrap; padding: 14px 12px; }
  .item-info { flex-basis: calc(100% - 44px); }
  .item-check + .item-info { flex-basis: calc(100% - 44px); }
  .item-info:first-child { flex-basis: 100%; }
  .item-acoes { width: 100%; gap: 8px; }
  .item-acoes:empty { display: none; }
  .item-acoes .btn { height: 42px; flex: 1 1 0; min-width: 0; padding: 0 8px; }
  .item-acoes .btn-ghost { border-color: var(--line-strong); }
  .so-mobile { display: inline; }
  .barra-fixa.ativo { position: sticky; bottom: 0; z-index: 15; border-radius: 10px; box-shadow: var(--shadow-lg); margin-top: 8px; }
  .btn { min-height: 40px; }
  .btn-sm { min-height: 36px; }
  input, select, textarea { font-size: 16px !important; }
  dialog.modal { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 16px 16px 0 0; }
  .modal-body .grid.g-3, .modal-body .grid.g-2 { grid-template-columns: 1fr; }
  .modal-foot .btn { flex: 1; height: 44px; }
  .tabs a { padding: 10px; }
  .filtros select, .filtros input { flex: 1 1 140px; min-width: 0; }
  .filtros input[type=search] { flex-basis: 100%; max-width: none; }
  .card-head { flex-wrap: wrap; }
  .stepper .quando { display: none; }
  .toasts { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .col-opcional { display: none; }
  .so-mobile-bloco { display: flex !important; }
  .tbl tfoot { display: none; }
  .total-mobile { justify-content: space-between; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 13.5px; }
  .tbl .prazo { white-space: normal; }
  .tbl-responsiva { table-layout: fixed; }
  .tbl-responsiva th.w-check { width: 34px; }
  .tbl-responsiva th.c-venc { width: 86px; }
  .tbl-responsiva th.c-valor { width: 112px; }
  .tbl-responsiva td, .tbl-responsiva th { padding-left: 8px; padding-right: 8px; }
  .tbl-responsiva td { overflow: hidden; }
  .tbl-responsiva td .cell-main.num { font-size: 13px; }
  .tbl td, .tbl th { padding: 10px 10px; }
  .tbl td[style*="max-width"] { max-width: 150px !important; }
  .filtro-toggle { display: inline-flex; }
  .filtros input[type=search] { flex: 1 1 0; }
  .filtros:not(.abertos) > :not([type=search]):not(.filtro-toggle):not([type=hidden]):not(.totais-filtro) { display: none; }
  .filtros .totais-filtro { margin-left: 0 !important; flex-wrap: wrap; }
}
@media print {
  .sidebar, .topbar, .page-head .acoes, .no-print { display: none !important; }
  .app { display: block; }
  .card { box-shadow: none; break-inside: avoid; }
}
@media (forced-colors: active) {
  .tag, .chip, .cal-ev { border: 1px solid CanvasText; }
}
