:root {
  --bg-primary:    #0f1117;
  --bg-surface:    #1a1d27;
  --bg-surface-2:  #222536;
  --bg-border:     #2a2d3a;
  --text-primary:  #ffffff;
  --text-muted:    #64748b;
  --accent-green:  #22c55e;
  --accent-blue:   #3b82f6;
  --accent-red:    #ef4444;
  --accent-yellow: #f59e0b;
  --accent-gray:   #6b7280;
  --sidebar-width: 272px;
  --radius:        8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Remove spinners de inputs numéricos em todos os browsers */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 18px;
}

a { color: var(--accent-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── App Layout ── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--bg-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.25s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem;
  text-decoration: none;
}

.sidebar-brand:hover { text-decoration: none; }

.brand-logo {
  width: 34px;
  height: 34px;
  background: var(--accent-blue);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-section-label {
  padding: 1.25rem 1.25rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.sidebar-nav {
  flex: 1;
  padding: 0.5rem 0.75rem;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  color: rgba(255,255,255,0.7);
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: var(--radius);
  margin-bottom: 2px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.sidebar-nav a:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}

.sidebar-nav a.active {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.25);
  font-weight: 600;
}

.sidebar-nav a svg { flex-shrink: 0; opacity: 0.7; }
.sidebar-nav a.active svg,
.sidebar-nav a:hover svg { opacity: 1; }

.sidebar-divider {
  height: 1px;
  background: var(--bg-border);
  margin: 0.5rem 0.75rem;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--bg-border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.25rem;
  margin-bottom: 0.75rem;
  min-width: 0;
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--accent-blue);
  flex-shrink: 0;
  text-transform: uppercase;
}

.sidebar-user-info { min-width: 0; }

.sidebar-user-info .u-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-info .u-role {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ── Sidebar bankroll mini ── */
.sidebar-bankroll {
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin: 0 0.75rem 0.5rem;
  text-decoration: none;
  display: block;
  transition: border-color 0.15s;
}

.sidebar-bankroll:hover {
  border-color: var(--accent-blue);
  text-decoration: none;
}

.sidebar-bankroll .sb-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.2rem;
}

.sidebar-bankroll .sb-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ── Mobile toggle ── */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 200;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

/* ── Main content ── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 2rem;
  min-width: 0;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -2rem;
  margin-left: -2rem;
  margin-right: -2rem;
  padding: 1.25rem 2rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.page-title {
  font-size: 1.4rem;
  font-weight: 700;
}

/* ── Auth Pages ── */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}

.auth-card h1 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.auth-card .subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

/* ── Forms ── */
.form-group { margin-bottom: 1.2rem; }

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s;
  outline: none;
}

.form-control:focus { border-color: var(--accent-blue); }
.form-control option { background: var(--bg-surface-2); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
}

.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary  { background: var(--accent-blue); color: #fff; }
.btn-danger   { background: var(--accent-red);  color: #fff; }
.btn-ghost    { background: transparent; color: var(--text-muted); border: 1px solid var(--bg-border); }
.btn-sm       { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-block    { width: 100%; }
.btn:hover:not(:disabled) { opacity: 0.85; }

/* ── Stats Cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
}

.stat-card .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.stat-card .value {
  font-size: 1.6rem;
  font-weight: 700;
}

.stat-card .value.positive { color: var(--accent-green); }
.stat-card .value.negative { color: var(--accent-red); }
.stat-card .value.neutral  { color: var(--text-primary); }

/* ── Bankroll Card ── */
.bankroll-hero {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
}

.bankroll-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.75rem;
}

.bankroll-hero-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.bankroll-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.12);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bankroll-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.bankroll-stat {
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}

.bankroll-stat.highlight {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.06);
}

.bankroll-stat .b-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.bankroll-stat .b-value {
  font-size: 1.4rem;
  font-weight: 700;
}

/* ── Empty State Card ── */
.empty-hero {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-surface);
  border: 1px dashed var(--bg-border);
  border-radius: var(--radius);
}

.empty-hero .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.empty-hero h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.empty-hero p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Table ── */
.table-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--bg-border);
}

.table-header h2 {
  font-size: 0.95rem;
  font-weight: 600;
}

table { width: 100%; border-collapse: collapse; }

thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--bg-border);
}

tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--bg-border);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-surface-2); }

.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-green  { background: rgba(34,197,94,0.15);  color: var(--accent-green); }
.badge-red    { background: rgba(239,68,68,0.15);   color: var(--accent-red); }
.badge-yellow { background: rgba(245,158,11,0.15);  color: var(--accent-yellow); }
.badge-gray   { background: rgba(107,114,128,0.15); color: var(--accent-gray); }

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--bg-border);
}

.modal-header h3 { font-size: 1rem; font-weight: 600; }

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem;
}

.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 1.5rem; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--bg-border);
}

/* ── Alerts ── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: none;
}

.alert.show   { display: block; }
.alert-error  { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.3);  color: #fca5a5; }
.alert-success{ background: rgba(34,197,94,0.1);  border: 1px solid rgba(34,197,94,0.3);  color: #86efac; }

/* ── Dashboard ── */
.dash-welcome {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.dash-greeting {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.dash-subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.dash-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 0.35rem 0.75rem;
  white-space: nowrap;
}

.dash-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 0.75rem;
}

/* Bankroll empty CTA */
.dash-bankroll-empty {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-surface);
  border: 1px dashed var(--bg-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.dash-bankroll-empty-icon { font-size: 2rem; flex-shrink: 0; }

.dash-bankroll-empty h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.dash-bankroll-empty p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.dash-bankroll-empty .btn { flex-shrink: 0; margin-left: auto; }

/* Bankroll featured card */
.dash-bankroll {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-left: 3px solid var(--accent-blue);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
}

.dash-bankroll-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--bg-border);
  flex-wrap: wrap;
  gap: 1rem;
}

.dash-bankroll-identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.dash-bankroll-icon {
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-bankroll-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.dash-bankroll-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  divide: var(--bg-border);
}

.dash-bstat {
  padding: 1.1rem 1.25rem;
  border-right: 1px solid var(--bg-border);
}

.dash-bstat:last-child { border-right: none; }

.dash-bstat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.dash-bstat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .dash-bankroll-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-bstat { border-right: none; border-bottom: 1px solid var(--bg-border); }
  .dash-bstat:nth-child(odd) { border-right: 1px solid var(--bg-border); }
  .dash-bstat:last-child { border-bottom: none; }
  .dash-bankroll-empty { flex-wrap: wrap; }
  .dash-bankroll-empty .btn { margin-left: 0; }
  .dash-welcome { flex-direction: column; gap: 0.5rem; }
}

/* ── Bet Detail Drawer ── */
.bet-detail-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 290;
}
.bet-detail-overlay.open { display: block; }

.bet-detail-drawer {
  position: fixed;
  top: 0;
  right: -440px;
  width: 420px;
  max-width: 100vw;
  height: 100%;
  background: var(--bg-surface);
  border-left: 1px solid var(--bg-border);
  display: flex;
  flex-direction: column;
  z-index: 300;
  transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
}
.bet-detail-drawer.open { right: 0; }

.bet-detail-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--bg-border);
  flex-shrink: 0;
}
.bet-detail-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 0.5rem;
}
.bet-detail-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.bet-detail-close:hover { color: var(--text-primary); }

.bet-detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bd-meta { display: flex; flex-direction: column; gap: 0.5rem; }
.bd-meta-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.bd-meta-date { font-size: 0.8rem; color: var(--text-muted); }
.bd-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.bd-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: 20px;
  color: var(--text-secondary);
}

.bd-stats {
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.bd-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--bg-border);
}
.bd-stat-row:last-child { border-bottom: none; }
.bd-stat-lbl { font-size: 0.8rem; color: var(--text-muted); }
.bd-stat-val { font-size: 0.88rem; font-weight: 700; color: var(--text-primary); }

.bd-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: -0.25rem;
}

.bd-selections { display: flex; flex-direction: column; gap: 0.5rem; }
.bd-sel {
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
}
.bd-sel-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.2rem; }
.bd-sel-title { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }
.bd-sel-meta { font-size: 0.75rem; color: var(--text-muted); }

.bd-comment {
  font-size: 0.83rem;
  color: var(--text-secondary);
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  line-height: 1.5;
}

.bet-detail-footer {
  border-top: 1px solid var(--bg-border);
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex-shrink: 0;
}
.bd-action-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.bd-action-btn:hover { background: var(--bg-surface); border-color: var(--accent-blue); }
.bd-action-btn.bd-danger { color: var(--accent-red); }
.bd-action-btn.bd-danger:hover { border-color: var(--accent-red); }

/* ── Stats Drawer ── */
.stats-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 290;
}

.stats-drawer-overlay.open { display: block; }

.stats-drawer {
  position: fixed;
  top: 0;
  right: -440px;
  width: 420px;
  height: 100vh;
  background: var(--bg-surface);
  border-left: 1px solid var(--bg-border);
  z-index: 300;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-drawer.open { right: 0; }

.stats-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--bg-border);
  flex-shrink: 0;
}

.stats-drawer-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.stats-drawer-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem;
}

.stats-drawer-close:hover { color: var(--text-primary); }

.stats-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
}

.stats-section { margin-bottom: 0; }

.stats-section-title {
  display: none;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 0.65rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--bg-border);
}

.stats-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.stats-card {
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 0.45rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.stats-card.full { grid-column: 1 / -1; }

.stats-card .sc-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.stats-card .sc-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.sc-value.positive { color: var(--accent-green); }
.sc-value.negative { color: var(--accent-red); }
.sc-value.warning  { color: var(--accent-yellow); }

@media (max-width: 480px) {
  .stats-drawer { width: 100%; right: -100%; }
}

/* ── Profit/Loss ── */
.pl-positive { color: var(--accent-green); font-weight: 600; }
.pl-negative { color: var(--accent-red);   font-weight: 600; }
.pl-neutral  { color: var(--text-muted); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.open {
    display: block;
  }
  .sidebar-toggle {
    display: flex;
  }
  .main-content {
    margin-left: 0;
    padding: 1rem;
    padding-top: 3.5rem;
  }
  .bankroll-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .form-row   { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hide-mobile { display: none; }
}

/* ── Bankroll Cards Grid ── */
.bankrolls-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 1100px) {
  .bankrolls-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .bankrolls-grid { grid-template-columns: 1fr; }
}

.bankroll-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.bankroll-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

.bc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.bc-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
.bc-bets {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  margin-top: 0.15rem;
}

.bc-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.bc-metric {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.bc-metric-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.bc-metric-value {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}
.bc-metric-value.positive { color: var(--accent-green); }
.bc-metric-value.negative { color: var(--accent-red); }

.bc-footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  gap: 0.5rem;
}
.bc-foot-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.bc-foot-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.bc-foot-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}
.bc-foot-value.positive { color: var(--accent-green); }
.bc-foot-value.negative { color: var(--accent-red); }

/* ── Sidebar: nav-group (collapsible) ── */
.nav-group-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  color: rgba(255,255,255,0.7);
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: var(--radius);
  margin-bottom: 2px;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.nav-group-toggle:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.06);
}
.nav-group-toggle.active {
  color: #ffffff;
  background: rgba(59,130,246,0.25);
  font-weight: 600;
}
.nav-group-toggle svg:first-of-type { flex-shrink: 0; opacity: 0.7; }
.nav-group-toggle:hover svg:first-of-type,
.nav-group-toggle.active svg:first-of-type { opacity: 1; }

.nav-arrow {
  margin-left: auto;
  flex-shrink: 0;
  transition: transform 0.2s;
  opacity: 0.5;
}
.nav-group-toggle[aria-expanded="true"] .nav-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-group-items {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.22s ease;
  position: relative;
}
.nav-group-items.open {
  max-height: 300px;
}
.nav-group-items.open::before {
  content: '';
  position: absolute;
  left: calc(0.9rem + 8px);
  top: 0.45rem;
  bottom: 0.45rem;
  width: 1px;
  background: rgba(255,255,255,0.13);
  pointer-events: none;
}
.nav-group-items a {
  padding-left: 0.9rem !important;
  gap: 0.75rem !important;
  font-size: 0.84rem;
  position: relative;
}
.nav-group-items a svg { display: none; }
.nav-group-items a::before {
  content: '•';
  width: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.0rem;
  line-height: 1;
  color: currentColor;
  opacity: 0.55;
}

/* ── Page subtitle ── */
.page-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ── Bookmakers Grid ── */
.bookmakers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.bookmakers-grid--modal {
  margin-top: 0.75rem;
}

/* ── Bookmaker Card ── */
.bm-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.bm-card--added {
  border-color: rgba(34,197,94,0.35);
  background: rgba(34,197,94,0.04);
}
.bm-card--already {
  opacity: 0.65;
}

.bm-logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-2);
  flex-shrink: 0;
}
.bm-logo-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 10px;
}
.bm-logo-fallback {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
}

.bm-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}
.bm-remove-btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  color: var(--accent-red) !important;
  border-color: rgba(239,68,68,0.3) !important;
}
.bm-remove-btn:hover {
  background: rgba(239,68,68,0.1) !important;
}
.bm-added-badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
}

/* ── Casas de Apostas: novo layout ── */
.casas-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
  border-radius: 14px;
  padding: 2rem 2.5rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
  position: relative;
  width: 100%;
  max-width: 68rem;
  margin-left: auto;
  margin-right: auto;
}
.casas-hero-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.casas-hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
}
.casas-hero-sub {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
}
.casas-hero-btn {
  margin-top: 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.15s;
  width: fit-content;
}
.casas-hero-btn:hover { background: rgba(255,255,255,0.25); }
.casas-hero-icon { color: rgba(255,255,255,0.25); flex-shrink: 0; }

/* ── Drawer lateral ── */
.casas-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 299;
}
.casas-drawer-overlay.open { display: block; }

.casas-drawer {
  position: fixed;
  top: 0;
  right: -440px;
  width: 418px;
  height: 100vh;
  background: var(--bg-surface);
  border-left: 1px solid var(--bg-border);
  z-index: 300;
  transition: right 0.28s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.casas-drawer.open { right: 0; }

.casas-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--bg-border);
  flex-shrink: 0;
}
.casas-drawer-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}
.casas-drawer-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem;
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: color 0.15s;
}
.casas-drawer-close:hover { color: var(--text-primary); }

.casas-drawer-body {
  padding: 1.25rem 1.5rem;
  flex: 1;
  overflow-y: auto;
}
.casas-drawer-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}

/* Custom select */
.casas-select-wrap { position: relative; }
.casas-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.9rem;
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: border-color 0.15s;
}
.casas-select-trigger:hover { border-color: var(--accent-blue); }

.casas-select-dropdown {
  display: none;
  margin-top: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  overflow: hidden;
}
.casas-select-dropdown.open { display: block; }

.casas-select-search-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--bg-border);
  color: var(--text-muted);
}
.casas-select-search-wrap input {
  background: none;
  border: none;
  outline: none;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  width: 100%;
}
.casas-select-search-wrap input::placeholder { color: var(--text-muted); }

.casas-select-list {
  list-style: none;
  max-height: 320px;
  overflow-y: auto;
  padding: 0.25rem 0;
}
.casas-select-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.1s;
}
.casas-select-item:hover:not(.casas-select-item--added) { background: var(--bg-surface-2); }
.casas-select-item--added { opacity: 0.55; cursor: default; }
.casas-select-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent-green);
}

/* Toolbar: busca + contador */
.casas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  max-width: 68rem;
  margin-left: auto;
  margin-right: auto;
}

#my-casas-section,
#my-tipsters-section {
  max-width: 68rem;
  margin-left: auto;
  margin-right: auto;
}
.casas-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: transparent;
  border: none;
  padding: 0.25rem 0;
  flex: 1;
  max-width: 400px;
  color: var(--text-muted);
}
.casas-search input {
  background: none;
  border: none;
  outline: none;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  width: 100%;
}
.casas-search input::placeholder { color: var(--text-muted); }
.casas-count {
  font-size: 1.0rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  white-space: nowrap;
}

/* Grid de cards horizontais */
.casas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}
@media (max-width: 900px)  { .casas-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px)  { .casas-grid { grid-template-columns: 1fr; } }

.casas-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: 8px;
  padding: 0 0.75rem;
  height: 80px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: border-color 0.15s;
}
.casas-card:hover { border-color: rgba(59,130,246,0.35); }

.casas-card-logo {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.casas-card-logo .bm-logo-img {
  height: 52px;
  width: auto;
  max-width: 140px;
}
.casas-logo-img {
  height: 38px;
  max-width: 170px;
  width: auto;
  object-fit: contain;
}
.casas-card-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  text-align: center;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}

/* 3-dot menu */
.casas-card-menu-wrap { position: relative; flex-shrink: 0; }
.casas-dots-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
}
.casas-dots-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface-2);
}
.casas-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: 8px;
  min-width: 130px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  z-index: 50;
  overflow: hidden;
}
.casas-dropdown.open { display: block; }
.casas-dropdown button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: none;
  border: none;
  font-size: 0.82rem;
  font-family: 'Inter', sans-serif;
  color: var(--accent-red);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}
.casas-dropdown button:hover { background: rgba(239,68,68,0.08); }

/* ── Modal large ── */
.modal-lg {
  max-width: 700px;
  width: 95vw;
}
.modal-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

/* ── Empty state ── */
.empty-state {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 4rem 2rem;
  color: var(--text-muted);
  text-align: center;
}
.empty-icon { font-size: 2.5rem; }
.empty-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.empty-desc  { font-size: 0.85rem; }

/* ── Calculadora: Tabs ── */
.calc-tabs {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 0.35rem;
}

.calc-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.calc-tab:hover  { background: var(--bg-surface-2); color: var(--text-primary); }
.calc-tab.active { background: var(--accent-blue); color: #fff; font-weight: 600; }

/* ── Calculadora: Panel ── */
.calc-panel { display: none; }
.calc-panel.active { display: block; }

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 900px) { .calc-grid { grid-template-columns: 1fr; } }

/* Explanation panel */
.calc-explain { }
.calc-explain-body {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.calc-explain-section { display: flex; flex-direction: column; gap: 0.35rem; }
.calc-explain-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}
.calc-explain-text {
  font-size: 0.87rem;
  color: var(--text-primary);
  line-height: 1.6;
}
.calc-explain-formula {
  background: var(--bg-surface-2);
  border-left: 3px solid var(--accent-blue);
  border-radius: 0 6px 6px 0;
  padding: 0.6rem 0.9rem;
  font-size: 0.83rem;
  font-family: 'Courier New', monospace;
  color: var(--accent-blue);
  line-height: 1.5;
}
.calc-explain-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.calc-explain-stat {
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
}
.calc-explain-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.calc-explain-stat-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.15rem;
}
.calc-explain-tip {
  background: rgba(59,130,246,0.07);
  border: 1px solid rgba(59,130,246,0.18);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  color: var(--text-primary);
  line-height: 1.55;
}

/* ── Calculadora: Card ── */
.calc-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: 12px;
  overflow: hidden;
}

.calc-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--bg-border);
}

.calc-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
}

.calc-card-title {
  font-size: 0.97rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.calc-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.calc-body {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-bottom: 1px solid var(--bg-border);
}

.calc-field { display: flex; flex-direction: column; gap: 0.35rem; }
.calc-field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.calc-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ── Calculadora: Result ── */
.calc-result {
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--bg-border);
  gap: 0.5rem;
}
.result-row:last-child { border-bottom: none; }

.result-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.result-value {
  font-size: 0.9rem;
  font-weight: 700;
  text-align: right;
}
.result-value.positive      { color: var(--accent-green); }
.result-value.negative      { color: var(--accent-red); }
.result-value.result-highlight {
  font-size: 1.05rem;
  color: var(--accent-blue);
}

@media (max-width: 640px) {
  .calc-row-2  { grid-template-columns: 1fr; }
  .calc-tabs   { gap: 0.2rem; }
  .calc-tab    { font-size: 0.76rem; padding: 0.4rem 0.65rem; }
}

/* ── Bankroll card: gear & currency tag ── */
.bc-header-left  { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.bc-header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; flex-shrink: 0; }

.bc-currency-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent-blue);
  background: rgba(59,130,246,0.1);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  width: fit-content;
}

.bc-gear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.bc-gear-btn:hover { background: var(--bg-surface-2); color: var(--text-primary); }
.bankroll-card:hover .bc-gear-btn { color: var(--text-primary); }

/* ── Bankroll card: archived state ── */
.bankroll-card--archived {
  opacity: 0.6;
  border-style: dashed;
}
.bankroll-card--archived:hover { opacity: 0.85; }

/* ── Archived toggle ── */
.archived-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 0.55rem 1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.archived-toggle:hover { border-color: var(--accent-blue); color: var(--text-primary); }
.archived-badge {
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.05rem 0.45rem;
  color: var(--text-muted);
}
.archived-grid { opacity: 1; }

/* ── Modal: footer with vertical action buttons ── */
.modal-footer-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--bg-border);
}
.btn-warning {
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.3);
  color: var(--accent-yellow);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.6rem 1rem;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.btn-warning:hover { background: rgba(245,158,11,0.2); }

/* ── Balanços page ── */
.balanco-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .balanco-layout { grid-template-columns: 1fr; }
}

.balanco-selector {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: 12px;
  overflow: hidden;
  position: sticky;
  top: 1rem;
}
.balanco-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--bg-border);
}
.balanco-selector-title {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.balanco-selected-count {
  font-size: 0.75rem;
  color: var(--accent-blue);
  font-weight: 600;
}

.bankroll-checklist { padding: 0.4rem; }

.bankroll-check-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
  user-select: none;
}
.bankroll-check-item:hover { background: var(--bg-surface-2); }

.bci-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--bg-border);
  border-radius: 5px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.bci-checkbox.checked {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}
.bci-checkbox .chk-icon { display: none; color: #fff; }
.bci-checkbox.checked .chk-icon { display: block; }

.bci-info { flex: 1; min-width: 0; }
.bci-name { display: block; font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bci-meta { display: block; font-size: 0.72rem; color: var(--text-muted); margin-top: 0.1rem; }
.bci-balance { font-size: 0.8rem; font-weight: 700; white-space: nowrap; }

/* ── Balanços: stat cards ── */
.balanco-stats {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: 12px;
  padding: 1.5rem;
  min-height: 300px;
}

.balanco-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.balanco-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 640px) { .balanco-cards-grid { grid-template-columns: 1fr 1fr; } }

.balanco-stat-card {
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
}
.bsc-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.bsc-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  word-break: break-all;
}
.bsc-value.positive { color: var(--accent-green); }
.bsc-value.negative { color: var(--accent-red); }

.balanco-multicur-warn {
  font-size: 0.78rem;
  color: var(--accent-yellow);
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 6px;
}

/* ── Balanços: detailed stats grid ── */
.balanco-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}
.balanco-detail-item {
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.bdi-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.bdi-value { font-size: 1rem; font-weight: 700; }
.bdi-value.positive { color: var(--accent-green); }
.bdi-value.negative { color: var(--accent-red); }

/* ── badge-blue helper ── */
.badge-blue { background: rgba(59,130,246,0.12); color: var(--accent-blue); }

/* ── Valores Progressivos: card elements ── */
.alav-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--bg-border);
  border-bottom: 1px solid var(--bg-border);
}
.alav-route-val { display: flex; flex-direction: column; gap: 0.15rem; }
.alav-route-label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.alav-route-num   { font-size: 0.95rem; font-weight: 700; }
.alav-route-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: var(--text-muted);
}
.alav-route-mult  { font-size: 0.72rem; font-weight: 700; color: var(--accent-blue); }

/* ── Progress bar ── */
.alav-progress-bar {
  height: 6px;
  background: var(--bg-surface-2);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--bg-border);
}
.alav-progress-bar--lg { height: 10px; }
.alav-progress-fill {
  height: 100%;
  background: var(--accent-blue);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.alav-progress-done { background: var(--accent-green); }

/* ── Create modal preview ── */
.alav-preview {
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-top: 0.5rem;
}
.alav-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.alav-preview-row strong { color: var(--accent-blue); font-size: 0.88rem; }

/* ── Detail page: sim bar ── */
.alav-sim-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  margin-bottom: 1rem;
}

/* ── Detail page: table rows ── */
.alav-table .alav-row-done td { opacity: 0.5; }
.alav-table .alav-row-active  { background: rgba(59,130,246,0.06); }
.alav-table .alav-row-active td { font-weight: 600; }
.alav-badge-active { animation: pulse-badge 2s infinite; }
@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* ── Risk selector (Valores Progressivos create modal) ── */
.risk-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.5rem;
}
.risk-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.6rem 0.4rem;
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  color: var(--text-primary);
}
.risk-btn:hover { border-color: var(--accent-blue); }
.risk-btn--active {
  border-color: var(--accent-blue);
  background: rgba(59,130,246,0.10);
}
.risk-label { font-size: 0.72rem; color: var(--text-muted); }
.risk-pct   { font-size: 1rem; font-weight: 700; color: var(--accent-blue); }
.risk-btn--active .risk-label { color: var(--text-primary); }

/* risk-tag variants */
.risk-tag { font-size: 0.7rem; padding: 0.15rem 0.5rem; border-radius: 999px; font-weight: 600; }
.risk-tag--conservador { background: rgba(34,197,94,0.12);  color: var(--accent-green); }
.risk-tag--moderado    { background: rgba(59,130,246,0.12); color: var(--accent-blue); }
.risk-tag--agressivo   { background: rgba(234,179,8,0.12);  color: #eab308; }
.risk-tag--alto        { background: rgba(239,68,68,0.12);  color: var(--accent-red); }
.risk-tag--custom      { background: rgba(168,85,247,0.12); color: #a855f7; }

/* ── Bankroll Hero: stats + chart ── */
.bk-stats-row {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 0.85rem 1.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem 0;
}
.bk-stat {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0 1.25rem;
  text-align: center;
}
.bk-stat > * {
  display: block;
  width: 100%;
  text-align: center;
}
.bk-stat-sep {
  width: 1px;
  height: 2rem;
  background: var(--bg-border);
  flex-shrink: 0;
}
.bk-stat-lbl {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  white-space: nowrap;
}
.bk-stat-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}
.bk-stat-val.pl-positive { color: var(--accent-green); }
.bk-stat-val.pl-negative { color: var(--accent-red); }
.bk-stat-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--text-muted);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.55rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s;
}
.bk-stat-info-btn:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}
/* Info Modal */
.info-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 900;
  align-items: center;
  justify-content: center;
}
.info-modal-overlay.open {
  display: flex;
}
.info-modal {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 420px;
  margin: 1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}
.info-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--bg-border);
}
.info-modal-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}
.info-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.15s;
}
.info-modal-close:hover { color: var(--text-primary); }
.info-modal-body {
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.info-modal-body p { margin: 0 0 0.6rem; }
.info-modal-body p:last-child { margin-bottom: 0; }
.info-modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 0.75rem 1.25rem 1rem;
  border-top: 1px solid var(--bg-border);
}

/* Filter Drawer */
.filter-drawer { width: 480px; right: -500px; }
.filter-drawer-body {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1.25rem 1rem;
  gap: 0.75rem;
  flex: 1;
  overflow: hidden;
}
.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.75rem;
  flex: 1;
}
.fg {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.fg-lbl {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.fg-inp {
  height: 28px;
  font-size: 0.8rem;
  padding: 0 0.5rem;
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: 6px;
  color: var(--text-primary);
  outline: none;
  width: 100%;
  box-sizing: border-box;
}
.fg-inp:focus { border-color: var(--accent-blue, #4f8ef7); }
.fg-inp option { background: var(--bg-surface-2); }
.filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
  padding-top: 0.5rem;
  border-top: 1px solid var(--bg-border);
}

.bk-chart-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 0.9rem;
  margin-bottom: 1.5rem;
}
.bk-chart-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.bk-chart-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.bk-dots-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  line-height: 1;
}
.bk-dots-btn:hover { background: var(--bg-surface-2); color: var(--text-primary); }
.bk-chart-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
  z-index: 200;
  min-width: 160px;
  padding: 0.3rem;
}
.bk-chart-menu.open { display: block; }
.bk-chart-opt {
  display: block;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 0.5rem 0.85rem;
  font-size: 0.83rem;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 5px;
  font-family: inherit;
}
.bk-chart-opt:hover { background: var(--bg-surface-2); }
.bk-chart-opt.active { color: var(--accent-blue); font-weight: 600; }
.bk-chart-wrap {
  position: relative;
  height: 200px;
}
#bk-chart-empty {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.84rem;
}

/* ── Compact card (novo layout Valores Progressivos) ── */
.alav-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
}

/* ── Modo organizar ── */
.bankrolls-grid.organizing .alav-card[data-id] {
  cursor: grab;
}
.bankrolls-grid.organizing .alav-card[data-id]:active {
  cursor: grabbing;
}
.bankrolls-grid.organizing .alav-card[data-id]::after {
  content: '⠿';
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  font-size: 1.1rem;
  color: var(--text-muted);
  pointer-events: none;
  opacity: 0.6;
}
.alav-card.dragging {
  opacity: 0.35;
  transform: scale(0.98);
}
.alav-card.drag-over {
  border-color: var(--accent-blue) !important;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.25) !important;
  transform: none !important;
}
.alav-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.alav-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.alav-card-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Etapas row */
.alav-stages-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.alav-stages-label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.alav-stages-count {
  font-weight: 600;
  color: var(--text-muted);
}

/* Dot slider */
.alav-slider {
  position: relative;
  display: flex;
  align-items: center;
  height: 18px;
}
.alav-slider::before {
  content: '';
  position: absolute;
  left: 4px;
  right: 4px;
  top: 50%;
  height: 2px;
  background: var(--bg-border);
  transform: translateY(-50%);
  border-radius: 1px;
}
.alav-dot {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.alav-dot::after {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg-surface-2);
  border: 2px solid var(--bg-border);
  display: block;
  transition: background 0.15s, border-color 0.15s;
}
.alav-dot--done::after {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

/* Bottom metrics */
.alav-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid var(--bg-border);
  padding-top: 0.75rem;
  gap: 0.25rem;
}
.alav-metric {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.alav-metric--center { align-items: center; }
.alav-metric--right  { align-items: flex-end; }
.alav-metric-label {
  font-size: 0.63rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.alav-metric-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}
.alav-metric-value.positive { color: var(--accent-green); }
.alav-metric-value.neutral  { color: var(--text-muted); }

/* Add card (tracejado) */
.alav-card-add {
  border: 2px dashed var(--bg-border);
  background: transparent;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  min-height: 160px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: border-color 0.15s, color 0.15s;
}
.alav-card-add:hover {
  border-color: var(--accent-blue);
  color: var(--text-primary);
  transform: none;
  box-shadow: none;
}
.alav-add-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  line-height: 1;
}
.risk-tag--total { background: rgba(239,68,68,0.18); color: #ff4444; font-weight: 800; }

/* ── alav-preview grid (create modal) ── */
.alav-preview-title {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
}
.alav-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem 0.5rem;
}
.alav-prev-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.alav-prev-label {
  font-size: 0.63rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.alav-prev-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}
.alav-prev-val.positive { color: var(--accent-green); }

/* ── Progress fill: loss variant ── */
.alav-progress-fill.alav-progress-loss { background: var(--accent-red); }

/* ── Detail page: action card ── */
.alav-action-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--accent-blue);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.08);
}
.alav-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}
.alav-action-badge-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.alav-action-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(59,130,246,0.15);
  color: var(--accent-blue);
  border-radius: 20px;
  padding: 0.2rem 0.65rem;
  white-space: nowrap;
}
.alav-action-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}
.alav-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem 1.25rem;
}
.alav-action-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
}
.alav-action-item--highlight {
  border-color: var(--accent-blue);
  background: rgba(59,130,246,0.06);
}
.alav-action-item-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.alav-action-item-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.alav-action-stake {
  font-size: 1rem;
  color: var(--accent-blue);
}

/* ── Detail page: completion card ── */
.alav-completion-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(34,197,94,0.08);
  border: 1.5px solid var(--accent-green);
  border-radius: 12px;
  padding: 1.1rem 1.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.alav-completion-icon { font-size: 1.8rem; line-height: 1; }
.alav-completion-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
}
.alav-completion-text strong { font-size: 0.95rem; color: var(--accent-green); }
.alav-completion-text span   { font-size: 0.82rem; color: var(--text-muted); }

/* ── Detail page: step number badge ── */
.alav-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--bg-surface-2);
  color: var(--text-muted);
  border: 1px solid var(--bg-border);
}
.alav-step-num--done   { background: rgba(34,197,94,0.15); color: var(--accent-green); border-color: var(--accent-green); }
.alav-step-num--active { background: rgba(59,130,246,0.15); color: var(--accent-blue); border-color: var(--accent-blue); }

/* ── Detail page: status badges ── */
.alav-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 20px;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
}
.alav-status--done    { background: rgba(34,197,94,0.12);  color: var(--accent-green); }
.alav-status--active  { background: rgba(59,130,246,0.12); color: var(--accent-blue); }
.alav-status--pending { background: var(--bg-surface-2);   color: var(--text-muted); }

/* ── Detail page: table rows ── */
.alav-table .alav-row-done td   { opacity: 0.45; }
.alav-table .alav-row-active    { background: rgba(59,130,246,0.05); }
.alav-table .alav-row-active td { border-top: none; }
.alav-table .alav-row-active > td:first-child { border-left: 3px solid var(--accent-blue); }

/* ── Personalizar Exibição das Apostas ── */
.disp-section-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 0.6rem;
}
.disp-preview {
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}
.disp-prev-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
  min-height: 1.2em;
}
.disp-prev-title {
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}
.disp-prev-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
}
.disp-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 4px;
}
.disp-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text-primary);
  user-select: none;
  transition: border-color .15s;
}
.disp-item.drag-over  { border-color: var(--accent-blue); background: rgba(59,130,246,0.06); }
.disp-item.dragging   { opacity: 0.3; }
.disp-item--available { opacity: 0.65; }
.disp-handle {
  cursor: grab;
  color: var(--text-muted);
  flex-shrink: 0;
  line-height: 0;
  padding: 0.1rem;
}
.disp-handle:active { cursor: grabbing; }
.disp-label { flex: 1; }
.disp-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.2rem;
  border-radius: 4px;
  line-height: 0;
  flex-shrink: 0;
  transition: color .15s, background .15s;
}
.disp-btn:hover { background: var(--bg-surface); color: var(--text-primary); }
.disp-btn--remove { color: var(--text-muted); }
.disp-btn--remove:hover { color: #94a3b8; }
.disp-btn--add {
  color: var(--accent-green);
  border: 1.5px solid var(--accent-green);
  border-radius: 6px;
  padding: 0.25rem;
}
.disp-btn--add:hover { background: rgba(34,197,94,0.1); color: var(--accent-green); }
.disp-empty {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0.4rem 0.1rem;
  font-style: italic;
}
.disp-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 99px;
}
.disp-badge--live { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.disp-badge--free { background: rgba(125,211,252,0.12); color: #7dd3fc; border: 1px solid rgba(125,211,252,0.3); }

/* ── SuperOdd: ícone no card ── */
.bet-superodd-icon {
  font-size: 0.8em;
  margin-right: 1px;
  vertical-align: middle;
  line-height: 1;
}

/* ── SuperOdd toggle ── */
.super-odd-toggle {
  display: block;
  cursor: pointer;
  margin-top: 1.25rem;
  margin-bottom: 0.25rem;
}
.super-odd-toggle input[type="checkbox"] { display: none; }
.super-odd-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1.5px dashed var(--bg-border);
  border-radius: 10px;
  background: var(--bg-surface-2);
  transition: border-color .2s, background .2s;
  user-select: none;
}
.super-odd-toggle:hover .super-odd-box {
  border-color: #f59e0b;
  background: rgba(245,158,11,0.05);
}
.super-odd-toggle--active .super-odd-box {
  border-color: #f59e0b;
  border-style: solid;
  background: rgba(245,158,11,0.08);
}
.super-odd-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}
.super-odd-text { flex: 1; }
.super-odd-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #f59e0b;
}
.super-odd-desc {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}
.super-odd-check {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid var(--bg-border);
  flex-shrink: 0;
  transition: background .2s, border-color .2s;
  position: relative;
}
.super-odd-toggle--active .super-odd-check {
  background: #f59e0b;
  border-color: #f59e0b;
}
.super-odd-toggle--active .super-odd-check::after {
  content: '';
  position: absolute;
  top: 2px; left: 5px;
  width: 5px; height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

/* ── Stats drawer: seção divider ── */
.stats-section-divider {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.25rem 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #f59e0b;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.stats-section-divider::before,
.stats-section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--bg-border);
}

/* ── Bet form: toggle chips ao vivo / grátis ── */
.bet-chips-row { display: flex; gap: 0.5rem; margin-top: 0.85rem; flex-wrap: wrap; }
.bet-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.9rem; border-radius: 999px;
  border: 1px solid var(--bg-border); background: transparent;
  cursor: pointer; font-size: 0.8rem; font-weight: 600;
  color: var(--text-muted); transition: all .15s; user-select: none;
}
.bet-chip input[type=checkbox] { display: none; }
.bet-chip.chip-live:has(input:checked) {
  background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.4); color: #f87171;
}
.bet-chip.chip-free:has(input:checked) {
  background: rgba(125,211,252,.12); border-color: rgba(125,211,252,.4); color: #7dd3fc;
}

/* ── Mais Detalhes (seleção de aposta) ── */
.mais-detalhes-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  width: 100%;
  text-align: left;
  transition: color .15s;
}
.mais-detalhes-btn:hover { color: var(--text-primary); }
.mais-det-chevron { transition: transform .2s ease; flex-shrink: 0; }
.mais-detalhes-body {
  display: none;
  flex-direction: column;
  gap: 0;
  padding: 0.65rem 0.85rem;
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: 8px;
  margin-bottom: 0.25rem;
}
.mais-detalhes-body.open { display: flex; }
.det-premium-badge {
  font-size: 0.6rem;
  font-weight: 700;
  background: rgba(251,191,36,0.15);
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: 99px;
  padding: 0.05rem 0.4rem;
  vertical-align: middle;
  margin-left: 0.25rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.det-optional-badge {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  vertical-align: middle;
  margin-left: 0.2rem;
}

/* ── User hover popup ── */
.user-wrap {
  position: relative;
}
.user-popup {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 0.35rem;
  display: none;
  flex-direction: column;
  gap: 0.1rem;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.35);
  z-index: 200;
}
/* popup shown via JS (delay prevents flicker on gap) */
.user-popup-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.55rem 0.7rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 0.83rem;
  font-weight: 500;
  text-align: left;
  transition: background 0.12s;
}
.user-popup-item:hover { background: var(--bg-surface-2); }
.user-popup-item--danger { color: var(--accent-red); }
.user-popup-item--danger:hover { background: rgba(239,68,68,0.08); }
.user-popup-divider {
  height: 1px;
  background: var(--bg-border);
  margin: 0.15rem 0;
}
.sidebar-user {
  cursor: pointer;
}

/* ── Minha Conta modal ── */
.account-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bg-border);
}
.account-section:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.account-section-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.theme-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem;
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.83rem;
  font-weight: 500;
  transition: border-color 0.15s, color 0.15s;
}
.theme-btn:hover { border-color: var(--accent-blue); color: var(--text-primary); }
.theme-btn--active { border-color: var(--accent-blue); color: var(--text-primary); background: rgba(59,130,246,0.08); }

/* ── Section page title ── */
.section-page-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: -2rem;
  margin-left: -2rem;
  margin-right: -2rem;
  padding: 1.25rem 2rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* ── Light theme overrides ── */
html[data-theme="light"] {
  --bg-primary:   #f1f5f9;
  --bg-surface:   #ffffff;
  --bg-surface-2: #f8fafc;
  --bg-border:    #e2e8f0;
  --text-primary: #0f172a;
  --text-muted:   #64748b;
}

/* Light theme: sidebar azul */
html[data-theme="light"] .sidebar {
  background: #1d4ed8;
  border-right-color: rgba(255,255,255,0.12);
}
html[data-theme="light"] .sidebar-brand {
  border-bottom-color: rgba(255,255,255,0.12);
}
html[data-theme="light"] .brand-name {
  color: #ffffff;
}
html[data-theme="light"] .sidebar-section-label {
  color: rgba(255,255,255,0.55);
}
html[data-theme="light"] .sidebar-nav a {
  color: rgba(255,255,255,0.75);
}
html[data-theme="light"] .sidebar-nav a:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.12);
}
html[data-theme="light"] .sidebar-nav a.active {
  color: #ffffff;
  background: rgba(255,255,255,0.18);
}
html[data-theme="light"] .sidebar-nav a svg { opacity: 0.75; }
html[data-theme="light"] .sidebar-nav a:hover svg,
html[data-theme="light"] .sidebar-nav a.active svg { opacity: 1; }
html[data-theme="light"] .nav-group-toggle {
  color: rgba(255,255,255,0.75);
}
html[data-theme="light"] .nav-group-toggle:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.12);
}
html[data-theme="light"] .nav-group-toggle.active {
  color: #ffffff;
  background: rgba(255,255,255,0.18);
}
html[data-theme="light"] .sidebar-footer {
  border-top-color: rgba(255,255,255,0.12);
}
html[data-theme="light"] .sidebar-user-info .u-name { color: #ffffff; }
html[data-theme="light"] .sidebar-user-info .u-role { color: rgba(255,255,255,0.6); }
html[data-theme="light"] .user-avatar {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
  color: #ffffff;
}
html[data-theme="light"] .sidebar-divider { background: rgba(255,255,255,0.12); }
html[data-theme="light"] .sidebar-bankroll {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.15);
}
html[data-theme="light"] .sidebar-bankroll:hover { border-color: rgba(255,255,255,0.4); }
html[data-theme="light"] .sidebar-bankroll .sb-label { color: rgba(255,255,255,0.55); }
html[data-theme="light"] .sidebar-bankroll .sb-value { color: #ffffff; }
html[data-theme="light"] .user-popup {
  background: #1e40af;
  border-color: rgba(255,255,255,0.15);
}
html[data-theme="light"] .user-popup-item { color: rgba(255,255,255,0.85); }
html[data-theme="light"] .user-popup-item:hover { background: rgba(255,255,255,0.1); color: #ffffff; }

/* ── Archived bankroll card variant ── */
.alav-card--archived {
  opacity: 0.6;
  filter: grayscale(0.4);
}
.alav-card--archived:hover {
  border-color: var(--bg-border);
  transform: none;
  box-shadow: none;
}

/* ── Tipster form (drawer) ── */
.tipster-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
/* floating label field */
.tipster-field {
  position: relative;
}
.tipster-input {
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 1.45rem 0.85rem 0.55rem;
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.18s;
  font-family: inherit;
  width: 100%;
}
.tipster-input:focus { border-color: var(--accent-blue); }
.tipster-float-label {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: top 0.18s ease, font-size 0.18s ease, color 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}
.tipster-input:focus ~ .tipster-float-label,
.tipster-input:not(:placeholder-shown) ~ .tipster-float-label {
  top: 0.45rem;
  transform: none;
  font-size: 0.72rem;
  color: var(--accent-blue);
  font-weight: 600;
}
.tipster-submit-btn {
  margin-top: 0.75rem;
  width: 100%;
  justify-content: center;
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  transition: transform 0.15s, box-shadow 0.15s !important;
}
.tipster-submit-btn:hover:not(:disabled) {
  opacity: 1 !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59,130,246,0.4);
}

/* ── Tipster card ── */
.tipster-card { height: auto; min-height: 64px; padding: 0.75rem; align-items: flex-start; }
.tipster-card-info {
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.2rem;
  overflow: hidden;
}
.tipster-card-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.tipster-card-site {
  font-size: 0.75rem;
  color: var(--accent-blue);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-decoration: none;
}
.tipster-card-site:hover { text-decoration: underline; }

/* ── Toast notifications ── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}
.toast {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: 12px;
  padding: 0.9rem 1.1rem 1.1rem;
  min-width: 270px;
  max-width: 340px;
  box-shadow: 0 10px 36px rgba(0,0,0,0.4);
  position: relative;
  overflow: hidden;
  pointer-events: all;
  animation: toast-slide-in 0.3s cubic-bezier(.22,.68,0,1.2) forwards;
}
.toast.toast-hiding {
  animation: toast-slide-out 0.28s ease forwards;
}
.toast.toast-error .toast-icon {
  background: rgba(239,68,68,0.15);
  color: var(--accent-red);
}
.toast.toast-error .toast-bar {
  background: var(--accent-red);
}
@keyframes toast-slide-in {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes toast-slide-out {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(110%); opacity: 0; }
}
.toast-body {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.toast-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(34,197,94,0.15);
  color: var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.toast-msg {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
.toast-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--accent-green);
  border-radius: 0 0 0 12px;
  animation: toast-bar-shrink 5s linear forwards;
}
@keyframes toast-bar-shrink {
  from { width: 100%; }
  to   { width: 0%; }
}

/* ── Spin animation (loading) ── */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.icon-spin {
  animation: spin 0.75s linear infinite;
  display: inline-block;
}

/* ── Bet Drawer ──────────────────────────────────────── */
.bet-drawer {
  width: 500px !important;
  right: -520px !important;
}
.bet-drawer.open {
  right: 0 !important;
}
.bet-drawer-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  display: block;
}
.bet-drawer-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.bet-drawer-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bg-border);
}

/* Selection blocks */
.selection-block {
  border: 1px solid var(--bg-border);
  border-radius: 10px;
  margin-bottom: 0.9rem;
  overflow: hidden;
}
.selection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--bg-border);
}
.selection-num {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.selection-remove-btn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  color: var(--accent-red);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 5px;
  transition: background 0.15s;
}
.selection-remove-btn:hover {
  background: rgba(239,68,68,0.12);
}
.selection-body {
  padding: 1rem;
}

/* Add selection button */
.bet-add-sel-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.6rem 1rem;
  border: 1.5px dashed var(--bg-border);
  border-radius: 8px;
  background: none;
  color: var(--text-muted);
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  margin-top: 0.25rem;
}
.bet-add-sel-btn:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

/* ── Bet type toggle (Simples / Múltipla) ─────────────── */
.bet-type-section {
  margin-top: 0.9rem;
}
.bet-type-toggle {
  display: flex;
  gap: 0.4rem;
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: 8px;
  padding: 0.3rem;
}
.bet-type-btn {
  flex: 1;
  padding: 0.42rem 0.75rem;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.bet-type-btn:hover {
  color: var(--text-primary);
}
.bet-type-btn.active {
  background: var(--bg-border);
  color: var(--text-primary);
  font-weight: 600;
}

/* ── Mais Opções collapsible ──────────────────────────── */
.mais-opcoes-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  margin-top: 1rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--bg-border);
  border-radius: 8px;
  background: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.mais-opcoes-btn:hover,
.mais-opcoes-btn.active {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}
.mais-opcoes-chevron {
  margin-left: auto;
  transition: transform 0.2s ease;
}
.mais-opcoes-body {
  display: none;
  flex-direction: column;
  gap: 0;
  margin-top: 0.75rem;
}
.mais-opcoes-body.open {
  display: flex;
}

/* ── Bet cards ────────────────────────────────────────── */
#bets-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem;
}
.bet-card {
  display: flex;
  align-items: stretch;
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.15s;
  min-height: 72px;
}
.bet-card:hover { border-color: #3a3d4a; }

/* Esquerda: botão ⋮ */
.bet-card-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  flex-shrink: 0;
  border: none;
  border-right: 1px solid var(--bg-border);
  background: none;
  color: var(--text-muted);
  font-size: 1.15rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.bet-card-dots:hover {
  background: var(--bg-border);
  color: var(--text-primary);
}

/* Centro: corpo */
.bet-card-body {
  flex: 1;
  padding: 0.6rem 1rem;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Área de texto (meta + título + desc) */
.bet-card-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.bet-card-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.bet-card-time  { font-weight: 600; color: var(--text-primary); }
.bet-card-dot   { opacity: 0.35; }
.bet-card-type,
.bet-card-casa  { font-weight: 500; }

/* Grid 4 colunas × 2 linhas — labels na linha 1, valores na linha 2 */
.bet-card-stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  grid-template-rows: auto auto;
  align-items: center;
  flex-shrink: 0;
}
.bet-card-stats > * {
  padding: 0 0.75rem;
  text-align: center;
  justify-self: center;
  border-left: 1px solid var(--bg-border);
}
/* Primeiro de cada linha sem borda */
.bet-card-stats > *:nth-child(1),
.bet-card-stats > *:nth-child(5) {
  border-left: none;
}
.bet-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  white-space: nowrap;
}
.bet-stat-value {
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}
.bet-stat-value.pl-positive { color: var(--accent-green); }
.bet-stat-value.pl-negative { color: var(--accent-red); }
.bet-stat-value.pl-neutral  { color: var(--text-muted); }

/* Título e descrição */
.bet-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}
.bet-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Agrupamento por mês e semana */
.bet-month-group { margin-bottom: 1.5rem; }
.bet-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  padding: 0.65rem 1rem;
  background: #12151f;
  border: 1px solid var(--bg-border);
  border-radius: 10px;
  margin-bottom: 0.75rem;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s, border-color 0.15s;
}
.bet-month-header:hover { color: var(--accent-blue); border-color: rgba(59,130,246,.35); }
.month-chevron { transition: transform 0.2s ease; flex-shrink: 0; }
.bet-month-group.collapsed .month-chevron { transform: rotate(-90deg); }
.bet-month-group.collapsed .bet-week-group { display: none; }
.bet-week-group { margin-bottom: 0.9rem; }
.bet-week-header {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0 1rem 0.5rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--bg-border);
}
.bet-day-group {
  border: 1px solid var(--bg-border);
  border-radius: 10px;
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: #0d1019;
}
.bet-day-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  text-transform: capitalize;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0d1019;
  border-bottom: 1px solid var(--bg-border);
}
.bet-day-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.6rem;
  background: #0d1019;
}
.group-pl {
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: none;
  letter-spacing: 0;
  flex-shrink: 0;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
}
.group-pl.pl-positive {
  color: var(--accent-green);
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
}
.group-pl.pl-negative {
  color: var(--accent-red);
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

/* Logo da casa de aposta no card */
.bet-bm-logo {
  height: 18px;
  width: auto;
  max-width: 56px;
  object-fit: contain;
  vertical-align: middle;
  border-radius: 3px;
}

/* Direita: situação vertical */
.bet-card-status-col {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  flex-shrink: 0;
  border: none;
  border-left: 1px solid var(--bg-border);
  cursor: pointer;
  padding: 0;
  transition: opacity 0.15s;
}
.bet-card-status-col:hover { opacity: 0.75; }
.bet-status-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 0.5rem 0;
}
.bet-status-col-PENDENTE    { background: rgba(234,179,8,0.1);  color: #ca8a04; }
.bet-status-col-GANHA       { background: rgba(34,197,94,0.1);  color: #16a34a; }
.bet-status-col-PERDIDA     { background: rgba(239,68,68,0.1);  color: #dc2626; }
.bet-status-col-ANULADA     { background: rgba(100,116,139,0.1);color: #94a3b8; }
.bet-status-col-REEMBOLSADA { background: rgba(100,116,139,0.1);color: #94a3b8; }
.bet-status-col-MEIO_GANHO  { background: rgba(34,197,94,0.07); color: #22c55e; }
.bet-status-col-MEIO_PERDIDA{ background: rgba(239,68,68,0.07); color: #f87171; }
.bet-status-col-CANCELADA   { background: rgba(100,116,139,0.1);color: #94a3b8; }

/* ── Status change modal ──────────────────────────────── */
.status-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9997;
  display: none;
  align-items: center;
  justify-content: center;
}
.status-modal-overlay.open { display: flex; }
.status-modal {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: 14px;
  padding: 1.5rem;
  width: 340px;
  max-width: calc(100vw - 2rem);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.status-modal-obs {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1rem;
  line-height: 1.45;
  border-left: 2px solid var(--bg-border);
  padding-left: 0.75rem;
}
.status-options {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.status-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--bg-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.status-option:hover  { background: var(--bg-surface-2); }
.status-option.selected { border-color: var(--accent-blue); background: rgba(59,130,246,0.07); }
.status-option input[type="radio"] { display: none; }
.status-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Bet context menu ─────────────────────────────────── */
.bet-ctx-menu {
  position: fixed;
  z-index: 9999;
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  padding: 0.35rem;
  width: 170px;
  display: none;
}
.bet-ctx-menu.open { display: block; }
.bet-ctx-menu button {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.48rem 0.65rem;
  border: none;
  background: none;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 500;
  text-align: left;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.12s;
}
.bet-ctx-menu button:hover { background: var(--bg-border); }
.bet-ctx-menu button.bet-ctx-danger { color: var(--accent-red); }
.bet-ctx-menu button.bet-ctx-danger:hover { background: rgba(239,68,68,0.1); }
.bet-ctx-divider {
  height: 1px;
  background: var(--bg-border);
  margin: 0.3rem 0.35rem;
}

/* Campos calculados automaticamente (somente leitura) */
.cob-readonly {
  cursor: not-allowed !important;
  background: var(--bg-surface-2) !important;
  color: var(--text-muted) !important;
  border-color: var(--bg-border) !important;
  user-select: none;
}
.cob-readonly:focus {
  outline: none !important;
  box-shadow: none !important;
  border-color: var(--bg-border) !important;
}

/* ═══════════════════════════════════════════
   NOTIFICAÇÃO BADGE (sidebar)
═══════════════════════════════════════════ */
.nav-notif-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--accent-red, #ef4444);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  margin-left: auto;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   ANÁLISES PAGE
═══════════════════════════════════════════ */
.analises-summary {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 0.85rem 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem 0;
}
.an-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  text-align: center;
}
.an-stat-sep {
  width: 1px;
  height: 2rem;
  background: var(--bg-border);
  flex-shrink: 0;
}
.an-stat-lbl {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.an-stat-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

/* Tabs */
.analises-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--bg-border);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.atab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.atab:hover  { color: var(--text-primary); }
.atab.active { color: var(--text-primary); border-bottom-color: var(--accent-blue, #4f8ef7); }
.atab-lock { font-size: 0.6rem; margin-left: 0.25rem; opacity: 0.55; vertical-align: middle; }
.an-free-period-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  background: rgba(100,116,139,0.12);
  border: 1px solid rgba(100,116,139,0.25);
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
}

/* Chart card */
.an-chart-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.an-chart-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}
.an-chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Ranking / Table */
.an-table-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
}
.an-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.an-table th {
  background: var(--bg-surface-2);
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  padding: 0.65rem 1rem;
  text-align: left;
  white-space: nowrap;
}
.an-table td {
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--bg-border);
  color: var(--text-primary);
  white-space: nowrap;
}
.an-table tr:hover td { background: var(--bg-surface-2); }

/* Heatmap */
.heatmap-grid {
  display: grid;
  grid-template-columns: 140px repeat(7, 1fr);
  gap: 4px;
}
.heatmap-day-hdr {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.2rem 0;
}
.heatmap-band-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding-right: 0.5rem;
}
.heatmap-cell {
  border-radius: 6px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  transition: opacity 0.15s;
}
.heatmap-cell:hover { opacity: 0.8; }
.heatmap-val {
  font-size: 0.62rem;
  font-weight: 600;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  padding: 2px;
}
.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  justify-content: center;
}
.heatmap-legend-bar {
  width: 160px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #991b1b, #ef4444, #bg-border, #22c55e, #166534);
  background: linear-gradient(to right, #991b1b, rgba(239,68,68,0.5), var(--bg-border), rgba(34,197,94,0.5), #166534);
}

/* ═══════════════════════════════════════════
   COMPARAÇÃO DE BANKROLLS
═══════════════════════════════════════════ */
.cmp-selectors {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.cmp-selector {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.cmp-selector-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cmp-vs {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-muted);
  flex-shrink: 0;
}
.cmp-chart-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.cmp-chart-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}
.cmp-stats-grid {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cmp-header {
  display: grid;
  grid-template-columns: 1fr 160px 1fr;
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--bg-border);
  padding: 0.7rem 1.25rem;
  font-size: 0.82rem;
  font-weight: 700;
}
.cmp-col-a  { color: #3b82f6; text-align: left; }
.cmp-col-b  { color: #f59e0b; text-align: right; }
.cmp-col-mid { text-align: center; color: var(--text-muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; }
.cmp-row {
  display: grid;
  grid-template-columns: 1fr 160px 1fr;
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid var(--bg-border);
  align-items: center;
}
.cmp-row:last-child { border-bottom: none; }
.cmp-row:hover { background: var(--bg-surface-2); }
.cmp-label {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.cmp-val { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.cmp-val:first-child  { text-align: left;  }
.cmp-val:last-child   { text-align: right; }
.cmp-negative { color: var(--accent-red); }
.cmp-winner { color: var(--accent-green); }

/* ── Multi-select bet cards ── */
.bet-card-select-overlay {
  position: absolute; inset: 0; z-index: 10; border-radius: inherit; cursor: pointer;
  background: rgba(59,130,246,0.04);
}
.bet-card-checkbox {
  position: absolute; top: 0.3rem; left: 0.3rem;
  width: 18px; height: 18px; border-radius: 5px;
  border: 2px solid #3b4060; background: #12151f;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.bet-card-checkbox svg { opacity: 0; }
.bet-card-checkbox.checked {
  background: #3b82f6; border-color: #3b82f6;
}
.bet-card-checkbox.checked svg { opacity: 1; }
.bet-card-selected {
  border-color: rgba(59,130,246,0.5) !important;
  background: rgba(59,130,246,0.06) !important;
}

/* ── Market analysis full-screen ── */
.mkt-screen {
  position: fixed; inset: 0; z-index: 1200;
  background: var(--bg-main, #0f1117);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.mkt-screen-header {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--bg-border);
  background: var(--bg-surface, #12151f); flex-shrink: 0;
}
/* Time filter */
.mkt-time-filter {
  display: flex; gap: 0.25rem; background: #0f1117;
  border: 1px solid var(--bg-border); border-radius: 8px; padding: 3px;
}
.mkt-tf-btn {
  padding: 0.25rem 0.6rem; font-size: 0.72rem; font-weight: 600;
  color: var(--text-muted); background: none; border: none; border-radius: 6px;
  cursor: pointer; transition: all 0.15s;
}
.mkt-tf-btn:hover  { color: var(--text-secondary); background: rgba(255,255,255,0.05); }
.mkt-tf-btn.active { color: #e2e8f0; background: #1e2235; }
/* Tabs */
.mkt-tabs {
  display: flex; flex-shrink: 0;
  background: var(--bg-surface, #12151f);
  border-bottom: 1px solid var(--bg-border);
  padding: 0 1.25rem;
}
.mkt-tab {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.6rem 0.9rem; font-size: 0.78rem; font-weight: 600;
  color: var(--text-muted); background: none; border: none;
  border-bottom: 2px solid transparent; cursor: pointer;
  transition: color 0.15s, border-color 0.15s; margin-bottom: -1px;
}
.mkt-tab:hover  { color: var(--text-secondary); }
.mkt-tab.active { color: #93c5fd; border-bottom-color: #3b82f6; }
/* Body */
.mkt-screen-body { flex: 1; overflow-y: auto; padding: 1.1rem 1.25rem; }
/* Summary row */
.mkt-summary-row {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr));
  gap: 0.75rem; margin-bottom: 1.25rem;
}
.mkt-summary-card {
  background: var(--bg-card); border: 1px solid var(--bg-border);
  border-radius: 12px; padding: 1rem 1.1rem;
  display: flex; align-items: center; gap: 0.8rem;
}
.mkt-sum-icon  { font-size: 1.6rem; flex-shrink: 0; }
.mkt-sum-lbl   { font-size: 0.65rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.2rem; }
.mkt-sum-val   { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }
/* Layout: main + sidebar */
.mkt-body-layout {
  display: flex; gap: 1.25rem; align-items: flex-start;
}
.mkt-body-main    { flex: 1; min-width: 0; }
.mkt-body-sidebar {
  width: 260px; flex-shrink: 0;
  position: sticky; top: 0;
}
@media (max-width: 860px) {
  .mkt-body-layout  { flex-direction: column; }
  .mkt-body-sidebar { width: 100%; position: static; }
}
/* Section title */
.mkt-section-title {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.72rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 0.6rem;
}
/* Equity chart */
.mkt-equity-wrap {
  background: var(--bg-card); border: 1px solid var(--bg-border);
  border-radius: 10px; padding: 0.85rem 1rem; margin-bottom: 1.1rem;
}
/* Groups */
.mkt-sport-section { margin-bottom: 1.75rem; }
.mkt-sport-title {
  font-size: 0.75rem; font-weight: 700; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.07em;
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.75rem; border-radius: 8px;
  background: var(--bg-surface, #12151f);
  border: 1px solid var(--bg-border); margin-bottom: 0.7rem;
}
.mkt-sport-badge {
  background: rgba(59,130,246,0.12); color: #93c5fd;
  border: 1px solid rgba(59,130,246,0.25); border-radius: 999px;
  font-size: 0.63rem; padding: 0.08rem 0.45rem; font-weight: 700;
}
.mkt-roi-badge {
  margin-left: auto; font-size: 0.7rem; font-weight: 700;
  padding: 0.08rem 0.5rem; border-radius: 999px;
}
.mkt-roi-badge.positive { background: rgba(34,197,94,0.1);  color: #22c55e; border: 1px solid rgba(34,197,94,0.25); }
.mkt-roi-badge.negative { background: rgba(239,68,68,0.1);   color: #ef4444; border: 1px solid rgba(239,68,68,0.25); }
/* Market cards */
.mkt-markets-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(185px,1fr)); gap: 0.6rem;
}
.mkt-flat-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 0.75rem; margin-bottom: 1rem;
}
.mkt-market-card {
  background: var(--bg-card); border: 1px solid var(--bg-border);
  border-radius: 10px; padding: 0.8rem 0.9rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  border-left-width: 3px;
}
.mkt-market-card.mkt-card-positive { border-left-color: rgba(34,197,94,0.5); }
.mkt-market-card.mkt-card-negative { border-left-color: rgba(239,68,68,0.4); }
.mkt-market-card:hover { border-color: rgba(59,130,246,0.4); box-shadow: 0 0 0 1px rgba(59,130,246,0.15); }
.mkt-market-name {
  font-size: 0.8rem; font-weight: 700; color: var(--text-primary);
  margin-bottom: 0.6rem; display: flex; align-items: center; gap: 0.4rem;
}
.mkt-pending-badge {
  font-size: 0.58rem; font-weight: 700; padding: 0.08rem 0.38rem;
  background: rgba(245,158,11,0.12); color: #f59e0b;
  border: 1px solid rgba(245,158,11,0.3); border-radius: 999px; white-space: nowrap;
}
.mkt-market-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem 0.65rem; }
.mkt-stat { display: flex; flex-direction: column; gap: 0.08rem; }
.mkt-stat-lbl { font-size: 0.6rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.mkt-stat-val { font-size: 0.83rem; font-weight: 700; color: var(--text-primary); }
/* Monospace numbers */
.mkt-mono { font-family: 'JetBrains Mono', 'Roboto Mono', 'Fira Code', ui-monospace, monospace; }
/* Warn color */
.mkt-warn { color: #f59e0b; }
/* Insights */
.mkt-insights {
  background: var(--bg-card); border: 1px solid var(--bg-border);
  border-radius: 10px; padding: 0.75rem 0.85rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.mkt-insight-item {
  display: flex; align-items: flex-start; gap: 0.5rem;
  font-size: 0.78rem; color: var(--text-secondary); line-height: 1.4;
}
.mkt-insight-item strong { color: var(--text-primary); }
/* Day heatmap */
.mkt-heatmap {
  background: var(--bg-card); border: 1px solid var(--bg-border);
  border-radius: 10px; overflow: hidden;
}
.mkt-heatmap-row {
  display: grid; grid-template-columns: 2.5rem 3rem 1fr 1fr;
  align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.75rem; border-bottom: 1px solid var(--bg-border);
  transition: background 0.15s;
}
.mkt-heatmap-row:last-child { border-bottom: none; }
.mkt-heatmap-day  { font-size: 0.72rem; font-weight: 700; color: var(--text-secondary); }
.mkt-heatmap-bets { font-size: 0.68rem; color: var(--text-muted); }
.mkt-heatmap-roi  { font-size: 0.75rem; font-weight: 700; text-align: right; }
.mkt-heatmap-pl   { font-size: 0.7rem;  font-weight: 600; color: var(--text-muted); text-align: right; }

/* ── Market performance ── */
.mkt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 0.75rem; margin-top: 1rem; }
.mkt-card {
  background: var(--bg-card); border: 1px solid var(--bg-border); border-radius: 10px;
  padding: 1rem 1.1rem;
}
.mkt-card-title { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.6rem; }
.mkt-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.4rem; }
.mkt-stat { display: flex; flex-direction: column; gap: 0.1rem; }
.mkt-stat-lbl { font-size: 0.67rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.mkt-stat-val { font-size: 0.88rem; font-weight: 700; color: var(--text-primary); }

/* Badge de apostas pendentes no card da bankroll */
.bk-overdue-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(245,158,11,0.15);
  border: 1px solid rgba(245,158,11,0.4);
  color: #f59e0b;
  font-size: 0.65rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: default;
}

/* ── Nav plan badge ── */
.nav-plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  border: 1px solid;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-left: auto;
  white-space: nowrap;
}

/* ── Plans page ── */
.plan-current-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.75rem;
}
.plan-banner-left  { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.plan-banner-right { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.plan-banner-label { color: var(--text-muted); font-size: 0.82rem; }
.plan-banner-name  { font-weight: 700; font-size: 1rem; }
.plan-banner-status {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
}
.plan-banner-status--active   { background: rgba(34,197,94,0.12); color: #22c55e; }
.plan-banner-status--canceled { background: rgba(239,68,68,0.12);  color: #ef4444; }
.plan-banner-status--past_due { background: rgba(245,158,11,0.12); color: #f59e0b; }
.plan-banner-status--trialing { background: rgba(59,130,246,0.12); color: #3b82f6; }
.plan-banner-renew { font-size: 0.78rem; color: var(--text-muted); }

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.plan-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.plan-card:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 1px var(--accent-blue);
}
.plan-card--featured {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 1px var(--accent-blue);
  position: relative;
}
.plan-card--featured::before {
  content: 'Mais popular';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-blue);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.75rem;
  border-radius: 0 0 6px 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.plan-card--current {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 1px var(--accent-green);
}

.plan-card-header {
  padding: 1.75rem 1.5rem 1.25rem;
  border-bottom: 1px solid var(--bg-border);
}

.plan-badge {
  display: inline-flex;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.85rem;
}
.plan-badge--free    { background: rgba(100,116,139,0.15); color: #94a3b8; }
.plan-badge--pro     { background: rgba(59,130,246,0.15);  color: #3b82f6; }
.plan-badge--premium { background: rgba(245,158,11,0.15);  color: #f59e0b; }

.plan-price { display: flex; align-items: baseline; gap: 0.1rem; margin-bottom: 0.35rem; }
.plan-price-amount { font-size: 2.2rem; font-weight: 800; color: var(--text-primary); }
.plan-price-period { font-size: 0.82rem; color: var(--text-muted); margin-left: 0.25rem; }
.plan-name  { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.3rem; }
.plan-desc  { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }

.plan-features {
  list-style: none;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}
.plan-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}
.plan-feature--ok { color: var(--text-primary); }
.plan-feature--ok svg { color: var(--accent-green); flex-shrink: 0; }
.plan-feature--no { color: var(--text-muted); }
.plan-feature--no svg { color: var(--text-muted); flex-shrink: 0; }

.plan-card-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--bg-border);
}
.plan-btn { width: 100%; justify-content: center; }

/* FAQ */
.plan-faq { margin-top: 1rem; }
.plan-faq-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}
.plan-faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.plan-faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.plan-faq-q {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}
.plan-faq-a {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.plans-grid--two {
  grid-template-columns: repeat(auto-fit, minmax(300px, 480px));
  justify-content: center;
}

/* Plan badge next to username in sidebar footer */
.user-plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.35rem;
  border-radius: 999px;
  border: 1px solid;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}
.user-plan-badge:hover { opacity: 0.8; text-decoration: none; }

/* ── Admin page ── */
.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.admin-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}
.admin-stat-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.admin-stat-val--green  { color: var(--accent-green); }
.admin-stat-val--red    { color: var(--accent-red); }
.admin-stat-val--yellow { color: var(--accent-yellow); }
.admin-stat-lbl { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.admin-toolbar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.admin-search        { flex: 1; min-width: 200px; }
.admin-filter-plan   { width: 160px; }
.admin-filter-status { width: 160px; }

.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.admin-table th {
  background: var(--bg-surface-2);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.6rem 0.85rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--bg-border);
}
.admin-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--bg-border);
  color: var(--text-primary);
  vertical-align: middle;
}
.admin-table tbody tr:hover { background: var(--bg-surface); }
.admin-empty { text-align: center; color: var(--text-muted); padding: 2rem !important; }

.admin-td-id    { color: var(--text-muted); width: 40px; }
.admin-td-email { color: var(--text-muted); font-size: 0.78rem; }
.admin-td-num   { text-align: center; color: var(--text-muted); }
.admin-td-date  { color: var(--text-muted); white-space: nowrap; }

.admin-username { font-weight: 600; }
.admin-fullname { font-size: 0.72rem; color: var(--text-muted); }
.admin-tag {
  display: inline-flex;
  margin-left: 0.4rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: rgba(59,130,246,0.15);
  color: #3b82f6;
  font-size: 0.6rem;
  font-weight: 700;
  vertical-align: middle;
  letter-spacing: 0.04em;
}

.admin-plan-badge {
  display: inline-flex;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.admin-plan-badge--free    { background: rgba(100,116,139,0.15); color: #94a3b8; }
.admin-plan-badge--premium { background: rgba(245,158,11,0.15);  color: #f59e0b; }

.admin-status-badge {
  display: inline-flex;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 600;
}
.admin-status-badge--active  { background: rgba(34,197,94,0.12);  color: #22c55e; }
.admin-status-badge--blocked { background: rgba(239,68,68,0.12);  color: #ef4444; }

.admin-checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  cursor: pointer;
}
.admin-checkbox-row input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; accent-color: var(--accent-blue); }

/* ── Premium Upsell Modal ── */
.upsell-modal {
  background: var(--bg-surface);
  border: 1px solid rgba(245,158,11,0.35);
  border-radius: 16px;
  padding: 2rem 2rem 1.75rem;
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-shadow: 0 0 40px rgba(245,158,11,0.12);
  animation: modalIn 0.2s ease;
}
.upsell-crown {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  line-height: 1;
}
.upsell-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}
.upsell-subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.upsell-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.upsell-features {
  list-style: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1.5rem;
  background: rgba(245,158,11,0.06);
  border: 1px solid rgba(245,158,11,0.15);
  border-radius: 10px;
  padding: 1rem 1.1rem;
}
.upsell-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.83rem;
  color: var(--text-primary);
}
.upsell-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.upsell-btn-discover {
  background: transparent;
  border: 1px solid var(--bg-border);
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.upsell-btn-discover:hover { border-color: var(--accent-blue); color: var(--text-primary); text-decoration: none; }
.upsell-bottom-btns {
  display: flex;
  gap: 0.6rem;
}
.upsell-bottom-btns .btn-ghost { flex: 1; justify-content: center; }
.upsell-btn-subscribe {
  flex: 2;
  background: #f59e0b;
  color: #000;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.15s;
}
.upsell-btn-subscribe:hover { background: #fbbf24; text-decoration: none; color: #000; }

.admin-search-box { flex: 1; min-width: 200px; max-width: 420px; }
.admin-search-box input {
  background: none;
  border: none;
  outline: none;
  font-size: 0.9rem;
  color: var(--text-primary);
  width: 100%;
}
.admin-search-box input::placeholder { color: var(--text-muted); }

/* ══════════════════════════════════════════════
   ANALYTICS — analises.html
   ══════════════════════════════════════════════ */

/* Summary bar */
.analises-summary {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.an-stat { display: flex; flex-direction: column; gap: 0.2rem; min-width: 90px; }
.an-stat-lbl { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.an-stat-val { font-size: 1.15rem; font-weight: 600; color: var(--text-primary); }
.an-stat-sep { width: 1px; height: 36px; background: var(--bg-border); margin: 0 1.25rem; flex-shrink: 0; }

/* Tabs */
.analises-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--bg-border);
  padding-bottom: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.analises-tabs::-webkit-scrollbar { display: none; }
.atab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.atab:hover { color: var(--text-primary); }
.atab.active { color: var(--accent-blue); border-bottom-color: var(--accent-blue); }

/* Chart cards */
.an-chart-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.an-chart-title {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}
.an-chart-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  border-radius: var(--radius);
}

/* Analytics table */
.an-table-wrap { overflow-x: auto; margin-top: 0.5rem; }
.an-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.an-table thead th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--bg-border);
}
.an-table tbody td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--bg-border);
  color: var(--text-primary);
}
.an-table tbody tr:last-child td { border-bottom: none; }
.an-table tbody tr:hover td { background: var(--bg-surface-2); }

/* Time-of-day heatmap */
.heatmap-grid {
  display: grid;
  grid-template-columns: 140px repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 0.75rem;
}
.heatmap-day-hdr {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 0.2rem 0;
}
.heatmap-band-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding-right: 0.5rem;
}
.heatmap-cell {
  border-radius: 4px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  transition: opacity 0.15s;
}
.heatmap-cell:hover { opacity: 0.85; }
.heatmap-val { font-size: 0.62rem; font-weight: 600; color: #fff; text-align: center; padding: 2px; }
.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.heatmap-legend-bar {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #991b1b, #ef4444, var(--bg-border), #22c55e, #166534);
  max-width: 200px;
}

/* Calendar heatmap (GitHub style) */
.cal-heatmap-wrap { overflow-x: auto; padding-bottom: 0.5rem; }
.cal-heatmap-inner { min-width: 700px; }
.cal-months {
  display: flex;
  margin-left: 28px;
  margin-bottom: 4px;
}
.cal-month-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  flex: 1;
  text-align: left;
}
.cal-grid {
  display: flex;
  gap: 3px;
  margin-left: 28px;
}
.cal-week { display: flex; flex-direction: column; gap: 3px; }
.cal-day {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: var(--bg-surface-2);
  cursor: default;
  transition: opacity 0.15s;
  position: relative;
}
.cal-day:hover { opacity: 0.75; }
.cal-day-labels {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-right: 4px;
  width: 24px;
}
.cal-day-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  height: 12px;
  line-height: 12px;
  text-align: right;
}
.cal-legend {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  justify-content: flex-end;
}
.cal-legend span { font-size: 0.68rem; color: var(--text-muted); }
.cal-legend-cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

/* Bankroll curve tab */
.bk-curve-selector {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.bk-curve-chip {
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.bk-curve-chip.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
}

@media (max-width: 640px) {
  .analises-summary { gap: 0.75rem; }
  .an-stat-sep { display: none; }
  .heatmap-grid { grid-template-columns: 100px repeat(7, 1fr); }
  .heatmap-band-label { font-size: 0.6rem; }
}

/* Bankroll filter select — analises.html */
.an-bk-select {
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-family: inherit;
  height: 34px;
  min-width: 160px;
  max-width: 260px;
  width: auto;
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
}
.an-bk-select:focus { border-color: var(--accent-blue); }

/* ── Alavancagem: reset confirm modal ── */
@keyframes alav-fade-in  { from { opacity: 0; }               to { opacity: 1; }              }
@keyframes alav-slide-up { from { transform: translateY(14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.alav-modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
.alav-modal-overlay.is-open {
  display: flex;
  animation: alav-fade-in 0.15s ease;
}
.alav-modal {
  background: var(--bg-surface);
  border: 1.5px solid var(--bg-border);
  border-radius: 16px;
  padding: 2rem 1.75rem 1.5rem;
  max-width: 380px; width: 90%;
  display: flex; flex-direction: column; align-items: center; gap: 0.55rem;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0,0,0,0.35);
  animation: alav-slide-up 0.2s ease;
}
.alav-modal-icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(239,68,68,0.12);
  border: 1.5px solid rgba(239,68,68,0.3);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-red);
  margin-bottom: 0.2rem;
}
.alav-modal-title {
  font-size: 1.05rem; font-weight: 700; color: var(--text-primary);
}
.alav-modal-msg {
  font-size: 0.84rem; color: var(--text-muted); line-height: 1.55;
  margin-bottom: 0.4rem;
}
.alav-modal-actions {
  display: flex; gap: 0.75rem; width: 100%; justify-content: center;
  margin-top: 0.2rem;
}
.alav-modal-actions .btn { min-width: 110px; }

/* ── Alavancagem: modal password field ── */
.alav-modal-field {
  width: 100%; text-align: left; margin-top: 0.35rem;
}
.alav-modal-field-label {
  display: block; font-size: 0.78rem; font-weight: 600;
  color: var(--text-muted); margin-bottom: 0.4rem;
}
.alav-modal-input {
  width: 100%; padding: 0.55rem 0.8rem;
  background: var(--bg-base); border: 1.5px solid var(--bg-border);
  border-radius: 8px; color: var(--text-primary); font-size: 0.9rem;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.alav-modal-input:focus {
  outline: none; border-color: var(--accent-blue);
}
.alav-modal-error {
  font-size: 0.78rem; color: var(--accent-red);
  min-height: 1.1rem; margin-top: 0.35rem;
}

/* ── Alavancagem: botão Zerar ── */
.alav-btn-zero {
  color: var(--accent-red) !important;
  border-color: rgba(239,68,68,0.3) !important;
}
.alav-btn-zero:hover {
  background: rgba(239,68,68,0.08) !important;
  border-color: rgba(239,68,68,0.5) !important;
}

/* ── Alavancagem: gain counter button ── */
.alav-gain-counter {
  display: none;
  align-items: center; gap: 0.35rem;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.28);
  border-radius: 20px; padding: 0.3rem 0.8rem;
  color: var(--accent-green);
  cursor: pointer; font-size: 0.8rem; font-weight: 700;
  transition: background 0.15s; line-height: 1;
}
.alav-gain-counter:hover { background: rgba(34,197,94,0.18); }
.alav-gain-counter-label { font-weight: 500; font-size: 0.75rem; }

/* ── Alavancagem: gains panel ── */
.alav-gains-panel { border-left-color: rgba(34,197,94,0.35); }
.alav-gain-item {
  display: grid;
  grid-template-columns: 1.2rem 1fr auto auto;
  align-items: center; gap: 0.5rem;
  padding: 0.75rem 0; border-bottom: 1px solid var(--bg-border);
}
.alav-gain-index  { font-size: 0.75rem; color: var(--text-muted); font-weight: 700; }
.alav-gain-label  { font-size: 0.85rem; color: var(--text-primary); font-weight: 600; }
.alav-gain-date   { font-size: 0.78rem; color: var(--text-muted); }
.alav-gain-amount { font-size: 0.85rem; font-weight: 700; color: var(--accent-green); white-space: nowrap; }
.alav-gain-total-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 0 0; font-weight: 700; font-size: 0.88rem;
  color: var(--text-primary);
}

/* ── Alavancagem: failure counter button ── */
.alav-fail-counter {
  display: none;
  align-items: center; gap: 0.35rem;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.28);
  border-radius: 20px; padding: 0.3rem 0.8rem;
  color: var(--accent-red);
  cursor: pointer; font-size: 0.8rem; font-weight: 700;
  transition: background 0.15s;
  line-height: 1;
}
.alav-fail-counter:hover { background: rgba(239,68,68,0.18); }
.alav-fail-counter-label { font-weight: 500; font-size: 0.75rem; }

/* ── Alavancagem: failures right panel ── */
.alav-failures-panel {
  position: fixed; top: 0; right: -340px; height: 100vh; width: 310px;
  background: var(--bg-surface);
  border-left: 1.5px solid var(--bg-border);
  z-index: 8000;
  padding: 1.5rem 1.25rem 2rem;
  display: flex; flex-direction: column; gap: 0;
  box-shadow: -10px 0 40px rgba(0,0,0,0.18);
  transition: right 0.25s cubic-bezier(0.4,0,0.2,1);
}
.alav-failures-panel.is-open { right: 0; }
.alav-failures-overlay {
  display: none; position: fixed; inset: 0; z-index: 7999;
  background: rgba(0,0,0,0.2);
}
.alav-failures-overlay.is-open { display: block; }
.alav-failures-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem; padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--bg-border);
}
.alav-failures-title { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.alav-fail-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 0; border-bottom: 1px solid var(--bg-border);
}
.alav-fail-stage { font-size: 0.88rem; color: var(--text-primary); }
.alav-fail-count {
  font-size: 0.8rem; font-weight: 700;
  background: rgba(239,68,68,0.12); color: var(--accent-red);
  border-radius: 20px; padding: 0.2rem 0.65rem;
}
.alav-fail-total-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 0 0; font-weight: 600; font-size: 0.88rem;
  color: var(--text-primary);
}
.alav-fail-empty { font-size: 0.85rem; color: var(--text-muted); padding: 1.25rem 0; text-align: center; }

/* ── Alavancagem: per-stage odd editing ── */
.alav-odd-cell {
  cursor: pointer; position: relative; white-space: nowrap;
}
.alav-odd-cell:hover .alav-odd-edit-icon { opacity: 1; }
.alav-odd-edit-icon {
  opacity: 0.35; color: var(--accent-blue);
  margin-left: 0.3rem; transition: opacity 0.15s; vertical-align: middle;
}
.alav-odd-input {
  width: 62px; padding: 0.22rem 0.4rem;
  background: var(--bg-surface-2);
  border: 1.5px solid var(--accent-blue);
  border-radius: 6px; color: var(--text-primary);
  font-size: 0.82rem; font-weight: 600; outline: none;
}
.alav-odd-custom { color: var(--accent-blue); font-weight: 700; }
.an-bk-select option { background: var(--bg-surface-2); }

/* ════════════════════════════════════════════
   RESPONSIVIDADE MOBILE — GLOBAL
   ════════════════════════════════════════════ */

/* Corrige margem do page-header com o padding menor do mobile */
@media (max-width: 768px) {
  body { font-size: 16px; }

  .page-header {
    margin-top: -1rem;
    margin-left: -1rem;
    margin-right: -1rem;
    padding: 0.875rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .page-title { font-size: 1.15rem; }

  /* Tabelas: scroll horizontal em vez de overflow hidden */
  .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-wrapper table { min-width: 520px; }

  /* Hero cards: padding menor */
  .bankroll-hero { padding: 1.25rem; }
  .bankroll-stat { padding: 0.875rem; }
  .bankroll-stat .b-value { font-size: 1.1rem; }

  /* Panels laterais: largura total no mobile */
  .alav-failures-panel {
    width: 100%;
    right: -100%;
  }

  /* Alavancagem action card */
  .alav-action-card { padding: 1rem; }
  .alav-action-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }

  /* Completion card */
  .alav-completion-card { padding: 1rem; }

  /* Contadores no header */
  .alav-fail-counter,
  .alav-gain-counter { font-size: 0.75rem; padding: 0.25rem 0.6rem; }
}

/* Telas muito pequenas (≤ 480px) */
@media (max-width: 480px) {
  .main-content { padding: 0.875rem; padding-top: 3.25rem; }

  .page-header {
    margin-top: -0.875rem;
    margin-left: -0.875rem;
    margin-right: -0.875rem;
    padding: 0.75rem 0.875rem;
  }

  /* Hero: 2 colunas no mínimo */
  .bankroll-hero > div:first-child {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Botões menores */
  .btn { font-size: 0.8rem; padding: 0.4rem 0.75rem; }
  .btn-sm { font-size: 0.75rem; padding: 0.3rem 0.55rem; }

  /* Modal: quase tela cheia */
  .alav-modal { padding: 1.5rem 1.25rem 1.25rem; }

  /* Alavancagem route na lista */
  .alav-route { flex-wrap: wrap; }

  /* Stats grid 2 colunas */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* Balanco cards 1 coluna */
  .balanco-cards-grid { grid-template-columns: 1fr !important; }
}

/* ════════════════════════════════════════════
   RESPONSIVIDADE — PÁGINA VALORES PROGRESSIVOS
   ════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Tabela da alavancagem: scroll, colunas menores */
  .alav-table { min-width: 600px; }
  .alav-table thead th,
  .alav-table tbody td { padding: 0.65rem 0.75rem; font-size: 0.82rem; }

  /* Action grid: 2 colunas */
  .alav-action-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Ganhos/falhas panel full width */
  #failures-panel, #gains-panel {
    width: 100%;
    right: -100%;
  }
}

@media (max-width: 480px) {
  /* Action grid: 1 coluna no mobile pequeno */
  .alav-action-grid { grid-template-columns: 1fr 1fr; }

  /* Esconde colunas menos essenciais na tabela */
  .alav-table .hide-xs { display: none; }

  /* Contadores empilham abaixo do título */
  .page-header > div:last-child {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ════════════════════════════════════════════
   RESPONSIVIDADE — BETS / APOSTAS
   ════════════════════════════════════════════ */
@media (max-width: 768px) {
  .bets-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .bets-filters { flex-wrap: wrap; gap: 0.5rem; }
  .bets-filters .btn,
  .bets-filters select,
  .bets-filters input { flex: 1 1 auto; min-width: 0; }
}

/* ════════════════════════════════════════════
   RESPONSIVIDADE — BANKROLL DETAIL
   ════════════════════════════════════════════ */
@media (max-width: 768px) {
  .bankroll-hero-header { flex-direction: column; gap: 0.75rem; }
  .bc-metrics-row { flex-wrap: wrap; gap: 0.75rem; }
  .bc-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
}

/* ════════════════════════════════════════════
   RESPONSIVIDADE — FORMULÁRIOS / MODAIS
   ════════════════════════════════════════════ */
@media (max-width: 768px) {
  .modal-inner { padding: 1.25rem; }
  .modal-footer { flex-direction: column-reverse; gap: 0.5rem; }
  .modal-footer .btn { width: 100%; justify-content: center; }
  .form-row { grid-template-columns: 1fr; }
  .modal-body { padding: 1rem; }
  .modal-header { padding: 1rem; }
  /* Garante que o modal não estoure a tela em celular */
  .modal-overlay { padding: 0.5rem; align-items: flex-end; }
  .modal {
    max-height: calc(100dvh - 1rem);
    border-radius: 16px 16px 0 0;
    -webkit-overflow-scrolling: touch;
  }
}

/* ════════════════════════════════════════════
   RESPONSIVIDADE — BANKROLL / STATS ROW
   ════════════════════════════════════════════ */
@media (max-width: 640px) {
  /* Stats row: separadores viram espaço, stats ficam 2 por linha */
  .bk-stats-row { padding: 0.75rem 1rem; gap: 0; }
  .bk-stat { min-width: 50%; flex: 0 0 50%; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--bg-border); }
  .bk-stat:nth-last-child(-n+2) { border-bottom: none; }
  .bk-stat-sep { display: none; }
  .bk-stat-val { font-size: 1rem; }

  /* bc metrics menor */
  .bc-metric-value { font-size: 1.1rem; }

  /* Tabs de mercado: scroll horizontal */
  .mkt-tabs { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch;
              white-space: nowrap; gap: 0.25rem; padding-bottom: 2px; }

  /* Stat cards grid: 2 colunas */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .stat-card { padding: 0.875rem 1rem; }
  .stat-card .value { font-size: 1.1rem; }
}

/* ════════════════════════════════════════════
   RESPONSIVIDADE — PÁGINA DE APOSTAS (BETS)
   ════════════════════════════════════════════ */
@media (max-width: 640px) {
  /* Header da tabela de apostas */
  .table-header { flex-wrap: wrap; gap: 0.5rem; padding: 0.75rem 1rem; }
  .table-header h2 { font-size: 0.88rem; }

  /* Filtros de apostas */
  .bets-filter-row { flex-wrap: wrap; gap: 0.5rem; }
  .bets-filter-row select,
  .bets-filter-row input { flex: 1 1 140px; }

  /* Badge de status na tabela menor */
  .bet-status { font-size: 0.68rem; padding: 0.15rem 0.45rem; }
}

/* ════════════════════════════════════════════
   RESPONSIVIDADE — SIDEBAR MOBILE EXTRAS
   ════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Fecha sidebar ao clicar num link de navegação */
  .sidebar-nav a { -webkit-tap-highlight-color: transparent; }

  /* User popup vira inline no mobile */
  .user-popup { right: 0; left: auto; }

  /* Page subtitle menor */
  .page-subtitle { font-size: 0.75rem; }
}
