:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e7edf7;
  background: #070c14;
  font-synthesis: none;
  --bg: #070c14;
  --panel: rgba(15, 24, 40, .94);
  --panel-2: #111d30;
  --line: #293852;
  --muted: #91a2ba;
  --orange: #f59e0b;
  --orange-2: #f97316;
  --green: #69e7ad;
  --red: #fb7185;
  --blue: #7db6ff;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at 82% -10%, #203452 0, #0a111d 29rem, #070c14 58rem); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, .file-button { border: 1px solid #3b4c69; background: #17253b; color: #eef3fb; padding: 10px 14px; border-radius: 10px; font-weight: 760; transition: .16s ease; }
button:hover, .file-button:hover { border-color: #7083a2; background: #1d304c; transform: translateY(-1px); }
button.primary { border-color: var(--orange); color: #171b22; background: linear-gradient(135deg, #fbbf24, var(--orange-2)); box-shadow: 0 9px 24px rgba(249,115,22,.18); }
button.primary:hover { filter: brightness(1.05); }
button.secondary { background: transparent; }
button.danger { color: #fda4af; }
button.small { padding: 6px 8px; font-size: 11px; }
button.large { padding: 14px 20px; }
button:disabled { cursor: not-allowed; opacity: .35; transform: none; }
input, select, textarea { width: 100%; color: #edf2fb; background: #091321; border: 1px solid #334663; border-radius: 9px; padding: 10px 11px; outline: none; }
select { min-width: 136px; }
input:focus, select:focus, textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(245,158,11,.12); }
textarea { resize: vertical; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 242px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 22px 16px; border-right: 1px solid #223048; background: rgba(6, 11, 20, .96); display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; margin: 2px 4px 28px; }
.brand-mark { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #101722; font-weight: 950; letter-spacing: -.06em; background: linear-gradient(135deg, #ffd45b, #f97316); box-shadow: 0 12px 28px rgba(249,115,22,.2); }
.brand strong { display: block; font-size: 15px; }.brand small { display: block; color: #8293ab; margin-top: 3px; }
.nav { display: grid; gap: 6px; }
.nav-button { border: 0; background: transparent; color: #9cabc0; text-align: left; display: flex; align-items: center; gap: 10px; padding: 12px 13px; }
.nav-button span { width: 20px; text-align: center; color: #667996; }
.nav-button:hover { background: #101b2d; color: white; transform: none; }
.nav-button.active { background: #182943; color: white; box-shadow: inset 3px 0 var(--orange); }
.nav-button.active span { color: #fbbf24; }
.sidebar-foot { margin-top: auto; padding: 13px; border: 1px solid #22314a; border-radius: 12px; color: #a6b5c9; font-size: 12px; line-height: 1.6; background: #0d1727; }
.sidebar-foot strong { color: white; }.sidebar-foot small { color: #74869e; }.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(105,231,173,.11); }
.main { min-width: 0; padding: 38px clamp(20px, 3.6vw, 58px) 72px; }
.page-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-header h1 { margin: 5px 0 9px; font-size: clamp(34px, 4vw, 54px); line-height: 1.02; letter-spacing: -.045em; }
.page-header p { max-width: 790px; margin: 0; color: #9babc0; line-height: 1.6; }
.page-header.hero { min-height: 210px; align-items: center; }
.eyebrow { margin: 0 !important; color: #fbbf24 !important; font-size: 11px !important; font-weight: 850; letter-spacing: .17em; text-transform: uppercase; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; margin-bottom: 18px; }
.kpi, .panel, .unit-card, .evaluation-panel, .scenario-card, .notes-panel { border: 1px solid #273752; background: var(--panel); border-radius: 16px; box-shadow: 0 20px 42px rgba(0,0,0,.14); }
.kpi { min-height: 133px; padding: 20px; }.kpi.accent { background: linear-gradient(150deg, #332513, #171d29 72%); border-color: #65461d; }
.kpi span, .kpi small { color: #8fa0b8; }.kpi span { font-size: 12px; font-weight: 740; }.kpi strong { display: block; margin: 9px 0 5px; font-size: 27px; }.kpi small { font-size: 11px; }
.grid { display: grid; gap: 17px; }.grid.two { grid-template-columns: repeat(2,minmax(0,1fr)); }.panel { padding: 22px; min-width: 0; }.panel h2, .panel h3 { margin: 0 0 13px; }.panel p { color: #a0afc2; line-height: 1.6; }
.panel-title { display: flex; justify-content: space-between; }.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; color: #d1dae7; }.check-list li::before { content: "✓"; color: var(--green); font-weight: 900; margin-right: 10px; }
.facts { margin: 0; display: grid; gap: 12px; }.facts div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid #263650; }.facts dt { color: #899bb2; }.facts dd { margin: 0; text-align: right; }
.notice { margin-top: 18px; padding: 14px 17px; border: 1px solid #6b4a1b; background: rgba(102,66,17,.2); color: #f6d797; border-radius: 12px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; background: #263751; color: #dbe8fa; font-size: 10px; font-weight: 850; letter-spacing: .035em; }
.badge.good, .roster-pro, .workload-ok { color: #73e7b2; background: rgba(16,185,129,.14); }.badge.warning, .roster-scratch, .workload-high { color: #fbd57e; background: rgba(245,158,11,.15); }.roster-farm { color: #9fc9ff; background: rgba(59,130,246,.15); }.badge.manual { color: #ffd28a; background: rgba(249,115,22,.15); }.workload-overload { color: #fda4af; background: rgba(244,63,94,.16); }
.toolbar, .planner-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 15px; margin-bottom: 17px; border: 1px solid #283953; background: rgba(13,22,37,.92); border-radius: 14px; }
.toolbar label, .planner-controls label, .unit-controls label, .strategy-grid label, .notes-panel label { display: grid; gap: 6px; color: #91a2b9; font-size: 11px; font-weight: 760; }.toolbar .grow { flex: 1 1 260px; }.sticky-toolbar { position: sticky; top: 12px; z-index: 8; backdrop-filter: blur(16px); }
.table-panel { padding: 0; overflow: hidden; }.table-wrap { overflow: auto; }.table-wrap.compact { max-height: 670px; } table { width: 100%; border-collapse: collapse; min-width: 760px; } th { position: sticky; top: 0; z-index: 2; padding: 12px 14px; background: #111d30; color: #8ea0b8; text-align: left; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; } td { padding: 12px 14px; border-top: 1px solid #24334c; color: #d5deeb; font-size: 12px; } tbody tr:hover { background: rgba(45,61,87,.28); }
.planner-header { align-items: end; }.scenario-save { display: flex; gap: 8px; min-width: min(420px,100%); }.scenario-save input { min-width: 240px; }.planner-controls { position: sticky; top: 9px; z-index: 12; box-shadow: 0 16px 35px rgba(0,0,0,.28); backdrop-filter: blur(18px); }.planner-controls > label { flex: 1 1 145px; }.planner-actions { display: flex; gap: 7px; margin-left: auto; }
.mode-note { display: flex; align-items: center; gap: 10px; color: #9baac0; font-size: 12px; margin: -5px 0 15px; }.mode-note button { margin-left: auto; padding: 6px 9px; font-size: 11px; }
.planner-tabs { display: flex; gap: 4px; padding: 5px; width: max-content; max-width: 100%; overflow-x: auto; margin-bottom: 14px; border: 1px solid #283952; background: #0d1727; border-radius: 12px; }.planner-tabs button { border: 0; background: transparent; color: #93a5bd; white-space: nowrap; }.planner-tabs button.active { color: #151a21; background: #f6b832; }
.planner-layout { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 16px; align-items: start; }.planner-main { min-width: 0; }.evaluation-panel { position: sticky; top: 100px; overflow: hidden; }.score-hero { padding: 23px; background: linear-gradient(145deg, #33230f, #131c2a 68%); text-align: center; }.score-hero span { display: block; color: #d8aa52; font-size: 10px; letter-spacing: .14em; font-weight: 850; }.score-hero strong { display: block; margin: 4px 0 2px; font-size: 56px; line-height: 1; letter-spacing: -.05em; }.score-hero div { color: #a9b7c8; font-size: 12px; }.score-hero b { color: #f8c454; }
.pillar-list { padding: 15px 17px; display: grid; gap: 7px; }.pillar-list > div { display: grid; grid-template-columns: 1fr 48px 34px; gap: 7px; align-items: center; padding: 8px 0; border-bottom: 1px solid #25354e; }.pillar-list span { color: #9badc3; font-size: 11px; }.pillar-list strong { text-align: right; }.pillar-list em { color: #f5c45a; font-size: 10px; font-style: normal; text-align: right; }
.diagnostic-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; background: #2a3a53; border-top: 1px solid #2a3a53; border-bottom: 1px solid #2a3a53; }.diagnostic-grid div { padding: 11px; background: #101a2b; }.diagnostic-grid span { display: block; color: #8294ac; font-size: 9px; text-transform: uppercase; }.diagnostic-grid b { display: block; margin-top: 4px; font-size: 12px; }.negative { color: var(--red); }
.warning-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px 8px; }.warning-head h3 { margin: 0; font-size: 13px; }.warning-head span { color: #f5c45a; }.warning-list { max-height: 360px; overflow: auto; padding: 0 12px 14px; display: grid; gap: 7px; }.warning { display: grid; grid-template-columns: 22px 1fr; gap: 7px; align-items: start; padding: 8px; border-radius: 8px; background: #152034; }.warning > span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 900; }.warning p { margin: 1px 0 0; color: #bec9d8; font-size: 10px; line-height: 1.4; }.warning.error > span { color: #fecdd3; background: rgba(244,63,94,.2); }.warning.warning > span { color: #fde68a; background: rgba(245,158,11,.19); }.warning.info > span { color: #bfdbfe; background: rgba(59,130,246,.19); }.all-clear { padding: 14px; color: var(--green); text-align: center; }
.planner-section { display: grid; gap: 13px; }.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 4px 3px; }.section-heading h2 { margin: 3px 0 0; font-size: 22px; }.section-heading > p { max-width: 520px; margin: 0; color: #8fa0b7; font-size: 12px; line-height: 1.5; }.section-heading.sub { margin-top: 13px; }.unit-stack { display: grid; gap: 11px; }.unit-stack.two-up { grid-template-columns: repeat(2,minmax(0,1fr)); }.unit-stack.three-up { grid-template-columns: repeat(3,minmax(0,1fr)); }
.unit-card { padding: 14px; min-width: 0; }.unit-card > header { display: flex; justify-content: space-between; gap: 12px; align-items: end; margin-bottom: 11px; }.unit-number { color: #f2f5fa; font-size: 13px; font-weight: 850; }.unit-controls { display: flex; gap: 7px; }.unit-controls label { grid-template-columns: auto 74px; align-items: center; }.unit-controls input, .unit-controls select { min-width: 0; padding: 6px 7px; font-size: 10px; }.unit-controls input { width: 61px; }
.slot-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }.slot-grid.cols-1 { grid-template-columns: 1fr; }.slot-grid.cols-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }.slot-grid.cols-5, .slot-grid.responsive { grid-template-columns: repeat(auto-fit,minmax(145px,1fr)); }.player-slot { position: relative; padding: 8px; border: 1px solid #30415e; border-radius: 10px; background: #0b1524; }.player-slot.slot-locked { border-color: #b67a21; box-shadow: inset 0 0 0 1px rgba(245,158,11,.13); }.player-slot.slot-warning { border-color: #d7606f; }.slot-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; color: #f4c661; font-size: 9px; font-weight: 900; letter-spacing: .08em; }.slot-label em { padding: 2px 4px; border-radius: 4px; color: #fecdd3; background: rgba(244,63,94,.18); font-style: normal; }.player-slot select { padding: 8px 31px 8px 8px; min-width: 0; font-size: 10px; text-overflow: ellipsis; }.lock-button { position: absolute; right: 12px; bottom: 14px; width: 18px; height: 18px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: #243550; color: #71839c; font-size: 10px; }.lock-button:hover { transform: none; }.lock-button.active { color: #1b1a16; background: #f5b83b; }
.goalie-card { margin-top: 4px; }.strategy-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; }.strategy-grid select { min-width: 0; }.notes-panel { margin-top: 15px; padding: 15px; display: grid; gap: 8px; }.notes-panel small { color: #7f91a9; }
.roster-grid { grid-template-columns: minmax(0,1.7fr) minmax(280px,.8fr); }.muted { color: #8294ad !important; font-size: 12px; }.search-line { display: grid; grid-template-columns: 1fr auto; gap: 7px; }.search-results { margin-top: 12px; max-height: 490px; overflow: auto; display: grid; gap: 6px; }.search-results > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px; border: 1px solid #293b57; border-radius: 8px; background: #0c1626; }.search-results strong, .search-results small { display: block; }.search-results strong { font-size: 11px; }.search-results small { color: #7e91aa; margin-top: 3px; font-size: 9px; }.search-results button { padding: 6px 8px; font-size: 10px; }.empty-mini { padding: 22px 5px; color: #71839c; font-size: 11px; }
.scenario-list { display: grid; gap: 12px; }.scenario-card { padding: 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }.scenario-card h2 { margin: 9px 0 5px; }.scenario-card p { margin: 0 0 8px; color: #a7b5c8; }.scenario-card small { color: #74869e; }.scenario-meta, .scenario-actions, .button-row { display: flex; flex-wrap: wrap; gap: 7px; }.empty-state { padding: 60px 24px; text-align: center; border: 1px dashed #344660; border-radius: 18px; color: #94a5bb; }.empty-state > div { font-size: 38px; color: #f4bd4c; }.empty-state h2 { color: white; }.file-button { display: inline-flex; align-items: center; cursor: pointer; }.file-button input { display: none; }.privacy-note { color: var(--green) !important; font-size: 11px; }.security-panel { margin-top: 17px; }.privacy-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }.privacy-grid div { padding: 15px; border: 1px solid #2a3a53; border-radius: 11px; background: #0d1727; }.privacy-grid p { margin-bottom: 0; font-size: 12px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 99; max-width: 420px; padding: 13px 17px; border: 1px solid #76602b; border-radius: 11px; color: #ffe5a7; background: #2b2417; box-shadow: 0 18px 42px rgba(0,0,0,.35); animation: pop .18s ease-out; } @keyframes pop { from { transform: translateY(8px); opacity: 0; } }
.fatal { max-width: 720px; margin: 14vh auto; padding: 30px; color: white; }.fatal p { color: #a9b6c8; line-height: 1.6; }
@media (max-width: 1260px) { .planner-layout { grid-template-columns: 1fr; }.evaluation-panel { position: static; display: grid; grid-template-columns: 260px 1fr; }.score-hero { grid-row: span 2; }.warning-list { max-height: 240px; } }
@media (max-width: 1040px) { .kpis { grid-template-columns: repeat(2,1fr); }.unit-stack.two-up, .unit-stack.three-up { grid-template-columns: 1fr; }.strategy-grid { grid-template-columns: repeat(2,1fr); }.roster-grid { grid-template-columns: 1fr; }.planner-header { align-items: stretch; flex-direction: column; }.scenario-save { width: 100%; } }
@media (max-width: 780px) { .app-shell { grid-template-columns: 1fr; }.sidebar { position: static; height: auto; }.nav { grid-template-columns: repeat(2,minmax(0,1fr)); }.sidebar-foot { margin-top: 18px; }.main { padding: 26px 14px 58px; }.page-header { align-items: stretch; flex-direction: column; }.grid.two, .kpis, .privacy-grid { grid-template-columns: 1fr; }.planner-controls { position: static; }.planner-actions { width: 100%; margin: 0; display: grid; grid-template-columns: repeat(3,1fr); }.planner-actions button { padding: 9px 5px; font-size: 10px; }.slot-grid, .slot-grid.cols-2 { grid-template-columns: 1fr; }.unit-card > header { align-items: stretch; flex-direction: column; }.unit-controls { display: grid; grid-template-columns: repeat(2,1fr); }.unit-controls label { grid-template-columns: 1fr; }.unit-controls input { width: 100%; }.evaluation-panel { display: block; }.scenario-card { align-items: stretch; flex-direction: column; }.scenario-actions button { flex: 1; }.scenario-save { flex-direction: column; }.scenario-save input { min-width: 0; }.strategy-grid { grid-template-columns: 1fr; } }
/* League Rankings v3 */
.rankings-kpis { grid-template-columns: repeat(4,minmax(0,1fr)); }
.rankings-toolbar { justify-content: space-between; }
.ranking-sort-summary { margin-left: auto; padding: 10px 12px; color: #91a2b9; font-size: 11px; }
.ranking-sort-summary strong { color: #f4c661; }
.rankings-panel { overflow: hidden; }
.rankings-table-wrap { max-height: calc(100vh - 285px); min-height: 480px; }
.rankings-table { min-width: 2350px; font-variant-numeric: tabular-nums; }
.rankings-table th { top: 0; white-space: nowrap; padding: 9px 10px; }
.rankings-table td { white-space: nowrap; padding: 10px; }
.rankings-table th:nth-child(1), .rankings-table td:nth-child(1) { position: sticky; left: 0; z-index: 4; width: 58px; text-align: center; }
.rankings-table th:nth-child(2), .rankings-table td:nth-child(2) { position: sticky; left: 58px; z-index: 4; width: 74px; }
.rankings-table th:nth-child(1), .rankings-table th:nth-child(2) { z-index: 7; background: #111d30; }
.rankings-table td:nth-child(1), .rankings-table td:nth-child(2) { background: #0f192a; }
.rankings-table .active-ranking-row td { background: rgba(117,78,20,.26); box-shadow: inset 0 1px rgba(245,158,11,.22), inset 0 -1px rgba(245,158,11,.22); }
.rankings-table .active-ranking-row td:nth-child(1), .rankings-table .active-ranking-row td:nth-child(2) { background: #302414; }
.table-sort { width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; color: #8ea0b8; text-align: left; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.table-sort:hover { transform: none; background: transparent; color: white; }
.table-sort.active { color: #f4c661; }
.team-link { padding: 4px 7px; border-color: #3b4c69; background: #17253b; color: #f6c45d; font-size: 11px; }
.overall-rank { color: #f4c661; font-size: 15px; font-weight: 900; }
.score-cell { color: white; font-size: 13px; font-weight: 900; }
.metric-value { color: #dbe4f1; }
.rank-cell { color: #f0bf55; font-size: 10px; }
@media (max-width: 1040px) { .rankings-kpis { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 780px) { .rankings-kpis { grid-template-columns: 1fr; }.rankings-table-wrap { max-height: none; }.ranking-sort-summary { margin-left: 0; } }
/* Market Search v4 */
.market-control-stack { display: grid; gap: 11px; margin-bottom: 17px; }
.market-control-band { border: 1px solid #2b3b56; border-radius: 14px; background: rgba(13,22,37,.94); overflow: hidden; }
.market-control-band h2 { margin: 0; padding: 9px 14px; color: #f6c65e; background: #111d30; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.market-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 11px; padding: 13px 14px; }
.market-controls label { display: grid; flex: 1 1 150px; gap: 6px; color: #91a2b9; font-size: 10px; font-weight: 760; }
.market-controls label.grow { flex: 2 1 290px; }
.market-controls-wide label { min-width: 170px; }
.market-help { margin: -3px 14px 12px !important; color: #7f91aa !important; font-size: 11px; }
.market-kpis { grid-template-columns: repeat(4,minmax(0,1fr)); }
.market-panel { overflow: hidden; }
.market-table-wrap { max-height: calc(100vh - 250px); min-height: 520px; }
.market-table { min-width: 3600px; font-variant-numeric: tabular-nums; }
.market-table th { top: 0; padding: 9px 10px; white-space: nowrap; }
.market-table td { max-width: 320px; padding: 9px 10px; vertical-align: top; white-space: nowrap; }
.market-table td:nth-child(1), .market-table th:nth-child(1) { position: sticky; left: 0; z-index: 5; width: 52px; text-align: center; background: #0f192a; }
.market-table td:nth-child(2), .market-table th:nth-child(2) { position: sticky; left: 52px; z-index: 5; width: 72px; background: #0f192a; }
.market-table td:nth-child(3), .market-table th:nth-child(3) { position: sticky; left: 124px; z-index: 5; min-width: 210px; background: #0f192a; }
.market-table th:nth-child(1), .market-table th:nth-child(2), .market-table th:nth-child(3) { z-index: 8; background: #111d30; }
.market-table tbody tr:hover td:nth-child(1), .market-table tbody tr:hover td:nth-child(2), .market-table tbody tr:hover td:nth-child(3) { background: #17243a; }
.market-table .why-cell { min-width: 390px; white-space: normal; line-height: 1.45; color: #aebbd0; }
.row-actions { margin-top: 6px; }
.row-actions button { color: #f5c45a; background: transparent; }
.market-empty { margin: 30px; }
@media (max-width: 1040px) { .market-kpis { grid-template-columns: repeat(2,1fr); }.market-table-wrap { max-height: none; } }
@media (max-width: 780px) { .market-kpis { grid-template-columns: 1fr; }.market-controls { display: grid; grid-template-columns: 1fr; }.market-controls label { min-width: 0; } }
