/* =====================================================================
   Simples SMS · Painel — escuro, verde-esmeralda da marca, laranja nos destaques.
   Nunito (marca) + JetBrains Mono (números, códigos, telefones). Sem framework.
   Padrão de acabamento inspirado no painel Vértice: brilhos suaves, holofote,
   entrada em cascata, logo com reflexo, barra de abas no celular.
   ===================================================================== */
:root {
  --bg: #060d0a;
  --bg-2: #08120e;
  --surface: #0d1713;
  --surface-2: #122019;
  --surface-3: #172a21;
  --border: #1c2d25;
  --border-2: #263c31;
  --text: #ecfdf3;
  --muted: #8ba699;
  --subtle: #5d7569;
  --brand: #22c55e;
  --brand-2: #16a34a;
  --brand-3: #15803d;
  --brand-ink: #03180c;
  --accent: #f97316;
  --accent-2: #fb923c;
  --ok: #34d399;
  --warn: #f5b544;
  --err: #f87171;
  --info: #60a5fa;
  --radius: 16px;
  --radius-sm: 11px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --side: 264px;
  /* superfícies e detalhes (tema escuro) */
  --strong: #ffffff;
  --card-a: rgba(18, 32, 25, .9);
  --card-b: rgba(11, 20, 16, .94);
  --side-a: rgba(13, 23, 19, .86);
  --side-b: rgba(6, 13, 10, .92);
  --pop: rgba(10, 18, 14, .97);
  --glass: rgba(13, 23, 19, .82);
  --th-bg: rgba(6, 13, 10, .35);
  --field: rgba(3, 9, 6, .6);
  --field-focus: rgba(3, 9, 6, .85);
  --field-solid: #07110c;
  --border-hover: #33503f;
  --switch-off: #1f3329;
  --knob: #9db5a9;
  --grid-line: rgba(255, 255, 255, .025);
  --hover: rgba(255, 255, 255, .035);
  --scroll: #24372d;
  --shadow-rgb: 0, 0, 0;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--scroll) transparent; scrollbar-width: thin; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 500 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(34, 197, 94, .35); color: #fff; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: #4ade80; }
h1, h2, h3 { margin: 0; letter-spacing: -.015em; }
h1 { font-size: 1.6rem; font-weight: 900; }
h2 { font-size: 1.02rem; font-weight: 800; }
h3 { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
code, .mono { font-family: var(--mono); font-feature-settings: "zero"; }
code { font-size: .84em; background: var(--surface-2); border: 1px solid var(--border); padding: .08em .4em; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .subtle { color: var(--subtle); } .small { font-size: .84rem; } .xs { font-size: .74rem; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.right { text-align: right; } .nowrap { white-space: nowrap; }
.t-ok { color: var(--ok); } .t-warn { color: var(--warn); } .t-err { color: var(--err); } .t-accent { color: var(--accent); } .t-brand { color: var(--brand); }

/* ------------------------------------------------------------ atmosfera */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(900px 560px at 12% -12%, rgba(34, 197, 94, .13), transparent 62%),
    radial-gradient(760px 480px at 108% 2%, rgba(249, 115, 22, .07), transparent 60%),
    radial-gradient(700px 600px at 50% 120%, rgba(22, 163, 74, .06), transparent 60%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(70% 55% at 40% 0%, #000, transparent 80%); mask-image: radial-gradient(70% 55% at 40% 0%, #000, transparent 80%);
}

/* ------------------------------------------------------------ estrutura */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 1.1rem;
  padding: 22px 16px 16px; border-right: 1px solid var(--border);
  background: linear-gradient(180deg, var(--side-a), var(--side-b));
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.side::after { content: ""; position: absolute; top: 0; right: -1px; bottom: 0; width: 1px; pointer-events: none; background: linear-gradient(180deg, rgba(34, 197, 94, .55), rgba(34, 197, 94, .05) 45%, transparent); }
.brand { position: relative; display: block; padding: 4px 8px 10px; line-height: 0; }
.brand img { width: 196px; max-width: 100%; height: auto; filter: drop-shadow(0 0 14px rgba(34, 197, 94, .22)); transition: filter .3s ease, transform .3s var(--ease); }
.brand:hover img { filter: drop-shadow(0 0 20px rgba(34, 197, 94, .45)); transform: translateY(-1px); }
.brand .sheen {
  position: absolute; inset: 4px 8px 10px; pointer-events: none;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, .7) 49%, rgba(249, 115, 22, .9) 52%, transparent 60%);
  background-size: 260% 260%; background-position: 160% -40%; background-repeat: no-repeat;
  -webkit-mask: var(--logo) center / 100% 100% no-repeat; mask: var(--logo) center / 100% 100% no-repeat;
  animation: sheen 7s ease-in-out infinite;
}
@keyframes sheen { 0%, 34% { background-position: 160% -40%; } 64%, 100% { background-position: -60% 140%; } }
.env-pill { display: inline-flex; align-items: center; gap: .4rem; margin: -4px 8px 0; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: .22rem .6rem; border-radius: 99px; width: max-content; }
.env-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: live 2.2s ease-out infinite; }
.env-prod { color: var(--ok); background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .3); }
.env-staging, .env-dev { color: var(--warn); background: rgba(245, 181, 68, .1); border: 1px solid rgba(245, 181, 68, .32); }
@keyframes live { 70%, 100% { box-shadow: 0 0 0 7px transparent; } }

.nav { display: grid; gap: 2px; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.nav-group { margin: .9rem 10px .35rem; font-size: .66rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--subtle); }
.nav a {
  position: relative; display: flex; align-items: center; gap: .75rem; padding: .62rem .8rem; border-radius: 12px;
  color: var(--muted); font-weight: 700; font-size: .93rem; transition: color .2s ease, background .25s ease;
}
.nav a svg { width: 19px; height: 19px; flex: none; transition: color .2s ease, transform .3s var(--ease); }
.nav a:hover { color: var(--text); background: var(--hover); }
.nav a:hover svg { transform: translateX(1px); }
.nav a.on { color: var(--strong); background: linear-gradient(90deg, rgba(34, 197, 94, .2), rgba(34, 197, 94, .04)); box-shadow: inset 0 0 0 1px rgba(34, 197, 94, .28); }
.nav a.on::before { content: ""; position: absolute; left: -4px; top: 22%; bottom: 22%; width: 3px; border-radius: 3px; background: var(--brand); box-shadow: 0 0 12px var(--brand); }
.nav a.on svg { color: var(--brand); filter: drop-shadow(0 0 6px rgba(34, 197, 94, .55)); }
.nav .count { margin-left: auto; }

.me { margin-top: auto; display: grid; gap: .7rem; padding: 12px; border-radius: 16px; border: 1px solid var(--border); background: linear-gradient(160deg, var(--surface-2), var(--surface)); }
.me-head { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.me-id { min-width: 0; display: grid; }
.me-id strong { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-id span { font-size: .72rem; color: var(--muted); display: flex; align-items: center; gap: .3rem; }
.me-id span svg { width: 13px; height: 13px; color: var(--ok); }
.me form { margin: 0; }

.main { min-width: 0; padding: 26px clamp(16px, 3vw, 40px) 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.page-head .eyebrow { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); margin-bottom: .3rem; }
.page-head p { margin: .35rem 0 0; color: var(--muted); }
.page-head .actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.crumb { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-weight: 700; font-size: .85rem; margin-bottom: .6rem; }
.crumb:hover { color: var(--text); }
.crumb svg { width: 16px; height: 16px; }

/* ------------------------------------------------------------ cartões */
.card {
  position: relative; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem;
  background: linear-gradient(170deg, var(--card-a), var(--card-b));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 18px 40px -30px rgba(var(--shadow-rgb), .9);
}
.card + .card { margin-top: 1rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .9rem; }
.card-head h2 { display: flex; align-items: center; gap: .55rem; }
.card-head h2 svg { width: 18px; height: 18px; color: var(--brand); }
.card-head a { font-size: .84rem; font-weight: 700; display: inline-flex; align-items: center; gap: .2rem; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush .card-head { padding: 1rem 1.2rem 0; }
.spot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s ease;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(34, 197, 94, .075), transparent 62%);
}
.spot:hover::after { opacity: 1; }
.lift { transition: transform .35s var(--ease), border-color .25s ease, box-shadow .35s ease; }
.lift:hover { transform: translateY(-3px); border-color: rgba(34, 197, 94, .32); box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 22px 40px -26px rgba(var(--shadow-rgb), .95); }

.grid { display: grid; gap: 1rem; }
.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 { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
@media (max-width: 1180px) { .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-main { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .g-2, .g-3, .g-4 { grid-template-columns: 1fr; } }
.mt { margin-top: 1rem; } .mt-lg { margin-top: 1.6rem; }

/* ------------------------------------------------------------ KPIs */
.kpi { padding: 1.05rem 1.15rem 1.1rem; overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, var(--kc, var(--brand)), transparent 72%); opacity: .9; }
.kpi .k-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.kpi .k-label { display: flex; align-items: center; gap: .5rem; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.k-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--kc, var(--brand)); background: color-mix(in srgb, var(--kc, var(--brand)) 13%, transparent); border: 1px solid color-mix(in srgb, var(--kc, var(--brand)) 28%, transparent); }
.k-ico svg { width: 16px; height: 16px; }
.kpi .k-value { display: block; margin: .65rem 0 .2rem; font: 700 1.72rem/1.1 var(--mono); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.kpi .k-sub { font-size: .8rem; color: var(--muted); }
.kpi.hero { --kc: var(--accent); border-color: rgba(249, 115, 22, .35); background: radial-gradient(130% 150% at 0% 0%, rgba(249, 115, 22, .15), transparent 55%), linear-gradient(170deg, var(--card-a), var(--card-b)); }
.kpi.hero .k-value { color: var(--strong); font-size: 2.15rem; }
.delta { font: 700 .72rem/1 var(--mono); padding: .3rem .5rem; border-radius: 99px; white-space: nowrap; }
.d-up { background: rgba(52, 211, 153, .13); color: var(--ok); } .d-down { background: rgba(248, 113, 113, .13); color: var(--err); } .d-flat { background: rgba(139, 166, 153, .12); color: var(--muted); }
.kc-ok { --kc: var(--ok); } .kc-warn { --kc: var(--warn); } .kc-err { --kc: var(--err); } .kc-info { --kc: var(--info); } .kc-accent { --kc: var(--accent); }

/* abas de período */
.seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: 13px; background: var(--surface); border: 1px solid var(--border); }
.seg button, .seg a { border: 0; background: none; font: inherit; font-weight: 800; font-size: .84rem; color: var(--muted); padding: .45rem .95rem; border-radius: 9px; cursor: pointer; transition: color .2s ease, background .25s ease, box-shadow .25s ease; }
.seg button:hover, .seg a:hover { color: var(--text); }
.seg .on { color: var(--brand-ink); background: linear-gradient(180deg, #4ade80, var(--brand)); box-shadow: 0 6px 16px -8px rgba(34, 197, 94, .9), inset 0 1px 0 rgba(255, 255, 255, .35); }

/* gráfico de barras (14 dias) */
.chart { display: grid; grid-template-columns: repeat(var(--n, 14), minmax(0, 1fr)); align-items: end; gap: 6px; height: 190px; padding-top: 6px; }
.chart .col { position: relative; display: grid; align-items: end; height: 100%; cursor: default; }
.chart .bar { position: relative; width: 100%; border-radius: 7px 7px 3px 3px; min-height: 3px; background: linear-gradient(180deg, #4ade80, rgba(22, 163, 74, .55)); transform-origin: bottom; transition: filter .2s ease; }
.chart .bar.zero { background: rgba(139, 166, 153, .12); }
.chart .cost { position: absolute; left: 22%; right: 22%; bottom: 0; border-radius: 4px 4px 2px 2px; background: rgba(249, 115, 22, .75); min-height: 0; }
.chart .col:hover .bar { filter: brightness(1.2); }
.chart .col:hover .tip { opacity: 1; transform: translate(-50%, -6px); }
.chart .tip { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, 0); opacity: 0; pointer-events: none; z-index: 5; white-space: nowrap; font-size: .74rem; padding: .45rem .6rem; border-radius: 9px; background: var(--pop); border: 1px solid var(--border-2); box-shadow: 0 12px 30px rgba(var(--shadow-rgb), .6); transition: opacity .15s ease, transform .2s var(--ease); }
.chart .tip b { display: block; font-family: var(--mono); }
.chart-x { display: grid; grid-template-columns: repeat(var(--n, 14), minmax(0, 1fr)); gap: 6px; margin-top: .45rem; font: 600 .66rem var(--mono); color: var(--subtle); text-align: center; }
.legend { display: flex; gap: 1rem; font-size: .78rem; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
@media (prefers-reduced-motion: no-preference) { .chart .bar { animation: grow .9s var(--ease) backwards; animation-delay: calc(.25s + var(--i, 0) * 35ms); } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* anel de progresso */
.ring { --p: 0; --c: var(--brand); position: relative; width: 68px; height: 68px; border-radius: 50%; flex: none; background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(139, 166, 153, .14) 0); display: grid; place-items: center; }
.ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface); }
.ring span { position: relative; font: 700 .9rem var(--mono); }

/* ------------------------------------------------------------ listas */
.list { list-style: none; margin: 0; padding: 0; }
.list li + li { border-top: 1px solid var(--border); }
.list .row { display: flex; align-items: center; gap: .8rem; padding: .7rem .2rem; color: var(--text); border-radius: 10px; transition: background .25s ease, padding-left .3s var(--ease); }
a.row:hover { background: linear-gradient(90deg, rgba(34, 197, 94, .08), transparent 85%); padding-left: .55rem; color: var(--text); }
.row .r-main { min-width: 0; flex: 1; display: grid; }
.row .r-main strong { font-weight: 800; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .r-main small { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .r-end { text-align: right; display: grid; justify-items: end; gap: 2px; }
.empty { display: grid; justify-items: center; gap: .5rem; padding: 2rem 1rem; color: var(--muted); text-align: center; }
.empty svg { width: 34px; height: 34px; color: var(--subtle); }
.bar-line { height: 6px; border-radius: 99px; background: rgba(139, 166, 153, .12); overflow: hidden; }
.bar-line i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-2), #4ade80); }

/* ------------------------------------------------------------ avatar / monograma */
.av { --h: 140; display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; color: #fff; font: 800 .78rem var(--sans); letter-spacing: .02em;
  background: linear-gradient(135deg, hsl(var(--h) 62% 44%), hsl(calc(var(--h) + 40) 58% 30%)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 6px 14px -8px rgba(var(--shadow-rgb), .9); }
.av.round { border-radius: 50%; }
.av-sm { width: 28px; height: 28px; font-size: .66rem; border-radius: 8px; }
.av-lg { width: 56px; height: 56px; font-size: 1.1rem; border-radius: 16px; }

/* ------------------------------------------------------------ chips de status */
.chip { display: inline-flex; align-items: center; gap: .38rem; font-size: .74rem; font-weight: 800; padding: .22rem .62rem; border-radius: 99px; white-space: nowrap; border: 1px solid transparent; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.plain::before { display: none; }
.s-waiting, .s-pending, .s-queued, .s-running { color: var(--warn); background: rgba(245, 181, 68, .1); border-color: rgba(245, 181, 68, .22); }
.s-code_received, .s-paid, .s-done, .s-on { color: var(--ok); background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .22); }
.s-finished { color: #86efac; background: rgba(34, 197, 94, .1); border-color: rgba(34, 197, 94, .22); }
.s-cancelled, .s-off { color: var(--muted); background: rgba(139, 166, 153, .1); border-color: rgba(139, 166, 153, .2); }
.s-expired { color: var(--accent-2); background: rgba(249, 115, 22, .1); border-color: rgba(249, 115, 22, .25); }
.s-error, .s-blocked { color: var(--err); background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .25); }
.s-refunded { color: #c4b5fd; background: rgba(167, 139, 250, .1); border-color: rgba(167, 139, 250, .25); }
.s-waiting::before, .s-running::before { animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 .45rem; border-radius: 99px; font: 700 .7rem var(--mono); background: var(--surface-3); color: var(--muted); }
.count.hot { background: rgba(249, 115, 22, .16); color: var(--accent-2); }
.code { font: 700 .95rem var(--mono); color: var(--accent); letter-spacing: .06em; }

/* ------------------------------------------------------------ tabelas */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--subtle); padding: .8rem 1rem; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--th-bg); }
.tbl td { padding: .72rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr { transition: background .2s ease; }
.tbl tbody tr:hover { background: rgba(34, 197, 94, .045); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.clickable { cursor: pointer; }
.tbl .who { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.tbl .who div { display: grid; min-width: 0; }
.tbl .who strong { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl .who small { color: var(--muted); font-size: .76rem; }
.tbl tr.dim td { opacity: .55; }
.tbl tr.flash { animation: flashrow 1.2s ease; }
@keyframes flashrow { from { background: rgba(34, 197, 94, .16); } to { background: transparent; } }
@media (max-width: 760px) {
  .tbl.stack thead { display: none; }
  .tbl.stack, .tbl.stack tbody, .tbl.stack tr, .tbl.stack td { display: block; width: 100%; }
  .tbl.stack tr { padding: .7rem 1rem; border-bottom: 1px solid var(--border); }
  .tbl.stack td { border: 0; padding: .22rem 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
  .tbl.stack td[data-label]::before { content: attr(data-label); color: var(--subtle); font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
}
.pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1.1rem; border-top: 1px solid var(--border); font-size: .84rem; color: var(--muted); }
.pager .btns { display: flex; gap: .5rem; }

/* ------------------------------------------------------------ formulários */
label.f { display: grid; gap: .38rem; font-size: .78rem; font-weight: 800; color: var(--muted); }
label.f .hint { font-weight: 600; color: var(--subtle); font-size: .74rem; }
input, select, textarea {
  font: 600 .93rem var(--sans); color: var(--text); background: var(--field); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); padding: .62rem .8rem; width: 100%; min-height: 42px; transition: border-color .2s ease, box-shadow .25s ease, background .2s ease;
}
textarea { resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--subtle); }
input:hover, select:hover, textarea:hover { border-color: var(--border-hover); }
input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(34, 197, 94, .7); box-shadow: 0 0 0 4px rgba(34, 197, 94, .12); background: var(--field-focus); }
select { appearance: none; padding-right: 2.2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238ba699' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .7rem center; background-size: 16px; }
input[type="date"] { color-scheme: inherit; }
.field-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: end; }
.field-row > * { flex: 1 1 160px; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: .75rem; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--subtle); pointer-events: none; }
.input-icon input { padding-left: 2.35rem; }
.money-in { position: relative; }
.money-in::before { content: "R$"; position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); font: 700 .78rem var(--mono); color: var(--subtle); pointer-events: none; }
.money-in input { padding-left: 2.2rem; font-family: var(--mono); }
.input-sm { min-height: 34px; padding: .35rem .6rem; font-size: .84rem; border-radius: 9px; }
.inline-edit { background: transparent; border-color: transparent; padding-left: .4rem; }
.inline-edit:hover { border-color: var(--border-2); background: var(--field); }

/* interruptor */
.switch { position: relative; display: inline-block; width: 40px; height: 23px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; min-height: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--switch-off); border: 1px solid var(--border-2); transition: background .25s ease, border-color .25s ease, box-shadow .25s ease; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: var(--knob); box-shadow: 0 2px 5px rgba(var(--shadow-rgb), .5); transition: transform .3s var(--ease), background .25s ease; }
.switch input:checked + span { background: linear-gradient(180deg, #2ad46a, var(--brand-2)); border-color: transparent; box-shadow: 0 0 14px -2px rgba(34, 197, 94, .7); }
.switch input:checked + span::after { transform: translateX(17px); background: #fff; }
.switch.danger input:checked + span { background: linear-gradient(180deg, #f87171, #dc2626); box-shadow: 0 0 14px -2px rgba(248, 113, 113, .7); }
.switch.star input:checked + span { background: linear-gradient(180deg, #fb923c, #ea580c); box-shadow: 0 0 14px -2px rgba(249, 115, 22, .7); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ------------------------------------------------------------ botões */
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 42px; padding: .55rem 1.05rem; border-radius: 12px; border: 1px solid transparent; cursor: pointer;
  font: 800 .9rem var(--sans); color: var(--text); white-space: nowrap; transition: transform .15s ease, box-shadow .25s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn svg { width: 17px; height: 17px; }
.btn:active { transform: scale(.97); }
.btn-primary { color: var(--brand-ink); background: linear-gradient(180deg, #4ade80, var(--brand)); box-shadow: 0 10px 24px -12px rgba(34, 197, 94, .9), inset 0 1px 0 rgba(255, 255, 255, .4); }
.btn-primary:hover { color: var(--brand-ink); transform: translateY(-1px); box-shadow: 0 14px 30px -12px rgba(34, 197, 94, 1), inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn-primary::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%); transform: translateX(-130%); }
.btn-primary:hover::after { transform: translateX(130%); transition: transform .75s var(--ease); }
.btn-accent { color: #1f0c00; background: linear-gradient(180deg, #fdba74, var(--accent)); box-shadow: 0 10px 24px -12px rgba(249, 115, 22, .9), inset 0 1px 0 rgba(255, 255, 255, .4); }
.btn-accent:hover { color: #1f0c00; transform: translateY(-1px); }
.btn-ghost { background: var(--hover); border-color: var(--border-2); }
.btn-ghost:hover { color: var(--text); border-color: rgba(34, 197, 94, .45); background: rgba(34, 197, 94, .06); transform: translateY(-1px); }
.btn-danger { color: var(--err); background: rgba(248, 113, 113, .06); border-color: rgba(248, 113, 113, .35); }
.btn-danger:hover { color: #fecaca; background: rgba(248, 113, 113, .14); }
.btn-sm { min-height: 34px; padding: .35rem .75rem; font-size: .82rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn .spin { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(3, 24, 12, .3); border-top-color: var(--brand-ink); animation: spin .7s linear infinite; }
.btn.loading .spin { display: inline-block; } .btn.loading { pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border-2); background: transparent; color: var(--muted); cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.icon-btn:hover { color: var(--text); border-color: rgba(34, 197, 94, .45); }
.icon-btn svg { width: 17px; height: 17px; }

/* filtros (chips) */
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.fchip { border: 1px solid var(--border-2); background: transparent; color: var(--muted); font: 800 .8rem var(--sans); padding: .42rem .85rem; border-radius: 99px; cursor: pointer; transition: all .2s ease; display: inline-flex; gap: .4rem; align-items: center; }
.fchip:hover { color: var(--text); border-color: var(--border-hover); }
.fchip.on { color: var(--brand-ink); background: var(--brand); border-color: transparent; box-shadow: 0 6px 16px -8px rgba(34, 197, 94, .9); }
.fchip .count { height: 18px; min-width: 18px; font-size: .64rem; }
.fchip.on .count { background: rgba(3, 24, 12, .2); color: var(--brand-ink); }
.toolbar { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.toolbar .grow { flex: 1 1 260px; max-width: 420px; }

/* ------------------------------------------------------------ alertas e toasts */
.alert { display: flex; align-items: flex-start; gap: .7rem; padding: .85rem 1rem; border-radius: 14px; border: 1px solid; font-weight: 700; font-size: .9rem; margin-bottom: 1rem; }
.alert svg { width: 19px; height: 19px; flex: none; margin-top: 1px; }
.alert-err { color: #fecaca; background: rgba(248, 113, 113, .08); border-color: rgba(248, 113, 113, .35); }
.alert-warn { color: #fde68a; background: rgba(245, 181, 68, .08); border-color: rgba(245, 181, 68, .32); }
.alert-ok { color: #bbf7d0; background: rgba(52, 211, 153, .08); border-color: rgba(52, 211, 153, .3); }
#toasts { position: fixed; z-index: 100; right: 18px; bottom: 18px; display: grid; gap: .6rem; width: min(380px, calc(100vw - 36px)); }
.toast { display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem; border-radius: 14px; font-weight: 700; font-size: .9rem; background: var(--pop); border: 1px solid var(--border-2); box-shadow: 0 20px 50px -12px rgba(var(--shadow-rgb), .8); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); animation: toast-in .45s var(--ease) both; }
.toast svg { width: 19px; height: 19px; flex: none; }
.toast.ok svg { color: var(--ok); } .toast.err svg { color: var(--err); }
.toast.ok { border-color: rgba(52, 211, 153, .35); } .toast.err { border-color: rgba(248, 113, 113, .4); }
.toast.out { animation: toast-out .35s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }
.saved { font-size: .74rem; font-weight: 800; color: var(--ok); white-space: nowrap; }
.saved.bad { color: var(--err); }

/* ------------------------------------------------------------ detalhes */
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem 1.4rem; margin: 0; }
.kv dt { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--subtle); }
.kv dd { margin: .25rem 0 0; font-weight: 700; word-break: break-word; }
.profile { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.profile h1 { font-size: 1.45rem; }
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--border); margin: 0 -1.2rem 1rem; padding: 0 1.2rem; }
.tabs button { border: 0; background: none; font: 800 .88rem var(--sans); color: var(--muted); padding: .7rem .4rem; margin-right: .9rem; border-bottom: 2px solid transparent; cursor: pointer; transition: color .2s, border-color .2s; }
.tabs button.on { color: var(--text); border-bottom-color: var(--brand); }
.tabs button:hover { color: var(--text); }

/* prévia estilo Telegram (broadcast) */
.tg-preview { border-radius: 16px; padding: 1rem; min-height: 180px; background: radial-gradient(120% 100% at 0% 0%, rgba(34, 197, 94, .1), transparent 50%), var(--surface-2); border: 1px solid var(--border); }
.tg-bubble { max-width: 92%; padding: .65rem .85rem .45rem; border-radius: 14px 14px 14px 4px; background: var(--surface-3); border: 1px solid var(--border-2); white-space: pre-wrap; word-break: break-word; font-weight: 600; font-size: .92rem; line-height: 1.45; }
.tg-bubble .tg-time { display: block; text-align: right; font-size: .66rem; color: var(--subtle); margin-top: .2rem; }

/* auditoria: linha do tempo */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 17px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(180deg, var(--border-2), transparent); }
.timeline li { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: .8rem; padding: .7rem 0; }
.timeline .dot { position: relative; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border-2); color: var(--brand); }
.timeline .dot svg { width: 16px; height: 16px; }
.timeline .t-body { min-width: 0; }
.timeline .t-line { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: baseline; }
.timeline .t-line strong { font-weight: 800; }
.diff { margin-top: .45rem; display: grid; gap: .3rem; font: 600 .76rem/1.45 var(--mono); }
.diff div { padding: .35rem .55rem; border-radius: 8px; background: var(--field); border: 1px solid var(--border); word-break: break-all; }
.diff .before { color: #fca5a5; } .diff .after { color: #86efac; }

/* ------------------------------------------------------------ login / 2FA */
.auth-body { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom)); overflow-x: hidden; }
.orbs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.orbs i { position: absolute; border-radius: 50%; filter: blur(70px); }
.orbs i:nth-child(1) { width: 460px; height: 460px; left: -150px; top: -140px; background: radial-gradient(circle, rgba(34, 197, 94, .45), transparent 70%); animation: orb-a 16s ease-in-out infinite; }
.orbs i:nth-child(2) { width: 400px; height: 400px; right: -150px; bottom: -130px; background: radial-gradient(circle, rgba(249, 115, 22, .3), transparent 70%); animation: orb-b 19s ease-in-out infinite; }
@keyframes orb-a { 50% { transform: translate(70px, 45px); } }
@keyframes orb-b { 50% { transform: translate(-55px, -40px); } }
.auth-wrap { width: 100%; max-width: 410px; }
.auth-card {
  --mx: 50%; --my: 0%; position: relative; display: grid; gap: 1.1rem; padding: 1.9rem 1.6rem 1.4rem; border-radius: 28px; border: 1px solid transparent; overflow: hidden;
  background:
    linear-gradient(180deg, var(--card-a), var(--card-b)) padding-box,
    linear-gradient(150deg, rgba(34, 197, 94, .7), rgba(255, 255, 255, .06) 38%, rgba(249, 115, 22, .35) 100%) border-box;
  -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: 0 34px 80px -30px rgba(var(--shadow-rgb), .9);
}
.auth-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(340px circle at var(--mx) var(--my), rgba(34, 197, 94, .11), transparent 65%); }
@media (prefers-reduced-motion: no-preference) { .auth-card { animation: rise .7s var(--ease) backwards; } }
.auth-card.has-error { animation: shake .5s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-7px); } 40%, 60% { transform: translateX(7px); } }
.auth-logo { position: relative; display: grid; justify-items: center; gap: .9rem; }
.auth-logo .icon { position: relative; width: 84px; height: 84px; line-height: 0; }
.auth-logo .icon img { width: 100%; height: 100%; filter: drop-shadow(0 0 22px rgba(34, 197, 94, .45)); animation: float 6s ease-in-out infinite; }
.auth-logo .icon .ping { position: absolute; right: 7px; top: 9px; width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 0 rgba(249, 115, 22, .7); animation: ping 2.6s ease-out infinite; }
@keyframes float { 50% { transform: translateY(-5px); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, .7); } 70%, 100% { box-shadow: 0 0 0 14px rgba(249, 115, 22, 0); } }
.auth-logo .word { width: 260px; max-width: 86%; height: auto; margin: .2rem 0 .1rem; filter: drop-shadow(0 0 22px rgba(34, 197, 94, .35)); }
@media (prefers-reduced-motion: no-preference) { .auth-logo .word { animation: float 6s ease-in-out infinite; } }
.auth-title { text-align: center; }
.auth-title h1 { font-size: 1.3rem; }
.auth-title p { margin: .25rem 0 0; color: var(--muted); font-size: .9rem; }
.inp { display: flex; align-items: center; gap: .65rem; min-height: 54px; padding: 0 .5rem 0 .95rem; border-radius: 15px; background: var(--field); border: 1px solid var(--border-2); transition: border-color .2s ease, box-shadow .25s ease; }
.inp > svg { width: 19px; height: 19px; flex: none; color: var(--subtle); transition: color .2s ease; }
.inp:focus-within { border-color: rgba(34, 197, 94, .75); box-shadow: 0 0 0 4px rgba(34, 197, 94, .13), 0 10px 26px -14px rgba(34, 197, 94, .7); }
.inp:focus-within > svg { color: var(--brand); }
.inp input { flex: 1; min-width: 0; min-height: 50px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 16px; font-weight: 700; }
.inp input:focus { box-shadow: none; background: transparent; }
.inp input:-webkit-autofill { -webkit-text-fill-color: var(--text); -webkit-box-shadow: 0 0 0 40px var(--field-solid) inset; caret-color: var(--text); }
.eye { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 11px; background: none; color: var(--subtle); cursor: pointer; transition: color .2s, background .2s; }
.eye:hover { color: var(--text); background: var(--hover); }
.eye svg { width: 20px; height: 20px; }
.eye .off { display: none; }
.eye[aria-pressed="true"] .on { display: none; }
.eye[aria-pressed="true"] .off { display: block; color: var(--brand); }
.caps { margin: -.5rem 0 0; font-size: .8rem; font-weight: 700; color: var(--warn); }
.auth-btn { min-height: 54px; font-size: 1rem; border-radius: 15px; width: 100%; }
.auth-foot { margin: 0; text-align: center; font-size: .76rem; color: var(--subtle); display: flex; align-items: center; justify-content: center; gap: .4rem; }
.auth-foot svg { width: 14px; height: 14px; color: var(--brand); }
.otp { text-align: center; font: 700 1.9rem var(--mono) !important; letter-spacing: .55em; padding-left: .55em !important; min-height: 64px !important; }
.qr-box { display: grid; justify-items: center; gap: .7rem; }
.qr-box .qr { padding: 12px; border-radius: 18px; background: #fff; line-height: 0; box-shadow: 0 18px 40px -18px rgba(34, 197, 94, .6); }
.qr-box .qr svg { width: 184px; height: 184px; }
.secret { display: flex; align-items: center; gap: .4rem; font: 700 .78rem var(--mono); color: var(--muted); padding: .35rem .5rem .35rem .75rem; border-radius: 10px; background: var(--field); border: 1px solid var(--border); max-width: 100%; }
.secret span { overflow: hidden; text-overflow: ellipsis; }
.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: .45rem; font-size: .86rem; color: var(--muted); font-weight: 600; }
.steps li { display: flex; gap: .6rem; align-items: flex-start; }
.steps b { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 7px; font: 800 .72rem var(--mono); color: var(--brand); background: rgba(34, 197, 94, .12); }

/* ------------------------------------------------------------ entrada em cascata */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .main > * { animation: rise .6s var(--ease) backwards; }
  .main > *:nth-child(2) { animation-delay: .06s; } .main > *:nth-child(3) { animation-delay: .12s; }
  .main > *:nth-child(4) { animation-delay: .18s; } .main > *:nth-child(n+5) { animation-delay: .24s; }
  .stagger > * { animation: rise .6s var(--ease) backwards; animation-delay: calc(.08s + var(--i, 0) * 60ms); }
}

/* ------------------------------------------------------------ celular: barra de abas */
.tabbar { display: none; }
.mobile-top { display: none; }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .mobile-top { display: flex; align-items: center; justify-content: space-between; gap: .8rem; position: sticky; top: 0; z-index: 30; padding: .65rem 16px; padding-top: calc(.65rem + env(safe-area-inset-top)); background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
  .mobile-top img { height: 34px; width: auto; }
  .main { padding: 18px 14px calc(110px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; position: fixed; z-index: 50; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
    padding: 6px; border-radius: 24px; background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6);
    border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 20px 44px -12px rgba(var(--shadow-rgb), .85);
  }
  .tab { display: grid; justify-items: center; gap: 3px; padding: 8px 2px 7px; border-radius: 18px; color: var(--muted); font-size: .64rem; font-weight: 800; }
  .tab svg { width: 22px; height: 22px; transition: transform .3s var(--ease); }
  .tab.on { color: var(--strong); background: linear-gradient(180deg, rgba(34, 197, 94, .24), rgba(34, 197, 94, .06)); box-shadow: inset 0 0 0 1px rgba(34, 197, 94, .4); }
  .tab.on svg { color: var(--brand); transform: translateY(-1px) scale(1.08); filter: drop-shadow(0 0 7px rgba(34, 197, 94, .65)); }
  #toasts { bottom: calc(96px + env(safe-area-inset-bottom)); }
  h1 { font-size: 1.35rem; }
}
@media (hover: none) and (pointer: coarse) { input, select, textarea { font-size: 16px !important; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ajustes finos */
.chart-card { display: flex; flex-direction: column; }
.chart-card .chart { flex: 1; height: auto; min-height: 200px; }
.card-head a { white-space: nowrap; }
.card-head a svg { width: 15px; height: 15px; }
.tbl.dense th { padding: .7rem .55rem; }
.tbl.dense td { padding: .5rem .55rem; }
.tbl.dense th:first-child, .tbl.dense td:first-child { padding-left: 1rem; }
.tbl .inline-edit { width: 100%; }

/* =====================================================================
   TEMA CLARO — segue o navegador/sistema (prefers-color-scheme: light)
   ===================================================================== */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f3f9f5; --bg-2: #edf6f0;
    --surface: #ffffff; --surface-2: #f1f8f3; --surface-3: #e5f1e9;
    --border: #dbe9df; --border-2: #cddfd3; --border-hover: #a9cbb6;
    --text: #0f2418; --muted: #4d6658; --subtle: #7b9285; --strong: #0b1f14;
    --brand: #16a34a; --brand-2: #15803d; --brand-3: #166534; --brand-ink: #ffffff;
    --accent: #ea580c; --accent-2: #c2410c;
    --ok: #059669; --warn: #b7791f; --err: #dc2626; --info: #2563eb;
    --card-a: rgba(255, 255, 255, .94); --card-b: rgba(250, 253, 251, .98);
    --side-a: rgba(255, 255, 255, .92); --side-b: rgba(243, 249, 245, .96);
    --pop: rgba(255, 255, 255, .98); --glass: rgba(255, 255, 255, .86); --th-bg: #f5faf7;
    --field: #ffffff; --field-focus: #ffffff; --field-solid: #ffffff;
    --switch-off: #d6e5db; --knob: #ffffff;
    --grid-line: rgba(15, 60, 35, .045); --hover: rgba(22, 163, 74, .06); --scroll: #c9dccf;
    --shadow-rgb: 34, 80, 56;
  }
  body::before {
    background:
      radial-gradient(900px 560px at 12% -12%, rgba(34, 197, 94, .14), transparent 62%),
      radial-gradient(760px 480px at 108% 2%, rgba(249, 115, 22, .08), transparent 60%);
  }
  a:hover { color: var(--brand-3); }
  .card, .auth-card { box-shadow: 0 1px 2px rgba(34, 80, 56, .06), 0 16px 36px -28px rgba(34, 80, 56, .35); }
  .side::after { background: linear-gradient(180deg, rgba(22, 163, 74, .45), rgba(22, 163, 74, .05) 45%, transparent); }
  .brand img, .auth-logo .word { filter: drop-shadow(0 4px 14px rgba(22, 163, 74, .18)); }
  .nav a:hover { background: var(--hover); }
  .nav a.on { background: linear-gradient(90deg, rgba(22, 163, 74, .14), rgba(22, 163, 74, .03)); box-shadow: inset 0 0 0 1px rgba(22, 163, 74, .3); }
  .nav a.on svg { filter: none; }
  .kpi.hero { background: radial-gradient(130% 150% at 0% 0%, rgba(249, 115, 22, .1), transparent 55%), linear-gradient(170deg, #ffffff, #fbfdfc); }
  .btn-primary { color: #fff; background: linear-gradient(180deg, #22c55e, #16a34a); box-shadow: 0 10px 22px -12px rgba(22, 163, 74, .8), inset 0 1px 0 rgba(255, 255, 255, .3); }
  .btn-primary:hover { color: #fff; }
  .btn .spin { border-color: rgba(255, 255, 255, .4); border-top-color: #fff; }
  .btn-accent { color: #fff; background: linear-gradient(180deg, #fb923c, #ea580c); }
  .btn-accent:hover { color: #fff; }
  .btn-ghost { background: #fff; }
  .seg .on, .fchip.on { color: #fff; background: linear-gradient(180deg, #22c55e, #16a34a); }
  .fchip.on .count { background: rgba(255, 255, 255, .25); color: #fff; }
  .env-staging, .env-dev { color: #92400e; background: rgba(245, 181, 68, .16); border-color: rgba(183, 121, 31, .35); }
  .env-prod { color: #047857; }
  /* chips com contraste em fundo claro */
  .s-waiting, .s-pending, .s-queued, .s-running { color: #92400e; background: #fef3c7; border-color: #fde68a; }
  .s-code_received, .s-paid, .s-done, .s-on { color: #047857; background: #d1fae5; border-color: #a7f3d0; }
  .s-finished { color: #166534; background: #dcfce7; border-color: #bbf7d0; }
  .s-cancelled, .s-off { color: #4d6658; background: #eef4f0; border-color: #dbe7df; }
  .s-expired { color: #c2410c; background: #ffedd5; border-color: #fed7aa; }
  .s-error, .s-blocked { color: #b91c1c; background: #fee2e2; border-color: #fecaca; }
  .s-refunded { color: #6d28d9; background: #ede9fe; border-color: #ddd6fe; }
  .d-up { color: #047857; background: #d1fae5; } .d-down { color: #b91c1c; background: #fee2e2; }
  .alert-err { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
  .alert-warn { color: #92400e; background: #fffbeb; border-color: #fde68a; }
  .alert-ok { color: #065f46; background: #ecfdf5; border-color: #a7f3d0; }
  .code { color: var(--accent); }
  .diff .before { color: #b91c1c; } .diff .after { color: #047857; }
  .chart .bar { background: linear-gradient(180deg, #22c55e, rgba(22, 163, 74, .45)); }
  .chart .bar.zero { background: rgba(77, 102, 88, .12); }
  .ring::before { background: var(--surface); }
  .tg-preview { background: radial-gradient(120% 100% at 0% 0%, rgba(34, 197, 94, .1), transparent 50%), #e8f1ec; }
  .tg-bubble { background: #ffffff; border-color: #d7e6dc; }
  .orbs i:nth-child(1) { background: radial-gradient(circle, rgba(34, 197, 94, .3), transparent 70%); }
  .orbs i:nth-child(2) { background: radial-gradient(circle, rgba(249, 115, 22, .18), transparent 70%); }
  .auth-card {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(250, 253, 251, .96)) padding-box,
      linear-gradient(150deg, rgba(22, 163, 74, .55), rgba(15, 60, 35, .08) 38%, rgba(234, 88, 12, .35) 100%) border-box;
  }
  .inp { background: #fff; }
  .inp input:-webkit-autofill { -webkit-text-fill-color: var(--text); -webkit-box-shadow: 0 0 0 40px #fff inset; }
  .k-ico { background: color-mix(in srgb, var(--kc, var(--brand)) 10%, #fff); }
  .timeline .dot { background: #fff; }
  .me { background: linear-gradient(160deg, #f6fbf8, #ffffff); }
  ::selection { background: rgba(34, 197, 94, .25); color: var(--text); }
}
picture { display: contents; }
.grid > .card + .card, .grid > .card { margin-top: 0; }
.grid { align-items: stretch; }
