/* ═══════════════════════════════════════
   DESIGN TOKENS — paleta Cashback Bitcoin
   (Alinhado 100% com public-web/index.html)
═══════════════════════════════════════ */
:root {
  /* Fundo — sólidos como na landing (S1, S4, S5 = #001219; header tier = #0d2535) */
  --bg:          #001219;
  --bg-mid:      #0d2535;
  --bg-panel:    #0d2535;         /* sólido, sem transparência */
  --bg-card:     #001219;

  /* Bordas — exatas da landing */
  --line:        rgba(255, 255, 255, 0.08);   /* s4-card border */
  --line-strong: rgba(255, 255, 255, 0.14);

  /* Texto — exatos da landing */
  --text:        #e5e7eb;   /* s4-sub / s5-sub */
  --text-muted:  #6a7282;
  --text-soft:   #9ca3af;   /* plan-detail / plan-annual */

  /* Brand — extraídos das classes col-n / col-t / col-k */
  --orange:      #e85d04;   /* Nitro / s1-h1 / s4-title */
  --orange-dark: #c94e02;
  --teal:        #0a9396;   /* Normal — s2-legend .lc */
  --gold:        #ee9b00;   /* Turbo — s2-legend .lt */

  /* Plan card backgrounds — exatos do S5 */
  --plan-normal-bg:     rgba(10, 147, 150, 0.15);
  --plan-normal-border: rgba(10, 147, 150, 0.30);
  --plan-turbo-bg:      rgba(238, 155, 0, 0.15);
  --plan-turbo-border:  rgba(238, 155, 0, 0.35);
  --plan-nitro-bg:      rgba(232, 93, 4, 0.15);
  --plan-nitro-border:  rgba(232, 93, 4, 0.35);

  /* Semantic */
  --danger:      #f87171;
  --danger-soft: rgba(248, 113, 113, 0.14);
  --success:     #34d399;
  --success-soft:rgba(52, 211, 153, 0.14);
  --attention-soft: rgba(238, 155, 0, 0.16);

  /* Shadows */
  --shadow-xl: 0 32px 80px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.38);

  /* Radii */
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;

  /* Fonts */
  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body:    'Inter', 'Segoe UI', sans-serif;
}

/* ═══ Reset ═══ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
#app {
  height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto; /* scroll liberado; modal/drawer travam via JS */
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
}

body.drawer-open,
body.modal-open {
  overflow: hidden;
}

body.modal-open #app,
body.drawer-open #app {
  height: 100%;
}

button,
input,
textarea,
a {
  font: inherit;
}

button,
a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, p, dl, dt, dd {
  margin: 0;
}

/* ═══════════════════════════════════════
   PAGE SHELL
═══════════════════════════════════════ */
.client-page {
  position: relative;
  min-height: 100%;
  padding: 20px;
  /* Garante scroll em mobile quando conteúdo excede a tela */
  overflow-y: auto;
}

/* background glows */
.client-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.22;
  pointer-events: none;
}

.client-glow--left {
  top: -60px;
  left: -140px;
  background: var(--orange);
}

.client-glow--right {
  top: 80px;
  right: -140px;
  background: var(--teal);
}

.client-shell {
  position: relative;
  min-height: calc(100vh - 40px);
  height: calc(100vh - 40px);
}

.client-shell__body {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 16px;
  min-height: 100%;
  transition: opacity 200ms ease, transform 240ms ease, filter 240ms ease;
}

.client-shell--modal .client-shell__body {
  opacity: 0.1;
  transform: scale(0.985);
  filter: blur(8px) saturate(0.5);
}

/* ═══════════════════════════════════════
   SHARED PANEL STYLE
   (Sólido como na landing — sem glassmorphism)
═══════════════════════════════════════ */
.client-header,
.surface-panel,
.login-surface,
.flow-modal,
.context-drawer,
.notice-banner {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  box-shadow: var(--shadow-xl);
  /* Removido backdrop-filter: landing não usa glassmorphism */
}

/* top gloss sheen — REMOVIDO: landing não usa este efeito */


/* ═══════════════════════════════════════
   HEADER
═══════════════════════════════════════ */
.client-header {
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 16px 20px;
  border-radius: var(--radius-xl);
  /* S4 card header = #0d2535 */
  background: #0d2535;
  border-color: var(--line);
}

.brand-block {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-logo-img {
  height: 44px;
  width: auto;
  display: block;
}

/* Nome da marca — igual ao .h-logo da landing */
.brand-name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 1.4rem;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}

/* Fallback text mark if logo fails */
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--orange);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow,
.balance-chip__label,
.list-card__eyebrow {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.header-title,
.surface-panel h1,
.surface-panel h2,
.surface-panel h3,
.login-surface h1,
.flow-modal h2,
.context-drawer h2,
.history-row strong,
.list-card h3 {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
}

.header-title {
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  font-weight: 400;
  color: var(--text-soft);
  text-transform: none;
}

.header-balance {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 160px)) 1fr;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.balance-chip {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #001219;
  border: 1px solid var(--line);
  transition: border-color 200ms ease;
}

.balance-chip:first-child {
  /* Saldo BTC — teal como o plano Normal na landing */
  border-color: rgba(10, 147, 150, 0.35);
  background: rgba(10, 147, 150, 0.08);
}

.balance-chip--muted {
  background: #001219;
  border-color: var(--line);
}

.balance-chip strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.header-meta,
.surface-copy,
.list-card__copy,
.history-row p,
.support-copy,
.feedback,
.inline-note {
  color: var(--text-soft);
  line-height: 1.6;
  font-size: 0.88rem;
}

.avatar-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #1a3547;
  cursor: pointer;
  transition: background 160ms ease;
}

.avatar-button:hover {
  background: #234760;
}

.avatar-image,
.avatar-fallback {
  width: 34px;
  height: 34px;
  border-radius: 999px;
}

.avatar-image {
  object-fit: cover;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
}

/* ═══════════════════════════════════════
   NOTICE BANNER
═══════════════════════════════════════ */
.notice-banner {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
}

.notice-banner[data-tone="positive"] {
  border-color: rgba(52, 211, 153, 0.22);
  background: rgba(0, 40, 28, 0.82);
}

.notice-banner[data-tone="critical"] {
  border-color: rgba(248, 113, 113, 0.22);
  background: rgba(40, 8, 8, 0.82);
}

/* ═══════════════════════════════════════
   DASHBOARD LAYOUT
═══════════════════════════════════════ */
.dashboard-shell {
  min-height: 0;
  height: 100%;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(300px, 0.84fr);
  gap: 16px;
  height: 100%;
}

.dashboard-column {
  display: grid;
  gap: 16px;
  min-height: 0;
  grid-template-rows: minmax(0, 0.92fr) minmax(0, 1.08fr);
}

.dashboard-column--secondary {
  grid-template-rows: minmax(0, 1fr);
}

/* ═══════════════════════════════════════
   SURFACE PANELS
═══════════════════════════════════════ */
.surface-panel {
  display: grid;
  gap: 14px;
  min-height: 0;
  padding: 20px;
  border-radius: var(--radius-xl);
}

.surface-panel--hero {
  align-content: space-between;
  /* Fundo sólido como #001219 da landing, com gradiente laranja sutil */
  background: linear-gradient(135deg, #0d2535 0%, #001219 60%);
  border-color: rgba(232, 93, 4, 0.22);
  border-left: 3px solid #e85d04; /* s4-card border-bottom style */
}

.surface-panel--history {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.hero-badge {
  display: grid;
  gap: 3px;
  min-width: 9rem;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  /* sólido como na landing */
  background: #001219;
}

.hero-badge span {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-badge strong {
  color: var(--text);
}

/* ─── Novos elementos do hero ─────────────────────────── */
.hero-balance-block {
  display: grid;
  gap: 4px;
}

.hero-btc-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-reais {
  font-size: 0.88rem;
  color: var(--text-soft);
}

.hero-reais strong {
  color: var(--text);
  font-weight: 700;
}

/* Pill de plano colorida por JS (cor via style inline) */
.hero-plan-pill {
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  border: 2px solid;
  border-radius: 14px;
  min-width: 7rem;
  align-self: flex-start;
}

.hero-plan-pill__label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-plan-pill strong {
  font-size: 1rem;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.surface-panel h1 {
  font-size: clamp(2rem, 3.5vw, 3.8rem);
  line-height: 0.94;
  color: var(--orange);
  text-shadow: 0 0 40px rgba(232, 93, 4, 0.4);
}

.balance-display {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.panel-header,
.drawer-head,
.list-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.panel-stack,
.history-list,
.drawer-body {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.panel-stack--scroll,
.drawer-body--scroll {
  overflow: auto;
  padding-right: 4px;
}

/* ═══════════════════════════════════════
   CARDS
═══════════════════════════════════════ */
.list-card,
.summary-block,
.plan-card,
.empty-state {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--bg-card);
}

.list-card,
.summary-block,
.empty-state {
  padding: 14px 16px;
}

.list-card {
  display: grid;
  gap: 10px;
}

.history-list {
  align-content: start;
  overflow: auto;
  padding-right: 4px;
}

.history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.history-row:last-child {
  border-bottom: 0;
}

.history-row__value {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.history-row__value span {
  font-weight: 700;
  color: var(--text);
}

.history-row__value small {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-row > .button,
.button-row > a.button {
  flex: 0 0 auto;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  transition: transform 140ms ease, opacity 140ms ease, box-shadow 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.5;
  transform: none;
}

.button--primary {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
  box-shadow: 0 4px 16px rgba(232, 93, 4, 0.3);
}

.button--primary:hover {
  background: var(--orange-dark);
  box-shadow: 0 6px 24px rgba(232, 93, 4, 0.4);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line-strong);
  color: var(--text);
}

.button--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.button--quiet {
  background: transparent;
  border-color: var(--line);
  color: var(--text-muted);
  min-height: 44px;
  padding-inline: 14px;
}

.button--quiet:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.button:focus-visible,
.avatar-button:focus-visible,
.flow-modal:focus-visible,
.context-drawer:focus-visible,
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid rgba(232, 93, 4, 0.6);
  outline-offset: 3px;
}

/* ═══════════════════════════════════════
   LOGIN SURFACE
═══════════════════════════════════════ */
.login-surface {
  display: grid;
  gap: 20px;
  align-content: center;
  justify-self: center;
  width: min(520px, 100%);
  min-height: min(60vh, 560px);
  padding: 36px 40px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(ellipse at 30% 20%, rgba(232, 93, 4, 0.12), transparent 60%),
    rgba(0, 18, 25, 0.92);
  border-color: rgba(232, 93, 4, 0.18);
}

.login-surface h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 0.96;
  color: var(--orange);
}

/* CTA-style Google login button (estilo landing page) */
.cta-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 0 24px;
  background: #fff;
  color: #001219;
  border: none;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12), 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.cta-google-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2), 0 12px 40px rgba(0, 0, 0, 0.5);
}

.cta-google-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════
   OVERLAYS & MODALS
═══════════════════════════════════════ */
.modal-overlay,
.context-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 10, 16, 0.72);
  backdrop-filter: blur(10px);
}

.modal-overlay {
  z-index: 10;
}

.context-overlay {
  z-index: 14;
}

.flow-modal,
.context-drawer {
  position: fixed;
  z-index: 15;
  animation: rise-in 220ms ease;
}

.flow-modal {
  inset: 50% auto auto 50%;
  width: min(620px, calc(100vw - 32px));
  max-height: min(92vh, 860px);
  transform: translate(-50%, -50%);
  display: grid;
  gap: 14px;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  padding: clamp(18px, 3vw, 26px);
  border-radius: var(--radius-xl);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
  background: rgba(5, 22, 32, 0.96);
  border-color: var(--line-strong);
}

.flow-modal__header {
  display: grid;
  gap: 6px;
}

.flow-modal__header h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 0.96;
}

.flow-modal__body {
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  align-content: start;
  padding-right: 4px;
}

.context-drawer {
  top: 20px;
  right: 20px;
  width: min(440px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-xl);
  background: rgba(5, 22, 32, 0.96);
}

/* ═══════════════════════════════════════
   DATA DISPLAYS
═══════════════════════════════════════ */
.account-grid,
.data-pair,
.summary-list {
  display: grid;
  gap: 10px;
}

.account-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-grid dt,
.data-pair dt,
.summary-list dt {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.account-grid dd,
.data-pair dd,
.summary-list dd {
  margin: 0;
  font-weight: 700;
  color: var(--text);
}

.data-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ═══════════════════════════════════════
   STAGE PROGRESS
═══════════════════════════════════════ */
.stage-progress {
  display: grid;
  gap: 8px;
}

.stage-progress__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.stage-progress__title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
}

.stage-progress__track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.stage-progress__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--orange);
  box-shadow: 0 0 10px rgba(232, 93, 4, 0.5);
}

.stage-progress__hint {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ═══════════════════════════════════════
   FORMS
═══════════════════════════════════════ */
.form-stack,
.summary-block,
.modal-copy-block {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  resize: vertical;
  font-size: 0.95rem;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-muted);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--orange);
  background: rgba(0, 0, 0, 0.4);
}

.field textarea[readonly] {
  background: rgba(0, 0, 0, 0.4);
  color: var(--text-soft);
}

.field--copy textarea {
  min-height: 96px;
}

/* ═══════════════════════════════════════
   PLAN CARDS (modal seleção)
═══════════════════════════════════════ */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

/* Indicadores de snap (pontinhos) — apenas no mobile via JS-free CSS */
.plan-grid__dots {
  display: none; /* ativado só no mobile via media query */
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
}

.plan-grid__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  transition: background 200ms ease, width 200ms ease;
}

.plan-grid__dot--active {
  background: var(--orange);
  width: 18px;
}

/* ─── card payment form ──────────────────────────────── */
.card-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.card-plan-summary {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
}

.card-plan-summary h3 {
  font-size: 1.1rem;
}

/* ─── upsell hint ─────────────────────────────────────── */
.upsell-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.upsell-hint strong {
  color: var(--text);
}

/* ─────────────────────────────────────────────────────── */

.plan-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.plan-card:hover {
  border-color: var(--line-strong);
}

/* Normal — s5 .plan-card.pn */
.plan-card--normal {
  border-color: var(--plan-normal-border) !important;
  background: var(--plan-normal-bg);
}

.plan-card--normal:hover {
  background: rgba(10, 147, 150, 0.22);
}

/* Turbo — s5 .plan-card.pu */
.plan-card--turbo {
  border-color: var(--plan-turbo-border) !important;
  background: var(--plan-turbo-bg);
}

.plan-card--turbo:hover {
  background: rgba(238, 155, 0, 0.22);
}

/* Nitro — s5 .plan-card.pk */
.plan-card--nitro {
  border-color: var(--plan-nitro-border) !important;
  background: var(--plan-nitro-bg);
}

.plan-card--nitro:hover {
  background: rgba(232, 93, 4, 0.22);
}

.plan-card--current {
  box-shadow:
    inset 0 0 0 2px var(--orange),
    0 0 24px rgba(232, 93, 4, 0.2);
  border-color: var(--orange) !important;
}

.plan-card__eyebrow {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.plan-card__price {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.plan-card__copy {
  color: var(--text-soft);
  line-height: 1.5;
  font-size: 0.84rem;
}

.plan-card__stats {
  display: grid;
  gap: 8px;
}

.plan-card__stats dt {
  color: var(--text-muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.plan-card__stats dd {
  margin: 0;
  font-weight: 700;
  color: var(--text);
}

/* ═══════════════════════════════════════
   PIX
═══════════════════════════════════════ */
.pix-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.pix-qr {
  display: grid;
  place-items: center;
  width: 100px;
  height: 100px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(232, 93, 4, 0.12), rgba(0, 18, 25, 0.8)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.04) 6px, transparent 6px, transparent 12px);
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--orange);
  border: 1px solid rgba(232, 93, 4, 0.2);
}

/* ═══════════════════════════════════════
   STATUS PILLS
═══════════════════════════════════════ */
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.status-pill[data-tone="attention"] {
  background: var(--attention-soft);
  color: var(--gold);
}

.status-pill[data-tone="current"] {
  background: rgba(10, 147, 150, 0.16);
  color: var(--teal);
}

.status-pill[data-tone="positive"] {
  background: var(--success-soft);
  color: var(--success);
}

.status-pill[data-tone="critical"] {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ═══════════════════════════════════════
   FEEDBACK / INLINE NOTES
═══════════════════════════════════════ */
.feedback[data-tone="critical"] {
  color: var(--danger);
}

.feedback[data-tone="positive"] {
  color: var(--success);
}

/* ═══════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════ */
.empty-state {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 160px;
  text-align: center;
  background: var(--bg-card);
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
}

.empty-state p {
  color: var(--text-soft);
  font-size: 0.88rem;
}

.empty-state--compact {
  min-height: 100px;
}

/* ═══════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════ */
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translate(-50%, -46%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ═══════════════════════════════════════
   RESPONSIVE — TABLET
═══════════════════════════════════════ */
@media (max-width: 1180px) {
  .dashboard-shell,
  .dashboard-grid,
  .dashboard-column {
    height: auto;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-column {
    grid-template-rows: auto auto;
  }

  .dashboard-column--secondary {
    grid-template-rows: auto;
  }

  .header-balance {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-meta {
    grid-column: 1 / -1;
  }

  .plan-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════
   RESPONSIVE — MOBILE  (≤ 860px)
═══════════════════════════════════════ */
@media (max-width: 860px) {

  /* ── Scrolling ── */
  body {
    overflow: auto;
    font-size: 14px;
  }

  body.modal-open,
  body.drawer-open {
    overflow: hidden;
  }

  body.modal-open #app,
  body.drawer-open #app,
  body.modal-open .client-page,
  body.drawer-open .client-page,
  body.modal-open .client-shell,
  body.drawer-open .client-shell {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }

  /* ── Page padding ── */
  .client-page {
    padding: 12px;
    min-height: 100dvh;
  }

  .client-shell {
    min-height: auto;
    height: auto;
  }

  .client-shell__body {
    min-height: auto;
    gap: 12px;
  }

  .client-shell--modal .client-shell__body {
    opacity: 0.06;
    transform: none;
    filter: none;
  }

  /* ── Header: logo + avatar na mesma linha, saldos abaixo ── */
  .client-header {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 20px;
  }

  .brand-block {
    grid-column: 1;
    grid-row: 1;
  }

  .brand-logo-img {
    height: 28px;
  }

  .avatar-button {
    grid-column: 2;
    grid-row: 1;
    width: 42px;
    height: 42px;
  }

  .header-balance {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .header-meta {
    grid-column: 1 / -1;
    font-size: 0.78rem;
  }

  .balance-chip {
    padding: 8px 10px;
    border-radius: 12px;
  }

  .balance-chip strong {
    font-size: 0.86rem;
  }

  .balance-chip__label {
    font-size: 0.62rem;
  }

  /* ── Login: tela cheia centralizada ── */
  .login-surface {
    width: 100%;
    min-height: auto;
    padding: 28px 20px 32px;
    border-radius: 22px;
    margin-top: 8px;
  }

  .login-surface h1 {
    font-size: clamp(1.8rem, 8vw, 2.8rem);
    line-height: 0.94;
  }

  .cta-google-btn {
    min-height: 52px;
    font-size: 1rem;
    border-radius: 100px;
    gap: 12px;
  }

  /* ── Dashboard panels ── */
  .dashboard-shell,
  .dashboard-grid,
  .dashboard-column {
    height: auto;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dashboard-column {
    grid-template-rows: auto auto;
    gap: 12px;
  }

  .dashboard-column--secondary {
    grid-template-rows: auto;
  }

  .surface-panel {
    padding: 16px;
    border-radius: 20px;
    gap: 12px;
  }

  .surface-panel h1 {
    font-size: clamp(1.8rem, 7vw, 3rem);
  }

  .surface-panel h2 {
    font-size: 1rem;
  }

  .hero-top {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .hero-badge {
    min-width: 0;
    padding: 8px 10px;
    border-radius: 12px;
  }

  .hero-actions {
    gap: 8px;
    width: 100%;
  }

  .hero-actions .button {
    flex: 1;
  }

  /* ── Buttons — touch targets generosos ── */
  .button {
    min-height: 48px;
    padding: 0 16px;
    font-size: 0.9rem;
    border-radius: 14px;
  }

  .button-row {
    flex-direction: column;
    gap: 8px;
  }

  .button-row > .button,
  .button-row > a.button {
    width: 100%;
    min-height: 50px;
    justify-content: center;
  }

  /* ── Plan grid: empilhado ── */
  /* ── Plan grid: carrossel horizontal com snap ── */
  .plan-grid {
    display: flex;
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    padding-bottom: 4px;
    /* Negative margin para o card beirar a borda do modal */
    margin-inline: -16px;
    padding-inline: 16px;
  }

  .plan-grid::-webkit-scrollbar {
    display: none; /* Chrome / Safari */
  }

  .plan-card {
    flex: 0 0 82%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }

  /* ── Data pairs ── */
  .account-grid,
  .data-pair {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  /* ── Forms ── */
  .field input,
  .field textarea {
    padding: 14px 14px;
    font-size: 1rem; /* Evita zoom automático iOS */
    border-radius: 14px;
  }

  /* ── Modal — bottom sheet ── */
  .modal-overlay {
    background: rgba(0, 10, 16, 0.82);
  }

  .flow-modal {
    inset: auto 0 0 0;
    width: 100%;
    max-height: 92dvh;
    transform: none;
    border-radius: 24px 24px 0 0;
    padding: 20px 16px 16px;
    animation: sheet-up 260ms cubic-bezier(0.32, 0.72, 0, 1);

    /* 6 linhas: handle | header | progress | body(scroll) | feedback | footer */
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
    overflow-x: visible;
    overflow-y: hidden;
  }

  /* Handle bar visual */
  .flow-modal::before {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 auto 8px;
  }

  .flow-modal__header h2 {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }

  /* ── Upsell: header ultra-compacto para maximizar espaço do carrossel ── */
  .flow-modal[data-modal-stage="upsell"] .flow-modal__header h2 {
    font-size: 0.95rem;
    font-family: "Inter", sans-serif;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.3;
    color: var(--text-muted);
  }

  .flow-modal[data-modal-stage="upsell"] .flow-modal__header p {
    display: none;
  }

  .flow-modal[data-modal-stage="upsell"] .flow-modal__header .eyebrow {
    display: none;
  }

  .flow-modal[data-modal-stage="upsell"] [data-stage-progress] {
    display: none;
  }

  /* Cards do upsell: scroll interno para mostrar tudo */
  .flow-modal[data-modal-stage="upsell"] .plan-card {
    flex: 0 0 88%;
    overflow-y: auto;
    max-height: calc(92dvh - 200px);
  }

  /* ── Drawer — bottom sheet ── */
  .context-drawer {
    inset: auto 0 0 0;
    width: 100%;
    max-height: 88dvh;
    border-radius: 24px 24px 0 0;
    padding: 20px 16px 28px;
    animation: sheet-up 260ms cubic-bezier(0.32, 0.72, 0, 1);
  }

  .context-drawer::before {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 auto 8px;
  }

  /* ── Stage progress ── */
  .stage-progress__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  /* ── List cards ── */
  .list-card {
    padding: 12px 14px;
    border-radius: 16px;
  }

  .history-row {
    padding: 10px 0;
  }

  /* ── Notice banner ── */
  .notice-banner {
    border-radius: 14px;
    padding: 10px 14px;
    font-size: 0.86rem;
  }

  /* ── Summary block ── */
  .summary-block {
    padding: 12px 14px;
  }
}

/* ── Bottom sheet keyframe ── */
@keyframes sheet-up {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══════════════════════════════════════
   RESPONSIVE — SMALL PHONES (≤ 400px)
═══════════════════════════════════════ */
@media (max-width: 400px) {
  .client-page {
    padding: 10px;
  }

  .client-header {
    padding: 12px 14px;
  }

  .login-surface {
    padding: 24px 16px 28px;
  }

  .login-surface h1 {
    font-size: clamp(1.6rem, 9vw, 2.2rem);
  }

  .surface-panel {
    padding: 14px;
  }

  .surface-panel h1 {
    font-size: clamp(1.6rem, 8vw, 2.4rem);
  }

  .flow-modal,
  .context-drawer {
    padding: 18px 14px 24px;
    max-height: 96dvh;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }

  .plan-card {
    flex: 0 0 88%;
  }
}
