/* ViewBox — Painel (tema escuro)
   Sem fontes externas, sem estilos inline em atributos (CSP estrita). */

:root {
  color-scheme: dark;
  --bg: #0F1013;
  --sidebar: #121316;
  --surface: #16171B;
  --surface-2: #1B1C21;
  --surface-3: #22232A;
  --input: #111216;
  --line: #24252B;
  --line-2: #2E3038;
  --text: #F2F2F4;
  --text-2: #B9BBC4;
  --muted: #8B8D98;
  --faint: #5E606B;

  --red: #E53935;
  --red-hover: #F04A3E;
  --red-dark: #B71C1C;
  --red-tint: rgba(229, 57, 53, .14);
  --good: #2FBF71;
  --good-text: #4ADE80;
  --good-tint: rgba(47, 191, 113, .14);
  --warn: #F5A524;
  --warn-text: #FBBF24;
  --warn-tint: rgba(245, 165, 36, .14);
  --orange: #FB7A3C;
  --orange-tint: rgba(251, 122, 60, .15);
  --blue: #3987E5;
  --blue-tint: rgba(57, 135, 229, .15);
  --aqua: #199E70;
  --aqua-tint: rgba(25, 158, 112, .16);
  --violet-tint: rgba(144, 133, 233, .16);

  --series-1: #E53935;
  --series-2: #3987E5;
  --series-3: #199E70;
  --series-other: #5B5D66;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, Menlo, monospace;
  --sidebar-w: 260px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.45;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--red-hover); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; }
::selection { background: rgba(229, 57, 53, .4); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .95em; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ic { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }
.ic-sm { width: 15px; height: 15px; }
.ic-lg { width: 22px; height: 22px; }
:focus-visible { outline: 2px solid var(--red-hover); outline-offset: 2px; }
.spacer-8 { height: 8px; }
.grow { flex: 1; min-width: 0; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2A2B32; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Boot ---------- */
.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); }
.boot img { width: 72px; height: 72px; border-radius: 18px; animation: pulse 1.4s ease-in-out infinite; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 15px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text);
  font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s, color .15s;
}
.btn:hover { text-decoration: none; background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary {
  background: var(--red); border-color: var(--red); color: #fff;
  box-shadow: 0 6px 18px rgba(229, 57, 53, .28), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.btn-primary:hover:not(:disabled) { background: var(--red-hover); border-color: var(--red-hover); }
.btn-ghost { background: var(--surface-2); }
.btn-danger { color: #FF8A80; border-color: rgba(229, 57, 53, .35); background: rgba(229, 57, 53, .08); }
.btn-danger:hover:not(:disabled) { background: rgba(229, 57, 53, .16); }
.btn-danger-solid { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn-danger-solid:hover:not(:disabled) { background: #C62828; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; gap: 6px; }
.btn-block { width: 100%; height: 46px; font-size: 15px; }
.btn-link { background: none; border: 0; padding: 0; height: auto; color: var(--red-hover); font-weight: 600; cursor: pointer; }
.btn-link:hover { text-decoration: underline; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; color: var(--text-2); transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); border-color: var(--line-2); }
.icon-btn .badge-dot {
  position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 0 2px var(--surface);
}
.btn-busy { position: relative; color: transparent !important; }
.btn-busy::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;
}

/* ---------- Campos ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field .hint, .hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.input, .field input, .field select, .field textarea, .select {
  width: 100%; height: 42px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--input); outline: none; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { height: 76px; padding: 10px 12px; resize: vertical; }
.input::placeholder, .field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus, .select:focus {
  border-color: var(--red); box-shadow: 0 0 0 3px rgba(229, 57, 53, .18);
}
.select { width: auto; min-width: 190px; height: 40px; padding: 0 10px; }
.field input.invalid { border-color: var(--red); }
.field-error { color: #FF8A80; font-size: 12.5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.prefix-input { position: relative; display: block; }
.prefix-input > b { position: absolute; left: 12px; top: 11px; color: var(--muted); font-weight: 600; font-size: 14px; pointer-events: none; }
.prefix-input input { padding-left: 38px; }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-cards.four { grid-template-columns: repeat(4, 1fr); }
.radio-card {
  position: relative; display: flex; flex-direction: column; gap: 2px; padding: 11px 13px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); cursor: pointer; background: var(--input);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card strong { font-size: 14px; }
.radio-card small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.radio-card.checked { border-color: var(--red); background: rgba(229, 57, 53, .08); box-shadow: 0 0 0 3px rgba(229, 57, 53, .12); }
.rules { list-style: none; margin: 4px 0 14px; padding: 0; display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.rules li { display: flex; align-items: center; gap: 6px; }
.rules li .ic { width: 14px; height: 14px; }
.rules li.ok { color: var(--good-text); }

/* ---------- Alertas ---------- */
.alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px;
  border-radius: var(--radius-sm); border: 1px solid; font-size: 13.5px; line-height: 1.45;
}
.alert .ic { margin-top: 1px; }
.alert strong { display: block; margin-bottom: 2px; color: inherit; }
.alert-error { background: rgba(229, 57, 53, .1); border-color: rgba(229, 57, 53, .4); color: #FFB4AE; }
.alert-warn { background: rgba(245, 165, 36, .09); border-color: rgba(245, 165, 36, .35); color: #FCD48A; }
.alert-ok { background: rgba(47, 191, 113, .09); border-color: rgba(47, 191, 113, .35); color: #9BE7BB; }
.alert-info { background: var(--surface-2); border-color: var(--line-2); color: var(--text-2); }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.alert-close { margin-left: auto; color: inherit; opacity: .75; width: 28px; height: 28px; background: transparent; border-color: transparent; }
.alert-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.stack { display: grid; gap: 10px; }
.plan-banner { margin: 18px 28px 0; }
.plan-banner .alert { align-items: center; }

/* ---------- Badges / pontos ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px;
  border-radius: 99px; font-size: 11.5px; font-weight: 650; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.badge .ic { width: 12px; height: 12px; }
.badge-good { background: var(--good-tint); color: var(--good-text); }
.badge-warn { background: var(--warn-tint); color: var(--warn-text); }
.badge-orange { background: var(--orange-tint); color: #FDA574; }
.badge-bad { background: var(--red-tint); color: #FF8A80; }
.badge-blue { background: var(--blue-tint); color: #8DBDF5; }
.badge-brand { background: var(--red); color: #fff; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #4A4C55; display: inline-block; flex: none; }
.dot-on { background: var(--good); box-shadow: 0 0 0 0 rgba(47, 191, 113, .5); animation: ping 2s ease-out infinite; }
.dot-good { background: var(--good); }
.dot-bad { background: var(--red); }
.dot-warn { background: var(--warn); }
.dot-orange { background: var(--orange); }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.login-brand {
  position: relative; overflow: hidden; color: #fff; padding: 56px;
  display: flex; flex-direction: column; justify-content: center; gap: 18px;
  background:
    radial-gradient(circle at 15% 15%, rgba(229, 57, 53, .38), transparent 46%),
    radial-gradient(circle at 85% 95%, rgba(183, 28, 28, .30), transparent 44%),
    linear-gradient(160deg, #1A1213, #0B0B0D);
  border-right: 1px solid var(--line);
}
.login-brand::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(circle at 30% 40%, #000, transparent 75%);
  mask-image: radial-gradient(circle at 30% 40%, #000, transparent 75%);
}
.login-brand > * { position: relative; z-index: 1; max-width: 460px; }
.login-logo { width: 96px; height: 96px; border-radius: 24px; box-shadow: 0 18px 50px rgba(229, 57, 53, .35); }
.login-brand h1 { font-size: 44px; letter-spacing: -.03em; }
.login-brand h1 span { color: var(--red-hover); }
.login-brand > p { font-size: 18px; color: #D9CFCF; }
.login-points { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 12px; }
.login-points li { display: flex; align-items: center; gap: 12px; color: #EDE5E5; font-size: 15px; }
.login-points .pt {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: rgba(240, 74, 62, .14); color: var(--red-hover); border: 1px solid rgba(240, 74, 62, .25);
}
.login-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; gap: 18px; background: var(--bg); }
.login-card {
  width: 100%; max-width: 400px; background: var(--surface); border-radius: 18px;
  padding: 34px 32px 30px; border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.login-card h2 { font-size: 24px; margin-bottom: 4px; }
.login-card > p { color: var(--muted); margin-bottom: 22px; }
.login-card .alert { margin-bottom: 16px; }
.login-card .btn-block { margin-top: 8px; }
.login-mobile-logo { display: none; width: 64px; height: 64px; border-radius: 16px; margin-bottom: 16px; }
.login-foot { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 46px; }
.pw-toggle { position: absolute; right: 2px; top: 2px; width: 38px; height: 38px; border-color: transparent; background: transparent; }

/* ---------- Estrutura ---------- */
.app { min-height: 100vh; }
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w); z-index: 40;
  display: flex; flex-direction: column; background: var(--sidebar); border-right: 1px solid var(--line);
}
.side-scroll { flex: 1; overflow-y: auto; padding: 22px 14px 12px; scrollbar-width: thin; }
.side-user { text-align: center; padding: 0 6px 18px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.side-user img { width: 66px; height: 66px; border-radius: 16px; margin: 0 auto 12px; box-shadow: 0 10px 30px rgba(229, 57, 53, .22); }
.side-user strong { display: block; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-line { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.side-line .ic { width: 14px; height: 14px; }
.side-line.warn { color: var(--warn-text); }
.side-line.bad { color: #FF8A80; }
.nav { display: grid; gap: 4px; }
.nav-group { display: grid; gap: 2px; }
.nav-head {
  display: flex; align-items: center; gap: 11px; width: 100%; height: 40px; padding: 0 10px;
  border: 0; background: transparent; color: var(--text); font-weight: 650; font-size: 13.5px;
  border-radius: var(--radius-sm); cursor: pointer; text-align: left;
}
.nav-head:hover { background: rgba(255, 255, 255, .03); }
.nav-head > .ic:first-child { color: var(--muted); }
.nav-head .chev { margin-left: auto; color: var(--faint); width: 15px; height: 15px; transition: transform .2s; }
.nav-group.collapsed .chev { transform: rotate(-90deg); }
.nav-group.collapsed .nav-items { display: none; }
.nav-items { display: grid; gap: 2px; padding: 2px 0 6px 20px; position: relative; }
.nav-items::before { content: ""; position: absolute; left: 19px; top: 4px; bottom: 10px; width: 1px; background: var(--line); }
.nav-items a {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; margin-left: 10px;
  border-radius: 10px; color: var(--muted); font-size: 13.5px; font-weight: 550; cursor: pointer;
  transition: background .15s, color .15s;
}
.nav-items a:hover { color: var(--text); background: rgba(255, 255, 255, .04); text-decoration: none; }
.nav-items a.active { background: var(--red); color: #fff; font-weight: 700; box-shadow: 0 6px 16px rgba(229, 57, 53, .3); }
.nav-items a .ext { width: 13px; height: 13px; margin-left: auto; opacity: .7; }
.side-promo {
  margin: 8px 14px 12px; padding: 16px; border-radius: 14px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #E53935 0%, #B71C1C 60%, #7F1414 100%); color: #fff;
  box-shadow: 0 12px 30px rgba(183, 28, 28, .35);
}
.side-promo::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 70%); pointer-events: none;
}
.side-promo small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(255, 255, 255, .85); font-weight: 600; }
.side-promo small .ic { width: 14px; height: 14px; }
.side-promo strong { display: block; font-size: 22px; letter-spacing: -.02em; margin: 4px 0 12px; position: relative; z-index: 1; }
.side-promo .btn { width: 100%; background: rgba(255, 255, 255, .95); color: #9B1717; border-color: transparent; height: 36px; box-shadow: none; position: relative; z-index: 1; }
.side-promo .btn:hover { background: #fff; }
.side-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--faint); }
.side-foot button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); cursor: pointer; font-weight: 600; padding: 6px 4px; border-radius: 8px; }
.side-foot button:hover { color: var(--text); }
.main { margin-left: var(--sidebar-w); min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px;
  height: 74px; padding: 0 28px; background: rgba(15, 16, 19, .88);
  -webkit-backdrop-filter: saturate(1.3) blur(12px); backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid var(--line);
}
.menu-btn { display: none; }
.topbar-title { min-width: 0; flex: 0 1 auto; }
.topbar-title small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .09em; color: var(--muted); text-transform: uppercase; }
.topbar-title h1 { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gsearch { position: relative; flex: 1 1 420px; max-width: 470px; margin: 0 auto; }
.gsearch > .ic { position: absolute; left: 13px; top: 12px; color: var(--muted); width: 17px; height: 17px; pointer-events: none; }
.gsearch input {
  width: 100%; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  padding: 0 70px 0 40px; outline: none; color: var(--text); transition: border-color .15s, box-shadow .15s;
}
.gsearch input::placeholder { color: var(--faint); }
.gsearch input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(229, 57, 53, .16); }
.kbd {
  position: absolute; right: 9px; top: 9px; height: 24px; padding: 0 8px; border-radius: 7px;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--muted); font-size: 11.5px; font-weight: 600;
  display: inline-grid; place-items: center; pointer-events: none;
}
.gresults {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; max-height: 440px; overflow: auto; z-index: 60;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px;
  animation: pop .12s ease-out;
}
.gresults h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 8px 10px 4px; }
.gresults button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none;
  border-radius: 9px; cursor: pointer; text-align: left;
}
.gresults button:hover, .gresults button.sel { background: var(--surface-3); }
.gresults button .ic { color: var(--muted); }
.gresults .t { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gresults .s { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }
.gresults .none { padding: 14px 10px; color: var(--muted); font-size: 13px; }
.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.top-avatar {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; margin-left: 4px; padding: 0;
  background: linear-gradient(135deg, var(--red-hover), var(--red-dark)); color: #fff; font-weight: 700; font-size: 13.5px;
  border: 2px solid var(--line-2); cursor: pointer; text-transform: uppercase;
}
.welcome {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px 0 10px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--line); font-weight: 650; font-size: 13px; white-space: nowrap;
}
.welcome .chk { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--good-tint); color: var(--good-text); }
.welcome .chk .ic { width: 12px; height: 12px; }
.pop-anchor { position: relative; }
.pop-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; padding: 6px; z-index: 60;
  background: var(--surface); border-radius: 14px; border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); animation: pop .14s ease-out;
}
.pop-menu .menu-head { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.pop-menu .menu-head strong { display: block; }
.pop-menu .menu-head small { color: var(--muted); }
.pop-menu > button {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 12px;
  border: 0; background: none; border-radius: 9px; cursor: pointer; text-align: left; font-size: 13.5px;
}
.pop-menu > button:hover { background: var(--surface-3); }
.pop-menu > button.danger { color: #FF8A80; }
.notif { width: 340px; }
.notif-item { display: flex; gap: 10px; padding: 10px 12px; font-size: 13px; }
.notif-item + .notif-item { border-top: 1px solid var(--line); }
.notif-item .dot { margin-top: 6px; }
.notif-item small { display: block; color: var(--muted); font-size: 12px; }
.notif-empty { padding: 18px 12px; color: var(--muted); font-size: 13px; text-align: center; }
.view { padding: 26px 28px 48px; max-width: 1500px; outline: none; }
.view-enter { animation: fadeUp .25s ease-out; }
.scrim { display: none; }

/* ---------- Cartões ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 0; flex-wrap: wrap; }
.card-head h2, .card-head h3 { font-size: 15.5px; }
.card-head .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.card-head .spacer { flex: 1; }
.card-body { padding: 16px 20px 20px; }
.card-body.flush { padding: 14px 0 0; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; flex-wrap: wrap; }
.section-title h2 { font-size: 16px; }
.section-title .spacer { flex: 1; }

/* Cabeçalho do dashboard */
.hello { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.hello h2 { font-size: 26px; letter-spacing: -.02em; }
.hello p { color: var(--muted); margin-top: 4px; }
.hello-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.date-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-weight: 600; font-size: 13px; white-space: nowrap;
}
.date-pill .ic { color: var(--muted); width: 16px; height: 16px; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpis + .kpis { margin-top: 16px; }
.kpi { padding: 18px 18px 14px; display: flex; flex-direction: column; min-height: 166px; transition: border-color .15s; }
.kpi:hover { border-color: var(--line-2); }
.kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.kpi-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; flex: none; }
.kpi-icon .ic { width: 19px; height: 19px; }
.t-red { background: var(--red-tint); color: #FF6B63; }
.t-blue { background: var(--blue-tint); color: #7DB3F2; }
.t-green { background: var(--good-tint); color: var(--good-text); }
.t-amber { background: var(--warn-tint); color: var(--warn-text); }
.t-violet { background: var(--violet-tint); color: #B5ADF5; }
.t-aqua { background: var(--aqua-tint); color: #4FD1A1; }
.t-orange { background: var(--orange-tint); color: #FDA574; }
.spark { width: 96px; height: 36px; display: block; overflow: visible; }
.spark .sl { fill: none; stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 550; margin-top: 14px; }
.kpi-value { font-size: 28px; font-weight: 700; letter-spacing: -.025em; color: var(--text); line-height: 1.15; margin-top: 2px; display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.kpi-value small { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.kpi-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; font-size: 12px; color: var(--muted); }
.kpi-foot > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-weight: 650; }
.delta .ic { width: 13px; height: 13px; }
.delta.up { color: var(--good-text); }
.delta.down { color: #FF8A80; }
.delta.flat { color: var(--muted); }

/* ---------- Grade ---------- */
.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: 1 / -1; }
.col-stack { display: grid; gap: 16px; align-content: start; min-width: 0; }
.is-stale { opacity: .6; transition: opacity .2s; }
.dash-grid > .card { height: 100%; }

/* Controle segmentado e pílulas de legenda */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--input); border: 1px solid var(--line); }
.seg button {
  height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  font-weight: 600; font-size: 12.5px; cursor: pointer; transition: background .15s, color .15s;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 99px;
  background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; color: var(--text-2); font-weight: 600;
}
.pill .sw { width: 8px; height: 8px; border-radius: 50%; }
.pill .sw-dash { width: 14px; height: 0; border-top: 2px dashed #6B6D78; }

/* ---------- Gráficos ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart svg:focus { outline: none; }
.chart svg:focus-visible { outline: 2px solid var(--red-hover); outline-offset: 4px; border-radius: 6px; }
.chart text { font-family: var(--font); font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart .lbl-strong { fill: var(--text-2); font-weight: 600; }
.chart .grid line { stroke: #202127; stroke-width: 1; shape-rendering: crispEdges; }
.chart .baseline { stroke: #34363F; stroke-width: 1; shape-rendering: crispEdges; }
.chart .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .s1 { stroke: var(--series-1); }
.chart .s2 { stroke: var(--series-2); }
.chart .prev { fill: none; stroke: #6B6D78; stroke-dasharray: 5 5; stroke-width: 1.5; }
.chart .area-wash { stroke: none; }
.chart .dot1 { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.chart .dot2 { fill: var(--series-2); stroke: var(--surface); stroke-width: 2; }
.chart .dotp { fill: #6B6D78; stroke: var(--surface); stroke-width: 2; }
.chart .xhair { stroke: #4A4C55; stroke-width: 1; shape-rendering: crispEdges; }
.chart-empty { display: grid; place-items: center; text-align: center; gap: 6px; min-height: 220px; color: var(--muted); font-size: 13.5px; padding: 20px; }
.chart-empty .ic { width: 28px; height: 28px; color: #3A3C45; margin: 0 auto; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.key-line { width: 16px; height: 2px; border-radius: 2px; display: inline-block; }
.key-rect { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.k1 { background: var(--series-1); }
.k2 { background: var(--series-2); }
.k3 { background: var(--series-3); }
.ko { background: var(--series-other); }
.table-toggle { margin-top: 10px; font-size: 12.5px; }
.data-table-box { margin-top: 10px; max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }

/* Rosca */
.donut-wrap { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 18px; align-items: center; }
.donut { position: relative; width: 168px; height: 168px; }
.donut svg { width: 168px; height: 168px; display: block; }
.donut .arc { transition: opacity .15s; }
.donut .arc.dim { opacity: .3; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut-center b { font-size: 26px; letter-spacing: -.02em; line-height: 1.1; }
.donut-center span { font-size: 12px; color: var(--muted); }
.dlegend { display: grid; gap: 2px; min-width: 0; }
.dlegend .row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; font-size: 13px; }
.dlegend .row:hover, .dlegend .row.hot { background: var(--surface-2); }
.dlegend .sw { width: 10px; height: 10px; border-radius: 3px; }
.dlegend .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.dlegend .ct { font-weight: 700; font-variant-numeric: tabular-nums; }
.dlegend .pc { color: var(--muted); font-size: 12px; min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }

/* Tooltip */
.tip {
  position: fixed; z-index: 90; pointer-events: none; min-width: 150px; max-width: 280px;
  background: #1F2026; border: 1px solid var(--line-2); border-radius: 10px;
  box-shadow: var(--shadow-lg); padding: 10px 12px; font-size: 12.5px; color: var(--text-2);
}
.tip-title { font-weight: 600; color: var(--text); margin-bottom: 6px; font-size: 12.5px; }
.tip-row { display: flex; align-items: center; gap: 8px; line-height: 1.7; white-space: nowrap; }
.tip-row b { color: #fff; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tip-key { width: 12px; height: 2px; border-radius: 2px; flex: none; }
.tip-key.k-none { background: transparent; }
.tip-key.k-dash { height: 0; border-top: 2px dashed #8B8D98; }

/* Lista chave/valor */
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 11px 16px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--muted); white-space: nowrap; }
.kv dd { margin: 0; text-align: right; font-weight: 600; color: var(--text); overflow-wrap: anywhere; min-width: 0; }
.kv dd.small { font-size: 12.5px; }

/* Listas de itens (vencimentos, ranking) */
.exp-list { display: grid; gap: 2px; }
.exp-item { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 10px; }
.exp-item:hover { background: var(--surface-2); }
.exp-av { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-3); font-weight: 700; font-size: 13px; color: var(--text-2); flex: none; text-transform: uppercase; }
.exp-item > div { min-width: 0; }
.exp-item .nm { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.exp-item small { display: block; color: var(--muted); font-size: 12px; }
.exp-item .badge { margin-left: auto; }

/* ---------- Tabelas ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th {
  text-align: left; font-size: 11.5px; font-weight: 650; color: var(--muted); white-space: nowrap; letter-spacing: .02em;
  padding: 10px 14px; background: #191A1F; border-bottom: 1px solid var(--line); border-top: 1px solid var(--line);
}
.card > .table-wrap:first-child .table th { border-top: 0; }
.card > .table-wrap:first-child .table th:first-child { border-top-left-radius: var(--radius); }
.card > .table-wrap:first-child .table th:last-child { border-top-right-radius: var(--radius); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--text-2); }
.table td strong, .table td b { color: var(--text); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table.hover tbody tr:hover { background: #1A1B20; }
.table.clickable tbody tr { cursor: pointer; }
.table.clickable tbody tr:focus-visible { outline: 2px solid var(--red-hover); outline-offset: -2px; }
.table .r { text-align: right; }
.table td.r { font-variant-numeric: tabular-nums; }
.table .w-1 { width: 1%; white-space: nowrap; }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.table.compact td { padding-top: 8px; padding-bottom: 8px; }
.dev-cell { display: flex; flex-direction: column; min-width: 0; }
.dev-id { font-family: var(--mono); font-weight: 650; color: var(--text); white-space: nowrap; letter-spacing: .02em; }
.dev-name { color: var(--muted); font-size: 12.5px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-sub { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; }
.plat { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.plat .ic { width: 16px; height: 16px; color: var(--muted); }
.avatar {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #3A3C45, #24252B); color: var(--text); font-weight: 700; font-size: 13px; text-transform: uppercase;
}
.avatar.red { background: linear-gradient(135deg, var(--red-hover), var(--red-dark)); color: #fff; }
.empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 34px 20px; color: var(--muted); font-size: 13.5px; }
.empty .ic { width: 30px; height: 30px; color: #3A3C45; }
.empty strong { color: var(--text-2); font-size: 14.5px; }
.actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; align-items: center; }
.detail { color: var(--text-2); }
.money { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--text); white-space: nowrap; }
.usage { display: grid; gap: 5px; min-width: 92px; }
.usage-bar { height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.usage-bar i { display: block; height: 100%; border-radius: 99px; background: var(--text-2); }
.usage-bar i.warn { background: var(--warn); }
.usage-bar i.full { background: var(--red); }
.usage span { font-size: 12.5px; white-space: nowrap; }
.switch { position: relative; width: 38px; height: 22px; border-radius: 99px; border: 0; background: #3A3C45; cursor: pointer; transition: background .15s; flex: none; padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch.on { background: var(--good); }
.switch.on::after { transform: translateX(16px); }
.switch:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Barra de ferramentas ---------- */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.search { position: relative; flex: 0 1 340px; min-width: 200px; }
.search .ic { position: absolute; left: 12px; top: 12px; color: var(--muted); width: 17px; height: 17px; pointer-events: none; }
.search input { padding-left: 38px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: 99px;
  border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: 13px; color: var(--text-2); cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: #3A3C45; color: var(--text); }
.chip .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--surface-3); display: inline-grid; place-items: center; font-size: 11.5px; color: var(--text-2); }
.chip.active { background: var(--red); border-color: var(--red); color: #fff; }
.chip.active .count { background: rgba(255, 255, 255, .2); color: #fff; }
.result-count { font-size: 13px; color: var(--muted); }

/* ---------- Atualizações ---------- */
.upd-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.upd-head { display: flex; align-items: center; gap: 14px; padding: 20px 20px 0; }
.upd-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--red-tint); color: #FF6B63; flex: none; }
.upd-icon .ic { width: 22px; height: 22px; }
.upd-head h2 { font-size: 16px; }
.upd-head p { font-size: 12.5px; color: var(--muted); }
.upd-current { padding: 18px 20px 20px; }
.ver-big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ver-big strong { font-size: 34px; letter-spacing: -.03em; line-height: 1.1; }
.ver-big span { color: var(--muted); font-size: 13px; }
.upd-current .kv { margin-top: 16px; }
.copy-row { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; max-width: 100%; }
.copy-row .val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.copy-btn {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; flex: none;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.copy-btn .ic { width: 14px; height: 14px; }
.copy-btn:hover { background: var(--surface-3); color: var(--text); }
.copy-btn.done { color: var(--good-text); border-color: rgba(47, 191, 113, .4); background: var(--good-tint); }
.upd-upload { padding: 18px 20px 20px; display: grid; gap: 12px; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px 18px; border-radius: 14px;
  border: 1.5px dashed #3A3C45; background: var(--input); cursor: pointer; text-align: center; width: 100%;
  transition: border-color .15s, background .15s, transform .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--red); background: rgba(229, 57, 53, .05); }
.dropzone.drag { transform: scale(1.01); }
.dz-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: var(--red-tint); color: #FF6B63; flex: none; }
.dz-text strong { display: block; font-size: 14.5px; color: var(--text); }
.dz-text span { font-size: 12.5px; color: var(--muted); }
.file-input { display: none; }
.file-pick { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--input); }
.file-pick .ic { color: #FF6B63; width: 22px; height: 22px; }
.file-pick .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-pick .meta { font-size: 12.5px; color: var(--muted); }
.file-pick > div { min-width: 0; flex: 1; }
.upload-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.progress { display: grid; gap: 6px; }
.progress-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text-2); }
.progress-top b { color: var(--text); font-variant-numeric: tabular-nums; }
.progress-track { height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; position: relative; }
.progress-fill { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--red-dark), var(--red-hover)); transition: width .2s ease-out; }
.progress-fill.indeterminate { width: 35% !important; animation: indet 1.1s ease-in-out infinite; }
.public-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; flex-wrap: wrap; }
.public-card .txt { flex: 1; min-width: 220px; }
.public-card .txt strong { display: block; font-size: 15px; }
.public-card .txt span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.readonly-note { margin-bottom: 16px; }

/* Plano */
.plan-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
.plan-hero { padding: 22px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.plan-hero .big { font-size: 40px; font-weight: 750; letter-spacing: -.03em; line-height: 1; }
.plan-hero .big small { font-size: 15px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.ring { width: 96px; height: 96px; flex: none; }
.ring circle { fill: none; stroke-width: 9; }
.ring .track { stroke: var(--surface-3); }
.ring .val { stroke: var(--good); stroke-linecap: round; }
.ring .val.warn { stroke: var(--warn); }
.ring .val.bad { stroke: var(--red); }

/* ---------- Diálogos / gaveta / avisos ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .62);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 20px; animation: fade .15s ease-out;
}
.dialog {
  width: 100%; max-width: 480px; max-height: calc(100vh - 40px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow-lg);
  animation: pop .18s cubic-bezier(.2, .9, .3, 1.1);
}
.dialog.wide { max-width: 580px; }
.dialog-head { display: flex; align-items: flex-start; gap: 12px; padding: 22px 24px 6px; }
.dialog-head h2 { font-size: 18px; flex: 1; padding-top: 8px; }
.dialog-head .icon-btn { margin: -4px -8px 0 0; border-color: transparent; background: transparent; }
.dialog-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none; background: var(--red-tint); color: #FF6B63; }
.dialog-body { padding: 10px 24px 4px; color: var(--text-2); }
.dialog-body p + p { margin-top: 10px; }
.dialog-body .alert { margin: 12px 0; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px 22px; flex-wrap: wrap; }
.dialog-foot .left { margin-right: auto; }
.drawer-overlay { place-items: stretch; justify-items: end; padding: 0; }
.drawer {
  width: min(460px, 100%); height: 100%; background: var(--surface); border-left: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slideIn .22s cubic-bezier(.2, .8, .2, 1);
}
.drawer-head {
  padding: 22px 22px 18px; display: flex; gap: 14px; align-items: flex-start;
  background: linear-gradient(150deg, rgba(229, 57, 53, .18), rgba(229, 57, 53, 0) 70%), var(--surface);
  border-bottom: 1px solid var(--line);
}
.drawer-head .icon-btn { margin: -6px -8px 0 auto; border-color: transparent; background: transparent; }
.drawer-head h2 { font-size: 18px; overflow-wrap: anywhere; }
.drawer-id { font-family: var(--mono); font-size: 22px; font-weight: 700; letter-spacing: .04em; margin-top: 2px; display: flex; align-items: center; gap: 8px; }
.drawer-status { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.drawer-body { padding: 8px 22px 28px; overflow: auto; flex: 1; }
.drawer-body h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 22px 0 8px; font-weight: 700; }
.drawer-body .kv { gap: 0; }
.drawer-body .kv dt, .drawer-body .kv dd { padding: 9px 0; border-bottom: 1px solid var(--line); }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pay-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pay-item .pi { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--good-tint); color: var(--good-text); flex: none; }
.pay-item .pi .ic { width: 16px; height: 16px; }
.pay-item > div { min-width: 0; }
.pay-item small { display: block; color: var(--muted); font-size: 12px; }
.pay-item .money { margin-left: auto; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 95; display: grid; gap: 8px; justify-items: end; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px;
  background: #24252C; border: 1px solid var(--line-2); color: #fff; box-shadow: var(--shadow-lg); font-size: 13.5px; max-width: 380px;
  animation: toastIn .2s ease-out;
}
.toast .ic { color: var(--good-text); }
.toast.err .ic { color: #FF8A80; }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }

/* ---------- Estados ---------- */
.loading-box { display: grid; place-items: center; gap: 12px; padding: 80px 20px; color: var(--muted); }
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--red); animation: spin .8s linear infinite; }
.error-box { max-width: 520px; margin: 60px auto; }
.error-box .btn { margin-top: 10px; }

/* ---------- Animações ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(.94); opacity: .8; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(47, 191, 113, .5); } 70%, 100% { box-shadow: 0 0 0 7px rgba(47, 191, 113, 0); } }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(4px); } }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- Responsivo ---------- */
.search-btn { display: none !important; }
@media (max-width: 1400px) {
  .welcome { display: none; }
}
@media (max-width: 1240px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid > .span-2, .dash-grid > .span-3 { grid-column: 1 / -1; }
  .upd-grid, .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .gsearch .kbd { display: none; }
  .gsearch input { padding-right: 14px; }
}
@media (max-width: 1000px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
  .app.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .app.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .6); animation: fade .15s; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 0 16px; gap: 10px; }
  .plan-banner { margin: 14px 16px 0; }
  .view { padding: 20px 16px 40px; }
  .login { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-mobile-logo { display: block; }
  .login-panel { min-height: 100vh; background: radial-gradient(circle at 50% -10%, rgba(229, 57, 53, .18), transparent 55%), var(--bg); }
}
@media (max-width: 760px) {
  .gsearch { display: none; }
  .gsearch.open { display: block; position: fixed; left: 12px; right: 12px; top: 12px; max-width: none; z-index: 61; }
  .search-btn { display: inline-grid !important; }
  .topbar-right .hide-mob { display: none; }
  .dash-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .hello h2 { font-size: 22px; }
  .hello-actions { margin-left: 0; width: 100%; }
  .hello-actions .date-pill { display: none; }
  .donut-wrap { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .donut-wrap .dlegend { width: 100%; }
}
@media (max-width: 640px) {
  .topbar { height: 64px; }
  .topbar-title h1 { font-size: 18px; }
  .topbar-title small { font-size: 10px; }
  .kpis { gap: 10px; }
  .kpi { padding: 14px 14px 12px; min-height: 150px; }
  .kpi-value { font-size: 22px; }
  .kpi-icon { width: 34px; height: 34px; }
  .kpi-icon .ic { width: 16px; height: 16px; }
  .spark { width: 60px; height: 30px; }
  .kpi-label { margin-top: 10px; font-size: 12.5px; }
  .kpi-foot { flex-direction: column; align-items: flex-start; gap: 2px; }
  .card-head { padding: 16px 16px 0; }
  .card-body { padding: 14px 16px 16px; }
  .card-body.flush { padding: 12px 0 0; }
  .table th:first-child, .table td:first-child { padding-left: 16px; }
  .table th:last-child, .table td:last-child { padding-right: 16px; }
  .hide-sm { display: none; }
  .search { flex: 1 1 100%; }
  .chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 2px; scrollbar-width: none; }
  .chip { flex: none; }
  .login-card { padding: 28px 22px 24px; }
  .radio-cards, .radio-cards.four { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .dialog-head { padding: 20px 20px 4px; }
  .dialog-body { padding: 8px 20px 4px; }
  .dialog-foot { padding: 14px 20px 20px; }
  .dialog-foot .btn { flex: 1; }
  .toasts { left: 16px; right: 16px; justify-items: stretch; }
  .public-card .btn { flex: 1; }
  .plan-banner .alert { flex-wrap: wrap; }
}

/* =====================================================================
   Página pública de download (baixar.html)
   ===================================================================== */
.dl-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.dl-hero {
  position: relative; overflow: hidden; color: #fff; text-align: center; padding: 56px 20px 120px;
  background:
    radial-gradient(circle at 20% 0%, rgba(229, 57, 53, .45), transparent 50%),
    radial-gradient(circle at 90% 100%, rgba(183, 28, 28, .35), transparent 45%),
    linear-gradient(160deg, #1D1416, #0E0B0C);
}
.dl-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 30%, #000, transparent 70%);
}
.dl-hero > * { position: relative; z-index: 1; }
.dl-hero img { width: 104px; height: 104px; border-radius: 26px; margin: 0 auto 20px; box-shadow: 0 18px 50px rgba(229, 57, 53, .4); }
.dl-hero h1 { font-size: 40px; letter-spacing: -.03em; }
.dl-hero p { font-size: 18px; color: #DCD2D2; margin-top: 8px; }
.dl-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 980px; width: 100%; margin: -84px auto 0; padding: 0 20px; position: relative; z-index: 2; }
.dl-card { padding: 26px; display: flex; flex-direction: column; gap: 18px; box-shadow: var(--shadow-lg); }
.dl-card-top { display: flex; align-items: center; gap: 14px; }
.dl-card-top .upd-icon { width: 54px; height: 54px; border-radius: 15px; }
.dl-card-top .upd-icon .ic { width: 26px; height: 26px; }
.dl-card-top h2 { font-size: 19px; }
.dl-card-top p { color: var(--muted); font-size: 13.5px; }
.dl-btn { height: 58px; font-size: 16.5px; border-radius: 14px; width: 100%; }
.dl-btn .ic { width: 22px; height: 22px; }
.dl-meta { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: -8px; }
.dl-meta b { color: var(--text-2); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: st; }
.steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 14px; color: var(--text-2); }
.steps li::before {
  counter-increment: st; content: counter(st); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--red-tint); color: #FF6B63; font-weight: 700; font-size: 14px;
}
.steps li strong { color: var(--text); }
.steps-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; border-top: 1px solid var(--line); padding-top: 18px; }
.dl-tip { max-width: 940px; margin: 22px auto 0; width: calc(100% - 40px); }
.dl-tip .addr { font-family: var(--mono); font-weight: 700; color: var(--text); }
.dl-foot { margin-top: auto; padding: 36px 20px 28px; text-align: center; color: var(--muted); font-size: 12.5px; }
.dl-foot img { width: 28px; height: 28px; border-radius: 7px; margin: 0 auto 8px; }
.btn-off { background: var(--surface-3) !important; border-color: var(--line-2) !important; color: var(--muted) !important; box-shadow: none !important; pointer-events: none; }
@media (max-width: 760px) {
  .dl-cards { grid-template-columns: 1fr; margin-top: -70px; }
  .dl-hero { padding: 40px 20px 100px; }
  .dl-hero h1 { font-size: 30px; }
  .dl-hero p { font-size: 16px; }
  .dl-hero img { width: 84px; height: 84px; border-radius: 22px; }
  .dl-card { padding: 22px; }
}

/* complementos */
.card-pad { padding: 4px; }
.dash-grid > div > .card { height: 100%; }
.pop-menu > button.notif-item { height: auto; align-items: flex-start; padding: 10px 12px; border-radius: 0; }
.pop-menu > button.notif-item:hover { border-radius: 9px; }
.field .select { width: 100%; height: 42px; }
.setting-row { align-items: center; gap: 16px; white-space: normal; }
.setting-desc { margin-top: 4px; font-size: 13px; max-width: 640px; }
.dl-code { padding: 16px 18px; border-radius: 14px; border: 1px solid rgba(229, 57, 53, .45); background: linear-gradient(135deg, rgba(229, 57, 53, .14), rgba(229, 57, 53, .04)); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dl-code small { display: block; font-size: 12px; color: var(--text-2); font-weight: 600; text-transform: uppercase; letter-spacing: .07em; }
.dl-code b { font-family: var(--mono); font-size: 30px; letter-spacing: .14em; color: #fff; }
.dl-code .copy-btn { margin-left: auto; width: 38px; height: 38px; }
.donut-wrap { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 14px; }
.donut-wrap .dlegend { width: 100%; }
.kpi-foot { flex-wrap: wrap; row-gap: 2px; }
.kpi-foot > span { overflow: visible; }
.rev-tools .search { flex: 0 1 280px; }
.drawer-body .kv { column-gap: 16px; }
.radio-cards.five { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.radio-cards.five .radio-card { padding: 10px 11px; }
@media (max-width: 640px) { .radio-cards.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.kpi-foot > span { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 1000px) {
  .side-user { padding-bottom: 14px; }
  .side-user img { width: 52px; height: 52px; border-radius: 13px; margin-bottom: 8px; }
}
@media (max-height: 820px) {
  .side-promo { padding: 12px 14px; }
  .side-promo strong { font-size: 18px; margin: 2px 0 8px; }
  .side-promo .btn { height: 32px; }
}
.drawer-body .kv { column-gap: 0; }
.drawer-body .kv dd { padding-left: 16px; }

/* ---------- Cobrança PIX ---------- */
.dialog-foot:empty { display: none; }
.pix { padding-bottom: 22px; }
.pix > p:first-child { color: var(--text-2); }
.pix-periods .radio-card { padding: 11px 12px; }
.pix-periods .val { margin-top: 8px; font-weight: 750; font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }
.pix-preview { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: -2px 0 14px; }
.pix-preview b { color: var(--text); }
.pix .btn-block { margin-top: 8px; }
.pix .alert { margin-bottom: 12px; }
.pix-grid { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 22px; align-items: center; margin: 4px 0 16px; }
.pix-qr { width: 236px; height: 236px; background: #fff; border-radius: 18px; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.pix-qr img { width: 212px; height: 212px; image-rendering: pixelated; }
.pix-info small { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pix-amount { font-size: 34px; font-weight: 750; letter-spacing: -.03em; color: var(--text); line-height: 1.15; margin: 2px 0 2px; }
.pix-valid { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; margin-top: 12px; }
.pix-wait { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--warn-tint); color: var(--warn-text); font-weight: 650; font-size: 13.5px; }
.pix-wait .pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--warn); flex: none; animation: pingWarn 1.4s ease-out infinite; }
@keyframes pingWarn { 0% { box-shadow: 0 0 0 0 rgba(245, 165, 36, .6); } 70%, 100% { box-shadow: 0 0 0 9px rgba(245, 165, 36, 0); } }
.field textarea.pix-code { height: auto; min-height: 92px; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; word-break: break-all; resize: none; color: var(--text-2); }
.pix-help { font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.pix-ok { text-align: center; padding: 8px 0 8px; }
.pix-ok .big-check { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 6px auto 16px; background: var(--good-tint); color: var(--good-text); box-shadow: 0 0 0 10px rgba(47, 191, 113, .06); animation: pop .3s cubic-bezier(.2, .9, .3, 1.3); }
.pix-ok .big-check .ic { width: 38px; height: 38px; stroke-width: 2.5; }
.pix-ok h3 { font-size: 22px; }
.pix-ok p { margin-top: 6px; color: var(--text-2); }
.pix-ok p.muted { color: var(--muted); font-size: 13px; }
.pix-key-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; max-width: 720px; }
.pix-key-row .field { margin-bottom: 0; flex: 1 1 320px; }
.pix-key-row .btn { height: 42px; }
@media (max-width: 640px) {
  .pix-grid { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 14px; }
  .pix-valid, .pix-wait { justify-content: center; }
  .pix-amount { font-size: 30px; }
  .pix-periods { grid-template-columns: 1fr 1fr; }
}
