/* Portal do afiliado — celular primeiro, coluna de até 480px no desktop.
   Sem estilo inline (CSP): tudo por classe. Tema escuro por prefers-color-scheme. */

:root {
  color-scheme: light dark;
  --bg: #f5f5f7;
  --bg-outer: #e9e8ef;
  --card: #ffffff;
  --text: #17151f;
  --muted: #5d596b;
  --line: #ebe9f1;
  --line-strong: #d4d1de;
  --input: #ffffff;
  --brand: #6d28d9;
  --brand-text: #5b21b6;
  --brand-soft: #f1ebfe;
  --btn: #6d28d9;
  --btn-hover: #5b21b6;
  --ring: #7c3aed;
  --pos: #0f7a3d;
  --pos-soft: #e3f5ea;
  --neg: #b42318;
  --neg-soft: #fdeceb;
  --neg-solid: #b42318;
  --warn: #8a4b00;
  --warn-soft: #fff3d6;
  --info: #1d4ed8;
  --info-soft: #e7eefe;
  --neutral-soft: #efeef3;
  --sk: #e8e6ee;
  --shadow: 0 1px 2px rgba(23, 16, 48, .06), 0 10px 28px rgba(23, 16, 48, .08);
  --shadow-up: 0 -6px 24px rgba(23, 16, 48, .07);
  --grad: linear-gradient(170deg, #3b1d8f 0%, #5b21b6 40%, #7c3aed 80%, #8f5cf7 100%);
  --radius: 20px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f13;
    --bg-outer: #08080b;
    --card: #1c1c22;
    --text: #f1f0f6;
    --muted: #aba7bb;
    --line: #2a2933;
    --line-strong: #3d3b4a;
    --input: #141419;
    --brand: #a78bfa;
    --brand-text: #c4b5fd;
    --brand-soft: #2a2142;
    --btn: #6d28d9;
    --btn-hover: #7c3aed;
    --ring: #a78bfa;
    --pos: #4ade80;
    --pos-soft: #12301e;
    --neg: #f87171;
    --neg-soft: #3a1818;
    --neg-solid: #c42b1f;
    --warn: #fbbf24;
    --warn-soft: #382a0c;
    --info: #93b4ff;
    --info-soft: #172443;
    --neutral-soft: #2a2933;
    --sk: #26252e;
    --shadow: 0 0 0 1px rgba(255, 255, 255, .04), 0 10px 28px rgba(0, 0, 0, .45);
    --shadow-up: 0 -6px 24px rgba(0, 0, 0, .5);
  }
}

/* ---------- base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-outer);
  color: var(--text);
  font: 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
[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;
}

:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--card); color: var(--text);
  padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow);
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.app {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
}
@media (min-width: 520px) {
  .app { box-shadow: 0 0 0 1px var(--line), 0 24px 64px rgba(0, 0, 0, .10); }
}

.boot {
  min-height: 100vh; min-height: 100dvh;
  display: grid; place-content: center; justify-items: center; gap: 14px;
  color: var(--muted); font-size: 15px;
}
.boot-dot {
  width: 40px; height: 40px; border-radius: 12px; background: var(--grad);
  animation: pulse 1.2s ease-in-out infinite;
}
.noscript { max-width: 480px; margin: 24px auto; padding: 0 16px; }

.ic { width: 24px; height: 24px; flex: none; }

/* ---------- textos utilitários */

.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .04em; font-weight: 700; }
.big {
  font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15;
  font-variant-numeric: tabular-nums; margin: 6px 0 4px;
}
.intro { color: var(--muted); font-size: 15px; margin: 0 4px 12px; }
.link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px;
  color: var(--brand-text); font-weight: 600; font-size: 15px; text-decoration: none;
}
.link:hover { text-decoration: underline; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stack { display: grid; gap: 12px; }
.stack-sm { display: grid; gap: 12px; }

/* ---------- moldura das telas */

.screen { min-height: 100vh; min-height: 100dvh; }
.screen.with-nav { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.content { padding: 16px 16px 0; display: grid; gap: 12px; }
.screen.is-home .content { padding: 0; display: block; }
.pad { padding: 0 16px; }

.topbar {
  background: var(--grad);
  color: #fff;
  padding: calc(14px + env(safe-area-inset-top)) 12px 18px;
  border-radius: 0 0 24px 24px;
}
.topbar-row { display: flex; align-items: center; gap: 4px; min-height: 48px; padding: 0 8px; }
.topbar h1 { font-size: 22px; font-weight: 750; letter-spacing: -.01em; }
.topbar .icon-btn { margin-left: -8px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  color: inherit; text-decoration: none;
  background: transparent; border: 0; cursor: pointer;
}
.icon-btn:hover { background: rgba(255, 255, 255, .14); }
.topbar :focus-visible, .hero :focus-visible, .auth-hero :focus-visible { outline-color: #fff; }

/* ---------- modo "ver como" (somente leitura) */

.viewas {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: calc(4px + env(safe-area-inset-top)) 8px 4px 14px;
  background: #f59e0b; color: #1c1200;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
  font-size: 14px; font-weight: 650; line-height: 1.3;
}
.viewas-ic { display: grid; place-items: center; flex: none; }
.viewas-ic .ic { width: 20px; height: 20px; }
.viewas-text { flex: 1; min-width: 0; padding: 6px 0; overflow-wrap: anywhere; }
.viewas-btn {
  flex: none; min-height: 44px; padding: 8px 16px;
  border-radius: 12px; border: 1.5px solid #1c1200;
  background: transparent; color: #1c1200;
  font-weight: 700; font-size: 14px; cursor: pointer;
}
.viewas-btn:hover:not(:disabled) { background: rgba(28, 18, 0, .1); }
.viewas-btn:disabled { opacity: .6; cursor: not-allowed; }
.viewas :focus-visible { outline-color: #1c1200; }
/* a faixa já ocupa a área segura do topo */
.is-viewas .topbar, .is-viewas .hero { padding-top: 14px; }

.action.is-disabled { opacity: .5; cursor: not-allowed; }

/* ---------- barra inferior */

.bottom-nav {
  position: fixed; z-index: 20;
  left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--card);
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow-up);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 56px; border-radius: 14px;
  color: var(--muted); text-decoration: none;
  font-size: 12px; font-weight: 600;
}
.nav-ic { display: grid; place-items: center; width: 56px; height: 30px; border-radius: 999px; transition: background-color .15s; }
.nav-item .ic { width: 22px; height: 22px; }
.nav-item[aria-current="page"] { color: var(--brand-text); }
.nav-item[aria-current="page"] .nav-ic { background: var(--brand-soft); }
.nav-item:hover { color: var(--text); }
.nav-item[aria-current="page"]:hover { color: var(--brand-text); }

/* ---------- cartões */

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card-title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }

.state-card { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 28px 20px; }
.state-card .btn { margin-top: 6px; }
.state-ic {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-text);
}
.state-ic.is-bad { background: var(--neg-soft); color: var(--neg); }
.state-title { font-weight: 700; font-size: 17px; }

.note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 14px;
  background: var(--brand-soft); color: var(--text); font-size: 14px;
}
.note .ic { width: 20px; height: 20px; color: var(--brand-text); margin-top: 1px; }
.note-warn { background: var(--warn-soft); }
.note-warn .ic { color: var(--warn); }
.card .note { margin-top: 12px; }

/* ---------- botões */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 20px;
  border-radius: 14px; border: 1.5px solid transparent;
  font-weight: 650; font-size: 16px; line-height: 1.2;
  text-decoration: none; text-align: center;
  cursor: pointer; background: transparent; color: var(--text);
  transition: background-color .15s, border-color .15s, transform .05s;
}
.btn:active:not(:disabled) { transform: scale(.985); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn .ic { width: 20px; height: 20px; }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 44px; padding: 8px 14px; font-size: 15px; border-radius: 12px; }
.btn-primary { background: var(--btn); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--btn-hover); }
.btn-outline { border-color: var(--line-strong); background: var(--card); }
.btn-outline:hover:not(:disabled) { border-color: var(--brand); color: var(--brand-text); }
.btn-ghost { color: var(--brand-text); }
.btn-ghost:hover:not(:disabled) { background: var(--brand-soft); }
.btn-danger { background: var(--neg-solid); color: #fff; }
.btn-outline-danger { border-color: var(--line-strong); background: var(--card); color: var(--neg); }
.btn-outline-danger:hover:not(:disabled) { border-color: var(--neg); background: var(--neg-soft); }
.card .btn-block { margin-top: 14px; }
.card .btn-block + .btn-block { margin-top: 8px; }
.form .btn-block { margin-top: 0; }
.form .btn-block + .btn-block { margin-top: -8px; }

/* ---------- selos */

.badge {
  display: inline-flex; align-items: center; flex: none;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; line-height: 1.3; white-space: nowrap;
}
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-ok { background: var(--pos-soft); color: var(--pos); }
.badge-bad { background: var(--neg-soft); color: var(--neg); }
.badge-muted { background: var(--neutral-soft); color: var(--muted); }

/* ---------- listas chave/valor */

.kv { display: grid; margin-top: 12px; }
.kv-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 11px 0; border-top: 1px solid var(--line);
}
.kv-row:first-child { border-top: 0; }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { text-align: right; font-weight: 600; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

/* ---------- seções */

.section { display: grid; gap: 8px; margin-top: 20px; }
.content > .section { margin-top: 8px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0 4px; }
.section-title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }

.how {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
}
.how summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; padding: 0 18px; cursor: pointer;
  font-weight: 650; list-style: none; border-radius: var(--radius);
}
.how summary::-webkit-details-marker { display: none; }
.how-ic { width: 20px; height: 20px; color: var(--muted); transition: transform .2s; }
.how[open] .how-ic { transform: rotate(180deg); }
.how ul { padding: 0 18px 16px 36px; list-style: disc; color: var(--muted); font-size: 14px; display: grid; gap: 6px; }

/* ---------- formulários */

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.label { font-weight: 600; font-size: 15px; }
.hint { color: var(--muted); font-size: 13px; }
.field-error { color: var(--neg); font-size: 14px; font-weight: 600; }
.input {
  width: 100%; min-height: 50px;
  padding: 12px 14px;
  font-size: 16px; /* evita zoom no iOS */
  background: var(--input); color: var(--text);
  border: 1.5px solid var(--line-strong); border-radius: 12px;
  appearance: none; -webkit-appearance: none;
}
.input::placeholder { color: var(--muted); opacity: .75; }
.input:focus-visible { outline: 3px solid var(--ring); outline-offset: 1px; border-color: var(--brand); }
.input[readonly] { background: var(--neutral-soft); color: var(--muted); }
.input[aria-invalid="true"] { border-color: var(--neg); }

.input-wrap { position: relative; }
.has-toggle .input { padding-right: 56px; }
.pw-toggle {
  position: absolute; right: 3px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; display: grid; place-items: center;
  background: transparent; border: 0; border-radius: 10px; color: var(--muted); cursor: pointer;
}
.pw-toggle:hover { color: var(--text); }
.pw-toggle .ic { width: 22px; height: 22px; }
.has-prefix .input { padding-left: 46px; }
.prefix {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-weight: 600; pointer-events: none;
}
.input-money { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.money-row { display: flex; gap: 8px; align-items: stretch; }
.money-row .input-wrap { flex: 1; min-width: 0; }
.money-row .btn { flex: none; min-height: 50px; }
.select-wrap { position: relative; }
.select-wrap .input { padding-right: 44px; cursor: pointer; }
.select-ic { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; }

.form-error {
  display: flex; gap: 8px; align-items: flex-start;
  color: var(--neg); font-weight: 600; font-size: 15px;
}
.form-error:not(:empty) { background: var(--neg-soft); padding: 12px 14px; border-radius: 12px; }
.form-error:empty { margin: 0; padding: 0; }
.form-error .ic { width: 20px; height: 20px; margin-top: 1px; }
.form > .form-error:empty { margin-top: -16px; }
.card .form-error:not(:empty) { margin-top: 10px; }
.form .form-error:not(:empty) { margin-top: 0; }

.flash {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--brand-soft); padding: 12px 14px; border-radius: 12px; font-size: 15px;
}
.flash .ic { width: 20px; height: 20px; color: var(--brand-text); margin-top: 1px; }
.help { color: var(--muted); font-size: 14px; text-align: center; }

/* ---------- login e convite */

.auth { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.auth-hero {
  background: var(--grad); color: #fff; text-align: center;
  padding: calc(40px + env(safe-area-inset-top)) 20px 88px;
  border-radius: 0 0 32px 32px;
}
.brand-mark {
  display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 18px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28);
}
.brand-mark .ic { width: 32px; height: 32px; stroke-width: 2.6; }
.brand-name { margin-top: 12px; font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .9; }
.auth-hero h1 { margin-top: 4px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.auth-card { margin: -56px 16px 0; position: relative; padding: 22px 20px; }
.auth-card .card-title { font-size: 20px; line-height: 1.3; }
.auth-card .state-card { padding: 8px 0; }
.auth-foot { margin: 20px 24px 0; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- início */

.hero {
  background: var(--grad); color: #fff;
  padding: calc(14px + env(safe-area-inset-top)) 20px 72px;
  border-radius: 0 0 28px 28px;
}
.hero-empty { min-height: 180px; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hello-sub { font-size: 14px; opacity: .88; }
.hello-name { font-size: 20px; font-weight: 750; letter-spacing: -.01em; line-height: 1.2; }
.hero-btn {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  color: #fff; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .26);
}
.hero-btn:hover { background: rgba(255, 255, 255, .24); }
.hero-btn .ic { width: 22px; height: 22px; }

.balance { text-align: center; margin-top: 22px; }
.balance-label { font-size: 14px; opacity: .88; }
.balance-value {
  font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15;
  font-variant-numeric: tabular-nums; margin-top: 2px; overflow-wrap: anywhere;
}
.balance-note { font-size: 13px; opacity: .88; margin-top: 2px; }
.pill {
  display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 8px;
  max-width: 100%; margin-top: 14px; padding: 7px 14px;
  border-radius: 999px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .22);
  font-size: 13px; font-weight: 600;
}
.pill-code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .06em; font-weight: 700; }
.pill-sep { opacity: .7; }
.pill-camp { overflow-wrap: anywhere; }

.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 22px; }
.action {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  min-height: 44px; color: #fff; text-decoration: none;
  font-size: 13px; font-weight: 600; border-radius: 16px; padding: 2px 0;
}
.action-ic {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .26);
  transition: background-color .15s;
}
.action:hover .action-ic { background: rgba(255, 255, 255, .26); }

.overlap { margin-top: -48px; position: relative; }
.week-card .week-foot {
  display: flex; align-items: center; gap: 8px; margin-top: 12px;
  color: var(--muted); font-size: 14px;
}
.week-card .week-foot .ic { width: 18px; height: 18px; }

.notice { padding: 16px 18px; }
.notice-row { display: flex; gap: 12px; align-items: flex-start; }
.notice-ic {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: var(--warn-soft); color: var(--warn);
}
.notice.is-info .notice-ic { background: var(--info-soft); color: var(--info); }
.notice-ic .ic { width: 20px; height: 20px; }
.notice-main { display: grid; gap: 2px; min-width: 0; }
.notice-title { font-size: 16px; font-weight: 700; }
.notice .cancel-ctl { margin-top: 12px; padding-left: 52px; }

/* ---------- movimentações e saques */

.list { padding: 4px 16px; }
.list > li + li { border-top: 1px solid var(--line); }
.entry { display: flex; align-items: center; gap: 12px; padding: 12px 0; min-height: 64px; }
.entry-ic {
  display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%;
  background: var(--neutral-soft); color: var(--muted);
}
.entry-ic .ic { width: 20px; height: 20px; }
.entry-ic.is-credit { background: var(--pos-soft); color: var(--pos); }
.entry-main { flex: 1; min-width: 0; }
.entry-title { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.entry-sub { color: var(--muted); font-size: 13px; }
.entry-amt { font-weight: 700; font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
.entry-amt.pos { color: var(--pos); }

.wd { padding-bottom: 12px; }
.wd .entry { padding-bottom: 6px; align-items: flex-start; }
.wd .entry .badge { margin-top: 2px; }
.wd-line { color: var(--muted); font-size: 14px; padding-left: 54px; }
.wd-line.is-bad { color: var(--neg); }
.wd .cancel-ctl { margin-top: 10px; padding-left: 54px; }

.cancel-ctl { display: grid; gap: 10px; justify-items: start; }
.cancel-q { font-size: 15px; font-weight: 600; }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; }

.more { display: grid; gap: 10px; margin-top: 4px; }
.more:empty { display: none; }

/* ---------- saque */

.balance-card .big { margin: 2px 0; }
.success { text-align: center; display: grid; justify-items: center; gap: 8px; }
.success .kv { width: 100%; text-align: left; }
.success-ic {
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%;
  background: var(--pos-soft); color: var(--pos);
}
.success-ic .ic { width: 30px; height: 30px; stroke-width: 2.6; }

/* ---------- comissões */

.week-item {
  display: flex; align-items: center; gap: 12px;
  min-height: 68px; padding: 12px 0;
  color: inherit; text-decoration: none; border-radius: 12px;
}
.week-item:hover .entry-title { color: var(--brand-text); }
.week-right { display: grid; justify-items: end; gap: 4px; }
.chev { width: 18px; height: 18px; color: var(--muted); }

.calc { display: grid; margin-top: 8px; }
.calc-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.calc-row:first-child { border-top: 0; }
.calc-row dt { color: var(--muted); font-size: 15px; display: grid; }
.calc-row dd { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc-row.is-sub dt { color: var(--text); font-weight: 600; }
.calc-row.is-sub dd { font-weight: 700; }
.calc-note { color: var(--muted); font-size: 13px; font-weight: 400; }
.calc-row.is-total { border-top: 2px solid var(--text); margin-top: 4px; padding-top: 14px; }
.calc-row.is-total dt { color: var(--text); font-weight: 700; font-size: 16px; }
.calc-row.is-total dd { font-weight: 800; font-size: 20px; }

/* ---------- indicadores */

.pills {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 10px -12px 0; padding: 2px 20px 4px;
  scroll-padding: 0 20px;
}
.pills::-webkit-scrollbar { display: none; }
.pill-btn {
  flex: none; min-height: 40px; padding: 8px 16px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .14); color: #fff;
  font-size: 14px; font-weight: 650; cursor: pointer;
}
.pill-btn:hover { background: rgba(255, 255, 255, .24); }
.pill-btn[aria-pressed="true"] { background: #fff; color: #4c1d95; border-color: #fff; }
/* área de toque de 44px sem aumentar a pílula */
.pill-btn { position: relative; }
.pill-btn::after { content: ""; position: absolute; inset: -3px -2px; }

.period-range { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 600; padding: 0 4px; }
.period-range .ic { width: 18px; height: 18px; }

.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.span2 { grid-column: 1 / -1; }
.metric { padding: 16px; display: grid; align-content: start; gap: 2px; min-width: 0; }
.metric-title { font-size: 14px; font-weight: 650; color: var(--muted); }
.metric-value {
  font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2;
  font-variant-numeric: tabular-nums; margin-top: 2px; overflow-wrap: anywhere;
}
.metric:not(.span2) .metric-value { font-size: 21px; }
.metric-value.sm { font-size: 20px; }
.metric-label { font-size: 13px; color: var(--muted); }
.explain { color: var(--muted); font-size: 13px; margin-top: 6px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.split-part { min-width: 0; }
.split-part + .split-part { border-left: 1px solid var(--line); padding-left: 12px; }
.split-top { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }

.delta { font-size: 13px; font-weight: 650; margin-top: 2px; }
.delta.good { color: var(--pos); }
.delta.bad { color: var(--neg); }
.delta.flat { color: var(--muted); font-weight: 500; }

.updated { color: var(--muted); font-size: 13px; text-align: center; padding: 4px 8px 8px; }

/* ---------- conta */

.profile { display: flex; align-items: center; gap: 14px; }
.avatar {
  display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 50%;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 20px; letter-spacing: .02em;
}
.profile-main { min-width: 0; }
.profile-name { font-size: 19px; font-weight: 750; overflow-wrap: anywhere; }
.profile .muted { overflow-wrap: anywhere; }
.deal-campaign { margin-top: 6px; font-weight: 700; color: var(--brand-text); }
.deal-list { display: grid; gap: 10px; margin-top: 12px; }
.deal-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.li-ic { width: 20px; height: 20px; color: var(--pos); margin-top: 1px; }

/* ---------- carregamento */

.skeleton { display: grid; gap: 12px; }
.skeleton > div { display: grid; gap: 12px; }
.sk { background: var(--sk); border-radius: 14px; animation: pulse 1.4s ease-in-out infinite; }
.sk-hero { height: 330px; background: var(--grad); border-radius: 0 0 28px 28px; }
.sk-card { height: 170px; border-radius: var(--radius); }
.sk-overlap { margin-top: -48px; position: relative; }
.sk-line { height: 20px; width: 55%; }
.sk-row { height: 64px; }
.sk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sk-tile { height: 120px; border-radius: var(--radius); }
.is-home .skeleton .pad { display: grid; gap: 12px; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- telas bem estreitas */

@media (max-width: 360px) {
  .balance-value { font-size: 34px; }
  .action-ic { width: 50px; height: 50px; }
  .action { font-size: 12px; }
  .metric:not(.span2) .metric-value { font-size: 18px; }
  .metric-value { font-size: 23px; }
}
