.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.card h1 {
  margin-top: 0;
}

.card p {
  color: var(--muted);
}

.empty-state {
  color: var(--muted);
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.dashboard-page {
  display: grid;
  gap: 14px;
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(12, 28, 48, 0.92), rgba(7, 17, 31, 0.9)),
    radial-gradient(circle at 92% 0%, rgba(34, 197, 94, 0.13), transparent 18rem);
  box-shadow: var(--shadow);
  padding: 14px;
}

.dashboard-hero h1 {
  margin: 0 0 5px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: 0;
}

.dashboard-hero p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.dashboard-action {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  padding: 0 11px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 950;
}

.dashboard-action.primary {
  color: #04100a;
  border-color: rgba(34, 197, 94, 0.72);
  background: var(--primary);
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-stat-card,
.dashboard-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(7, 18, 32, 0.78);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
}

.dashboard-stat-card {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 12px;
}

.dashboard-stat-card span,
.dashboard-stat-card small,
.dashboard-slip-row small,
.dashboard-market-count span,
.dashboard-activity-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.dashboard-stat-card > strong {
  overflow: hidden;
  color: var(--accent);
  font-size: 24px;
  font-weight: 950;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-stat-card.balance-card > strong,
.dashboard-stat-card.net-card.positive > strong {
  color: var(--primary);
}

.dashboard-stat-card.net-card.negative > strong {
  color: var(--danger);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.dashboard-panel {
  min-width: 0;
  padding: 12px;
}

.dashboard-panel-wide {
  grid-row: span 2;
}

.dashboard-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 9px;
  padding-bottom: 9px;
}

.dashboard-panel-head h2 {
  margin: 0;
  font-size: 18px;
}

.dashboard-panel-head a {
  flex: 0 0 auto;
  color: var(--primary);
  text-decoration: none;
  font-size: 12px;
  font-weight: 950;
}

.dashboard-slip-list,
.dashboard-match-list,
.dashboard-activity-list {
  display: grid;
  gap: 6px;
}

.dashboard-slip-row,
.dashboard-match-row,
.dashboard-activity-row {
  display: grid;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 8px;
  text-decoration: none;
}

.dashboard-slip-row {
  grid-template-columns: minmax(0, 1fr) auto 74px 58px;
}

.dashboard-slip-list.compact .dashboard-slip-row {
  grid-template-columns: minmax(0, 1fr) 74px 58px;
}

.dashboard-match-row {
  grid-template-columns: 120px minmax(0, 1fr) 70px;
}

.dashboard-activity-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.dashboard-slip-row:hover,
.dashboard-match-row:hover {
  border-color: rgba(34, 197, 94, 0.36);
  background: rgba(34, 197, 94, 0.07);
}

.dashboard-slip-row div,
.dashboard-match-teams,
.dashboard-activity-row div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dashboard-slip-row strong,
.dashboard-match-row strong,
.dashboard-activity-row strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-slip-row span,
.dashboard-match-row span,
.dashboard-activity-row span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-slip-row > div:last-child strong,
.dashboard-market-count strong,
.dashboard-activity-row > div:last-child strong {
  color: var(--accent);
}

.dashboard-market-count {
  display: grid;
  justify-items: end;
}

.dashboard-empty {
  display: grid;
  gap: 3px;
  border: 1px dashed var(--border-strong);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  padding: 14px;
  text-align: center;
}

.dashboard-empty strong {
  color: var(--text);
}

.saved-slips {
  display: grid;
  gap: 16px;
}

.saved-slip-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
}

.saved-slip-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.saved-slip-header h2 {
  margin: 0 0 6px;
}

.saved-slip-header p {
  margin: 0;
  color: var(--muted);
}

.saved-slip-summary {
  display: flex;
  gap: 18px;
}

.saved-slip-summary div {
  text-align: right;
}

.saved-slip-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.saved-slip-summary strong,
.saved-selection-odds {
  color: var(--accent);
  font-weight: 900;
  font-size: 18px;
}

.saved-slip-selections {
  display: grid;
  gap: 10px;
}

.saved-selection {
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.saved-selection p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  margin-left: 8px;
}

.status-pending {
  background: rgba(250, 204, 21, 0.14);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.35);
}

.status-won,
.status-settled {
  background: rgba(34, 197, 94, 0.14);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.status-lost {
  background: rgba(239, 68, 68, 0.14);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.status-void {
  background: rgba(148, 163, 184, 0.14);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.status-created {
  background: rgba(59, 130, 246, 0.14);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

@media (max-width: 720px) {
  .dashboard-hero {
    align-items: stretch;
    flex-direction: column;
    padding: 12px;
  }

  .dashboard-actions {
    justify-content: stretch;
  }

  .dashboard-action {
    justify-content: center;
    flex: 1 1 110px;
  }

  .dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-stat-card {
    padding: 10px;
  }

  .dashboard-stat-card > strong {
    font-size: 21px;
  }

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

  .dashboard-panel-wide {
    grid-row: auto;
  }

  .dashboard-slip-row,
  .dashboard-slip-list.compact .dashboard-slip-row,
  .dashboard-match-row,
  .dashboard-activity-row {
    grid-template-columns: 1fr;
  }

  .dashboard-market-count {
    justify-items: start;
  }

  .saved-slip-header,
  .saved-selection {
    flex-direction: column;
  }

  .saved-slip-summary {
    flex-wrap: wrap;
  }

  .saved-slip-summary div {
    text-align: left;
  }
}
