.slips-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 950px);
  gap: 14px;
  align-items: start;
}

.account-history-sidebar {
  position: sticky;
  top: 84px;
  min-width: 0;
}

.account-nav {
  display: grid;
  gap: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(10, 22, 38, 0.76);
  padding: 8px;
}

.account-nav a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-radius: 7px;
  color: #cbd5e1;
  padding: 8px 9px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 850;
}

.account-nav a:hover,
.account-nav a.active {
  color: #04100a;
  background: var(--primary);
}

.account-nav span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-nav strong {
  flex: 0 0 auto;
  min-width: 28px;
  color: var(--accent);
  text-align: right;
}

.account-nav a:hover strong,
.account-nav a.active strong {
  color: #04100a;
}

.mobile-slip-nav { display: none; }

.slips-page {
  display: grid;
  gap: 10px;
  max-width: 950px;
}

.slip-profile-filter {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.slip-profile-filter label {
  display: grid;
  gap: 4px;
  min-width: 220px;
}

.slip-profile-filter label span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.slip-profile-filter select,
.slip-profile-filter input {
  appearance: none;
  width: 100%;
  height: 42px;
  min-height: 42px;
  border: 1px solid #34475c;
  border-radius: 8px;
  outline: 0;
  background-color: #091827;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20'%3E%3Cpath fill='%2394a3b8' d='m5.5 7.5 4.5 4.5 4.5-4.5 1.4 1.4-5.9 5.9-5.9-5.9z'/%3E%3C/svg%3E");
  background-position: right 10px center;
  background-repeat: no-repeat;
  padding: 0 34px 0 11px;
  color: #e5edf6;
  font: inherit;
  font-size: 13px;
}

.slip-profile-filter input {
  padding: 0 11px;
  color-scheme: dark;
}

.slip-profile-filter select:focus,
.slip-profile-filter input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .18);
}

.slip-profile-filter select option {
  background: #091827;
  color: #e5edf6;
}

.slip-date-filter {
  min-width: 145px !important;
}

.slip-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.slip-filter-actions button {
  appearance: none;
  height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: #03140b;
  background: var(--primary);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.slip-filter-actions button:hover {
  filter: brightness(1.08);
}

.slip-filter-actions button:focus-visible,
.slip-filter-actions a:focus-visible,
.slip-pagination a:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

.slip-profile-filter a {
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.slip-profile-filter a:hover { text-decoration: underline; }

.slip-filter-error {
  flex: 1 0 100%;
  margin: 0;
  color: #fca5a5;
  font-size: 11px;
  font-weight: 800;
}

.slip-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 60px;
  border-top: 1px solid var(--border);
  padding: 10px 2px 0;
}

.slip-pagination p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.slip-pagination p strong {
  color: var(--text);
}

.slip-pagination-pages {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.slip-pagination-pages a,
.slip-pagination-pages span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border: 1px solid #294157;
  border-radius: 7px;
  color: #b9c9d7;
  background: #091827;
  font-size: 11px;
  font-weight: 850;
  text-decoration: none;
}

.slip-pagination-pages a:hover {
  border-color: rgba(34, 197, 94, .55);
  color: #effff5;
  background: rgba(34, 197, 94, .09);
}

.slip-pagination-pages .slip-page-number.active {
  border-color: var(--primary);
  color: #03140b;
  background: var(--primary);
}

.slip-pagination-pages .slip-page-direction {
  min-width: 72px;
  padding: 0 10px;
}

.slip-pagination-pages .disabled {
  opacity: .38;
}

.slip-pagination-pages .slip-page-ellipsis {
  min-width: 24px;
  border-color: transparent;
  background: transparent;
}

.slips-hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(15, 35, 58, 0.86), rgba(8, 20, 35, 0.74)),
    radial-gradient(circle at 12% 8%, rgba(34, 197, 94, 0.14), transparent 22rem);
  box-shadow: var(--shadow);
}

.slips-hero h1 {
  margin: 0 0 2px;
  font-size: clamp(20px, 2.2vw, 26px);
}

.slips-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.slip-filter-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.slip-filter-tab {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(10, 22, 38, 0.72);
  padding: 9px 11px;
  text-decoration: none;
  font-weight: 900;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.slip-filter-tab strong {
  min-width: 30px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  padding: 3px 8px;
  text-align: center;
}

.slip-filter-tab:hover,
.slip-filter-tab.active {
  color: var(--text);
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.1);
}

.slip-filter-won.active {
  border-color: rgba(34, 197, 94, 0.7);
}

.slip-filter-lost.active {
  border-color: rgba(239, 68, 68, 0.7);
  background: rgba(239, 68, 68, 0.1);
}

.slip-filter-pending.active {
  border-color: rgba(250, 204, 21, 0.7);
  background: rgba(250, 204, 21, 0.09);
}

.slip-detail-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.slip-action-message {
  border: 1px solid rgba(34, 197, 94, .24);
  border-radius: 10px;
  color: var(--primary);
  background: rgba(34, 197, 94, .1);
  padding: 10px 12px;
}

.slip-action-error {
  border-color: rgba(239, 68, 68, .3);
  color: #fecaca;
  background: rgba(239, 68, 68, .12);
}

.slip-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.slip-detail-summary span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.slip-detail-summary strong {
  color: var(--accent);
  font-size: 20px;
}

.slip-detail-selections {
  display: grid;
  gap: 12px;
}

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

.selection-main {
  font-weight: bold;
  margin-bottom: 6px;
}

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

.selection-status {
  color: var(--accent);
  font-weight: bold;
  text-transform: uppercase;
}

.slip-detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.slip-detail-actions form {
  margin: 0;
}

.back-link {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover {
  color: var(--primary);
}

.compact-slips-list {
  display: grid;
  gap: 7px;
  width: 100%;
  max-width: 920px;
}

.compact-slip-card {
  display: block;
  color: var(--text);
  background: linear-gradient(180deg, rgba(12, 26, 45, 0.92), rgba(8, 18, 32, 0.92));
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  transition: border-color 140ms ease, background 140ms ease;
}

.compact-slip-card:hover {
  border-color: rgba(34, 197, 94, 0.55);
}

.compact-slip-card[open] {
  border-color: rgba(34, 197, 94, 0.5);
}

.compact-slip-summary {
  display: grid;
  grid-template-columns: minmax(145px, 1.25fr) auto repeat(4, minmax(74px, 0.55fr)) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  cursor: pointer;
  list-style: none;
}

.compact-slip-summary::-webkit-details-marker {
  display: none;
}

.compact-slip-main {
  min-width: 0;
}

.compact-slip-main strong {
  display: block;
  margin-top: 2px;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.2;
}

.compact-slip-main em {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.compact-slip-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.compact-slip-stat {
  min-width: 0;
  text-align: right;
}

.compact-slip-stat span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.compact-slip-stat strong {
  display: block;
  margin-top: 2px;
  color: var(--accent);
  font-size: 14px;
  line-height: 1.15;
}

.compact-slip-return strong {
  color: var(--primary);
}

.compact-slip-toggle {
  justify-self: end;
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  transition: color .14s ease, background-color .14s ease;
}

.compact-slip-toggle::after {
  content: "  ›";
  font-size: 16px;
}

.compact-slip-card[open] .compact-slip-toggle::after {
  content: "  ⌄";
}

.compact-slip-summary:hover .compact-slip-toggle { color: var(--primary); }

.compact-slip-details {
  display: grid;
  gap: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(3, 10, 20, 0.2);
  padding: 8px 10px 9px;
}

.compact-slip-tax-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 16px;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(148, 163, 184, .07);
  padding: 8px 10px;
  font-size: 12px;
}

.compact-slip-tax-summary strong {
  color: #cbd5e1;
  font-weight: 850;
}

.compact-slip-tax-summary .compact-tax-negative {
  color: #fca5a5;
}

.compact-slip-tax-summary .compact-net-return,
.compact-slip-tax-summary .compact-profit-value {
  color: var(--primary);
}

.compact-slip-picks {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.compact-slip-pick {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  align-items: start;
  color: var(--muted);
  font-size: 12px;
  border-left: 2px solid rgba(250, 204, 21, 0.28);
  padding: 7px 0 7px 10px;
}

.compact-slip-pick-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.compact-slip-pick-main strong {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.compact-slip-pick-main em,
.compact-slip-pick-main small {
  overflow: hidden;
  color: #9fb2c7;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-slip-pick-main b {
  color: var(--text);
  font-size: 12px;
}

.compact-slip-pick-side {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.compact-slip-pick-side span {
  color: var(--accent);
  font-weight: 900;
  white-space: nowrap;
}

.compact-slip-pick-side .status-pill {
  padding: 4px 9px;
  font-size: 10px;
  font-style: normal;
}

.compact-slip-pick-won {
  border-left-color: rgba(34, 197, 94, 0.46);
}

.compact-slip-pick-lost {
  border-left-color: rgba(239, 68, 68, 0.5);
}

.compact-slip-pick-void {
  border-left-color: rgba(148, 163, 184, 0.5);
}

.compact-slip-link {
  justify-self: start;
  color: var(--primary);
  font-size: 12px;
  font-weight: 950;
  text-decoration: none;
}

.compact-slip-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.compact-slip-actions form {
  margin: 0;
}

.compact-slip-delete,
.slip-detail-delete {
  border: 1px solid rgba(239, 68, 68, .45);
  border-radius: 999px;
  color: #fecaca;
  background: rgba(239, 68, 68, .11);
  padding: 7px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.compact-slip-delete:hover,
.slip-detail-delete:hover {
  border-color: rgba(239, 68, 68, .7);
  background: rgba(239, 68, 68, .18);
}

.compact-slip-delete:focus-visible,
.slip-detail-delete:focus-visible {
  outline: 3px solid rgba(248, 113, 113, .28);
  outline-offset: 2px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 950;
}

.status-pill-pending {
  color: var(--accent);
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.3);
}

.status-pill-won {
  color: var(--primary);
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-pill-lost {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-pill-void {
  color: var(--muted);
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.3);
}


.compact-slip-pending {
  border-color: rgba(250, 204, 21, 0.25);
}

.compact-slip-won {
  border-color: rgba(34, 197, 94, 0.35);
}

.compact-slip-lost {
  border-color: rgba(239, 68, 68, 0.35);
}

.compact-slip-pending .compact-slip-summary {
  border-left: 4px solid var(--accent);
}

.compact-slip-won .compact-slip-summary {
  border-left: 4px solid var(--primary);
}

.compact-slip-lost .compact-slip-summary {
  border-left: 4px solid var(--danger);
}

.compact-slip-won .compact-slip-return strong {
  color: var(--primary);
}

.compact-slip-lost .compact-slip-return strong {
  color: var(--danger);
}

.slips-empty-state {
  max-width: 640px;
}

.slips-empty-state strong,
.slips-empty-state span {
  display: block;
}

.slips-empty-state span {
  margin-top: 5px;
}

.slip-detail-summary {
  grid-template-columns: repeat(5, 1fr);
}

.selection-left {
  min-width: 0;
}

.selection-right {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.selection-teams {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 8px;
}

.selection-teams span {
  color: var(--muted);
  margin: 0 6px;
}

.selection-pick {
  margin-bottom: 6px;
  color: var(--text);
}

.selection-pick strong {
  color: var(--accent);
}

.selection-score {
  margin-top: 8px;
  font-weight: bold;
  color: var(--text);
}

.pending-score {
  color: var(--muted);
}

.slip-selection-won {
  border-color: rgba(34, 197, 94, 0.35);
}

.slip-selection-lost {
  border-color: rgba(239, 68, 68, 0.35);
}

.slip-selection-pending {
  border-color: rgba(250, 204, 21, 0.25);
}

.compact-slip-void {
  border-color: rgba(148, 163, 184, 0.35);
}

.compact-slip-void .compact-slip-summary {
  border-left: 4px solid var(--muted);
}

.compact-slip-void .compact-slip-return strong {
  color: var(--muted);
}

@media (max-width: 820px) {
  .page.saved-slips-shell {
    --mobile-nav-height: 64px;
    overflow-x: hidden;
    padding-right: 15px;
    padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 18px);
    padding-left: 15px;
  }

  .slips-layout {
    grid-template-columns: 1fr;
    gap: 8px;
    min-width: 0;
  }

  .account-history-sidebar {
    display: none;
  }

  .mobile-slip-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    max-width: 100%;
    border: 0;
    border-radius: 0;
    padding: 1px 0 3px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-slip-nav::-webkit-scrollbar {
    display: none;
  }

  .mobile-slip-nav a {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(10, 22, 38, .72);
    padding: 0 11px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .mobile-slip-nav a strong { color: var(--text); font-size: 11px; }
  .mobile-slip-nav a.active { border-color: rgba(34, 197, 94, .55); background: rgba(34, 197, 94, .13); color: var(--primary); }
  .mobile-slip-nav .mobile-slip-filter-pending.active { border-color: rgba(250, 204, 21, .55); background: rgba(250, 204, 21, .1); color: var(--accent); }
  .mobile-slip-nav .mobile-slip-filter-lost.active { border-color: rgba(239, 68, 68, .5); background: rgba(239, 68, 68, .1); color: #fca5a5; }

  .slip-profile-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    padding: 10px;
  }

  .slip-profile-filter label {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
  }

  .slip-profile-filter label:not(.slip-date-filter),
  .slip-filter-actions,
  .slip-filter-error {
    grid-column: 1 / -1;
  }

  .slip-filter-actions {
    align-items: center;
    flex-wrap: wrap;
  }

  .slip-filter-actions button { flex: 1 0 100%; }

  .slip-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .slip-pagination-pages {
    justify-content: flex-start;
    overflow-x: auto;
    padding: 2px 0 4px;
    scrollbar-width: none;
  }

  .slip-pagination-pages::-webkit-scrollbar { display: none; }

  .slips-page {
    gap: 8px;
    max-width: none;
  }

  .slips-hero {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 7px 0 5px;
  }

  .slips-hero h1 {
    margin-bottom: 5px;
    font-size: 22px;
  }

  .slips-hero p { font-size: 14px; line-height: 1.4; }
  .slips-hero .eyebrow { font-size: 10px; }

  .compact-slips-list {
    max-width: none;
  }

  .slip-filter-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-slip-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 9px 12px;
    padding: 12px 12px 0;
  }

  .compact-slip-stat {
    display: block;
    text-align: left;
  }

  .compact-slip-main { min-width: 0; }
  .compact-slip-main strong { white-space: normal; }
  .status-pill { align-self: start; justify-self: end; padding: 4px 8px; font-size: 10px; }
  .compact-slip-stat span { font-size: 9px; }
  .compact-slip-stat strong { margin-top: 3px; font-size: 15px; }
  .compact-slip-toggle {
    grid-column: 1 / -1;
    justify-self: stretch;
    min-height: 44px;
    margin: 1px -12px 0;
    border-top: 1px solid rgba(148, 163, 184, .13);
    padding: 12px;
    color: #cbd5e1;
    text-align: right;
  }
}

@media (max-width: 520px) {
  .slip-filter-tabs {
    grid-template-columns: 1fr;
  }

  .compact-slip-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-slip-pick {
    grid-template-columns: 1fr;
  }

  .compact-slip-pick-main strong,
  .compact-slip-pick-main em,
  .compact-slip-pick-main small,
  .compact-slip-pick-side span {
    white-space: normal;
  }

  .compact-slip-pick-side {
    justify-items: start;
  }
}
