/* Scopex SMS — Painel administrativo
   Visual: preto profundo + gradiente azul (#3f6bff → #7ab8ff), bordas sutis, animações suaves. */
:root {
  color-scheme: dark;
  --bg: #05070c;
  --bg-2: #080b12;
  --panel: #0b1019;
  --panel-2: #0f1522;
  --panel-3: #141c2c;
  --line: #182133;
  --line-2: #222d44;
  --line-3: #2e3b57;
  --text: #edf2fc;
  --text-2: #bac5d9;
  --muted: #8691a8;
  --dim: #5c6780;
  --blue: #3f6bff;
  --blue-2: #7ab8ff;
  --blue-3: #a9cbff;
  --grad: linear-gradient(135deg, #3f6bff 0%, #5a8cff 50%, #7ab8ff 100%);
  --grad-soft: linear-gradient(135deg, rgba(63, 107, 255, .18), rgba(122, 184, 255, .08));
  --ok: #3fd99a;
  --warn: #ffb547;
  --err: #ff5d75;
  --info: #6fa8ff;
  --r: 14px;
  --r-sm: 10px;
  --r-xs: 8px;
  --side: 264px;
  --bar-h: 0px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .7), 0 2px 8px rgba(0, 0, 0, .35);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-h: 'Manrope', 'DM Sans', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'tnum' 0;
}
body.has-modal { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ic { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.mono { font-family: var(--mono); font-size: .86em; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.truncate { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pos { color: var(--ok); }
.neg { color: var(--err); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.noscript { padding: 40px; text-align: center; color: var(--muted); }

/* ---------- Boot ---------- */
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 18px; color: var(--muted); }
.boot-logo { width: 56px; height: 56px; animation: pulse 1.6s var(--ease) infinite; }
.boot-text { font-size: 14px; letter-spacing: .2px; }
@keyframes pulse { 0%, 100% { opacity: .55; transform: scale(.96); } 50% { opacity: 1; transform: scale(1); } }

/* ---------- Gate (tela de entrada) ---------- */
.gate { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 18px; overflow: hidden; isolation: isolate; }
.gate-bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(1200px 600px at 50% -10%, rgba(63, 107, 255, .16), transparent 60%), var(--bg); }
.gate-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(122, 184, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(122, 184, 255, .045) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 70%); }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; animation: drift 18s ease-in-out infinite alternate; }
.orb-a { width: 420px; height: 420px; background: #2346c9; top: -120px; left: 50%; margin-left: -460px; }
.orb-b { width: 360px; height: 360px; background: #1d6fd1; bottom: -140px; left: 50%; margin-left: 120px; opacity: .32; animation-duration: 22s; }
@keyframes drift { to { transform: translate3d(60px, 40px, 0) scale(1.08); } }
.gate-card {
  width: 100%; max-width: 420px; padding: 34px 30px 26px; border-radius: 22px;
  background: linear-gradient(180deg, rgba(17, 24, 39, .88), rgba(10, 14, 22, .92));
  border: 1px solid var(--line-2); box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .04);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: flex; flex-direction: column; gap: 16px; animation: rise .5s var(--ease) both;
}
.gate-logo { width: 168px; height: auto; margin: 0 auto 4px; }
.gate-pill { align-self: center; display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--blue-3); background: rgba(63, 107, 255, .12); border: 1px solid rgba(122, 184, 255, .22); padding: 6px 12px; border-radius: 99px; }
.gate-pill .ic { width: 14px; height: 14px; }
.gate-title { font-family: var(--font-h); font-weight: 800; font-size: 24px; letter-spacing: -.6px; text-align: center; }
.gate-text { text-align: center; color: var(--text-2); font-size: 14.5px; }
.gate-text strong { color: var(--text); font-weight: 600; word-break: break-all; }
.gate-note { text-align: center; font-size: 12.5px; color: var(--muted); }
.gate-form { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.gate-msg { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; border-radius: var(--r-sm); font-size: 13.5px; background: rgba(111, 168, 255, .1); border: 1px solid rgba(111, 168, 255, .25); color: var(--blue-3); animation: rise .3s var(--ease) both; }
.gate-msg .ic { width: 17px; height: 17px; margin-top: 1px; }
.gate-msg.is-err { background: rgba(255, 93, 117, .1); border-color: rgba(255, 93, 117, .32); color: #ffb3bf; animation: shake .4s var(--ease) both; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.gate-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.gate-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; padding: 6px 2px; transition: color .2s; }
.gate-link:hover { color: var(--text); }
.gate-link .ic { width: 16px; height: 16px; }
.gate-card > .gate-link { align-self: center; }
.gate-foot { margin-top: 20px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); text-align: center; }
.gate-foot .ic { width: 15px; height: 15px; color: var(--blue-2); opacity: .8; }
.gate-state { align-self: center; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; }
.gate-state .ic { width: 26px; height: 26px; }
.demo-note { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; color: #ffd9a0; background: rgba(255, 181, 71, .08); border: 1px solid rgba(255, 181, 71, .25); padding: 10px 12px; border-radius: var(--r-sm); }
.demo-note .ic { width: 17px; height: 17px; margin-top: 1px; color: var(--warn); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Botões ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; white-space: nowrap;
  color: var(--text); background: var(--panel-3); border: 1px solid var(--line-2);
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease), box-shadow .2s var(--ease), filter .2s;
}
.btn .ic { width: 17px; height: 17px; }
.btn:hover:not(:disabled) { background: #1a2438; border-color: var(--line-3); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; }
.btn-primary { color: #fff; background: var(--grad); border-color: rgba(122, 184, 255, .45); box-shadow: 0 6px 22px -8px rgba(63, 107, 255, .7), inset 0 1px 0 rgba(255, 255, 255, .22); }
.btn-primary:hover:not(:disabled) { background: var(--grad); filter: brightness(1.1); border-color: rgba(169, 203, 255, .6); box-shadow: 0 10px 28px -8px rgba(63, 107, 255, .85), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-danger { color: #fff; background: linear-gradient(135deg, #e5384f, #ff6b81); border-color: rgba(255, 140, 160, .45); box-shadow: 0 6px 22px -8px rgba(229, 56, 79, .7); }
.btn-danger:hover:not(:disabled) { background: linear-gradient(135deg, #e5384f, #ff6b81); filter: brightness(1.1); }
.btn-danger-ghost { color: #ff9aaa; background: rgba(255, 93, 117, .07); border-color: rgba(255, 93, 117, .28); }
.btn-danger-ghost:hover:not(:disabled) { background: rgba(255, 93, 117, .14); border-color: rgba(255, 93, 117, .45); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--panel-3); border-color: var(--line-2); color: var(--text); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: var(--r-xs); gap: 6px; }
.btn-sm .ic { width: 15px; height: 15px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon-right { flex-direction: row-reverse; }
.btn.is-confirm { animation: glow 1.2s var(--ease) infinite alternate; }
@keyframes glow { to { box-shadow: 0 0 0 4px rgba(122, 184, 255, .25), 0 8px 26px -8px rgba(63, 107, 255, .9); } }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading .ic { opacity: 0; }
.btn.is-loading::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn.is-spinning.is-loading { color: transparent !important; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-exit { color: var(--text-2); background: transparent; }
.btn-exit:hover:not(:disabled) { color: #ffb3bf; border-color: rgba(255, 93, 117, .35); background: rgba(255, 93, 117, .06); }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: var(--r-sm); color: var(--muted); border: 1px solid transparent; transition: background .2s, color .2s, border-color .2s; }
.icon-btn:hover { background: var(--panel-3); color: var(--text); border-color: var(--line-2); }
.icon-btn-danger:hover { color: #ff9aaa; background: rgba(255, 93, 117, .1); border-color: rgba(255, 93, 117, .3); }
.icon-btn-xs { width: 26px; height: 26px; border-radius: 7px; }
.icon-btn-xs .ic { width: 14px; height: 14px; }
.link-sm { white-space: nowrap; color: var(--blue-2); font-size: 12.5px; font-weight: 600; padding: 2px 0; }
.link-sm:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Campos ---------- */
.input {
  width: 100%; height: 42px; padding: 0 13px; border-radius: var(--r-sm); background: var(--bg-2);
  border: 1px solid var(--line-2); color: var(--text); font-size: 14.5px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
textarea.input { height: auto; padding: 11px 13px; resize: vertical; min-height: 84px; line-height: 1.5; }
.input::placeholder { color: var(--dim); }
.input:hover { border-color: var(--line-3); }
.input:focus, .input:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(63, 107, 255, .22); background: #0a0f19; }
.input-lg { height: 50px; font-size: 16px; padding-right: 48px; letter-spacing: .5px; }
.input-sm { height: 34px; font-size: 13px; padding: 0 30px 0 10px; width: auto; }
select.input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; cursor: pointer; }
select.input option { background: var(--panel-2); color: var(--text); }
input[type=datetime-local].input { color-scheme: dark; }
.input-money { font-variant-numeric: tabular-nums; font-weight: 600; }
.input-wrap { position: relative; }
.input-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; min-width: 0; }
.field-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.label { font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: .1px; }
.hint { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.counter { font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; transition: color .2s; }
.counter.is-near { color: var(--warn); }
.resolved { display: block; margin-top: -10px; margin-bottom: 14px; font-size: 12px; color: var(--blue-2); min-height: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

/* Segmentado */
.seg { display: flex; padding: 4px; gap: 4px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; margin-bottom: 16px; }
.seg-opt { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 10px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; transition: background .25s var(--ease), color .2s, box-shadow .25s; text-align: center; }
.seg-opt .ic { width: 16px; height: 16px; }
.seg-opt:hover { color: var(--text); }
.seg input:checked + .seg-opt { background: var(--panel-3); color: var(--text); box-shadow: 0 0 0 1px var(--line-3), 0 4px 12px -4px rgba(0, 0, 0, .6); }
.seg input:checked + .seg-opt .ic { color: var(--blue-2); }
.seg input:focus-visible + .seg-opt { outline: 2px solid var(--blue-2); outline-offset: 1px; }

/* Cartões de escolha */
.choices { border: 0; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.choices legend { margin-bottom: 8px; padding: 0; }
.choice-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; }
.choice-card:hover { border-color: var(--line-3); }
.choice-card strong { display: block; font-size: 14.5px; margin-bottom: 2px; }
.choice-card small { display: block; color: var(--muted); font-size: 13px; line-height: 1.45; }
.choice-ic { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: var(--panel-3); color: var(--muted); }
.choice-ic .ic { width: 18px; height: 18px; }
.choice-check { margin-left: auto; width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid var(--line-3); display: grid; place-items: center; color: transparent; transition: all .2s; }
.choice-check .ic { width: 13px; height: 13px; stroke-width: 2.5; }
.choice input:checked + .choice-card { border-color: rgba(122, 184, 255, .6); background: var(--grad-soft); box-shadow: 0 0 0 1px rgba(63, 107, 255, .35); }
.choice input:checked + .choice-card .choice-ic { background: rgba(63, 107, 255, .2); color: var(--blue-2); }
.choice input:checked + .choice-card .choice-check { background: var(--grad); border-color: transparent; color: #fff; }
.choice input:focus-visible + .choice-card { outline: 2px solid var(--blue-2); outline-offset: 2px; }

/* Switch */
.switch-row { margin-bottom: 16px; }
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; position: relative; }
.switch-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 44px; height: 26px; flex-shrink: 0; border-radius: 99px; background: var(--line-2); border: 1px solid var(--line-3); transition: background .25s var(--ease), border-color .25s; }
.switch-thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #c6cfdf; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); transition: transform .25s var(--ease), background .25s; }
.switch-input:checked + .switch-track { background: var(--grad); border-color: rgba(122, 184, 255, .5); }
.switch-input:checked + .switch-track .switch-thumb { transform: translateX(18px); background: #fff; }
.switch-input:focus-visible + .switch-track { outline: 2px solid var(--blue-2); outline-offset: 2px; }
.switch-input:disabled + .switch-track { opacity: .5; }
.switch-text strong { display: block; font-size: 14px; font-weight: 600; }
.switch-text small { display: block; font-size: 12.5px; color: var(--muted); }
.switch-sm .switch-track { width: 38px; height: 22px; }
.switch-sm .switch-thumb { width: 14px; height: 14px; }
.switch-sm .switch-input:checked + .switch-track .switch-thumb { transform: translateX(16px); }

/* Chips de filtro */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 12px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--muted); border: 1px solid var(--line-2); background: transparent; display: inline-flex; align-items: center; gap: 6px; transition: all .2s var(--ease); }
.chip:hover { color: var(--text); border-color: var(--line-3); background: var(--panel-3); }
.chip[aria-pressed=true] { color: #fff; background: rgba(63, 107, 255, .2); border-color: rgba(122, 184, 255, .5); box-shadow: inset 0 0 0 1px rgba(63, 107, 255, .25); }
.chip-count { font-size: 11px; background: rgba(255, 255, 255, .08); padding: 1px 6px; border-radius: 99px; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.tone-ok { color: #74ebb9; background: rgba(63, 217, 154, .09); border-color: rgba(63, 217, 154, .26); }
.tone-warn { color: #ffcd80; background: rgba(255, 181, 71, .09); border-color: rgba(255, 181, 71, .28); }
.tone-err { color: #ff9cad; background: rgba(255, 93, 117, .09); border-color: rgba(255, 93, 117, .3); }
.tone-info { color: #a6c9ff; background: rgba(111, 168, 255, .09); border-color: rgba(111, 168, 255, .26); }
.tone-accent { color: #c8dcff; background: rgba(63, 107, 255, .16); border-color: rgba(122, 184, 255, .38); }
.tone-mute { color: #9aa5ba; background: rgba(140, 152, 175, .07); border-color: rgba(140, 152, 175, .2); }

/* ---------- Estrutura do painel ---------- */
.shell { min-height: 100vh; }
.shell.is-demo { --bar-h: 38px; }
.demo-bar { position: sticky; top: 0; z-index: 40; height: var(--bar-h); display: flex; align-items: center; justify-content: center; gap: 9px; padding: 0 16px; font-size: 13px; color: #ffe2b5; background: linear-gradient(90deg, rgba(255, 160, 40, .14), rgba(255, 181, 71, .2), rgba(255, 160, 40, .14)), #0e0b07; border-bottom: 1px solid rgba(255, 181, 71, .3); text-align: center; white-space: nowrap; overflow: hidden; }
.demo-bar .ic { width: 16px; height: 16px; color: var(--warn); }
.demo-bar strong { color: #ffd08a; }
.demo-bar span { overflow: hidden; text-overflow: ellipsis; }
.sidebar {
  position: fixed; top: var(--bar-h); bottom: 0; left: 0; width: var(--side); z-index: 30;
  display: flex; flex-direction: column; padding: 22px 14px 16px;
  background: linear-gradient(180deg, #070a11, #05070c); border-right: 1px solid var(--line);
  overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; }
.side-logo { width: 132px; height: auto; }
.side-tag { font-size: 10px; font-weight: 800; letter-spacing: 1.6px; color: var(--blue-3); padding: 4px 7px; border-radius: 6px; background: rgba(63, 107, 255, .15); border: 1px solid rgba(122, 184, 255, .25); }
.sheet-close { display: none; margin-left: auto; }
.side-demo { display: flex; gap: 10px; align-items: center; margin: 0 4px 14px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255, 181, 71, .28); background: rgba(255, 181, 71, .07); }
.side-demo .ic { color: var(--warn); width: 18px; height: 18px; }
.side-demo strong { display: block; font-size: 11px; letter-spacing: 1.3px; color: #ffcd80; }
.side-demo small { display: block; font-size: 12px; color: #c9b08a; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group { font-size: 10.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--dim); padding: 16px 12px 7px; }
.nav-group:first-child { padding-top: 4px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 12px; border-radius: 10px; color: var(--muted); font-size: 14px; font-weight: 500; transition: background .2s var(--ease), color .2s; }
.nav-item .ic { width: 19px; height: 19px; transition: color .2s; }
.nav-item:hover { color: var(--text); background: rgba(255, 255, 255, .035); }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(63, 107, 255, .2), rgba(63, 107, 255, .04)); box-shadow: inset 0 0 0 1px rgba(122, 184, 255, .16); }
.nav-item.active .ic { color: var(--blue-2); }
.nav-item.active::before { content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; color: #1a1306; background: var(--warn); animation: pop .35s var(--ease) both; }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }
.side-foot { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px 10px 0; border-top: 1px solid var(--line); }
.side-user-text { min-width: 0; }
.side-user-text strong { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-text small { display: block; font-size: 11.5px; color: var(--dim); }
.avatar { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: 14px; color: #dce8ff; background: linear-gradient(135deg, #2a4bb8, #3f7fd6); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.avatar-sm { width: 30px; height: 30px; font-size: 12.5px; }
.avatar-lg { width: 54px; height: 54px; font-size: 21px; }
.sheet-back { display: none; }

.main-col { margin-left: var(--side); min-width: 0; }
.topbar { position: sticky; top: var(--bar-h); z-index: 20; height: 66px; display: flex; align-items: center; gap: 14px; padding: 0 32px; background: rgba(5, 7, 12, .78); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid var(--line); }
.menu-btn { display: none; }
.top-text { display: flex; align-items: center; gap: 10px; min-width: 0; }
.top-crumb { color: var(--dim); font-size: 13px; }
.top-crumb::after { content: '/'; margin-left: 10px; color: var(--line-3); }
.top-title { font-size: 14px; font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.demo-pill { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 99px; font-size: 11px; font-weight: 800; letter-spacing: 1.2px; color: #ffcd80; background: rgba(255, 181, 71, .1); border: 1px solid rgba(255, 181, 71, .35); margin-right: 6px; }
.demo-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 0 rgba(255, 181, 71, .6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(255, 181, 71, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 181, 71, 0); } }
.view { max-width: 1320px; margin: 0 auto; padding: 30px 32px 64px; outline: none; }
.view.enter { animation: viewIn .4s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Cabeçalho de página */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 6px; }
.page-title { font-family: var(--font-h); font-size: 28px; font-weight: 800; letter-spacing: -.8px; line-height: 1.15; outline: none; }
.page-desc { margin-top: 7px; color: var(--muted); font-size: 14.5px; max-width: 720px; line-height: 1.55; }
.page-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* Cartões */
.stack { display: flex; flex-direction: column; gap: 18px; }
.stack-xs { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.stack-xs small { color: var(--muted); font-size: 12px; }
.stack-xs > .badge { align-self: flex-start; }
.demo-short { display: none; }
.card { position: relative; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: 0 1px 0 rgba(255, 255, 255, .025) inset; min-width: 0; }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.card-title { display: flex; align-items: center; gap: 9px; font-family: var(--font-h); font-size: 15.5px; font-weight: 700; letter-spacing: -.2px; }
.card-title .ic { width: 18px; height: 18px; color: var(--blue-2); }
.card-sub { margin-top: 3px; color: var(--muted); font-size: 13px; }
.card-actions { display: flex; gap: 8px; }
.card-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .012); }
.card-foot { display: flex; justify-content: flex-end; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-wide-left { grid-template-columns: 1.35fr 1fr; }
.note { display: flex; gap: 9px; align-items: flex-start; margin-top: 14px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.note .ic { width: 16px; height: 16px; margin-top: 2px; color: var(--blue-2); opacity: .9; }
.view > .note { margin-top: 14px; padding: 0 4px; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border-radius: 12px; border: 1px solid; margin: 0 0 16px; }
.alert .ic { width: 19px; height: 19px; margin-top: 1px; }
.alert strong { display: block; font-size: 14px; color: var(--text); margin-bottom: 2px; }
.alert p { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.card .alert:last-child { margin-bottom: 0; margin-top: 16px; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }
.kpi { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 16px; border-radius: var(--r); border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel-2), var(--panel)); overflow: hidden; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; animation: rise .45s var(--ease) both; }
.kpis > :nth-child(2) { animation-delay: .03s; } .kpis > :nth-child(3) { animation-delay: .06s; } .kpis > :nth-child(4) { animation-delay: .09s; } .kpis > :nth-child(5) { animation-delay: .12s; } .kpis > :nth-child(6) { animation-delay: .15s; } .kpis > :nth-child(7) { animation-delay: .18s; } .kpis > :nth-child(8) { animation-delay: .21s; } .kpis > :nth-child(9) { animation-delay: .24s; }
.kpi::after { content: ''; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(122, 184, 255, .25), transparent); opacity: 0; transition: opacity .3s; }
.kpi.is-link:hover { transform: translateY(-2px); border-color: var(--line-3); box-shadow: 0 14px 30px -18px rgba(63, 107, 255, .55); }
.kpi.is-link:hover::after { opacity: 1; }
.kpi-top { display: flex; align-items: center; gap: 10px; }
.kpi-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: rgba(63, 107, 255, .12); color: var(--blue-2); border: 1px solid rgba(122, 184, 255, .14); }
.kpi-ic .ic { width: 17px; height: 17px; }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi-value { font-family: var(--font-h); font-size: 27px; font-weight: 800; letter-spacing: -.8px; font-variant-numeric: tabular-nums; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-sub { font-size: 12.5px; color: var(--dim); }
.kpi-go { position: absolute; top: 16px; right: 14px; color: var(--dim); opacity: 0; transform: translateX(-4px); transition: all .25s var(--ease); }
.kpi-go .ic { width: 16px; height: 16px; }
.kpi.is-link:hover .kpi-go { opacity: 1; transform: none; color: var(--blue-2); }
.kpi-accent { background: radial-gradient(120% 120% at 100% 0%, rgba(63, 107, 255, .16), transparent 55%), linear-gradient(180deg, var(--panel-2), var(--panel)); border-color: rgba(122, 184, 255, .2); }
.kpi-accent .kpi-value { background: linear-gradient(135deg, #fff 30%, var(--blue-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kpi-warn { border-color: rgba(255, 181, 71, .3); background: radial-gradient(120% 120% at 100% 0%, rgba(255, 181, 71, .1), transparent 55%), linear-gradient(180deg, var(--panel-2), var(--panel)); }
.kpi-warn .kpi-ic { background: rgba(255, 181, 71, .12); color: var(--warn); border-color: rgba(255, 181, 71, .22); }
.kpi-warn .kpi-sub { color: #e8b66e; }
.kpi-ok .kpi-value { color: #74ebb9; }
.kpi-mini { padding: 14px 16px; }
.kpi-mini .kpi-value { font-size: 24px; margin: 0; }
.kpi.is-skel { gap: 12px; animation: none; }

/* Gráfico */
.chart { position: relative; min-height: 190px; }
.chart-svg { display: block; overflow: visible; }
.chart-svg .grid { stroke: var(--line); stroke-dasharray: 3 4; }
.chart-svg .axis { stroke: var(--line-2); }
.chart-svg .bar-fill { fill: #4f7dff; transition: fill .2s; }
.chart-svg .bar.is-last .bar-fill { fill: #6aa3ff; }
.chart-svg .bar-zero { fill: var(--line-3); }
.chart-svg .hit { fill: transparent; }
.chart-svg .bar { cursor: default; outline: none; }
.chart-svg .bar.is-hover .bar-fill, .chart-svg .bar:focus-visible .bar-fill { fill: #9cc7ff; }
.chart-svg .bar:focus-visible .hit { fill: rgba(122, 184, 255, .06); stroke: var(--blue-2); stroke-width: 1; }
.chart-svg .x-label { fill: var(--text-2); font-size: 12px; font-family: var(--font); text-transform: capitalize; }
.chart-svg .x-sub { fill: var(--dim); font-size: 11px; font-family: var(--font); }
.chart-svg .v-label { fill: var(--text); font-size: 11.5px; font-weight: 600; font-family: var(--font); }
.chart-tip { position: absolute; transform: translateX(-50%); pointer-events: none; z-index: 2; padding: 7px 10px; border-radius: 9px; background: #182238; border: 1px solid var(--line-3); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; white-space: nowrap; font-size: 12px; color: var(--muted); animation: rise .15s var(--ease) both; }
.chart-tip strong { color: var(--text); font-size: 13.5px; }

/* Provedores, flags, atalhos */
.providers { display: flex; flex-direction: column; gap: 10px; }
.provider { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.provider-name strong { display: block; font-size: 14px; }
.provider-name small { display: block; color: var(--muted); font-size: 12.5px; }
.flags { display: flex; flex-direction: column; gap: 10px; }
.flag { padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.flag-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.flag-top strong { font-size: 14px; }
.flag p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.quick-item { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); transition: border-color .2s, transform .2s var(--ease), background .2s; }
.quick-item:hover { border-color: rgba(122, 184, 255, .35); background: rgba(63, 107, 255, .06); transform: translateY(-1px); }
.quick-item > .ic { width: 34px; height: 34px; padding: 8px; border-radius: 10px; color: var(--blue-2); background: rgba(63, 107, 255, .12); }
.quick-item strong { display: block; font-size: 13.5px; }
.quick-item small { display: block; font-size: 12px; color: var(--muted); }

/* Tabelas (viram cartões no celular) */
.dt-wrap { overflow-x: auto; }
.dt { width: 100%; border-collapse: collapse; font-size: 14px; }
.dt th { text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase; color: var(--dim); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: rgba(255, 255, 255, .012); }
.dt td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--text-2); }
.dt td strong { color: var(--text); font-weight: 600; }
.dt tbody tr { transition: background .15s; animation: rowIn .35s var(--ease) both; }
.dt tbody tr:nth-child(2) { animation-delay: .02s; } .dt tbody tr:nth-child(3) { animation-delay: .04s; } .dt tbody tr:nth-child(4) { animation-delay: .06s; } .dt tbody tr:nth-child(5) { animation-delay: .08s; } .dt tbody tr:nth-child(n+6) { animation-delay: .1s; }
@keyframes rowIn { from { opacity: 0; } }
.dt tbody tr:last-child td { border-bottom: 0; }
.dt tbody tr:hover { background: rgba(122, 184, 255, .035); }
.dt.is-clickable tbody tr { cursor: pointer; }
.dt tbody tr:focus-visible { outline: 2px solid var(--blue-2); outline-offset: -2px; background: rgba(122, 184, 255, .05); }
.dt .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dt .col-main { max-width: 280px; }
.dt .col-act { text-align: right; width: 1%; white-space: nowrap; }
.dt .col-details { max-width: 340px; font-size: 13px; }
.cell-user { display: flex; align-items: center; gap: 11px; min-width: 0; }
.cell-user > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.cell-user small { color: var(--dim); }
.reason { color: #e8b66e !important; max-width: 240px; line-height: 1.35; margin-top: 3px; }
.id-cell { display: inline-flex; align-items: center; gap: 4px; max-width: 200px; min-width: 0; }
.row-actions { display: inline-flex; gap: 2px; }
.details summary { cursor: pointer; color: var(--text-2); list-style: none; }
.details summary::-webkit-details-marker { display: none; }
.details summary::after { content: ' ver mais'; color: var(--blue-2); font-weight: 600; font-size: 12px; }
.details[open] summary { display: none; }
.details-text { word-break: break-word; color: var(--text-2); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
.pager-info { font-size: 13px; color: var(--muted); }

/* Busca */
.searchbar { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 10px; position: relative; }
.searchbar-ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--dim); display: grid; pointer-events: none; }
.searchbar-ic .ic { width: 17px; height: 17px; }
.searchbar .input { padding-left: 40px; max-width: 520px; }

/* Skeleton */
.skel { height: 12px; border-radius: 6px; background: linear-gradient(90deg, #121a28 0%, #1b2538 40%, #121a28 80%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
.skel-lg { height: 26px; border-radius: 8px; }
.skel-wrap { display: flex; flex-direction: column; gap: 14px; padding: 6px 0; }
.skel-table { padding: 8px 16px; }
.skel-row { display: grid; grid-template-columns: 2.2fr 1fr 1fr .8fr; gap: 24px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.skel-row:last-child { border-bottom: 0; }
.skel-a { width: 80%; } .skel-b { width: 60%; } .skel-c { width: 70%; } .skel-d { width: 50%; height: 22px; border-radius: 99px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -200% 0; } }

/* Vazio / erro */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 46px 20px; }
.empty-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: var(--blue-2); background: var(--grad-soft); border: 1px solid rgba(122, 184, 255, .2); margin-bottom: 6px; }
.empty-ic .ic { width: 24px; height: 24px; }
.empty strong { font-size: 15.5px; font-family: var(--font-h); }
.empty p { font-size: 13.5px; color: var(--muted); max-width: 380px; }
.empty .btn { margin-top: 10px; }
.empty.is-error .empty-ic { color: var(--err); background: rgba(255, 93, 117, .08); border-color: rgba(255, 93, 117, .25); }

/* ---------- Modais e gaveta ---------- */
.modal-back { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(2, 4, 8, .66); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .22s var(--ease); }
.modal-back.open { opacity: 1; }
.modal { position: relative; width: 100%; max-width: 540px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; border-radius: 18px; background: linear-gradient(180deg, #111827, #0b1019); border: 1px solid var(--line-2); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .85), inset 0 1px 0 rgba(255, 255, 255, .04); transform: translateY(14px) scale(.98); transition: transform .26s var(--ease); outline: none; }
.modal-back.open .modal { transform: none; }
.modal-sm { max-width: 440px; }
.modal-xl { max-width: 1040px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 6px; }
.modal-title { font-family: var(--font-h); font-size: 19px; font-weight: 800; letter-spacing: -.4px; }
.modal-sub { margin-top: 3px; font-size: 13px; color: var(--muted); word-break: break-all; }
.modal-x { margin: -6px -8px 0 0; }
.modal-body { padding: 14px 22px 8px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.modal-error { display: flex; gap: 9px; align-items: flex-start; margin: 6px 22px 0; padding: 11px 13px; border-radius: 11px; font-size: 13.5px; line-height: 1.45; color: #ffc0ca; background: rgba(255, 93, 117, .09); border: 1px solid rgba(255, 93, 117, .3); animation: rise .25s var(--ease) both; }
.modal-error .ic { width: 17px; height: 17px; margin-top: 1px; color: var(--err); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px 20px; }
.modal-foot[hidden] { display: none; }
.modal-back.is-drawer { justify-content: flex-end; padding: 0; }
.modal.is-drawer { max-width: 620px; height: 100%; max-height: none; border-radius: 0; border-width: 0 0 0 1px; transform: translateX(40px); }
.modal-back.is-drawer.open .modal { transform: none; }
.modal.is-drawer .modal-head { padding: 22px 24px 8px; border-bottom: 1px solid transparent; }
.modal.is-drawer .modal-body { padding: 10px 24px 28px; flex: 1; }
.confirm-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; border: 1px solid; }
.confirm-ic .ic { width: 23px; height: 23px; }
.confirm-msg { font-size: 14.5px; color: var(--text-2); line-height: 1.55; margin-bottom: 14px; }
.summary { margin: 0 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); overflow: hidden; }
.summary-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.summary-row:last-child { border-bottom: 0; }
.summary-row dt { color: var(--muted); flex-shrink: 0; }
.summary-row dd { margin: 0; text-align: right; color: var(--text); font-weight: 500; word-break: break-word; min-width: 0; }
.summary-row.is-total { background: var(--grad-soft); }
.summary-row.is-total dd strong { font-size: 16px; }
.balance-preview { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--grad-soft); }
.balance-preview small { display: block; font-size: 12px; color: var(--muted); }
.balance-preview strong { font-family: var(--font-h); font-size: 19px; font-variant-numeric: tabular-nums; }
.balance-preview .arrow { color: var(--blue-2); }
.balance-preview > div:last-child { text-align: right; }
.balance-preview .is-bad strong { color: var(--err); }

/* Detalhes do usuário */
.u-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.u-head-text { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.u-id { display: flex; align-items: center; gap: 4px; color: var(--dim); min-width: 0; }
.u-id .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-stats { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.u-stat { padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); min-width: 0; }
.u-stat small { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.u-stat strong { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-stat-main { background: var(--grad-soft); border-color: rgba(122, 184, 255, .25); }
.u-stat-main strong { font-family: var(--font-h); font-size: 19px; }
.u-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.u-actions + .note { margin-top: 10px; }
.tabs { display: flex; gap: 4px; margin: 22px 0 12px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px; font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: color .2s; }
.tab:hover { color: var(--text); }
.tab[aria-selected=true] { color: #fff; }
.tab[aria-selected=true]::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--grad); }
.tab-count { font-size: 11px; padding: 1px 6px; border-radius: 99px; background: var(--panel-3); color: var(--muted); }
.tab-panel { outline: none; animation: viewIn .3s var(--ease) both; }
.mini-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mini-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.mini-list li:last-child { border-bottom: 0; }
.mini-list li > span:first-child { min-width: 0; display: flex; flex-direction: column; }
.mini-list strong { font-size: 13.5px; font-weight: 600; }
.mini-list small { font-size: 12px; color: var(--muted); }
.mini-end { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.drawer-skel { display: flex; flex-direction: column; gap: 18px; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 12px 12px 12px 14px; border-radius: 13px; background: #121a2a; border: 1px solid var(--line-3); box-shadow: var(--shadow); font-size: 14px; line-height: 1.45; opacity: 0; transform: translateY(10px) scale(.98); transition: opacity .25s var(--ease), transform .25s var(--ease); }
.toast.in { opacity: 1; transform: none; }
.toast > .ic { width: 19px; height: 19px; margin-top: 1px; }
.toast-ok > .ic { color: var(--ok); }
.toast-err { border-color: rgba(255, 93, 117, .4); }
.toast-err > .ic { color: var(--err); }
.toast-info > .ic { color: var(--blue-2); }
.toast-msg { flex: 1; }
.toast-x { color: var(--dim); display: grid; padding: 2px; border-radius: 6px; }
.toast-x:hover { color: var(--text); }
.toast-x .ic { width: 15px; height: 15px; }

/* ---------- Preços ---------- */
.readonly-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 2px 0 10px; }
.readonly-row > div { padding: 11px 13px; border-radius: 11px; border: 1px dashed var(--line-2); }
.readonly-row small { display: block; font-size: 12px; color: var(--muted); }
.readonly-row strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.sim-out { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sim-out > div { padding: 12px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--line); min-width: 0; }
.sim-out small { display: block; font-size: 11.5px; color: var(--muted); }
.sim-out strong { display: block; font-family: var(--font-h); font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps { margin: 0 0 6px; padding-left: 0; list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.steps li { counter-increment: s; position: relative; padding: 14px 14px 14px 48px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); font-size: 13px; color: var(--muted); line-height: 1.45; }
.steps li::before { content: counter(s); position: absolute; left: 13px; top: 13px; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: #fff; background: var(--grad); }
.steps strong { color: var(--text); display: block; }

/* ---------- Avisos ---------- */
.ann-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ann { display: flex; flex-direction: column; gap: 14px; transition: border-color .2s, opacity .2s; }
.ann:hover { border-color: var(--line-2); }
.ann.is-off .site-banner { opacity: .55; filter: saturate(.6); }
.ann-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ann-meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.ann-meta span { display: inline-flex; align-items: center; gap: 6px; }
.ann-meta .ic { width: 14px; height: 14px; }
.site-banner { display: flex; align-items: flex-start; gap: 11px; padding: 12px 14px; border-radius: 12px; border: 1px solid; font-size: 13.5px; line-height: 1.45; animation: rise .3s var(--ease) both; }
.site-banner-ic { width: 28px; height: 28px; flex-shrink: 0; border-radius: 8px; display: grid; place-items: center; }
.site-banner-ic .ic { width: 16px; height: 16px; }
.site-banner-text { flex: 1; min-width: 0; word-break: break-word; }
.site-banner-text strong { display: block; color: #fff; font-size: 14px; margin-bottom: 1px; }
.site-banner-text span { color: var(--text-2); white-space: pre-wrap; }
.site-banner-x { color: var(--dim); display: grid; }
.site-banner-x .ic { width: 15px; height: 15px; }
.lv-info { background: linear-gradient(90deg, rgba(63, 107, 255, .2), rgba(63, 107, 255, .07)); border-color: rgba(122, 184, 255, .35); }
.lv-info .site-banner-ic { background: rgba(63, 107, 255, .25); color: var(--blue-3); }
.lv-warning { background: linear-gradient(90deg, rgba(255, 181, 71, .17), rgba(255, 181, 71, .05)); border-color: rgba(255, 181, 71, .38); }
.lv-warning .site-banner-ic { background: rgba(255, 181, 71, .2); color: var(--warn); }
.lv-success { background: linear-gradient(90deg, rgba(63, 217, 154, .16), rgba(63, 217, 154, .05)); border-color: rgba(63, 217, 154, .35); }
.lv-success .site-banner-ic { background: rgba(63, 217, 154, .2); color: var(--ok); }
.ann-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 24px; }
.ann-preview { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 0; align-self: start; }
.preview-head { display: flex; align-items: center; justify-content: space-between; }
.mock-site { border-radius: 14px; border: 1px solid var(--line-2); background: #070a11; overflow: hidden; box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .9); }
.mock-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.mock-logo { width: 92px; height: auto; margin-right: auto; }
.mock-pill { width: 54px; height: 8px; border-radius: 99px; background: var(--line-2); }
.mock-pill.short { width: 34px; }
.mock-btn { width: 64px; height: 22px; border-radius: 7px; background: var(--grad); opacity: .85; }
.preview-slot { padding: 12px 14px 0; }
.mock-body { padding: 16px 14px 18px; display: flex; flex-direction: column; gap: 9px; }
.mock-line { height: 10px; border-radius: 99px; background: var(--line); }
.mock-line.w60 { width: 60%; height: 14px; background: var(--line-2); }
.mock-line.w40 { width: 40%; }
.mock-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.mock-cards span { height: 58px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }

/* ---------- Suporte ---------- */
.support { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 16px; height: calc(100vh - var(--bar-h) - 66px - 190px); height: calc(100dvh - var(--bar-h) - 66px - 190px); min-height: 560px; }
.inbox, .thread-col { display: flex; flex-direction: column; min-height: 0; }
.inbox-head { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-bottom: 1px solid var(--line); }
.live-dot { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); }
.live-dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(63, 217, 154, .6); animation: pingOk 2s infinite; }
@keyframes pingOk { 70% { box-shadow: 0 0 0 6px rgba(63, 217, 154, 0); } 100% { box-shadow: 0 0 0 0 rgba(63, 217, 154, 0); } }
.inbox-head .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.inbox-head .chip { height: 30px; padding: 0 10px; font-size: 12.5px; flex-shrink: 0; }
.inbox-list { flex: 1; overflow-y: auto; padding: 8px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.inbox-item { width: 100%; display: flex; align-items: flex-start; gap: 11px; padding: 12px; border-radius: 12px; text-align: left; border: 1px solid transparent; transition: background .2s, border-color .2s; margin-bottom: 2px; }
.inbox-item:hover { background: rgba(255, 255, 255, .03); }
.inbox-item.is-active { background: rgba(63, 107, 255, .12); border-color: rgba(122, 184, 255, .25); }
.inbox-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.inbox-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.inbox-row strong { font-size: 14px; font-weight: 600; color: var(--text-2); }
.inbox-item.is-unread .inbox-row strong { color: #fff; font-weight: 700; }
.inbox-row time { font-size: 11.5px; color: var(--dim); flex-shrink: 0; }
.inbox-row small { font-size: 12.5px; color: var(--muted); }
.inbox-tags { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.inbox-tags .badge { height: 20px; font-size: 11px; padding: 0 7px; }
.unread { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; background: var(--grad); box-shadow: 0 0 12px rgba(63, 107, 255, .5); }
.inbox-skel { display: flex; flex-direction: column; gap: 6px; padding: 6px; }
.skel-item { display: flex; flex-direction: column; gap: 9px; padding: 12px; }
.thread { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.thread-empty { flex: 1; display: grid; place-items: center; }
.thread-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.back-btn { display: none; }
.thread-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.thread-title > strong { font-size: 15.5px; font-family: var(--font-h); }
.thread-sub { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.thread-sub .muted { white-space: nowrap; }
.msgs { flex: 1; overflow-y: auto; padding: 18px 18px 8px; display: flex; flex-direction: column; gap: 4px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; background: radial-gradient(600px 300px at 80% 0%, rgba(63, 107, 255, .05), transparent 60%); }
.day-sep { display: flex; align-items: center; justify-content: center; margin: 10px 0; }
.day-sep span { font-size: 11.5px; color: var(--dim); padding: 3px 10px; border-radius: 99px; background: var(--panel-3); border: 1px solid var(--line); }
.msg { display: flex; flex-direction: column; max-width: min(78%, 560px); margin-bottom: 8px; animation: msgIn .3s var(--ease) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } }
.msg-user { align-self: flex-start; }
.msg-admin { align-self: flex-end; align-items: flex-end; }
.bubble { padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; }
.msg-user .bubble { background: var(--panel-3); border: 1px solid var(--line-2); border-bottom-left-radius: 5px; color: var(--text); }
.msg-admin .bubble { background: var(--grad); color: #fff; border-bottom-right-radius: 5px; box-shadow: 0 8px 20px -10px rgba(63, 107, 255, .7); }
.bubble-text { white-space: pre-wrap; word-break: break-word; }
.msg-meta { font-size: 11.5px; color: var(--dim); margin-top: 4px; padding: 0 4px; }
.composer { border-top: 1px solid var(--line); padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; background: rgba(255, 255, 255, .01); }
.composer-input { min-height: 74px; max-height: 220px; resize: none; }
.composer-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.composer-right { display: flex; align-items: center; gap: 12px; }
.composer-note { font-size: 12px; color: var(--dim); }
.thread-skel { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.bubble-skel { height: 46px; width: 55%; border-radius: 16px; background: linear-gradient(90deg, #121a28 0%, #1b2538 40%, #121a28 80%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
.bubble-skel.right { align-self: flex-end; width: 45%; }
.bubble-skel.short { width: 30%; }

/* ---------- Conciliação / Configurações ---------- */
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); line-height: 1.5; }
.checks .ic { width: 18px; height: 18px; margin-top: 2px; color: var(--ok); }
.run-card { display: flex; flex-direction: column; justify-content: center; gap: 14px; background: radial-gradient(120% 120% at 100% 0%, rgba(63, 107, 255, .18), transparent 55%), linear-gradient(180deg, var(--panel-2), var(--panel)); }
.run-card .card-head { margin-bottom: 0; }
.run-card .btn { align-self: flex-start; }
.history { margin-top: 18px; }
.history .label { display: block; margin-bottom: 8px; }
.maint-preview { margin-top: 2px; }
.maint-banner { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 12px; border: 1px dashed var(--line-3); color: var(--muted); transition: all .3s var(--ease); }
.maint-banner .ic { width: 22px; height: 22px; }
.maint-banner strong { display: block; font-size: 14px; color: var(--text-2); }
.maint-banner small { display: block; font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.maint-banner.is-on { border-style: solid; border-color: rgba(255, 181, 71, .4); background: rgba(255, 181, 71, .09); color: var(--warn); }
.maint-banner.is-on strong { color: #ffd59a; }
.maint-banner.is-on small { color: #e6c79b; }
.save-bar { position: sticky; bottom: 16px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px 12px 18px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(12, 17, 27, .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow); font-size: 13px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-wide-left { grid-template-columns: 1fr; }
  .ann-list { grid-template-columns: 1fr; }
  .support { grid-template-columns: 300px minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .main-col { margin-left: 0; }
  .menu-btn { display: inline-grid; margin-left: -8px; }
  .topbar { padding: 0 18px; height: 60px; }
  .view { padding: 22px 18px 90px; }
  .sidebar {
    top: auto; right: 0; width: auto; max-height: 86vh; max-height: 86dvh; z-index: 90;
    border-right: 0; border-top: 1px solid var(--line-2); border-radius: 22px 22px 0 0;
    padding: 10px 14px calc(14px + env(safe-area-inset-bottom));
    background: #090d15; box-shadow: 0 -24px 60px rgba(0, 0, 0, .6);
    transform: translateY(105%); transition: transform .35s var(--ease); visibility: hidden;
  }
  .sidebar::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line-3); margin: 0 auto 12px; flex-shrink: 0; }
  .shell.sheet-open .sidebar { transform: none; visibility: visible; }
  .sheet-back { display: block; position: fixed; inset: 0; z-index: 80; background: rgba(2, 4, 8, .6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fadeIn .25s var(--ease) both; }
  .sheet-back[hidden] { display: none; }
  @keyframes fadeIn { from { opacity: 0; } }
  .sheet-close { display: inline-grid; }
  .side-brand { padding-bottom: 12px; }
  .side-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
  .nav-group { grid-column: 1 / -1; padding: 10px 6px 4px; }
  .nav-item { height: 46px; background: var(--panel-2); border: 1px solid var(--line); }
  .nav-item.active::before { display: none; }
  .nav-item.active { border-color: rgba(122, 184, 255, .35); }
  .side-foot { padding-top: 14px; }
  .support { height: calc(100vh - var(--bar-h) - 60px - 150px); height: calc(100dvh - var(--bar-h) - 60px - 150px); min-height: 480px; }
}
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .page-head { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 18px; }
  .page-title { font-size: 24px; }
  .page-desc { font-size: 14px; }
  .page-actions .btn { width: 100%; }
  .card { padding: 16px; border-radius: 13px; }
  .card-flush { padding: 0; }
  .kpis { gap: 10px; }
  .kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 21px; }
  .kpi-ic { width: 28px; height: 28px; }
  .kpi-label { font-size: 12px; line-height: 1.3; }
  .kpi-sub { font-size: 11.5px; }
  .kpi-top { gap: 8px; align-items: flex-start; }
  .quick, .steps { grid-template-columns: 1fr; }
  .form-grid, .readonly-row { grid-template-columns: 1fr; }
  .top-crumb { display: none; }
  .demo-pill { display: none; }
  .demo-bar { font-size: 12px; }
  .demo-long { display: none; }
  .demo-short { display: inline; }
  .dt td .stack-xs > .badge { align-self: flex-end; }
  .card-toolbar { padding: 12px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; }
  .searchbar { min-width: 0; width: 100%; }
  .searchbar .btn { padding: 0 12px; }
  /* Tabela → cartões */
  .dt-wrap { overflow: visible; }
  .dt thead { display: none; }
  .dt, .dt tbody, .dt tr, .dt td { display: block; width: 100%; }
  .dt tbody { padding: 10px; display: flex; flex-direction: column; gap: 10px; }
  .dt tbody tr { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); padding: 6px 14px; }
  .dt td { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 8px 0; border-bottom: 1px dashed var(--line); text-align: right; min-width: 0; max-width: none !important; }
  .dt td::before { content: attr(data-label); flex-shrink: 0; font-size: 11px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: var(--dim); text-align: left; }
  .dt td[data-label=''] { justify-content: flex-end; border-bottom: 0; }
  .dt td[data-label='']::before { display: none; }
  .dt td:last-child { border-bottom: 0; }
  .dt .num { text-align: right; }
  .dt .col-act { width: 100%; }
  .dt .col-act .btn { width: 100%; }
  .dt td > * { min-width: 0; }
  .dt td .stack-xs { align-items: flex-end; }
  .dt td .truncate { max-width: 60vw; }
  .cell-user { justify-content: flex-end; }
  .cell-user > span:last-child { align-items: flex-end; }
  .reason { text-align: right; }
  .id-cell { max-width: 55vw; }
  .pager { padding: 10px 12px; }
  .modal-back { padding: 0; align-items: flex-end; }
  .modal { max-width: none !important; max-height: 92vh; max-height: 92dvh; border-radius: 20px 20px 0 0; transform: translateY(40px); }
  .modal-head { padding: 18px 18px 4px; }
  .modal-body { padding: 12px 18px 8px; }
  .modal-error { margin: 6px 18px 0; }
  .modal-foot { padding: 14px 18px calc(16px + env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1; }
  .modal.is-drawer { height: 94vh; height: 94dvh; border-radius: 20px 20px 0 0; border-width: 1px 0 0; transform: translateY(40px); }
  .modal-back.is-drawer { align-items: flex-end; }
  .modal.is-drawer .modal-head { padding: 18px 18px 4px; }
  .modal.is-drawer .modal-body { padding: 10px 18px 24px; }
  .u-stats { grid-template-columns: 1fr 1fr; }
  .u-actions .btn { flex: 1; }
  .ann-editor { grid-template-columns: 1fr; }
  .ann-preview { position: static; order: -1; }
  .sim-out { grid-template-columns: 1fr 1fr 1fr; }
  .sim-out strong { font-size: 14.5px; }
  .seg-opt { font-size: 12.5px; padding: 0 6px; }
  .seg-opt .ic { display: none; }
  /* Suporte: lista → conversa */
  .support { display: block; height: auto; min-height: 0; }
  .support .thread-col { display: none; }
  .support.show-thread .inbox { display: none; }
  .support.show-thread .thread-col { display: flex; height: calc(100dvh - var(--bar-h) - 60px - 40px); min-height: 460px; }
  .page-head:has(+ .support.show-thread) { display: none; }
  .back-btn { display: inline-grid; margin-left: -6px; }
  .thread-head { padding: 10px 12px; gap: 8px; flex-wrap: wrap; }
  .thread-head select { order: 3; width: 100%; }
  .inbox-list { max-height: none; }
  .msgs { padding: 14px 12px 6px; }
  .msg { max-width: 88%; }
  .composer { padding: 10px 12px 12px; }
  .composer-note { display: none; }
  .thread-sub .muted { display: none; }
  .composer-bar .input-sm { max-width: 150px; }
  .save-bar { flex-direction: column; align-items: stretch; bottom: 10px; }
  .save-bar .btn { width: 100%; }
  .toasts { left: 16px; right: 16px; bottom: 16px; width: auto; }
  .gate-card { padding: 28px 20px 22px; border-radius: 20px; }
}
@media (max-width: 380px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 19px; }
  .u-stats { grid-template-columns: 1fr 1fr; }
  .side-nav { grid-template-columns: 1fr; }
}

/* Movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .skel, .bubble-skel { animation: none; }
}
@media (forced-colors: active) {
  .btn-primary, .nav-item.active, .chip[aria-pressed=true] { border: 2px solid CanvasText; }
}
