/* ═══════════════════════════════════════════════════
   PRIME DASH — Dark SaaS Premium · Dashboard v2
   Auth styles preserved below (do not edit above line)
═══════════════════════════════════════════════════ */
:root {
  /* Canvas */
  --bg:          #070a14;
  --bg-mid:      #0a0e1c;
  --surface:     #0e1220;
  --surface-2:   rgba(255,255,255,.04);
  --surface-3:   rgba(255,255,255,.07);

  /* Borders */
  --line:        rgba(255,255,255,.07);
  --line-mid:    rgba(255,255,255,.13);

  /* Text */
  --ink:         #edf2f8;
  --muted:       rgba(237,242,248,.48);
  --subtle:      rgba(237,242,248,.24);
  --dark:        #0a0e1c;

  /* Brand */
  --blue:        #3b82f6;
  --blue-dark:   #2563eb;
  --blue-soft:   rgba(59,130,246,.15);
  --violet:      #8b5cf6;
  --violet-soft: rgba(139,92,246,.15);
  --cyan:        #06b6d4;

  /* Status */
  --green:       #10b981;
  --green-soft:  rgba(16,185,129,.14);
  --amber:       #f59e0b;
  --amber-soft:  rgba(245,158,11,.14);
  --red:         #ef4444;
  --red-soft:    rgba(239,68,68,.14);

  /* Layout */
  --sidebar-w:   256px;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 24px 64px rgba(0,2,16,.6);
  --shadow-sm:   0 4px 20px rgba(0,2,16,.4);
  --transition:  .18s ease;
}

/* ── Reset & base ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Sora', ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }

svg { width: 18px; height: 18px; flex: 0 0 auto; }

/* ── Flash ──────────────────────────────────────── */
.flash-stack {
  position: fixed;
  top: 18px; left: 50%;
  z-index: 50;
  width: min(92vw, 440px);
  transform: translateX(-50%);
}

.flash {
  padding: 12px 16px;
  border: 1px solid var(--line-mid);
  border-radius: var(--radius-sm);
  background: rgba(14,18,32,.96);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  backdrop-filter: blur(12px);
  font-size: .84rem;
}

.flash-error {
  border-color: rgba(239,68,68,.3);
  background: rgba(239,68,68,.1);
  color: #fca5a5;
}

/* ── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font-weight: 600;
  font-size: .84rem;
  transition: transform var(--transition), box-shadow var(--transition),
              background var(--transition), border-color var(--transition),
              color var(--transition);
  white-space: nowrap;
}

.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
  box-shadow: 0 4px 16px rgba(59,130,246,.3);
}
.btn-primary:hover { box-shadow: 0 6px 22px rgba(59,130,246,.45); }

.btn-dark {
  background: var(--surface-3);
  border-color: var(--line);
  color: var(--ink);
}
.btn-dark:hover { background: rgba(255,255,255,.1); border-color: var(--line-mid); }

.btn-ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }

.btn-danger {
  border-color: rgba(239,68,68,.3);
  background: var(--red-soft);
  color: #fca5a5;
}
.btn-danger:hover { background: rgba(239,68,68,.2); border-color: rgba(239,68,68,.5); }

.btn-full { width: 100%; }

/* ── Eyebrow ────────────────────────────────────── */
.eyebrow {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ── Global label & input ───────────────────────── */
label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
}

.check-row { display: flex; align-items: center; gap: 9px; }
.check-row input { width: 18px; min-height: 18px; accent-color: var(--blue); }

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.05);
  color: var(--ink);
  padding: 0 12px;
  outline: none;
  font-size: .875rem;
  transition: border-color var(--transition), box-shadow var(--transition),
              background var(--transition);
}

input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
  background: rgba(59,130,246,.06);
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 17px,
    calc(100% - 13px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

input[type=date]::-webkit-calendar-picker-indicator {
  filter: invert(.7) opacity(.6);
  cursor: pointer;
}

/* ── App shell ──────────────────────────────────── */
.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
}

/* ── Sidebar ────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #090d1a;
  border-right: 1px solid var(--line);
  overflow: hidden;
  z-index: 30;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.app-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  box-shadow: 0 4px 14px rgba(59,130,246,.4);
  flex-shrink: 0;
  color: #fff;
}

.app-logo strong {
  display: block;
  font-size: .93rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.015em;
}

.app-logo small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: .7rem;
  overflow-wrap: anywhere;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 8px;
  flex: 1;
  overflow-y: auto;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 600;
  font-size: .84rem;
  padding: 10px 12px;
  transition: background var(--transition), color var(--transition);
  position: relative;
}

.side-nav a:hover {
  background: rgba(255,255,255,.05);
  color: var(--ink);
}

.side-nav a.active {
  background: var(--blue-soft);
  color: var(--blue);
}

.side-nav a.active::before {
  content: '';
  position: absolute;
  left: 0; top: 22%; height: 56%;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--blue);
}

.user-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 12px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.user-box span {
  display: block;
  font-size: .86rem;
  font-weight: 700;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.user-box small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: .72rem;
  overflow-wrap: anywhere;
}

/* ── Dashboard main ─────────────────────────────── */
.dashboard-main {
  display: grid;
  gap: 24px;
  min-width: 0;
  padding: 28px;
  align-content: start;
}

.tab-panel { display: none; gap: 24px; min-width: 0; }
.tab-panel.active { display: grid; }

/* ── Topbar ─────────────────────────────────────── */
.topbar {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.35rem, 2.1vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -.025em;
  color: var(--ink);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.section-header h1 {
  margin: 0;
  font-size: clamp(1.35rem, 2.1vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -.025em;
}

/* ── Date filter & chips ────────────────────────── */
.date-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.chip {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: var(--muted);
  padding: 0 14px;
  font-weight: 600;
  font-size: .79rem;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition);
}

.chip:hover {
  background: rgba(255,255,255,.07);
  color: var(--ink);
  border-color: var(--line-mid);
}

.chip.active {
  background: var(--blue-soft);
  border-color: rgba(59,130,246,.35);
  color: var(--blue);
}

.refresh-btn { min-height: 34px; }

.custom-range {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.03);
}

.custom-range label,
.date-picker { min-width: 148px; }

.custom-range input,
.date-picker input { min-height: 34px; }

/* ── KPI grid ───────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

/* ── Metric cards ───────────────────────────────── */
.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.035);
  box-shadow: 0 4px 24px rgba(0,0,0,.22);
}

.metric-card {
  position: relative;
  min-height: 128px;
  padding: 18px;
  backdrop-filter: blur(6px);
  overflow: hidden;
  animation: cardIn .55s ease both;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

/* Shimmer top border */
.metric-card::before {
  content: '';
  position: absolute;
  top: 0; left: 16px; right: 16px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.1), transparent);
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-mid);
  box-shadow: 0 10px 36px rgba(0,0,0,.35);
}

/* Staggered entrance */
.kpi-grid .metric-card:nth-child(1) { animation-delay: .04s; }
.kpi-grid .metric-card:nth-child(2) { animation-delay: .08s; }
.kpi-grid .metric-card:nth-child(3) { animation-delay: .12s; }
.kpi-grid .metric-card:nth-child(4) { animation-delay: .16s; }
.kpi-grid .metric-card:nth-child(5) { animation-delay: .20s; }
.kpi-grid .metric-card:nth-child(6) { animation-delay: .24s; }
.kpi-grid .metric-card:nth-child(7) { animation-delay: .28s; }
.kpi-grid .metric-card:nth-child(8) { animation-delay: .32s; }
.kpi-grid .metric-card:nth-child(9) { animation-delay: .36s; }

.metric-label {
  display: block;
  color: var(--muted);
  font-size: .71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.metric-card strong {
  display: block;
  margin: 11px 0 6px;
  color: var(--ink);
  font-family: 'Fira Code', 'Roboto Mono', monospace;
  font-size: 1.44rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}

.metric-card small {
  display: block;
  color: var(--muted);
  font-size: .73rem;
}

.metric-card small + small { margin-top: 2px; }

/* Profit accent card */
.accent-profit {
  background: linear-gradient(148deg,
    rgba(59,130,246,.12) 0%,
    rgba(139,92,246,.09) 100%);
  border-color: rgba(59,130,246,.22);
}

.accent-profit::before {
  background: linear-gradient(90deg, transparent, rgba(59,130,246,.28), transparent);
}

.accent-profit strong { color: #93c5fd; }

/* ── Skeleton / loading ─────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.kpi-grid.loading .metric-card strong {
  color: transparent !important;
  border-radius: 6px;
  height: 1.55rem;
  display: block;
  margin: 11px 0 6px;
  background: linear-gradient(90deg,
    rgba(255,255,255,.04) 25%,
    rgba(255,255,255,.09) 50%,
    rgba(255,255,255,.04) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.6s infinite linear;
}

.kpi-grid.loading .metric-card small { color: transparent !important; }

/* ── Panels ─────────────────────────────────────── */
.panel {
  min-width: 0;
  padding: 20px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.01em;
}

.panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.5;
}

/* ── Content grids ──────────────────────────────── */
.daily-grid,
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 16px;
}

.settings-grid {
  align-items: start;
}

.daily-grid {
  align-items: stretch;
}

.daily-grid > .panel {
  height: 100%;
}

.insights-panel {
  display: flex;
  flex-direction: column;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.chart-wide { grid-column: 1 / -1; }

/* ── Chart containers ───────────────────────────── */
.chart-wrap {
  position: relative;
  height: 300px;
  min-height: 240px;
}

.chart-wrap.compact { height: 260px; }

/* ── Forms ──────────────────────────────────────── */
.auth-form,
.account-form,
.fees-form,
.entry-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.entry-opt-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Entry card ─────────────────────────────────── */
.daily-entry-panel {
  position: relative;
  overflow: visible;
}

.entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px auto;
  align-items: end;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.entry-field-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.entry-field-label {
  font-size: .67rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  min-height: 14px;
  display: block;
}

.entry-field-input-row {
  display: flex;
  align-items: stretch;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.04);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.entry-field-input-row:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(59,130,246,.13);
}

.entry-currency {
  display: flex;
  align-items: center;
  padding: 0 9px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--subtle);
  background: rgba(255,255,255,.03);
  border-right: 1px solid rgba(255,255,255,.08);
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
  font-family: 'Fira Code', monospace;
}

.entry-field-input-row input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  outline: none;
  padding: 0 10px;
  min-height: 36px;
  font-size: .88rem;
  font-weight: 600;
  font-family: 'Fira Code', monospace;
  color: var(--ink);
  letter-spacing: -.01em;
}

.entry-field-input-row input:focus {
  border: none;
  box-shadow: none;
  background: transparent;
}

.entry-field-input-row input[type=number]::-webkit-inner-spin-button,
.entry-field-input-row input[type=number]::-webkit-outer-spin-button,
.spend-input::-webkit-inner-spin-button,
.spend-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.entry-field-input-row input[type=number],
.spend-input[type=number] {
  -moz-appearance: textfield;
}

/* Spend zone */
.spend-zone {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.spend-zone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.spend-zone-header span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .71rem;
  font-weight: 700;
  color: var(--subtle);
  text-transform: uppercase;
  letter-spacing: .07em;
}

.spend-zone-header svg {
  width: 12px; height: 12px;
  opacity: .7;
}

.account-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  margin-bottom: 14px;
}

.fees-form {
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: end;
}

/* ── Spend / account rows ───────────────────────── */
.spend-list,
.account-table,
.insight-list { display: grid; gap: 8px; }

.spend-row,
.account-row,
.insight-item {
  display: grid;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.025);
  padding: 12px 14px;
  transition: border-color var(--transition), background var(--transition);
}

.spend-row:hover,
.account-row:hover {
  border-color: var(--line-mid);
  background: rgba(255,255,255,.04);
}

.spend-row   { grid-template-columns: minmax(0, 1fr) 148px; padding: 10px 12px; }
.account-row { grid-template-columns: minmax(0, 1fr) auto; }

.account-row strong,
.spend-row strong {
  display: block;
  color: var(--ink);
  font-size: .88rem;
  overflow-wrap: anywhere;
}

.account-row small,
.spend-row small,
.insight-item small {
  display: block;
  color: var(--muted);
  font-size: .73rem;
  margin-top: 2px;
}

/* Spend row field — R$ prefix + input */
.spend-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.spend-input-label {
  font-size: .66rem;
  font-weight: 700;
  color: var(--subtle);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.spend-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.spend-currency {
  position: absolute;
  left: 9px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
  pointer-events: none;
  z-index: 1;
  line-height: 1;
}

.spend-input-wrap .spend-input {
  width: 130px;
  min-height: 34px;
  padding: 0 9px 0 30px;
  font-size: .87rem;
  font-weight: 600;
  text-align: right;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.09);
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.spend-input-wrap .spend-input:focus {
  border-color: var(--blue);
  background: rgba(59,130,246,.04);
  box-shadow: 0 0 0 2px rgba(59,130,246,.12);
  outline: none;
}

/* ── Formula box ────────────────────────────────── */
.formula-box {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.025);
  padding: 16px;
}

.formula-box strong { font-size: 1rem; color: var(--ink); }
.formula-box span   { color: var(--muted); line-height: 1.55; font-size: .875rem; }

/* ── Insight items ──────────────────────────────── */
.insight-item { grid-template-columns: 10px minmax(0, 1fr); }

.insight-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted);
}

.insight-good .insight-dot { background: var(--green); }
.insight-warn .insight-dot { background: var(--amber); }
.insight-bad  .insight-dot { background: var(--red);   }

.insight-item strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: .88rem;
}

.insight-item + .insight-item {
  margin-top: 0;
}

/* ── Empty states ───────────────────────────────── */
.empty-state {
  display: none;
  margin: 0;
  border: 1px dashed rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  color: var(--muted);
  padding: 24px 16px;
  text-align: center;
  font-size: .84rem;
  line-height: 1.6;
}

.empty-state.visible { display: block; }

/* ── Admin ──────────────────────────────────────── */
.admin-shell {
  display: grid;
  gap: 24px;
  min-height: 100vh;
  padding: 28px;
  align-content: start;
}

.admin-top,
.admin-actions,
.admin-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.admin-top h1 {
  margin: 0;
  font-size: clamp(1.35rem, 2.1vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -.025em;
}

.admin-top p { margin: 5px 0 0; color: var(--muted); font-size: .84rem; }
.admin-filter { justify-content: flex-start; }

.admin-table-wrap { overflow-x: auto; }

.admin-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 700;
}

.admin-table td strong,
.admin-table td span { display: block; color: var(--ink); }
.admin-table td small { display: block; margin-top: 3px; color: var(--muted); font-size: .76rem; }

.profit-good { color: var(--green); font-weight: 700; }
.profit-bad  { color: var(--red);   font-weight: 700; }

/* ── Toast ──────────────────────────────────────── */
.toast {
  position: fixed;
  right: 20px; bottom: 24px;
  z-index: 50;
  max-width: min(92vw, 340px);
  border-radius: var(--radius-sm);
  background: rgba(14,18,32,.97);
  border: 1px solid var(--line-mid);
  color: var(--ink);
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
  font-size: .84rem;
  font-weight: 500;
}

.toast.visible { opacity: 1; transform: translateY(0); }

/* ── Keyframes ──────────────────────────────────── */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 1040px) {
  .app-shell { grid-template-columns: 1fr; }

  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .app-logo {
    padding: 0;
    border-bottom: none;
    flex: 0 0 auto;
  }

  .side-nav {
    flex-direction: row;
    flex-wrap: wrap;
    flex: 1 1 auto;
    padding: 0;
    gap: 4px;
  }

  .side-nav a {
    font-size: .78rem;
    padding: 7px 11px;
  }

  .side-nav a.active::before { display: none; }

  .user-box {
    border-top: none;
    padding: 0;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex: 0 0 auto;
  }

  .user-box span,
  .user-box small { display: none; }

  .content-grid,
  .daily-grid,
  .settings-grid { grid-template-columns: 1fr; }

  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chart-wide { grid-column: auto; }
}

@media (max-width: 720px) {
  .dashboard-main,
  .admin-shell { padding: 16px; }

  .kpi-grid { grid-template-columns: 1fr 1fr; }

  .spend-row,
  .fees-form,
  .account-form,
  .account-row { grid-template-columns: 1fr; }

  .entry-row { grid-template-columns: 1fr 1fr; }
  .entry-row .entry-field-wrap:last-child { grid-column: 1 / -1; }
  .entry-row .btn { width: 100%; }

  .custom-range,
  .date-filter,
  .custom-range label { width: 100%; }

  .entry-filters { width: 100%; }
  .entry-filters .filter-pill { width: 100%; justify-content: space-between; }

  .spend-input-wrap .spend-input { width: 100%; }
  .spend-field { align-items: stretch; }

  .chip,
  .refresh-btn,
  .custom-range .btn,
  .fees-form .btn,
  .account-form .btn { width: 100%; }
}

@media (max-width: 460px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .chart-wrap,
  .chart-wrap.compact { height: 240px; }
}

/* ── Premium topbar & filter dropdowns ────────────────────── */
.topbar-left { flex-shrink: 0; }

.topbar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.filter-pill-wrap { position: relative; }

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-mid);
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  color: var(--ink);
  font-size: .81rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition),
              box-shadow var(--transition);
}

.filter-pill:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.18);
}

.filter-pill[aria-expanded="true"] {
  border-color: rgba(59,130,246,.5);
  background: var(--blue-soft);
  box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}

.filter-pill > svg:first-child { color: var(--muted); }
.filter-pill[aria-expanded="true"] > svg:first-child { color: var(--blue); }

.filter-pill-label { color: var(--muted); font-weight: 500; }
.filter-pill-sep   { color: var(--subtle); font-weight: 400; }
.filter-pill-value { color: var(--ink); font-weight: 700; }

.filter-pill-arrow {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: var(--muted);
  transition: transform var(--transition), color var(--transition);
  margin-left: 2px;
}

.filter-pill[aria-expanded="true"] .filter-pill-arrow {
  transform: rotate(180deg);
  color: var(--blue);
}

/* Dropdown panel */
.filter-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 200;
  min-width: 224px;
  background: rgba(10,14,26,.97);
  border: 1px solid var(--line-mid);
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.04);
  padding: 6px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  transform: translateY(-6px) scale(.98);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  transform-origin: top left;
}

.filter-dropdown.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.filter-dropdown-right {
  left: auto;
  right: 0;
  transform-origin: top right;
}

/* Chips inside dropdown — override pill shape */
.filter-dropdown .chip {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: .83rem;
  font-weight: 500;
  justify-content: flex-start;
  min-height: unset;
  transition: background .14s, color .14s;
}

.filter-dropdown .chip:hover {
  background: rgba(255,255,255,.06);
  color: var(--ink);
  border-color: transparent;
  transform: none;
}

.filter-dropdown .chip.active {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
  border-color: transparent;
}

/* Dropdown option (platform) */
.dropdown-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: .83rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .14s, color .14s;
}

.dropdown-option:not([disabled]):hover {
  background: rgba(255,255,255,.06);
  color: var(--ink);
}

.dropdown-option.active {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
}

.dropdown-option[disabled] {
  cursor: not-allowed;
  opacity: .45;
}

.badge-soon {
  font-size: .61rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(139,92,246,.18);
  color: var(--violet);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.dropdown-divider {
  height: 1px;
  background: var(--line);
  margin: 6px 4px;
}

/* Custom date inside period dropdown */
.custom-date-section {
  padding: 4px 2px 2px;
}

.custom-date-label {
  font-size: .62rem;
  font-weight: 700;
  color: var(--subtle);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 0 4px 5px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.custom-date-label svg { width: 11px; height: 11px; flex-shrink: 0; }

.custom-date-row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 2px;
}

.custom-date-row input {
  flex: 1;
  min-height: 30px;
  max-height: 30px;
  padding: 0 8px;
  font-size: .78rem;
  border-radius: 7px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  min-width: 0;
}

.custom-date-row input:focus {
  border-color: rgba(59,130,246,.5);
  box-shadow: 0 0 0 2px rgba(59,130,246,.12);
}

.custom-date-row .btn-apply-date {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 11px;
  font-size: .75rem;
  font-weight: 700;
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
  border: none;
  white-space: nowrap;
  transition: background var(--transition), box-shadow var(--transition);
  cursor: pointer;
}

.custom-date-row .btn-apply-date:hover {
  background: var(--blue-dark);
  box-shadow: 0 2px 10px rgba(59,130,246,.35);
}

.btn-xs {
  min-height: 34px;
  padding: 0 12px;
  font-size: .79rem;
  white-space: nowrap;
}

/* Refresh pill */
.refresh-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: .81rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition), transform var(--transition);
}

.refresh-pill:hover {
  background: rgba(255,255,255,.08);
  border-color: var(--line-mid);
  color: var(--ink);
  transform: translateY(-1px);
}

.refresh-pill:active { transform: none; }
.refresh-pill:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

.refresh-icon { transition: none; }

.refresh-pill.spinning .refresh-icon {
  animation: refreshSpin .65s cubic-bezier(.4, 0, .2, 1);
}

@keyframes refreshSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Metric card header with icon ─────────────────────────── */
.metric-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.metric-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  color: var(--muted);
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}

.metric-icon-wrap svg {
  width: 14px;
  height: 14px;
}

.metric-card:hover .metric-icon-wrap {
  background: var(--blue-soft);
  color: var(--blue);
}

.accent-profit .metric-icon-wrap {
  background: rgba(59,130,246,.15);
  color: #93c5fd;
}

.metric-card-header + strong { margin-top: 8px; }

/* ── Topbar responsive ────────────────────────────────────── */
@media (max-width: 1040px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .topbar-controls { width: 100%; }
}

@media (max-width: 720px) {
  .topbar-controls { gap: 6px; }

  .filter-pill,
  .refresh-pill { height: 34px; font-size: .78rem; }

  .filter-dropdown {
    min-width: unset;
    width: max-content;
    max-width: calc(100vw - 32px);
  }

  .filter-dropdown-right {
    left: 0;
    right: auto;
    transform-origin: top left;
  }
}

/* ═══════════════════════════════════════════════════════════
   AUTH SPLIT — Prime Dash · login & cadastro redesign
   Estilos isolados: não afetam dashboard nem admin
   ═══════════════════════════════════════════════════════════ */

body.auth-split-page {
  background: #050329;
  padding: 0;
  margin: 0;
  overflow-x: hidden;
  font-family: 'Sora', ui-sans-serif, system-ui, sans-serif;
}

/* Flash override para tema escuro */
body.auth-split-page .flash-stack { top: 14px; }
body.auth-split-page .flash {
  background: rgba(15,17,23,.96);
  border-color: rgba(255,255,255,.12);
  color: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
}
body.auth-split-page .flash-error {
  background: rgba(239,68,68,.12);
  border-color: rgba(239,68,68,.28);
  color: #fca5a5;
}

/* ── Layout ─────────────────────────────────────────────── */
.auth-split {
  display: flex;
  width: 100vw;
  min-height: 100vh;
  background: #050329;
}

/* ── LEFT PANEL ─────────────────────────────────────────── */
.auth-left {
  flex: 0 0 50vw;
  min-width: 560px;
  background: #073bc7;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(2.4rem, 5vw, 5.5rem);
}

.auth-left::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(circle at 74% 44%, rgba(56,189,248,.2), transparent 28%),
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.13), transparent 24%),
    linear-gradient(145deg, #08145f 0%, #0d3bb9 54%, #0759d8 100%);
}

.auth-left-grid {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 48px 48px;
}

.auth-left-glow {
  position: absolute; width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, rgba(15,23,42,.2) 0%, transparent 66%);
  top: -140px; left: -120px; pointer-events: none; z-index: 0;
}

.auth-left-glow2 {
  position: absolute; width: 440px; height: 440px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.14) 0%, transparent 66%);
  bottom: -130px; right: -110px; pointer-events: none; z-index: 0;
}

.auth-left-inner {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  max-width: 560px;
  transform: translateY(18px);
}

/* Brand */
.auth-left-brand {
  display: none; align-items: center; gap: .75rem;
  margin-bottom: 2rem;
  animation: aSplitUp .6s ease both;
}

.auth-left-brand-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg,#2563eb,#1d4ed8);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(37,99,235,.45);
}

.auth-left-brand-icon svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.auth-left-brand-name {
  font-size: 1.05rem; font-weight: 800; color: #fff;
  letter-spacing: -.02em; font-family: 'Sora', sans-serif;
}

/* Tagline */
.auth-left-tagline {
  display: none;
  margin-bottom: 1.75rem;
  animation: aSplitUp .6s .08s ease both;
}

.auth-left-tagline h2 {
  font-family: 'Sora', sans-serif; font-size: 1.8rem; font-weight: 800;
  color: #fff; line-height: 1.2; letter-spacing: -.03em; margin: 0 0 .5rem;
}

.auth-left-tagline p { font-size: .83rem; color: rgba(255,255,255,.38); margin: 0; line-height: 1.65; }

/* Metric cards */
.auth-metrics-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: .7rem;
  margin-bottom: .7rem;
  animation: aSplitUp .6s .16s ease both;
}

.auth-metric-card {
  min-height: 72px;
  background: rgba(7, 31, 103, .42);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px; padding: .8rem .9rem;
  box-shadow: 0 18px 44px rgba(3, 7, 18, .13);
  transition: transform .2s, border-color .2s;
}

.auth-metric-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.3); }

.auth-metric-lbl {
  display: block; font-size: .58rem; font-weight: 700;
  color: rgba(255,255,255,.58); text-transform: uppercase; letter-spacing: .07em; margin-bottom: .35rem;
}

.auth-metric-val {
  display: block; font-family: 'Fira Code', monospace; font-size: 1rem;
  font-weight: 600; color: #fff; margin-bottom: .28rem; letter-spacing: -.01em;
}

.auth-metric-badge {
  font-size: .66rem; font-weight: 700; padding: .15rem .42rem; border-radius: 99px;
  display: inline-flex; align-items: center; gap: .18rem;
}
.auth-metric-badge.up   { background: rgba(56,189,248,.16); color: #bae6fd; }
.auth-metric-badge.down { background: rgba(239,68,68,.12);   color: #f87171; }
.auth-metric-badge.neu  { background: rgba(255,255,255,.07); color: rgba(255,255,255,.4); }

/* Chart card */
.auth-chart-card {
  background: rgba(7, 31, 103, .34);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px; padding: .9rem 1rem;
  margin-bottom: .7rem;
  box-shadow: 0 18px 44px rgba(3, 7, 18, .12);
  animation: aSplitUp .6s .24s ease both;
}

.auth-chart-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: .6rem;
}

.auth-chart-head-title {
  font-size: .64rem; font-weight: 700; color: rgba(255,255,255,.64);
  text-transform: uppercase; letter-spacing: .07em;
}

.auth-chart-head-tag {
  font-size: .62rem; color: rgba(255,255,255,.56);
  background: rgba(255,255,255,.09); padding: .12rem .45rem; border-radius: 99px;
}

/* SVG area chart */
.auth-area-svg { width: 100%; height: 88px; overflow: visible; }
.auth-area-line {
  stroke-dasharray: 480; stroke-dashoffset: 480;
  animation: aDrawLine 1.8s .5s ease forwards;
}

/* Mini bars */
.auth-bars-row {
  display: flex; align-items: flex-end; gap: 3px; height: 44px; margin-top: .5rem;
}
.auth-bar-col {
  display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1;
}
.auth-bar {
  width: 100%; border-radius: 3px 3px 0 0;
  transform: scaleY(0); transform-origin: bottom;
  animation: aBarGrow .7s var(--d,0s) cubic-bezier(.34,1.56,.64,1) forwards;
}
.auth-bar-col span { font-size: .58rem; color: rgba(255,255,255,.18); }

/* Donut row */
.auth-donut-row {
  display: flex; align-items: center; gap: 1.2rem;
  background: rgba(7, 31, 103, .28);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 8px;
  padding: .85rem 1rem;
  box-shadow: 0 18px 44px rgba(3, 7, 18, .1);
  animation: aSplitUp .6s .32s ease both;
}
.auth-donut-svg { flex-shrink: 0; }
.auth-donut-seg1 { animation: aDonut1 1.2s .8s cubic-bezier(.34,1.56,.64,1) forwards; }
.auth-donut-seg2 { animation: aDonut2 1s  1s  cubic-bezier(.34,1.56,.64,1) forwards; }
.auth-donut-seg3 { animation: aDonut3 .8s 1.2s cubic-bezier(.34,1.56,.64,1) forwards; }

.auth-donut-legend { display: flex; flex-direction: column; gap: .45rem; }
.auth-donut-item {
  display: flex; align-items: center; gap: .45rem;
  font-size: .72rem; color: rgba(255,255,255,.4);
}
.auth-donut-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* Social proof */
.auth-social-row {
  display: none; align-items: center; gap: .7rem;
  font-size: .75rem; color: rgba(255,255,255,.28);
  margin-top: .85rem;
  animation: aSplitUp .6s .4s ease both;
}
.auth-avatars { display: flex; }
.auth-avatar {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid #08090e;
  margin-left: -5px; display: flex; align-items: center; justify-content: center;
  font-size: .58rem; font-weight: 800; color: #fff;
}
.auth-avatar:first-child { margin-left: 0; }

/* ── RIGHT PANEL ─────────────────────────────────────────── */
.auth-right {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  background: #050329;
  box-shadow: -1px 0 0 rgba(255,255,255,.04);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(3rem, 7vw, 7rem);
  overflow-y: auto;
}

.auth-right-inner {
  position: relative;
  z-index: 1;
  width: min(100%, 620px);
  max-width: 620px;
  margin: 0;
  animation: aSplitUp .5s .12s ease both;
}

/* Form brand */
.auth-form-logo {
  display: flex; align-items: center; gap: .65rem; margin-bottom: clamp(3rem, 8vh, 5.2rem);
}
.auth-form-logo-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg,#2563eb,#1d4ed8);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(37,99,235,.35);
}
.auth-form-logo-icon svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.auth-form-logo-name { font-family: 'Sora',sans-serif; font-size: 1.08rem; font-weight: 800; color: rgba(255,255,255,.94); letter-spacing: -.01em; }

/* Heading */
.auth-form-heading { margin-bottom: 1.8rem; }
.auth-form-heading h1 {
  font-family: 'Sora',sans-serif; font-size: 1.48rem; font-weight: 800;
  color: #fff; margin: 0 0 .3rem; letter-spacing: -.025em;
}
.auth-form-heading p { font-size: .84rem; color: rgba(255,255,255,.72); margin: 0; }

/* Field */
.auth-split .auth-field { margin-bottom: .95rem; }
.auth-split .auth-field > label,
.auth-split label.auth-field-label {
  display: block; font-size: .72rem; font-weight: 700;
  color: rgba(255,255,255,.58); letter-spacing: .05em;
  text-transform: uppercase; margin-bottom: .38rem; gap: 0;
}

.auth-iw { position: relative; }
.auth-iw input {
  width: 100%; min-height: 50px;
  background: #f8fafc; border: 1px solid rgba(255,255,255,.9);
  border-radius: 999px; color: #0f172a; padding: 0 3rem 0 1rem;
  font-size: .875rem; outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.auth-iw input:focus {
  border-color: #60a5fa;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37,99,235,.22);
}
.auth-iw input.err  { border-color: rgba(239,68,68,.55); box-shadow: 0 0 0 3px rgba(239,68,68,.1); }
.auth-iw input.ok   { border-color: rgba(56,189,248,.7); }

/* No eye icon = less right padding */
.auth-iw input.no-eye { padding-right: 1rem; }

.auth-eye-btn {
  position: absolute; right: .6rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: rgba(15,23,42,.48);
  cursor: pointer; display: flex; padding: .2rem; border-radius: 5px;
  transition: color .15s;
}
.auth-eye-btn:hover { color: rgba(15,23,42,.75); }
.auth-eye-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

.auth-field-err { font-size: .7rem; color: #f87171; margin-top: .3rem; display: none; }
.auth-field-err.show { display: block; }

/* Strength bars */
.auth-strength { margin-top: .5rem; }
.auth-strength-bars { display: flex; gap: 3px; margin-bottom: .28rem; }
.auth-strength-bar {
  height: 3px; flex: 1; border-radius: 99px;
  background: rgba(255,255,255,.08); transition: background .3s;
}
.auth-strength-lbl { font-size: .68rem; font-weight: 700; color: rgba(255,255,255,.28); }

/* Checklist */
.auth-checks {
  display: grid; grid-template-columns: 1fr 1fr; gap: .28rem .5rem;
  margin-top: .6rem; padding: .7rem .85rem;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); border-radius: 8px;
}
.auth-check-row {
  display: flex; align-items: center; gap: .38rem;
  font-size: .7rem; color: rgba(255,255,255,.28); transition: color .2s;
}
.auth-check-row.met { color: #67e8f9; }
.auth-check-row .dot {
  width: 13px; height: 13px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.14); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.auth-check-row.met .dot { background: #0891b2; border-color: #38bdf8; }
.auth-check-row .dot svg { width: 7px; height: 7px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; display: none; }
.auth-check-row.met .dot svg { display: block; }

/* Remember */
.auth-remember-row {
  display: flex; align-items: center; gap: .5rem;
  font-size: .78rem; color: rgba(255,255,255,.32);
  margin-bottom: 1.2rem; cursor: pointer;
}
.auth-remember-row input[type=checkbox] {
  min-height: auto; width: 15px; height: 15px;
  accent-color: #2563eb; cursor: pointer; padding: 0;
}

/* Submit button */
.auth-submit-btn {
  width: 100%; min-height: 50px; border-radius: 999px;
  background: linear-gradient(135deg,#0b73ff,#3156ff); border: none;
  color: #fff; font-size: .9rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  box-shadow: 0 14px 30px rgba(37,99,235,.28);
  transition: transform .15s, box-shadow .15s; font-family: inherit;
  letter-spacing: .01em; margin-top: .2rem;
}
.auth-submit-btn:hover { transform: translateY(-1px); box-shadow: 0 18px 36px rgba(37,99,235,.36); }
.auth-submit-btn:active { transform: none; }
.auth-submit-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.auth-submit-btn .spin {
  width: 16px; height: 16px; border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: #fff; border-radius: 50%;
  animation: aSpin .7s linear infinite; display: none;
}
.auth-submit-btn.loading .spin { display: block; }
.auth-submit-btn.loading .btn-lbl { opacity: .7; }

/* Switch link */
.auth-switch-lnk { text-align: left; font-size: .78rem; color: rgba(255,255,255,.72); margin-top: 1.05rem; }
.auth-switch-lnk a { color: #67e8f9; font-weight: 800; text-decoration: none; }
.auth-switch-lnk a:hover { color: #a5f3fc; }

.auth-right-extra {
  position: relative;
  z-index: 1;
  display: grid;
  gap: .85rem;
  width: 100%;
  max-width: 320px;
  animation: aSplitUp .5s .22s ease both;
}

.auth-extra-card {
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
  padding: 1rem;
}

.auth-extra-card strong {
  display: block;
  color: rgba(255,255,255,.88);
  font-size: .84rem;
  margin-bottom: .28rem;
}

.auth-extra-card span {
  display: block;
  color: rgba(255,255,255,.34);
  font-size: .74rem;
  line-height: 1.45;
}

.auth-extra-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
}

.auth-extra-mini .auth-extra-card {
  min-height: 86px;
}

.auth-extra-number {
  display: block;
  color: #fff;
  font-family: 'Fira Code', monospace;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: .25rem;
}

/* ── Keyframes ───────────────────────────────────────────── */
@keyframes aSplitUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes aDrawLine {
  to { stroke-dashoffset: 0; }
}
@keyframes aBarGrow {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}
@keyframes aDonut1 {
  from { stroke-dasharray: 0 282.7; }
  to   { stroke-dasharray: 169.6 282.7; }
}
@keyframes aDonut2 {
  from { stroke-dasharray: 0 282.7; }
  to   { stroke-dasharray: 70.7 282.7; }
}
@keyframes aDonut3 {
  from { stroke-dasharray: 0 282.7; }
  to   { stroke-dasharray: 42.4 282.7; }
}
@keyframes aSpin { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1023px) {
  .auth-split  { flex-direction: column; }
  .auth-left   { display: none; }
  .auth-right  {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    background: #050329;
    box-shadow: none;
    padding: 2.5rem 1.5rem;
  }
  .auth-right-inner { max-width: 420px; }
}

@media (min-width: 1024px) and (max-width: 1360px) {
  .auth-right {
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .auth-right {
    min-width: 0;
    padding: 2rem 1.25rem;
  }
}

/* ═══════════════════════════════════════════
   PLATFORM — Selector & Badges
═══════════════════════════════════════════ */

/* Seletor de plataforma no formulário */
.platform-selector {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.platform-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  color: var(--muted);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform .15s;
  font-family: inherit;
}

.platform-card:hover {
  border-color: var(--line-mid);
  background: rgba(255,255,255,.05);
  transform: translateY(-2px);
}

.platform-card--active {
  border-color: var(--blue);
  background: rgba(59,130,246,.08);
  color: var(--ink);
}

/* Ícones dentro do seletor */
.platform-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

.platform-icon img {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
}

.platform-icon--kwai     { background: rgba(255,80,20,.14);  }
.platform-icon--facebook { background: rgba(24,119,242,.13); }
.platform-icon--tiktok   { background: rgba(254,44,85,.10);  }
.platform-icon--google   { background: rgba(66,133,244,.11); }

.platform-card--active .platform-icon--kwai     { background: rgba(255,80,20,.28);  }
.platform-card--active .platform-icon--facebook { background: rgba(24,119,242,.28); }
.platform-card--active .platform-icon--tiktok   { background: rgba(254,44,85,.25);  }
.platform-card--active .platform-icon--google   { background: rgba(66,133,244,.25); }

.platform-icon--kwai img,
.platform-icon--facebook img {
  width: 26px;
  height: 26px;
}

.platform-icon--google img {
  width: 27px;
  height: 27px;
}

.platform-label {
  font-size: .69rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: .01em;
}

/* Badge de plataforma na lista de contas */
.account-row-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.spend-row-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.platform-badge {
  width: 26px !important;
  min-width: 26px !important;
  max-width: 26px !important;
  height: 26px !important;
  min-height: 26px !important;
  max-height: 26px !important;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0 !important;
  overflow: hidden !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

.platform-badge img {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  display: block !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
}

.platform-badge--kwai     { background: rgba(255,80,20,.14);  }
.platform-badge--facebook { background: rgba(24,119,242,.13); }
.platform-badge--tiktok   { background: rgba(254,44,85,.10);  }
.platform-badge--google   { background: rgba(66,133,244,.11); }

.platform-badge--kwai img,
.platform-badge--facebook img {
  width: 19px;
  height: 19px;
}

.platform-badge--google img {
  width: 20px;
  height: 20px;
}

@media (max-width: 600px) {
  .platform-selector { grid-template-columns: repeat(2, 1fr); }
  .platform-label    { font-size: .65rem; }
}
