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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0d1a0d;
  color: #e0e8e0;
}

.app {
  display: flex;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 240px;
  background: #0f1f0f;
  border-right: 1px solid #1a3a1a;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 10;
}

.sidebar-header {
  padding: 20px 16px 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.logo-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 900;
  color: #2ea55a;
  letter-spacing: 1px;
}

.active-op {
  background: #1a5c36;
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
}

.active-op-label {
  display: block;
  font-size: 10px;
  font-weight: 500;
  opacity: 0.8;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.active-op-name {
  font-size: 15px;
  font-weight: 600;
}

.sidebar-nav {
  flex: 1;
  padding: 8px 12px;
}

.nav-section {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #2ea55a;
  letter-spacing: 0.5px;
  padding: 12px 8px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #8faa8f;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: #1a3a1a;
  color: #c0dcc0;
}

.nav-item.active {
  background: #1a5c36;
  color: #fff;
}

.nav-item.active svg {
  stroke: #fff;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid #1a3a1a;
}

.user-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.user-name {
  font-weight: 600;
  color: #c0dcc0;
}

.logout-link {
  color: #999;
  text-decoration: none;
  cursor: pointer;
  font-size: 12px;
}

.logout-link:hover {
  color: #dc2626;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  margin-left: 240px;
  padding: 32px 40px;
  min-height: 100vh;
}

/* ===== PAGE HEADER ===== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: #e0e8e0;
}

.page-subtitle {
  font-size: 14px;
  color: #888;
  margin-top: 2px;
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: #1a5c36;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}

.btn-primary:hover { background: #144a2b; }

.btn-secondary {
  background: #1a3a1a;
  color: #c0dcc0;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover { background: #244424; }

.btn-danger {
  background: #fef2f2;
  color: #dc2626;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.btn-danger:hover { background: #fee2e2; }

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  color: #999;
  transition: all 0.15s;
}

.btn-icon:hover { background: #1a3a1a; color: #c0dcc0; }

/* ===== CARDS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #142814;
  border: 1.5px solid #1a3a1a;
  border-radius: 14px;
  padding: 20px;
  position: relative;
}

.stat-card .stat-label {
  font-size: 11px;
  font-weight: 600;
  color: #888;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  margin-top: 6px;
  color: #e0e8e0;
}

.stat-card .stat-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  color: #2ea55a;
}

.stat-value.positive { color: #16a34a; }
.stat-value.negative { color: #dc2626; }

/* ===== BANKROLL CARDS ===== */
.bankrolls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.bankroll-card {
  background: #142814;
  border: 2px solid #1a3a1a;
  border-radius: 14px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.bankroll-card:hover { border-color: #2ea55a; }

.bankroll-card.active {
  border-color: #2ea55a;
  box-shadow: 0 0 0 1px #2ea55a;
}

.bankroll-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.bankroll-card-name {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: #e0e8e0;
  letter-spacing: 0.5px;
}

.bankroll-card-actions {
  display: flex;
  gap: 4px;
}

.bankroll-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.bankroll-stat {
  background: #0d1a0d;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}

.bankroll-stat-label {
  font-size: 10px;
  font-weight: 600;
  color: #888;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.bankroll-stat-value {
  font-size: 18px;
  font-weight: 700;
}

.bankroll-stat-value.positive { color: #16a34a; }
.bankroll-stat-value.negative { color: #dc2626; }

.add-bankroll-card {
  background: #142814;
  border: 2px dashed #1a3a1a;
  border-radius: 14px;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  color: #999;
  transition: all 0.2s;
}

.add-bankroll-card:hover {
  border-color: #2ea55a;
  color: #2ea55a;
}

.add-bankroll-card .plus {
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
}

.bankroll-bets-list {
  margin-top: 14px;
  border-top: 1px solid #1a3a1a;
  padding-top: 10px;
}

.bankroll-bet-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 12px;
}

.bankroll-bet-title {
  color: #c0dcc0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.bankroll-bet-more {
  font-size: 11px;
  color: #8faa8f;
  text-align: center;
  padding: 4px 0;
}

.bankroll-bet-count {
  margin-top: 10px;
  font-size: 11px;
  color: #8faa8f;
  text-align: center;
}

/* ===== FORM ===== */
.form-container {
  background: #142814;
  border: 1.5px solid #1a3a1a;
  border-radius: 14px;
  padding: 32px;
  max-width: 700px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #8faa8f;
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #1a3a1a;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  background: #0d1a0d;
  color: #e0e8e0;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #2ea55a;
}

.format-group {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.format-btn {
  flex: 1;
  padding: 10px;
  border: 1.5px solid #1a3a1a;
  border-radius: 10px;
  background: #0d1a0d;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  color: #8faa8f;
}

.format-btn.active {
  background: #1a5c36;
  color: #fff;
  border-color: #1a5c36;
}

.format-btn:hover:not(.active) {
  border-color: #2ea55a;
  color: #2ea55a;
}

/* ===== BETS TABLE ===== */
.bets-list {
  background: #142814;
  border: 1.5px solid #1a3a1a;
  border-radius: 14px;
  overflow: hidden;
}

.bet-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 80px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #1a3a1a;
  font-size: 13px;
  transition: background 0.1s;
  color: #c0dcc0;
}

.bet-row:hover { background: #1a2e1a; }

.bet-row:last-child { border-bottom: none; }

.bet-row-header {
  font-weight: 600;
  color: #888;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #0d1a0d;
}

.bet-row-header:hover { background: #0d1a0d; }

.bet-title { font-weight: 600; color: #e0e8e0; }
.bet-title small { display: block; font-weight: 400; color: #999; font-size: 11px; margin-top: 2px; }

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.status-pendente { background: #fef9c3; color: #a16207; }
.status-ganhou { background: #dcfce7; color: #16a34a; }
.status-perdeu { background: #fee2e2; color: #dc2626; }
.status-cashout { background: #e0e7ff; color: #4f46e5; }
.status-reembolso { background: #f0f0f0; color: #666; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-state p { font-size: 16px; margin-bottom: 4px; }
.empty-state small { font-size: 13px; }

/* ===== CALCULATOR (BIZZU STYLE) ===== */
.calc-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 16px 24px;
  background: linear-gradient(180deg, hsl(152 30% 14%), hsl(152 30% 10%));
  border-radius: 14px;
  border: 1px solid #2a4a2a;
  box-shadow: 0 0 30px hsla(45, 60%, 50%, 0.1);
}

.calc-header-bar .page-title {
  color: #e8dcc0;
}

.calc-header-bar .page-subtitle {
  color: #8a9a7a;
}

.calc-roi-badge {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.calc-roi-badge.positive {
  background: rgba(34, 139, 80, 0.2);
  color: #22c55e;
}

.calc-roi-badge.negative {
  background: rgba(220, 38, 38, 0.2);
  color: #ef4444;
}

.calc-content {
  background: linear-gradient(180deg, hsl(152 30% 14%), hsl(152 30% 10%));
  border: 1px solid #2a4a2a;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 0 30px hsla(45, 60%, 50%, 0.06);
}

.calc-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 8px;
}

.calc-toolbar .btn-primary {
  background: hsl(45, 60%, 48%);
  color: #1a2e1a;
  font-weight: 700;
}

.calc-toolbar .btn-primary:hover {
  background: hsl(45, 60%, 42%);
}

.calc-toolbar .btn-secondary {
  background: transparent;
  border: 1.5px solid hsl(45, 60%, 48%);
  color: hsl(45, 60%, 55%);
}

.calc-toolbar .btn-secondary:hover {
  background: hsla(45, 60%, 48%, 0.1);
}

/* ===== CALC TABLE ===== */
.calc-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.calc-table th {
  font-size: 9px;
  font-weight: 600;
  color: #8a9a7a;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 10px 3px;
  text-align: center;
  border-bottom: 1px solid #2a4a2a;
  white-space: nowrap;
}

.calc-row {
  border-bottom: 1px solid rgba(42, 74, 42, 0.4);
  transition: background 0.15s;
}

.calc-row:hover {
  background: hsla(152, 30%, 18%, 0.4);
}

.calc-td {
  padding: 7px 3px;
  text-align: center;
  color: #c0d4b0;
  font-size: 12px;
  font-weight: 500;
}

.calc-center { text-align: center; }

.calc-input {
  padding: 7px 5px;
  border: 1.5px solid #2a4a2a;
  border-radius: 6px;
  font-size: 12px;
  text-align: center;
  outline: none;
  background: hsl(152, 30%, 10%);
  color: #e8dcc0;
  transition: border-color 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.calc-input:focus { border-color: hsl(45, 60%, 50%); }

.calc-input.calc-name { text-align: left; }
.calc-input.calc-bk { text-align: left; }
.calc-input.calc-num { }
.calc-input.calc-stake { }
.calc-input.w80 { width: 80px; }

.calc-select {
  padding: 7px 3px;
  border: 1.5px solid #2a4a2a;
  border-radius: 6px;
  font-size: 11px;
  background: hsl(152, 30%, 10%);
  color: #e8dcc0;
  outline: none;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}

.calc-select:focus { border-color: hsl(45, 60%, 50%); }

.calc-select.calc-sport { }
.calc-select.calc-type { }

.chance-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 2px 4px;
}

.chance-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.chance-icon.positive {
  background: hsla(45, 60%, 50%, 0.15);
  color: hsl(45, 60%, 55%);
}

.chance-icon.negative {
  background: rgba(220, 38, 38, 0.15);
  color: #ef4444;
}

.chance-label {
  font-size: 9px;
  font-weight: 600;
}

.chance-label.positive { color: hsl(45, 60%, 55%); }
.chance-label.negative { color: #ef4444; }

.profit-cell {
  color: hsl(45, 60%, 55%);
  font-weight: 700;
}

.calc-table input[type="radio"] {
  width: 15px;
  height: 15px;
  accent-color: hsl(45, 60%, 48%);
  cursor: pointer;
}

/* Column widths — NOME, CASA, CHANCE, ODD, COM.%, APOSTA, RESP., TRAVAR, CB%, TIPO, COM.R$, LUCRO */
.calc-table th:nth-child(1) { width: 12%; }  /* NOME */
.calc-table th:nth-child(2) { width: 10%; }  /* CASA */
.calc-table th:nth-child(3) { width: 6%; }   /* CHANCE */
.calc-table th:nth-child(4) { width: 7%; }   /* ODD */

.calc-total-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

.calc-total-box {
  background: hsl(152, 30%, 10%);
  border: 1px solid #2a4a2a;
  border-radius: 10px;
  padding: 14px 28px;
  min-width: 210px;
}

.calc-total-value {
  font-size: 24px;
  font-weight: 700;
  color: #e8dcc0;
}

.calc-results {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.calc-result-card {
  background: hsla(152, 20%, 16%, 0.4);
  border: 1px solid #2a4a2a;
  border-radius: 10px;
  padding: 18px;
}

.calc-result-label {
  font-size: 12px;
  color: #8a9a7a;
  margin-bottom: 6px;
}

.calc-result-value {
  font-size: 19px;
  font-weight: 700;
  color: #e8dcc0;
}

.calc-result-value.positive { color: #22c55e; }
.calc-result-value.negative { color: #ef4444; }

.calc-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid #2a4a2a;
}

.calc-settings .form-group label {
  color: #8a9a7a;
}

.calc-settings .form-group input,
.calc-settings .form-group select {
  background: hsl(152, 30%, 10%);
  border-color: #2a4a2a;
  color: #e8dcc0;
}

.calc-settings .form-group input:focus,
.calc-settings .form-group select:focus {
  border-color: hsl(45, 60%, 50%);
}

.calc-toggle-group {
  display: flex;
  align-items: center;
}

.calc-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #8a9a7a;
}

.calc-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: hsl(45, 60%, 48%);
  cursor: pointer;
}

.calc-checkbox-label span {
  white-space: nowrap;
}

.calc-table input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: hsl(45, 60%, 48%);
  cursor: pointer;
}

.calc-footer-tip {
  margin-top: 24px;
  padding: 16px 18px;
  font-size: 13px;
  color: #8a9a7a;
  background: hsla(152, 30%, 10%, 0.6);
  border: 1px solid #2a4a2a;
  border-radius: 10px;
}

.calc-footer-tip strong {
  color: #e8dcc0;
}

/* Settings inputs */
.calc-input {
  padding: 9px 10px;
  border: 1.5px solid #2a4a2a;
  border-radius: 8px;
  font-size: 13px;
  text-align: center;
  outline: none;
  background: hsl(152, 30%, 10%);
  color: #e8dcc0;
  transition: border-color 0.2s;
}

.calc-input:focus {
  border-color: hsl(45, 60%, 50%);
}

.calc-input.w80 { width: 84px; }

.calc-save-section {
  margin-top: 24px;
  padding: 20px;
  background: linear-gradient(180deg, hsl(152 30% 14%), hsl(152 30% 10%));
  border: 1px solid hsl(45, 60%, 40%, 0.3);
  border-radius: 12px;
  box-shadow: 0 0 20px hsla(45, 60%, 50%, 0.08);
}

.calc-save-header {
  font-size: 15px;
  font-weight: 700;
  color: hsl(45, 60%, 55%);
  margin-bottom: 14px;
  letter-spacing: 0.3px;
}

.calc-save-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.calc-save-row .form-group select {
  background: hsl(152, 30%, 10%);
  border-color: #2a4a2a;
  color: #e8dcc0;
}

.calc-save-row .form-group select:focus {
  border-color: hsl(45, 60%, 50%);
}

.calc-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  background: hsl(45, 60%, 48%);
  color: #1a2e1a;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.calc-save-btn:hover {
  background: hsl(45, 60%, 42%);
  box-shadow: 0 0 15px hsla(45, 60%, 50%, 0.2);
}

/* ===== DASHBOARD BETS ===== */
.dashboard-bets-section {
  margin-top: 28px;
}

/* ===== BET GROUPS (month / week / day) ===== */
.bet-groups {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bet-month-group {
  background: #142814;
  border: 1.5px solid #1a3a1a;
  border-radius: 12px;
  overflow: hidden;
}

.bet-month-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.bet-month-header:hover {
  background: hsla(152, 30%, 15%, 0.4);
}

.bet-month-name {
  font-size: 15px;
  font-weight: 700;
  color: #e0e8e0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bet-month-name::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #8a9a7a;
  transition: transform 0.2s;
  transform: rotate(-90deg);
}

.bet-month-header.open .bet-month-name::before {
  transform: rotate(0deg);
}

.bet-month-content {
  border-top: 1px solid #1a3a1a;
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: hsla(152, 30%, 8%, 0.3);
}

.bet-week-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bet-week-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px;
  font-size: 12px;
  color: #8a9a7a;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.bet-week-name {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.6px;
}

.bet-week-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bet-day-group {
  border: 1px solid #1a3a1a;
  border-radius: 10px;
  background: hsla(152, 30%, 10%, 0.5);
  overflow: hidden;
}

.bet-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #c0d4b0;
  background: hsla(152, 30%, 14%, 0.4);
  border-bottom: 1px solid #1a3a1a;
}

.bet-day-group .bet-cards-list {
  padding: 10px;
  gap: 8px;
}

.bet-group-total {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: #c0d4b0;
  white-space: nowrap;
}

.bet-group-total.positive {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}

.bet-group-total.negative {
  background: rgba(220, 38, 38, 0.12);
  color: #f87171;
}

/* ===== BET CARD ===== */
.bet-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bet-card {
  background: #142814;
  border: 1.5px solid #1a3a1a;
  border-radius: 12px;
  padding: 18px 0 18px 20px;
  display: grid;
  grid-template-columns: 1fr auto 40px;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s;
}

.bet-card:hover {
  border-color: #2a5a2a;
}

.bet-card-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.bet-card-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bet-badge {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  border: 1px solid transparent;
}

.bet-badge-date {
  background: rgba(120, 180, 120, 0.12);
  color: #4a8a4a;
  font-weight: 700;
  border-color: rgba(120, 180, 120, 0.3);
}

.bet-badge-time {
  background: #f3f4f6;
  color: #4b5563;
  font-weight: 700;
}

.bet-badge-format {
  background: #dbeafe;
  color: #1e40af;
}

.bet-badge-bookmaker {
  background: transparent;
  color: #a78bfa;
  border-color: #a78bfa;
}

.bet-badge-account {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.4);
}

.bet-card-match {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #e0e8e0;
  letter-spacing: 0.3px;
  min-width: 0;
}

.bet-sport-icon {
  font-size: 18px;
}

.bet-match-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bet-card-stats {
  display: flex;
  gap: 32px;
  padding-right: 20px;
}

.bet-stat {
  text-align: right;
  min-width: 70px;
}

.bet-stat-value {
  font-size: 16px;
  font-weight: 700;
  color: #e0e8e0;
  white-space: nowrap;
}

.bet-stat-value .currency {
  font-size: 10px;
  font-weight: 600;
  margin-left: 2px;
  opacity: 0.8;
}

.bet-stat-value.positive { color: #22c55e; }
.bet-stat-value.negative { color: #ef4444; }

.bet-stat-label {
  font-size: 11px;
  font-weight: 500;
  color: #8a9a7a;
  margin-top: 2px;
}

.bet-card-status {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  padding: 10px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  min-width: 32px;
  border: none;
  cursor: pointer;
  transition: filter 0.15s;
}

.bet-card-status:hover {
  filter: brightness(1.3);
}

/* ===== STATUS DROPDOWN MENU ===== */
.status-menu {
  position: fixed;
  min-width: 160px;
  background: #142814;
  border: 1.5px solid #2a4a2a;
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.status-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  background: transparent;
  color: #c0dcc0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 7px;
  text-align: left;
  transition: background 0.1s;
  letter-spacing: 0.2px;
}

.status-menu-item:hover {
  background: #1a3a1a;
}

.status-menu-item.active {
  background: rgba(46, 165, 90, 0.12);
}

.status-menu-item::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-menu-pendente::before { background: #fbbf24; }
.status-menu-ganhou::before { background: #22c55e; }
.status-menu-perdeu::before { background: #ef4444; }
.status-menu-cashout::before { background: #818cf8; }
.status-menu-reembolso::before { background: #94a3b8; }

.status-menu-pendente { color: #fbbf24; }
.status-menu-ganhou { color: #22c55e; }
.status-menu-perdeu { color: #ef4444; }
.status-menu-cashout { color: #818cf8; }
.status-menu-reembolso { color: #94a3b8; }

.bet-status-pendente { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.bet-status-ganhou { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.bet-status-perdeu { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.bet-status-cashout { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.bet-status-reembolso { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

/* ===== CHART CARD ===== */
.chart-card {
  background: #142814;
  border: 1.5px solid #1a3a1a;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
}

.chart-card-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.chart-menu-wrap {
  position: relative;
  margin-left: auto;
}

.chart-menu-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1.5px solid #1a3a1a;
  background: #0d1a0d;
  color: #8faa8f;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.chart-menu-btn:hover {
  border-color: #2ea55a;
  color: #c0dcc0;
}

.chart-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #142814;
  border: 1.5px solid #1a3a1a;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 50;
}

.chart-menu-section {
  font-size: 11px;
  font-weight: 600;
  color: #8a9a7a;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 8px 10px 4px;
}

.chart-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  background: transparent;
  color: #c0dcc0;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  text-align: left;
  transition: background 0.12s;
}

.chart-menu-item:hover {
  background: #1a3a1a;
}

.chart-menu-item.active {
  background: rgba(46, 165, 90, 0.1);
  color: #2ea55a;
}

.chart-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1.5px solid #1a3a1a;
  border-radius: 999px;
  background: #0d1a0d;
  color: #8faa8f;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.chart-pill:hover {
  border-color: #2ea55a;
  color: #c0dcc0;
}

.chart-pill.active {
  border-color: #2ea55a;
  color: #2ea55a;
  background: rgba(46, 165, 90, 0.08);
}

.chart-wrap {
  width: 100%;
  height: 320px;
  position: relative;
}

.profit-chart-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ===== METRICS (APOSTAS, LUCROS, ROI, PROGRESSÃO) ===== */
.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: #142814;
  border: 1.5px solid #1a3a1a;
  border-radius: 14px;
  padding: 22px 24px;
  text-align: center;
}

.metric-label {
  font-size: 12px;
  font-weight: 600;
  color: #888;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.metric-value {
  font-size: 32px;
  font-weight: 700;
  color: #e0e8e0;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.metric-value.positive { color: #22c55e; }
.metric-value.negative { color: #ef4444; }
.metric-value.metric-blue { color: #3b82f6; }

.metric-currency {
  font-size: 16px;
  font-weight: 600;
  opacity: 0.75;
}

@media (max-width: 900px) {
  .dashboard-metrics { grid-template-columns: 1fr 1fr; }
  .bet-card { grid-template-columns: 1fr auto; padding: 16px; gap: 10px; }
  .bet-card-menu { display: none; }
  .bet-card-status { writing-mode: horizontal-tb; transform: none; padding: 4px 10px; border-radius: 999px; }
  .bet-card-stats { flex-wrap: wrap; gap: 16px; padding-right: 0; }
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal {
  background: #142814;
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.modal h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #e0e8e0;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ===== CAPITAL INPUT ===== */
.capital-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.capital-input-wrapper span {
  font-size: 14px;
  color: #888;
  font-weight: 500;
}

.capital-input {
  width: 120px;
  padding: 8px 12px;
  border: 1.5px solid #1a3a1a;
  border-radius: 8px;
  font-size: 14px;
  text-align: right;
  outline: none;
  background: #0d1a0d;
  color: #e0e8e0;
}

.capital-input:focus {
  border-color: #2ea55a;
}

/* ===== MOBILE HEADER ===== */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #0f1f0f;
  border-bottom: 1px solid #1a3a1a;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  z-index: 40;
}

.mobile-menu-btn {
  background: none;
  border: none;
  color: #c0dcc0;
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
}

.mobile-menu-btn:active {
  background: #1a3a1a;
}

.mobile-header-title {
  font-size: 16px;
  font-weight: 700;
  color: #e0e8e0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mobile-header-spacer {
  width: 40px;
}

.mobile-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 90;
}

body.sidebar-open .mobile-sidebar-overlay {
  display: block;
}

/* ===== MOBILE BOTTOM NAV ===== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: #0f1f0f;
  border-top: 1px solid #1a3a1a;
  padding: 0 8px;
  z-index: 40;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #6a8a6a;
  font-size: 10.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  padding: 6px 4px;
  flex: 1;
  transition: color 0.15s;
}

.mobile-nav-item.active,
.mobile-nav-item:active {
  color: #2ea55a;
}

.mobile-nav-fab {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
  margin-top: -20px;
  flex-shrink: 0;
}

.mobile-nav-fab:active {
  transform: scale(0.95);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .dashboard-metrics { grid-template-columns: 1fr 1fr; }
  .bet-card { grid-template-columns: 1fr 32px; gap: 10px; padding: 14px 0 14px 14px; }
  .bet-card-stats {
    grid-column: 1 / -1;
    padding-right: 0;
    padding-left: 0;
    gap: 16px;
    justify-content: space-between;
  }
  .bet-stat { min-width: 0; }
  .bet-stat-value { font-size: 14px; }
  .bet-stat-label { font-size: 10px; }
}

@media (max-width: 768px) {
  /* Show mobile chrome */
  .mobile-header { display: flex; }
  .mobile-bottom-nav { display: flex; }

  /* Hide desktop sidebar by default, show as drawer when open */
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(.4,0,.2,1);
    width: 260px;
    z-index: 100;
    top: 0;
    padding-top: 8px;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.4);
  }

  /* Main content takes full width, with space for top header and bottom nav */
  .main-content {
    margin-left: 0;
    padding: 16px;
    padding-top: 72px;
    padding-bottom: 88px;
  }

  /* Page header stack */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
  }

  .page-title { font-size: 20px; }
  .page-subtitle { font-size: 13px; }

  .capital-input-wrapper {
    width: 100%;
    justify-content: space-between;
    background: #142814;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1.5px solid #1a3a1a;
  }
  .capital-input { width: 100px; }

  /* Stats / metrics */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 16px; }
  .stat-card .stat-value { font-size: 22px; }

  .dashboard-metrics { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card { padding: 18px 14px; }
  .metric-value { font-size: 26px; }
  .metric-currency { font-size: 13px; }

  /* Bankroll cards full width */
  .bankrolls-grid { grid-template-columns: 1fr; }

  /* Chart card */
  .chart-card { padding: 14px; }
  .chart-wrap { height: 240px; }
  .chart-pill { padding: 7px 12px; font-size: 12px; }
  .chart-card-toolbar { gap: 6px; }

  /* Bet card mobile — vertical layout */
  .bet-card {
    grid-template-columns: 1fr 32px;
    grid-template-rows: auto auto;
    gap: 10px;
    padding: 14px 0 14px 14px;
  }
  .bet-card-main {
    grid-column: 1 / 2;
  }
  .bet-card-badges { gap: 6px; }
  .bet-badge { padding: 3px 8px; font-size: 10.5px; }
  .bet-card-match { font-size: 13px; }
  .bet-sport-icon { font-size: 16px; }
  .bet-card-stats {
    grid-column: 1 / -1;
    padding: 10px 14px 0 0;
    gap: 10px;
    justify-content: space-between;
    border-top: 1px solid #1a3a1a;
    margin-top: 4px;
  }
  .bet-stat { text-align: center; min-width: 0; flex: 1; }
  .bet-stat-value { font-size: 13px; }
  .bet-stat-label { font-size: 10px; }
  .bet-card-status {
    grid-row: 1 / 3;
    grid-column: 2 / 3;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
  }

  /* Forms */
  .form-container { padding: 20px 16px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-group input, .form-group select { padding: 12px 14px; font-size: 15px; }
  .format-group { flex-direction: column; gap: 6px; }

  /* Modal */
  .modal { max-width: 92vw; padding: 20px; }

  /* Calculator mobile — card layout (table collapses into cards) */
  .calc-content { padding: 12px; }
  .calc-toolbar { gap: 10px; }
  .calc-toolbar .form-group { flex: 1 1 100%; margin-bottom: 0; }
  .calc-toolbar > div:last-child { width: 100%; }
  .calc-toolbar > div:last-child .btn-primary,
  .calc-toolbar > div:last-child .btn-secondary { flex: 1; }
  .calc-header-bar { padding: 14px 16px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .calc-total-value { font-size: 22px; }
  .calc-results { grid-template-columns: 1fr; gap: 10px; }
  .calc-save-row { flex-direction: column; align-items: stretch; gap: 12px; }
  .calc-save-row .form-group { width: 100%; }
  .calc-save-btn { width: 100%; justify-content: center; }

  /* Wrapper no overflow needed — cards fit */
  .calc-content > div[style*="overflow-x"] { overflow-x: visible !important; margin-top: 12px; }

  /* Table → cards */
  .calc-table { display: block; width: 100%; table-layout: auto; }
  .calc-table thead { display: none; }
  .calc-table tbody { display: block; }
  .calc-table th, .calc-table td { width: auto !important; }

  .calc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
    padding: 14px;
    margin-bottom: 12px;
    background: hsla(152, 30%, 10%, 0.5);
    border: 1px solid #2a4a2a;
    border-radius: 10px;
    position: relative;
  }

  .calc-row::before {
    content: attr(data-row-label);
    grid-column: 1 / -1;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: hsl(45, 60%, 55%);
    margin-bottom: 2px;
  }

  .calc-td {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    text-align: left;
    font-size: 13px;
    gap: 4px;
  }

  .calc-td::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 600;
    color: #8a9a7a;
    text-transform: uppercase;
    letter-spacing: 0.4px;
  }

  /* Full-width fields */
  .calc-td[data-label="Nome"],
  .calc-td[data-label="Casa"] { grid-column: 1 / -1; }

  /* Center-type cells: align label + value row */
  .calc-td.calc-center { text-align: left; }
  .calc-td.calc-center[data-label="Travar"] { align-items: flex-start; }
  .calc-td.calc-center[data-label="Travar"] input[type="radio"] { margin-top: 2px; }

  /* Resp./Com R$ display as plain value */
  .calc-td[data-label="Resp."],
  .calc-td[data-label="Com. R$"],
  .calc-td[data-label="Lucro"] {
    padding: 4px 0;
    font-weight: 600;
  }

  /* Chance toggle: render horizontal on mobile */
  .calc-td[data-label="Chance"] .chance-toggle {
    flex-direction: row;
    gap: 6px;
    justify-content: flex-start;
    padding: 4px 0;
  }

  .calc-input, .calc-select {
    padding: 9px 10px;
    font-size: 13px;
    text-align: left;
  }
  .calc-input.calc-num, .calc-input.calc-stake { text-align: right; }

  /* Lucro — highlight as the most important metric */
  .calc-td.profit-cell {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    margin-top: 6px;
    background: hsla(45, 60%, 50%, 0.08);
    border: 1px solid hsla(45, 60%, 50%, 0.25);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
  }
  .calc-td.profit-cell::before { font-size: 11px; color: hsl(45, 60%, 60%); }

  /* Menu dropdown on mobile positioning */
  .chart-menu { right: 0; }
}

@media (max-width: 480px) {
  .main-content { padding: 12px; padding-top: 68px; padding-bottom: 84px; }
  .chart-card { padding: 12px; }
  .chart-wrap { height: 200px; }
  .metric-value { font-size: 22px; }
  .bet-card-badges { gap: 5px; }
  .bet-badge { padding: 2px 7px; font-size: 10px; }
  .stat-card .stat-value { font-size: 20px; }
}
