:root {
  color-scheme: dark;
  --ink: #f2f4ed;
  --muted: #939b91;
  --line: #272c28;
  --panel: #151916;
  --panel-soft: #1a1f1b;
  --bg: #0b0e0c;
  --lime: #c9ff3d;
  --lime-soft: rgba(201, 255, 61, .12);
  --red: #ff675f;
  --amber: #ffbd59;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg); }
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

.login-page {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(201, 255, 61, .08), transparent 32%),
    #090c0a;
}

.login-shell {
  width: min(1120px, 100%);
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(400px, 1.08fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #101411;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .45);
}

.login-panel { display: flex; flex-direction: column; padding: 46px 54px 42px; }
.brand-lockup { display: inline-flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.brand-mark { position: relative; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--lime); }
.brand-mark::before, .brand-mark::after, .brand-mark span { content: ""; position: absolute; width: 2px; height: 12px; background: var(--lime); transform: rotate(35deg); }
.brand-mark::before { left: 8px; }
.brand-mark::after { right: 8px; }
.brand-mark span { height: 17px; }
.login-copy { margin: auto 0 42px; }
.eyebrow { margin: 0 0 12px; color: var(--lime); font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.login-copy h1 { margin: 0; max-width: 520px; font-size: clamp(46px, 6vw, 76px); line-height: .94; letter-spacing: -.065em; }
.login-copy > p:last-child { max-width: 390px; margin: 24px 0 0; color: var(--muted); font-size: 17px; line-height: 1.6; }
.login-form label { display: block; margin-bottom: 9px; color: #c9cec7; font-size: 12px; font-weight: 700; }
.password-field { display: flex; align-items: center; border: 1px solid #343a35; border-radius: 12px; background: #0d100e; transition: border-color .2s, box-shadow .2s; }
.password-field:focus-within { border-color: var(--lime); box-shadow: 0 0 0 3px var(--lime-soft); }
.password-field input { min-width: 0; flex: 1; padding: 16px; border: 0; outline: 0; color: var(--ink); background: transparent; }
.text-button { padding: 10px 14px; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; }
.primary-button, .secondary-button, .danger-button { border: 0; border-radius: 10px; padding: 12px 17px; font-weight: 750; cursor: pointer; transition: transform .15s, opacity .15s, background .15s; }
.primary-button { color: #10140d; background: var(--lime); }
.primary-button:hover, .danger-button:hover { transform: translateY(-1px); }
.primary-button:disabled, .danger-button:disabled { cursor: wait; opacity: .65; transform: none; }
.login-submit { width: 100%; display: flex; justify-content: space-between; margin-top: 14px; padding: 16px 18px; }
.form-error { margin: 10px 0 0; color: #ff8b85; font-size: 13px; }
.login-footnote { margin: 25px 0 0; color: #6f776f; font-size: 11px; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime); }

.login-visual { position: relative; overflow: hidden; min-height: 680px; padding: 45px; background: var(--lime); color: #0a0d09; }
.pitch-grid { position: absolute; inset: 0; opacity: .22; background-image: linear-gradient(rgba(0,0,0,.3) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,.3) 1px, transparent 1px); background-size: 72px 72px; transform: perspective(600px) rotateX(60deg) scale(1.6); transform-origin: center bottom; }
.login-visual::before { content: ""; position: absolute; width: 430px; height: 430px; top: 50%; left: 50%; border: 1px solid rgba(0,0,0,.32); border-radius: 50%; transform: translate(-50%, -50%); }
.login-visual::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: rgba(0,0,0,.32); }
.signal { position: absolute; z-index: 2; display: flex; flex-direction: column; gap: 3px; padding: 12px 15px; border: 1px solid rgba(0,0,0,.35); background: rgba(201,255,61,.75); backdrop-filter: blur(6px); }
.signal span { font-size: 8px; font-weight: 800; letter-spacing: .18em; }
.signal strong { font-size: 18px; }
.signal-a { top: 16%; left: 13%; }
.signal-b { right: 10%; bottom: 24%; }
.visual-number { position: absolute; z-index: 1; top: 50%; left: 50%; transform: translate(-50%, -54%); font-size: clamp(110px, 15vw, 210px); font-weight: 900; letter-spacing: -.1em; }
.login-visual > p { position: absolute; z-index: 2; right: 40px; bottom: 35px; margin: 0; text-align: right; font-size: 13px; font-weight: 900; letter-spacing: .12em; line-height: 1.5; }

.dashboard-page { background: radial-gradient(circle at 70% -20%, rgba(201,255,61,.07), transparent 30%), var(--bg); }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1420px) / 2)); border-bottom: 1px solid var(--line); background: rgba(11,14,12,.88); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 10; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.main-nav { display: flex; align-self: stretch; gap: 28px; }
.nav-tab { position: relative; border: 0; color: #777f77; background: transparent; cursor: pointer; font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.nav-tab::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--lime); transform: scaleX(0); transition: transform .2s; }
.nav-tab:hover, .nav-tab.is-active { color: var(--ink); }
.nav-tab.is-active::after { transform: scaleX(1); }
.live-indicator { margin-right: 12px; color: #aeb5ac; font-size: 10px; font-weight: 800; letter-spacing: .15em; }
.icon-button, .secondary-button { border: 1px solid #343a35; background: #151916; }
.icon-button { width: 40px; height: 40px; border-radius: 10px; cursor: pointer; font-size: 20px; }
.secondary-button:hover, .icon-button:hover { background: #202620; }
.dashboard-shell { width: min(1420px, calc(100% - 48px)); margin: 0 auto; padding: 58px 0 80px; }
.hero-row { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin-bottom: 40px; }
.hero-row h1 { margin: 0; font-size: clamp(40px, 5vw, 70px); line-height: 1; letter-spacing: -.055em; }
.hero-subtitle { margin: 15px 0 0; color: var(--muted); font-size: 16px; }
.hero-controls { display: flex; align-items: stretch; gap: 10px; }
.league-switcher { min-width: 210px; display: grid; gap: 5px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.league-switcher span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.league-switcher select { max-width: 230px; padding: 0 24px 0 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; font-weight: 750; cursor: pointer; }
.league-switcher option { color: var(--ink); background: var(--panel); }
.bot-state { display: flex; align-items: center; gap: 13px; min-width: 190px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.bot-state-orb { width: 12px; height: 12px; border: 3px solid rgba(201,255,61,.25); border-radius: 50%; background: var(--lime); box-shadow: 0 0 14px rgba(201,255,61,.5); }
.bot-state[data-state="running"] .bot-state-orb { animation: pulse 1.4s infinite; }
.bot-state[data-state="error"] .bot-state-orb { background: var(--red); box-shadow: 0 0 14px rgba(255,103,95,.45); }
.bot-state[data-state="paused"] .bot-state-orb { background: var(--amber); box-shadow: 0 0 14px rgba(255,189,89,.35); }
.bot-state small { display: block; margin-bottom: 4px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.bot-state strong { font-size: 13px; }
.pause-button { min-width: 130px; padding: 0 17px; border: 1px solid rgba(255,189,89,.35); border-radius: 14px; color: var(--amber); background: rgba(255,189,89,.08); cursor: pointer; font-size: 11px; font-weight: 800; }
.pause-button:hover { border-color: var(--amber); background: rgba(255,189,89,.14); }
.pause-button.is-resume { border-color: rgba(201,255,61,.35); color: var(--lime); background: var(--lime-soft); }
.pause-button:disabled { cursor: wait; opacity: .55; }
@keyframes pulse { 50% { transform: scale(.72); opacity: .6; } }

.dashboard-view { animation: view-in .22s ease-out; }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }
.data-view { min-height: 620px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.data-view-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; padding: 30px 32px; border-bottom: 1px solid var(--line); }
.data-view-heading h2 { margin: 0; font-size: 28px; letter-spacing: -.035em; }
.data-view-heading p:last-child { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.view-stats { display: flex; gap: 34px; }
.view-stats span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.view-stats strong { display: block; margin-top: 7px; color: var(--ink); font-size: 20px; letter-spacing: -.02em; }
.lineup-heading-actions { display: flex; align-items: center; gap: 28px; }
.lineup-heading-actions .primary-button { white-space: nowrap; }
.data-loading, .data-error { margin: 22px 32px 0; padding: 13px 15px; border-radius: 10px; font-size: 11px; }
.data-loading { color: var(--lime); background: var(--lime-soft); }
.data-error { color: #ffaaa5; background: rgba(255,103,95,.1); }
.pitch { position: relative; min-height: 610px; display: grid; grid-template-rows: repeat(4, 1fr); gap: 18px; margin: 28px; padding: 34px 24px; overflow: hidden; border: 1px solid rgba(201,255,61,.25); border-radius: 16px; background: linear-gradient(90deg, rgba(201,255,61,.035) 50%, transparent 50%), #101a12; background-size: 25% 100%; }
.pitch::before { content: ""; position: absolute; inset: 50% auto auto 50%; width: 150px; height: 150px; border: 1px solid rgba(201,255,61,.16); border-radius: 50%; transform: translate(-50%, -50%); }
.pitch::after { content: ""; position: absolute; top: 50%; right: 0; left: 0; border-top: 1px solid rgba(201,255,61,.16); }
.pitch-line { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: clamp(10px, 2.5vw, 38px); }
.lineup-player { width: min(160px, 17vw); min-width: 100px; display: grid; justify-items: center; text-align: center; }
.player-avatar { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 8px; overflow: hidden; border: 2px solid var(--lime); border-radius: 50%; color: #0b0e0c; background: var(--lime); box-shadow: 0 8px 20px rgba(0,0,0,.35); font-size: 13px; font-weight: 900; }
.player-avatar img, .market-avatar img, .squad-avatar img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; background: #dce5da; }
.lineup-player strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.lineup-player small { margin-top: 4px; color: #839083; font-size: 8px; }
.pitch-empty { position: relative; z-index: 1; grid-row: 1 / -1; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.market-search { min-width: 270px; display: grid; gap: 7px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.market-search input { width: 100%; padding: 12px 14px; border: 1px solid #343a35; border-radius: 10px; outline: 0; color: var(--ink); background: #0d100e; }
.market-search input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px var(--lime-soft); }
.market-table-wrap { overflow-x: auto; }
.market-table { width: 100%; border-collapse: collapse; }
.market-table th { padding: 15px 22px; border-bottom: 1px solid var(--line); color: #6f776f; text-align: left; font-size: 8px; letter-spacing: .12em; text-transform: uppercase; }
.market-table td { padding: 16px 22px; border-bottom: 1px solid var(--line); color: #c6ccc5; white-space: nowrap; font-size: 11px; }
.market-table tbody tr:hover { background: rgba(201,255,61,.025); }
.market-player { min-width: 210px; display: flex; align-items: center; gap: 12px; }
.market-avatar { width: 42px; height: 42px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 50%; color: var(--lime); background: var(--lime-soft); font-size: 9px; font-weight: 900; }
.market-player strong, .market-player small { display: block; }
.market-player strong { color: var(--ink); font-size: 11px; }
.market-player small { margin-top: 4px; color: #697069; font-size: 8px; }
.trend-up { color: var(--lime) !important; }
.trend-down { color: var(--red) !important; }
.offers-cell { min-width: 190px; }
.offers-cell > small { display: block; margin-top: 5px; color: #697069; font-size: 8px; }
.offer-detail { display: block; color: #c7cec5; font-size: 9px; }
.offer-detail + .offer-detail { margin-top: 4px; }
.offer-detail.is-own { color: var(--lime); font-weight: 800; }
.offer-button { padding: 8px 12px; border: 1px solid rgba(201,255,61,.3); border-radius: 8px; color: var(--lime); background: var(--lime-soft); cursor: pointer; font-size: 9px; font-weight: 800; }
.offer-button:hover { border-color: var(--lime); background: rgba(201,255,61,.17); }
.detail-button { margin-left: 7px; padding: 8px 10px; border: 1px solid #343a35; border-radius: 8px; color: #9fa79e; background: transparent; cursor: pointer; font-size: 9px; }
.detail-button:hover { border-color: #596159; color: var(--ink); }
.market-player.is-interactive { cursor: pointer; }
.market-player.is-interactive:hover strong { color: var(--lime); }

.mode-switcher { min-width: 154px; display: grid; gap: 5px; }
.mode-switcher span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .11em; }
.mode-switcher select { padding: 10px 32px 10px 11px; border: 1px solid #343a35; border-radius: 9px; color: var(--ink); background: #111512; font-size: 10px; font-weight: 750; }
.budget-cockpit { margin-bottom: 22px; padding: 25px 27px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.section-label { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 19px; }
.section-label h2 { margin: 4px 0 0; font-size: 20px; letter-spacing: -.025em; }
.section-label > span { color: #747c74; font-size: 9px; }
.budget-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 11px; }
.budget-grid article { padding: 18px 20px; border-right: 1px solid var(--line); background: #101411; }
.budget-grid article:last-child { border-right: 0; }
.budget-grid span, .strategy-profile span { display: block; color: #6f776f; font-size: 8px; font-weight: 800; letter-spacing: .09em; }
.budget-grid strong { display: block; margin-top: 9px; font-size: 19px; }
.is-negative { color: var(--red) !important; }
.intelligence-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; margin-bottom: 22px; }
.approval-panel, .strategy-panel, .watchlist-panel { padding: 25px 27px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.proposal-list { display: grid; gap: 8px; }
.proposal-card { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #101411; }
.proposal-score { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #0c0f0b; background: var(--lime); font-size: 12px; font-weight: 900; }
.proposal-card strong, .proposal-card small { display: block; }
.proposal-card small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.proposal-actions { display: flex; gap: 6px; }
.proposal-actions button { padding: 8px 10px; font-size: 9px; }
.strategy-profile { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.strategy-profile > div { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #101411; }
.strategy-profile strong { display: block; margin-top: 7px; color: var(--lime); font-size: 18px; }
.strategy-profile p { grid-column: 1 / -1; margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.watchlist-panel { margin-top: 22px; }
.watchlist-items { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.watch-card { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-align: left; background: #101411; cursor: pointer; }
.watch-card:hover { border-color: rgba(201,255,61,.35); }
.watch-card > img, .watch-card > span:first-child { width: 36px; height: 36px; flex: none; display: grid; place-items: center; object-fit: contain; border-radius: 50%; color: var(--lime); background: var(--lime-soft); font-size: 8px; font-weight: 900; }
.watch-card strong, .watch-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watch-card strong { font-size: 10px; }
.watch-card small, .empty-inline { margin-top: 4px; color: var(--muted); font-size: 8px; }
.empty-inline { grid-column: 1 / -1; padding: 18px 0; }
.sales-offer-cell { min-width: 300px; white-space: normal !important; }
.incoming-offer { display: grid; grid-template-columns: minmax(120px, 1fr) auto auto; align-items: center; gap: 6px; }
.incoming-offer + .incoming-offer { margin-top: 7px; }
.accept-button, .decline-button { padding: 6px 8px; border-radius: 7px; cursor: pointer; font-size: 8px; font-weight: 800; }
.accept-button { border: 1px solid rgba(201,255,61,.3); color: var(--lime); background: var(--lime-soft); }
.decline-button { border: 1px solid #343a35; color: #969e95; background: transparent; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.metric { min-height: 145px; padding: 25px 26px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric p { margin: 0 0 17px; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.metric strong { display: block; margin-bottom: 8px; font-size: 34px; line-height: 1; letter-spacing: -.04em; }
.metric span { color: #788078; font-size: 11px; }
.metric-accent { color: #0c0f0b; background: var(--lime); }
.metric-accent p, .metric-accent span { color: rgba(12,15,11,.66); }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; margin-top: 22px; align-items: start; }
.activity-panel, .connection-panel, .control-panel, .league-panel, .safety-note { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.activity-panel { min-height: 550px; overflow: hidden; }
.panel-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; padding: 27px 28px 23px; border-bottom: 1px solid var(--line); }
.panel-heading h2, .control-panel h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.filters { display: flex; gap: 4px; padding: 4px; border-radius: 9px; background: #0c100d; }
.filter { padding: 7px 10px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; cursor: pointer; font-size: 10px; font-weight: 750; }
.filter.is-active { color: #10140d; background: var(--lime); }
.activity-list { max-height: 690px; overflow-y: auto; }
.activity-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 15px; align-items: center; min-height: 96px; padding: 19px 28px; border-bottom: 1px solid var(--line); }
.activity-row:last-child { border-bottom: 0; }
.activity-marker { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; font-size: 13px; font-weight: 900; background: #222822; color: #aeb5ac; }
.marker-bid { color: var(--lime); background: var(--lime-soft); }
.marker-error { color: var(--red); background: rgba(255,103,95,.1); }
.marker-canceled { color: var(--amber); background: rgba(255,189,89,.1); }
.activity-body { min-width: 0; }
.activity-heading { display: flex; justify-content: space-between; gap: 15px; }
.activity-heading strong { font-size: 13px; }
.activity-heading time { flex: none; color: #666e66; font-size: 10px; }
.activity-body p { margin: 6px 0 9px; overflow: hidden; color: #a7aea5; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.activity-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.activity-tags span { padding: 4px 7px; border: 1px solid #303630; border-radius: 5px; color: #7e867e; font-size: 8px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.activity-tags .tag-open { border-color: rgba(201,255,61,.3); color: var(--lime); background: var(--lime-soft); }
.activity-tags .tag-muted { color: var(--amber); }
.cancel-button { padding: 8px 11px; border: 1px solid rgba(255,103,95,.28); border-radius: 8px; color: #ff8e88; background: rgba(255,103,95,.08); cursor: pointer; font-size: 10px; font-weight: 750; }
.cancel-button:hover { border-color: var(--red); background: rgba(255,103,95,.14); }
.empty-state { padding: 70px 25px; color: #6f776f; text-align: center; font-size: 13px; }

.side-column { display: grid; gap: 18px; }
.connection-panel, .control-panel, .league-panel { padding: 25px; }
.connection-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.connection-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.connection-badge { padding: 6px 8px; border: 1px solid rgba(255,103,95,.25); border-radius: 6px; color: #ff8e88; background: rgba(255,103,95,.08); font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.connection-badge.is-connected { border-color: rgba(201,255,61,.3); color: var(--lime); background: var(--lime-soft); }
.connection-copy { margin: 16px 0 19px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.credentials-form { display: grid; gap: 8px; }
.credentials-form label { margin-top: 4px; color: #aeb5ac; font-size: 10px; font-weight: 700; }
.credentials-form input { width: 100%; padding: 11px 12px; border: 1px solid #343a35; border-radius: 9px; outline: 0; color: var(--ink); background: #0d100e; }
.credentials-form input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px var(--lime-soft); }
.credentials-form .primary-button { margin-top: 7px; font-size: 10px; }
.rule-list { margin: 22px 0 0; }
.rule-list > div { display: flex; justify-content: space-between; gap: 15px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rule-list > div:last-child { border-bottom: 0; }
.rule-list dt { color: var(--muted); font-size: 11px; }
.rule-list dd { margin: 0; text-align: right; font-size: 11px; font-weight: 750; }
.league-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.league-row:last-child { border-bottom: 0; padding-bottom: 0; }
.league-number { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: var(--lime); background: var(--lime-soft); font-size: 9px; font-weight: 800; }
.league-row strong { display: block; font-size: 11px; }
.league-row small { color: #697069; font-size: 9px; }
.league-status { color: var(--lime); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.safety-note { display: flex; gap: 13px; padding: 19px; border-color: rgba(255,189,89,.2); background: rgba(255,189,89,.055); }
.safety-icon { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border: 1px solid rgba(255,189,89,.45); border-radius: 50%; color: var(--amber); font-size: 11px; font-weight: 900; }
.safety-note strong { font-size: 11px; }
.safety-note p { margin: 5px 0 0; color: #858b83; font-size: 10px; line-height: 1.5; }

.confirm-dialog { width: min(470px, calc(100% - 32px)); padding: 0; border: 1px solid #373d37; border-radius: 18px; color: var(--ink); background: #151916; box-shadow: 0 35px 90px rgba(0,0,0,.65); }
.confirm-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(5px); }
.confirm-dialog form { position: relative; padding: 30px; }
.confirm-dialog h2 { margin: 0; font-size: 25px; letter-spacing: -.035em; }
.dialog-copy { margin: 14px 0 26px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.dialog-close { position: absolute; top: 15px; right: 15px; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 24px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; }
.danger-button { color: white; background: #d94740; }
.dialog-field { display: grid; gap: 8px; margin-bottom: 14px; }
.dialog-field span, .formation-field span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.dialog-field input, .formation-field select { width: 100%; padding: 13px 14px; border: 1px solid #343a35; border-radius: 10px; outline: 0; color: var(--ink); background: #0d100e; }
.dialog-field input:focus, .formation-field select:focus { border-color: var(--lime); box-shadow: 0 0 0 3px var(--lime-soft); }
.dialog-warning { margin: 0 0 20px; color: var(--amber); font-size: 10px; line-height: 1.5; }
.lineup-dialog { width: min(980px, calc(100% - 32px)); }
.lineup-dialog form { max-height: min(88vh, 850px); display: flex; flex-direction: column; }
.lineup-dialog-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.lineup-dialog-heading h2 { margin-bottom: 8px; }
.lineup-dialog-heading p:last-child { margin: 0; color: var(--muted); font-size: 11px; }
.formation-field { width: 170px; flex: none; display: grid; gap: 7px; }
.selection-summary { display: flex; align-items: baseline; gap: 9px; margin: 24px 0 12px; }
.selection-summary strong { color: var(--lime); font-size: 20px; }
.selection-summary span { color: var(--muted); font-size: 10px; }
.selection-hint { margin: -4px 0 14px; color: var(--amber); font-size: 10px; line-height: 1.5; }
.selection-hint.is-valid { color: var(--lime); }
.squad-list { min-height: 220px; overflow-y: auto; padding-right: 5px; }
.squad-group { margin-bottom: 20px; }
.squad-group h3 { margin: 0 0 9px; color: #747d74; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.squad-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.squad-player { position: relative; min-width: 0; display: grid; grid-template-columns: auto 38px minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: #101411; cursor: pointer; }
.squad-player:has(input:checked) { border-color: rgba(201,255,61,.42); background: var(--lime-soft); }
.squad-player:has(input:disabled) { cursor: not-allowed; opacity: .45; }
.squad-player input { width: 15px; height: 15px; accent-color: var(--lime); }
.squad-avatar { width: 38px; height: 38px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; color: var(--lime); background: var(--lime-soft); font-size: 8px; font-weight: 900; }
.squad-player strong, .squad-player small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.squad-player strong { font-size: 10px; }
.squad-player small { margin-top: 4px; color: #747c74; font-size: 8px; }
.lineup-dialog-actions { flex: none; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.player-dialog { width: min(760px, calc(100% - 32px)); }
.player-dialog-shell { position: relative; max-height: 88vh; overflow-y: auto; padding: 30px; }
.player-detail-hero { display: flex; align-items: center; gap: 18px; }
.player-detail-hero h2 { margin: 3px 0 7px; font-size: 28px; }
.player-detail-avatar { width: 76px; height: 76px; display: grid; place-items: center; overflow: hidden; border: 2px solid var(--lime); border-radius: 50%; color: #0b0e0c; background: var(--lime); font-weight: 900; }
.player-detail-avatar img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.player-detail-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 22px 0; }
.player-detail-stats > div { padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: #101411; }
.player-detail-stats span { display: block; color: var(--muted); font-size: 8px; }
.player-detail-stats strong { display: block; margin-top: 7px; font-size: 15px; }
.history-section, .recent-transfers { padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: #101411; }
.history-title { display: flex; justify-content: space-between; gap: 15px; font-size: 10px; }
.history-title span { color: var(--muted); }
.history-bars { height: 110px; display: flex; align-items: end; gap: 2px; margin-top: 17px; }
.history-bars span { min-width: 2px; flex: 1; border-radius: 2px 2px 0 0; background: var(--lime); opacity: .74; }
.recent-transfers { display: grid; gap: 8px; margin-top: 10px; }
.recent-transfers div { padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.watch-form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 9px; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--line); }
.watch-form label { display: grid; gap: 7px; color: var(--muted); font-size: 8px; font-weight: 800; }
.watch-form input { width: 100%; padding: 10px; border: 1px solid #343a35; border-radius: 8px; color: var(--ink); background: #0d100e; }
.watch-actions { display: flex; gap: 7px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: min(390px, calc(100% - 48px)); padding: 14px 18px; border: 1px solid rgba(201,255,61,.26); border-radius: 11px; color: #dfffa1; background: #172012; box-shadow: 0 16px 50px rgba(0,0,0,.4); font-size: 12px; }
.toast-error { border-color: rgba(255,103,95,.32); color: #ffaaa5; background: #271513; }

@media (max-width: 980px) {
  .login-shell { grid-template-columns: 1fr; min-height: 0; }
  .login-visual { display: none; }
  .login-panel { min-height: 650px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .content-grid { grid-template-columns: 1fr; }
  .intelligence-grid { grid-template-columns: 1fr; }
  .watchlist-items { grid-template-columns: repeat(2, 1fr); }
  .hero-row { align-items: start; flex-direction: column; }
  .hero-controls { width: 100%; }
  .league-switcher { flex: 1; }
  .side-column { grid-template-columns: 1fr 1fr; }
  .safety-note { grid-column: 1 / -1; }
}

@media (max-width: 650px) {
  .login-page { padding: 0; }
  .login-shell { border: 0; border-radius: 0; }
  .login-panel { min-height: 100vh; padding: 28px 24px; }
  .topbar { height: 66px; padding: 0 16px; }
  .topbar .brand-lockup > span:last-child { display: none; }
  .main-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 20; height: 62px; justify-content: space-around; gap: 0; border-top: 1px solid var(--line); background: rgba(11,14,12,.96); backdrop-filter: blur(16px); }
  .nav-tab { flex: 1; font-size: 9px; }
  .nav-tab::after { top: -1px; bottom: auto; }
  .live-indicator { display: none; }
  .dashboard-shell { width: min(100% - 28px, 1420px); padding-top: 36px; }
  .hero-row { align-items: start; flex-direction: column; }
  .hero-row h1 { font-size: 42px; }
  .hero-controls { display: grid; grid-template-columns: 1fr 1fr; }
  .mode-switcher { grid-column: 1 / -1; }
  .league-switcher { grid-column: 1 / -1; }
  .bot-state, .pause-button { width: 100%; min-width: 0; }
  .data-view-heading { align-items: start; flex-direction: column; padding: 24px 20px; }
  .view-stats { width: 100%; justify-content: space-between; gap: 12px; }
  .lineup-heading-actions { width: 100%; align-items: stretch; flex-direction: column; gap: 16px; }
  .market-search { width: 100%; min-width: 0; }
  .pitch { min-height: 560px; margin: 14px; padding: 24px 8px; gap: 12px; }
  .pitch-line { gap: 5px; }
  .lineup-player { width: 19vw; min-width: 66px; }
  .player-avatar { width: 42px; height: 42px; }
  .lineup-player strong { font-size: 8px; }
  .lineup-player small { display: none; }
  .market-table th, .market-table td { padding-right: 14px; padding-left: 14px; }
  .lineup-dialog form { padding: 23px 18px; }
  .lineup-dialog-heading { align-items: stretch; flex-direction: column; }
  .formation-field { width: 100%; }
  .squad-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
  .metric { min-height: 122px; border-right: 0; border-bottom: 1px solid var(--line); }
  .metric:last-child { border-bottom: 0; }
  .panel-heading { align-items: start; flex-direction: column; padding: 23px 20px; }
  .filters { width: 100%; overflow-x: auto; }
  .filter { flex: 1; }
  .activity-row { grid-template-columns: 34px minmax(0, 1fr); padding: 17px 18px; }
  .activity-row .cancel-button { grid-column: 2; justify-self: start; }
  .activity-heading { align-items: start; flex-direction: column; gap: 5px; }
  .activity-body p { white-space: normal; }
  .side-column { grid-template-columns: 1fr; }
  .safety-note { grid-column: auto; }
  .budget-grid, .player-detail-stats { grid-template-columns: repeat(2, 1fr); }
  .budget-grid article:nth-child(2) { border-right: 0; }
  .budget-grid article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .watchlist-items { grid-template-columns: 1fr; }
  .proposal-card { grid-template-columns: 42px minmax(0, 1fr); }
  .proposal-actions { grid-column: 2; }
  .watch-form { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
