:root {
  --desk-ink: #182b2b;
  --desk-muted: #667673;
  --desk-line: #dce5e1;
  --desk-paper: #f0f4f2;
  --desk-red: #a72f3d;
  --desk-red-soft: #f9ecec;
  --desk-green: #25745a;
}

body { background: var(--desk-paper); color: var(--desk-ink); }
.app-header { background: #203936; color: #fff; border: 0; }
.header-inner { max-width: 1440px; min-height: 68px; }
.brand-mark { background: #fff; color: var(--desk-red); border: 0; border-radius: 5px; }
.brand h1 { color: #fff; font-weight: 700; letter-spacing: 0; }
.brand p { color: #bfd0c8; letter-spacing: 0; }
.header-actions .connection, .header-actions .connection.good { color: #dae8e0; background: #2d4c43; border-color: #49685e; }
.header-actions .account-button { color: #e4ede8; }
.header-actions .account-button:hover { background: #34534a; color: #fff; }
.header-actions #authTrigger { color: #203936; background: #fff; border-color: #fff; }
.header-actions #authTrigger:hover { color: #203936; background: #eef5f1; }
.seo-summary { background: #fff; border-bottom: 1px solid #e4ebe7; }
.seo-summary-details > summary { color: #667673; }
.shell { grid-template-columns: 176px minmax(0, 1fr); gap: 24px; padding-top: 24px; }
.side-nav .nav-button { min-height: 44px; color: #52645f; border-radius: 5px; }
.side-nav .nav-button.active { color: #8f2634; background: #f9eaea; box-shadow: inset 3px 0 #ae3643; }
.view.active { gap: 16px; }
.view.active > .page-head h2 { color: #1c302d; font-size: 25px; letter-spacing: 0; }
.page-head p { color: #687b74; }
.date-field { border-color: #d1ded7; border-radius: 5px; background: #fff; color: #324a40; }
.panel { border-color: #dde6e1; border-radius: 6px; box-shadow: 0 2px 12px rgba(27, 52, 43, .035); }

#view-overview .hero-status { grid-template-columns: minmax(0, 1fr) minmax(260px, .65fr); border-radius: 6px; background: #29463c; }
#view-overview .scan-block { min-height: 108px; padding: 18px 22px; background: #29463c; }
#view-overview .scan-block h3 { font-size: 19px; line-height: 1.4; letter-spacing: 0; }
#view-overview .scan-block .eyebrow::before { background: #d9ac75; }
#view-overview .stat, #view-overview .stat:first-child { min-height: 52px; padding: 10px 16px; background: #35564a; border-color: #527365 !important; }
#view-overview .fixture-ledger-panel { overflow: hidden; border-color: #dce5df; }
#view-overview .fixture-ledger-panel .panel-head { min-height: 60px; padding: 14px 20px; }
#view-overview .fixture-ledger-panel .panel-head h3 { font-size: 16px; }
#view-overview .fixture-ledger-kicker { color: #a03842; }
#view-overview .fixture-play-tabs { gap: 0; padding: 0 12px; background: #fff; }
#view-overview .fixture-play-tab { min-height: 52px; border-right: 0; border-bottom: 2px solid transparent; background: #fff; }
#view-overview .fixture-play-tab.active { border-bottom-color: #a72f3d; background: #fff; }
#view-overview .fixture-play-tab strong { color: #52645d; font-size: 13px; font-weight: 600; }
#view-overview .fixture-play-tab.active strong, #view-overview .fixture-play-tab.active span { color: #a72f3d; }
#view-overview .fixture-ledger-panel .match-tools { background: #f6f9f7; border-color: #e5ece7; }
#view-overview .match-filter { color: #5d6d66; border: 1px solid transparent; border-radius: 4px; }
#view-overview .match-filter.active { color: #922b38; border-color: #ecd5d5; background: #fff; box-shadow: none; }
#view-overview .match-search { border-color: #dce6df; border-radius: 5px; }
#view-overview .fixture-context-bar { border-color: #e5ece7; }
#view-overview .fixture-row .match-number { border-left: 3px solid #b54750; background: #f5f8f6; }
#view-overview .fixture-row .match-number strong { color: #a32f3c; }
#view-overview .fixture-row .match-teams strong { color: #20312b; font-weight: 700; letter-spacing: 0; }
#view-overview .fixture-market-line { border-color: #e0e9e2; background: #f7faf8; }
#view-overview .fixture-market-cell b { color: #243c31; font-weight: 700; font-variant-numeric: tabular-nums; }
#view-overview .fixture-market-cell i { color: #7b8b82; font-weight: 600; }
#view-overview .fixture-market-marker { color: #a72f3d; }
#view-overview .fixture-row .ai-match { color: #fff; background: #a6313e; border-color: #a6313e; }
#view-overview .fixture-row .ai-match:hover { background: #892634; border-color: #892634; }

.report-switcher { background: #edf3ef; border-color: #dce6df; }
.membership-card, .membership-card.active, #view-settings .account-identity { background: #29463c; border-color: #29463c; }
.mobile-nav { background: #fff; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #cc7881; outline-offset: 2px; }
#authDialog, #authDialog .auth-sheet, #authDialog .auth-workspace { background: #fff; }
#authDialog .auth-identity-panel { background: #f3f7f4; border-color: #e0e9e3; }
#authDialog .auth-body .segmented { border-radius: 6px; background: #f0f5f1; }
#authDialog .auth-body .segmented button { border-radius: 4px; }
#authDialog .auth-input-shell input { border-radius: 6px; box-shadow: none; }
#authDialog .auth-mode.active, #authDialog #authSubmitBtn { background: #29463c; border-color: #29463c; }

@media (max-width: 980px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding: 0 0 calc(86px + env(safe-area-inset-bottom)); }
  .mobile-nav { border-top: 1px solid #dbe5de; box-shadow: 0 -3px 14px rgba(23, 46, 35, .06); }
  .mobile-nav .nav-button { color: #718077; }
  .mobile-nav .nav-button.active { color: #9f303e; background: #fbefee; }
}

@media (max-width: 760px) {
  .header-inner { min-height: 58px; padding: 8px 14px; }
  .brand { gap: 10px; }
  .brand-mark { width: 34px; height: 34px; flex-basis: 34px; }
  .brand h1 { font-size: 17px; }
  .header-actions #authTrigger { min-height: 36px; min-width: 80px; font-size: 12px; }
  .seo-summary-details > summary { min-height: 27px; padding-inline: 14px; font-size: 11px; }
  #view-overview .page-head { min-height: 62px; padding: 10px 14px; background: #f0f4f2; border: 0; }
  #view-overview .page-head h2 { font-size: 21px; }
  #view-overview .page-actions .date-field { min-height: 38px; border-color: #d4e0d9; border-radius: 5px; }
  #view-overview .fixture-ledger-panel { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  #view-overview .fixture-ledger-panel .panel-head { min-height: 48px; padding: 10px 14px; background: #fff; border: 0; }
  #view-overview .fixture-ledger-panel .panel-head h3 { font-size: 16px; }
  #view-overview .fixture-play-tabs { padding: 0 6px; border-bottom: 1px solid #e5ece8; }
  #view-overview .fixture-play-tab { min-height: 44px; padding: 6px 9px; }
  #view-overview .fixture-play-tab strong { font-size: 12px; }
  #view-overview .fixture-ledger-panel .match-tools { gap: 6px; padding: 8px 12px 10px; background: #fff; border-color: #e8eeea; }
  #view-overview .match-filter { min-height: 32px; padding: 0 10px; font-size: 11px; }
  #view-overview .match-filter.active { background: #f8eeed; border-color: transparent; }
  #view-overview .match-search { margin-top: 3px; min-height: 38px; background: #f4f7f5; border-color: #e2eae5; }
  #view-overview .fixture-context-bar { padding: 7px 12px; background: #f3f7f4; }
  #view-overview .fixture-ledger-panel .fixture-list { padding: 8px 10px 0; background: #edf2ef; }
  #view-overview .fixture-ledger-panel .fixture-row,
  #view-overview .fixture-ledger-panel .fixture-row:nth-child(even) {
    display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "number" "main" "side";
    gap: 0; margin: 0 0 8px; padding: 12px 14px; border: 1px solid #dce6df; border-radius: 6px; background: #fff; box-shadow: 0 2px 8px rgba(31, 56, 41, .035);
  }
  #view-overview .fixture-row .match-number { grid-area: number; min-height: 25px; display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; padding: 0 0 9px; border: 0; border-bottom: 1px solid #edf1ee; border-radius: 0; background: transparent; }
  #view-overview .fixture-row .match-number strong { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 7px; border-radius: 4px; background: #f9ecec; color: #a1303d; font: 700 12px/1.2 -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; }
  #view-overview .fixture-row .match-number span { margin: 0; color: #60736a; font-size: 11px; line-height: 1.2; font-weight: 600; letter-spacing: 0; }
  #view-overview .fixture-row .match-main { grid-area: main; overflow: visible; }
  #view-overview .fixture-row .match-meta { min-height: 22px; margin: 9px 0 4px; }
  #view-overview .fixture-row .match-league { padding: 0; color: #71837a; background: transparent; font-size: 11px; font-weight: 600; }
  #view-overview .fixture-row .market-cue { border-radius: 4px; font-size: 10px; }
  #view-overview .fixture-row .match-teams { grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr); gap: 6px; min-height: 38px; align-items: center; }
  #view-overview .fixture-row .match-teams strong { overflow: visible; color: #1c3028; font-size: 16px; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; text-align: center; }
  #view-overview .fixture-row .match-vs { color: #9caba1; font-size: 10px; font-weight: 600; }
  #view-overview .fixture-row .match-foot { margin-top: 8px; }
  #view-overview .fixture-market-ledger { gap: 5px; }
  #view-overview .fixture-market-line { min-height: 45px; grid-template-columns: 32px 43px repeat(3, minmax(0, 1fr)); border-color: #e1eae4; border-radius: 4px; background: #f7faf8; }
  #view-overview .fixture-market-cell i { color: #778a7e; font-size: 10px; }
  #view-overview .fixture-market-cell b { margin-top: 3px; color: #1c392c; font-size: 15px; }
  #view-overview .fixture-market-unavailable { color: #819187; font-size: 11px; }
  #view-overview .fixture-row .match-side { grid-area: side; display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; }
  #view-overview .fixture-row .match-state { min-width: 0; flex: 1 1 auto; }
  #view-overview .fixture-row .match-state .pill { border-radius: 4px; }
  #view-overview .fixture-row .row-actions { width: auto; flex: 0 0 auto; gap: 6px; margin-left: auto; }
  #view-overview .fixture-row .row-actions .btn { min-height: 36px; border-radius: 5px; }
  #view-overview .fixture-row .ai-match { min-width: 78px; }
  #view-reports > .panel, #view-settings > .panel { margin-inline: 10px; }
  #view-recommendations .page-head, #view-reports .page-head, #view-settings .page-head { background: #f0f4f2; }
  #authDialog { border-radius: 8px 8px 0 0; }
}

@media (max-width: 360px) {
  #view-overview .fixture-ledger-panel .fixture-list { padding-inline: 6px; }
  #view-overview .fixture-ledger-panel .fixture-row { padding-inline: 10px; }
  #view-overview .fixture-row .match-teams strong { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; }
}
