/* Fantasy Report — shared "field report" look for /my, /, and /settings. */

:root {
  --turf: #1B4D3E;
  --turf-deep: #12352C;
  --chalk: #F4F7F2;
  --ink: #14201C;
  --muted: #5A6B63;
  --line: rgba(20, 32, 28, 0.12);
  --amber: #C47A14;
  --good: #1F7A5C;
  --bad: #B83A2E;
  --display: 'Space Grotesk', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

.hidden { display: none !important; }

body.dash {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--display);
  background-color: var(--chalk);
  background-image:
    linear-gradient(180deg, rgba(27, 77, 62, 0.14) 0%, transparent 42%),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 47px,
      rgba(27, 77, 62, 0.045) 47px,
      rgba(27, 77, 62, 0.045) 48px
    ),
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(196, 122, 20, 0.12), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

.dash-top,
.dash-hero,
.dash-block,
.dash-banner,
.dash-report,
.dash-footer {
  width: min(1080px, calc(100% - 2.5rem));
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Top bar ---------- */
.dash-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem 0 1.25rem;
  animation: dash-rise 0.55s ease both;
}

.dash-brand-mark {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 2.55rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--turf-deep);
}

.dash-brand-meta {
  margin: 0.4rem 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.dash-top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
}

.dash-leagues {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.league-pill {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 0.45rem 0.7rem;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.league-pill:hover {
  border-color: var(--turf);
  color: var(--turf-deep);
}

.league-pill.active {
  background: var(--turf);
  border-color: var(--turf);
  color: #fff;
  font-weight: 500;
}

.dash-settings {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--turf-deep);
  text-decoration: none;
  border-bottom: 1px solid rgba(27, 77, 62, 0.35);
  padding-bottom: 0.1rem;
}

.dash-settings:hover { border-bottom-color: var(--turf); }

/* ---------- Hero matchup ---------- */
.dash-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  align-items: end;
  padding: 1.75rem 0 1.5rem;
  border-top: 2px solid var(--turf);
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.25rem;
  animation: dash-rise 0.65s 0.08s ease both;
}

.dash-week {
  margin: 0 0 0.65rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--amber);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dash-week-label { color: var(--muted); letter-spacing: 0.08em; }

.dash-headline {
  margin: 0;
  font-size: clamp(1.6rem, 4.2vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
}

.dash-sub {
  margin: 0.55rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.dash-scoreboard {
  min-height: 4.5rem;
}

.live-score {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: var(--turf);
  color: #fff;
  border-radius: 6px;
  animation: dash-score-in 0.5s 0.15s ease both;
}

.live-score-side { text-align: center; flex: 1; }
.live-score-num {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.live-score-team {
  margin-top: 0.35rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  opacity: 0.75;
}
.live-score-sep {
  font-family: var(--mono);
  font-size: 0.75rem;
  opacity: 0.55;
  padding: 0 0.25rem;
}

.live-score-pending {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: var(--turf);
  color: #fff;
  border-radius: 6px;
  font-size: 1.05rem;
  font-weight: 600;
  animation: dash-score-in 0.5s 0.15s ease both;
}

.live-score-pending-note {
  margin-top: 0.55rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
}

/* ---------- Banners ---------- */
.dash-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  background: rgba(196, 122, 20, 0.12);
  border-left: 3px solid var(--amber);
  font-size: 0.86rem;
  line-height: 1.45;
  animation: dash-rise 0.4s ease both;
}

.dash-banner a { color: var(--turf-deep); font-weight: 600; }
.notice-banner-icon { color: var(--amber); flex-shrink: 0; }

/* ---------- Blocks ---------- */
.dash-block {
  padding: 1.35rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  animation: dash-rise 0.55s ease both;
}

.dash-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin-bottom: 0.9rem;
}

.dash-block-title {
  margin: 0 0 0.9rem;
  font-size: 0.78rem;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--turf);
}

.dash-block-head .dash-block-title { margin-bottom: 0; }

.dash-note {
  margin: -0.45rem 0 0.85rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.dash-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.dash-status {
  margin: 0.75rem 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  min-height: 1.1em;
}

.dash-cta {
  margin-top: 1rem;
  border: none;
  border-radius: 4px;
  padding: 0.85rem 1.25rem;
  background: var(--turf);
  color: #fff;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.dash-cta:hover:not(:disabled) {
  background: var(--turf-deep);
  transform: translateY(-1px);
}

.dash-cta:disabled { opacity: 0.6; cursor: default; transform: none; }

.dash-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 0 rgba(31, 122, 92, 0.45);
  animation: dash-pulse 2s infinite;
}

.dash-live.live-dot-idle {
  background: var(--muted);
  animation: none;
  box-shadow: none;
}

/* ---------- Live lineup grid ---------- */
.ll-grid {
  display: grid;
  grid-template-columns: 64px 1fr 1fr;
  row-gap: 0.55rem;
  column-gap: 0.85rem;
}

.ll-head {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}

.ll-slot {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--muted);
  align-self: center;
}

.ll-player {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.ll-badge {
  font-family: var(--mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  padding: 0.08rem 0.3rem;
  border-radius: 3px;
  border: 1px solid rgba(196, 122, 20, 0.4);
  color: var(--amber);
  background: rgba(196, 122, 20, 0.1);
}

.ll-badge.out {
  color: var(--bad);
  border-color: rgba(184, 58, 46, 0.35);
  background: rgba(184, 58, 46, 0.08);
}

/* ---------- Odds ---------- */
.dash-odds {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 0.85rem;
}

.dash-odds-pct {
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  min-width: 4.8rem;
}

.dash-odds-pct.favored { color: var(--good); }
.dash-odds-pct.underdog { color: var(--bad); }

.dash-odds-main { flex: 1; min-width: 0; }

.dash-odds-label {
  margin: 0 0 0.4rem;
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dash-odds-bar {
  height: 6px;
  background: rgba(20, 32, 28, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.dash-odds-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--bad), var(--amber), var(--good));
  transition: width 0.7s ease;
}

.dash-odds-proj {
  margin: 0.45rem 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.dash-summary {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 70ch;
}

/* ---------- Report sections ---------- */
.dash-report { padding-bottom: 1rem; }

.dash-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 2rem;
  width: min(1080px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.dash-split .dash-block { width: auto; }

.ss-row {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

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

.ss-row.decision {
  background: rgba(196, 122, 20, 0.08);
  margin: 0.2rem -0.55rem;
  padding: 0.85rem 0.55rem;
  border-bottom: none;
  border-radius: 4px;
}

.ss-slot {
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.ss-line { font-size: 0.92rem; margin-bottom: 0.15rem; }
.ss-line strong { font-weight: 700; }
.ss-sit { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.3rem; }
.ss-reasoning { font-size: 0.82rem; color: var(--muted); line-height: 1.45; }

.wv-row {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

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

.wv-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
  flex-wrap: wrap;
}

.wv-player { font-size: 0.92rem; font-weight: 600; }
.wv-pos { font-family: var(--mono); font-size: 0.66rem; color: var(--muted); }

.wv-priority {
  font-family: var(--mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.35rem;
  border-radius: 3px;
}

.wv-priority.high {
  color: var(--bad);
  background: rgba(184, 58, 46, 0.1);
  border: 1px solid rgba(184, 58, 46, 0.3);
}

.wv-priority.medium {
  color: var(--amber);
  background: rgba(196, 122, 20, 0.1);
  border: 1px solid rgba(196, 122, 20, 0.3);
}

.wv-priority.low {
  color: var(--muted);
  background: rgba(90, 107, 99, 0.1);
  border: 1px solid rgba(90, 107, 99, 0.25);
}

.wv-drop { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.25rem; }
.wv-reasoning { font-size: 0.82rem; color: var(--muted); line-height: 1.45; }

.trade-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.trade-card {
  padding: 0.9rem 0;
  border-top: 2px solid var(--turf);
}

.trade-head { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.55rem; }
.trade-cols { display: flex; gap: 1.5rem; margin-bottom: 0.55rem; }
.trade-col-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.trade-col ul { margin: 0; padding-left: 1rem; font-size: 0.88rem; }
.trade-reasoning { font-size: 0.82rem; color: var(--muted); line-height: 1.45; }

.st-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.st-table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}
.st-table td {
  padding: 0.55rem 0.4rem 0.55rem 0;
  border-bottom: 1px solid var(--line);
}
.st-table tr:last-child td { border-bottom: none; }
.st-table tr.me td { font-weight: 700; color: var(--turf-deep); }
.st-table td:first-child,
.st-table th:first-child {
  width: 1.5rem;
  color: var(--muted);
  font-family: var(--mono);
}

.pr-row {
  display: flex;
  gap: 0.7rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

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

.pr-row.me {
  background: rgba(27, 77, 62, 0.08);
  margin: 0.15rem -0.45rem;
  padding: 0.6rem 0.45rem;
  border-radius: 4px;
  border-bottom: none;
}

.pr-rank {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--muted);
  min-width: 1.5rem;
}

.pr-body { flex: 1; min-width: 0; }
.pr-head { display: flex; align-items: center; gap: 0.4rem; }
.pr-team { font-size: 0.9rem; font-weight: 600; }
.pr-move { font-family: var(--mono); font-size: 0.66rem; }
.pr-move.up { color: var(--good); }
.pr-move.down { color: var(--bad); }
.pr-move.flat { color: var(--muted); }
.pr-blurb {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 0.15rem;
}

.dash-footer {
  padding: 2rem 0 3rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
}

@keyframes dash-rise {
  from { transform: translateY(8px); }
  to { transform: translateY(0); }
}

@keyframes dash-score-in {
  from { transform: translateY(6px) scale(0.98); }
  to { transform: translateY(0) scale(1); }
}

@keyframes dash-pulse {
  0% { box-shadow: 0 0 0 0 rgba(31, 122, 92, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(31, 122, 92, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 122, 92, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .dash-top,
  .dash-hero,
  .dash-block,
  .dash-banner,
  .live-score,
  .live-score-pending {
    animation: none;
  }
  .dash-live { animation: none; }
  .dash-odds-fill { transition: none; }
}

@media (max-width: 820px) {
  .dash-hero { grid-template-columns: 1fr; }
  .dash-split { grid-template-columns: 1fr; gap: 0; }
  .trade-grid { grid-template-columns: 1fr; }
  .dash-top { flex-direction: column; }
  .dash-top-actions { justify-content: flex-start; }
}

/* ---------- Auth / settings ---------- */
#auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.dash-auth-card {
  width: min(420px, 100%);
  padding: 2.25rem 0 0;
  border-top: 2px solid var(--turf);
}

.dash-auth-card .dash-brand-mark {
  font-size: clamp(2rem, 5vw, 2.6rem);
}

.dash-auth-card .dash-brand-meta {
  margin: 0.5rem 0 1.75rem;
  font-size: 0.85rem;
  font-family: var(--display);
  color: var(--muted);
  letter-spacing: 0;
}

.dash-auth-card a {
  color: var(--turf-deep);
  font-weight: 600;
}

.dash-field {
  display: block;
  width: 100%;
  padding: 0.8rem 0.95rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-family: var(--display);
  font-size: 0.95rem;
}

.dash-field:focus {
  outline: none;
  border-color: var(--turf);
}

textarea.dash-field {
  resize: vertical;
  min-height: 4.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
}

.dash-auth-card .dash-cta,
.dash-settings-panel .dash-cta {
  width: 100%;
  margin-top: 0.35rem;
}

.dash-auth-toggle {
  margin: 1.25rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.dash-link-btn {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--turf-deep);
  background: none;
  border: none;
  border-bottom: 1px solid rgba(27, 77, 62, 0.35);
  padding: 0 0 0.1rem;
  cursor: pointer;
}

.dash-link-btn:hover { border-bottom-color: var(--turf); }

.dash-settings-note {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted);
}

.dash-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  user-select: none;
}

.dash-toggle-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.dash-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.dash-toggle-track {
  position: relative;
  width: 2.4rem;
  height: 1.25rem;
  border-radius: 999px;
  background: rgba(20, 32, 28, 0.18);
  border: 1px solid var(--line);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dash-toggle-track::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--chalk);
  border: 1px solid rgba(20, 32, 28, 0.2);
  transition: transform 0.15s ease;
}

.dash-toggle input:checked + .dash-toggle-track {
  background: var(--turf);
  border-color: var(--turf-deep);
}

.dash-toggle input:checked + .dash-toggle-track::after {
  transform: translateX(1.1rem);
  border-color: transparent;
}

.dash-toggle input:focus-visible + .dash-toggle-track {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.dash-toggle-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.dash-howto {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.5;
}

.dash-howto summary {
  cursor: pointer;
  color: var(--turf-deep);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  list-style: none;
}

.dash-howto summary::-webkit-details-marker { display: none; }
.dash-howto summary::before { content: '▸ '; color: var(--amber); }
.dash-howto[open] summary::before { content: '▾ '; }
.dash-howto ol { margin: 0.7rem 0 0.5rem 1.1rem; padding: 0; }
.dash-howto li { margin: 0.3rem 0; }
.dash-howto a { color: var(--turf-deep); font-weight: 600; }
.dash-howto code { font-family: var(--mono); font-size: 0.78rem; }

.league-checklist { margin: 0.75rem 0 1rem; }
.league-check-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.league-check-row:last-child { border-bottom: none; }

.connected-leagues-list {
  margin: 0.35rem 0 1rem;
  padding-left: 1.15rem;
  font-size: 0.9rem;
}

.dash-inline-cta {
  display: inline-flex;
  width: auto;
  margin-top: 0.5rem;
  text-decoration: none;
}

/* Player briefing modal */
.player-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(10, 22, 18, 0.55);
}
.player-modal.hidden { display: none; }
.player-modal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: min(85vh, 720px);
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.25rem 1.35rem 1.4rem;
}
.player-modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.player-modal-head { margin-bottom: 1rem; padding-right: 2rem; }
.player-modal-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.15;
  color: var(--ink);
}
.player-modal-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-top: 0.35rem;
}
.player-modal-section { margin-bottom: 0.95rem; }
.player-modal-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--turf-deep);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.player-modal-text {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink);
  white-space: pre-line;
}
.player-sources { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.player-source {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--turf-deep);
  border: 1px solid var(--line);
  padding: 0.3rem 0.45rem;
  text-decoration: none;
}
.player-source:hover { border-color: var(--turf-deep); }
[data-player] { cursor: pointer; }
[data-player]:hover { text-decoration: underline; text-underline-offset: 2px; }

