:root{
  --red:#da1a32;
  --ember:#a00c30;
  --ink:#0f0f0f;            /* solid dark accent surface (active nav/pills) — constant, doesn't flip */
  --black:#0f0f0f;          /* primary text/ink — flips to a light color in dark mode */
  --white:#ffffff;          /* card/surface background — flips */
  --bg:#f7f7f8;              /* airy grey background — flips */
  --grey:#6b7280;            /* secondary text — flips */
  --grey-light:#e8e8ea;      /* hairline borders — flips */
  --grey-fill:#f2f2f3;       /* subtle fills — flips */
  --muted:#9ca3af;           /* placeholder/tertiary text — flips */
  --hover-fill:#eaeaec;      /* hover background tint — flips */
  --border-hover:#c9c9cd;    /* hover border/chevron tint — flips */
  --success:#16a34a;         /* constant — reads fine on both grounds */
  --success-bg:#e8f7ee;      /* flips */
  --danger-bg:#fde8eb;       /* flips */
  --danger-border:#f3b3bd;   /* flips */
  --radius:20px;
  --shadow:0 1px 2px rgba(0,0,0,.06),0 4px 16px rgba(0,0,0,.05);
  --shadow-lift:0 4px 12px rgba(0,0,0,.08),0 10px 32px rgba(0,0,0,.08);
  --mono:'SF Mono',ui-monospace,Menlo,Consolas,monospace;
}
:root[data-theme="dark"]{
  --black:#f2f2f3; --white:#1c1c1f; --bg:#141416;
  --grey:#9a9aa2; --grey-light:#2c2c30; --grey-fill:#232326;
  --muted:#6b6b73; --hover-fill:#2a2a2e; --border-hover:#3a3a3f;
  --success-bg:#0f2a1a; --danger-bg:#3a1218; --danger-border:#5c1f28;
  --shadow:0 1px 2px rgba(0,0,0,.3),0 4px 16px rgba(0,0,0,.25);
  --shadow-lift:0 4px 12px rgba(0,0,0,.35),0 10px 32px rgba(0,0,0,.3);
}
:root[data-theme="dark"] select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239a9aa2' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E")}
:root[data-theme="light"]{
  --black:#0f0f0f; --white:#ffffff; --bg:#f7f7f8;
  --grey:#6b7280; --grey-light:#e8e8ea; --grey-fill:#f2f2f3;
  --muted:#9ca3af; --hover-fill:#eaeaec; --border-hover:#c9c9cd;
  --success-bg:#e8f7ee; --danger-bg:#fde8eb; --danger-border:#f3b3bd;
  --shadow:0 1px 2px rgba(0,0,0,.06),0 4px 16px rgba(0,0,0,.05);
  --shadow-lift:0 4px 12px rgba(0,0,0,.08),0 10px 32px rgba(0,0,0,.08);
}
:root[data-theme="light"] select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E")}
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:'Google Sans Flex',-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;background:var(--bg);color:var(--black);font-size:15px;line-height:1.5;transition:background-color .2s,color .2s}
h1,h2,h3{font-weight:700;letter-spacing:-0.01em}

/* ── Auth ── */
/* spacing scale: 12 / 24 / 36 / 48 / 60 */
.auth-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;background:var(--grey-fill);position:relative}
.auth-card{background:var(--white);border-radius:20px;padding:36px;max-width:400px;width:100%;text-align:center;box-shadow:var(--shadow-lift)}
.auth-card.split{display:flex;max-width:none;width:auto;padding:12px;gap:12px;text-align:center}
.auth-visual{width:384px;border-radius:14px;background:var(--grey-fill);overflow:hidden;position:relative;min-height:420px}
.auth-visual img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;opacity:0;transition:opacity 2.4s ease;z-index:0}
.auth-visual img.prev{opacity:1;transition:none;z-index:1}
.auth-visual img.active{opacity:1;z-index:2}
.auth-form{width:384px;padding:36px;display:flex;flex-direction:column}
.auth-form > div{display:flex;flex-direction:column;flex:1}
.auth-note{margin-top:auto;padding-top:36px;font-size:12px;color:var(--muted)}
@media(max-width:800px){
  .auth-card.split{flex-direction:column;width:100%;max-width:400px}
  .auth-visual{width:100%;min-height:150px;max-height:170px}
  .auth-form{width:100%}
}
.auth-logo{height:60px;width:auto;margin:0 auto 24px;display:block}
.auth-card .tag{color:var(--grey);font-size:14px;font-weight:400;margin-bottom:36px}
.auth-card .field{text-align:left;margin-bottom:12px}
/* borderless grey fields with in-field labels */
.auth-card .field input{background:var(--grey-fill);border:1.5px solid transparent;border-radius:12px}
.auth-card .field input::placeholder{color:var(--grey)}
.auth-card .field input:hover{background:var(--hover-fill)}
.auth-card .field input:focus{background:var(--grey-fill);border-color:var(--black);box-shadow:none}
.auth-card .field input:-webkit-autofill,
.auth-card .field input:-webkit-autofill:hover,
.auth-card .field input:-webkit-autofill:focus{
  -webkit-box-shadow:0 0 0 1000px var(--grey-fill) inset;
  -webkit-text-fill-color:var(--black);
  caret-color:var(--black);
  transition:background-color 99999s ease-in-out 0s;
}
.btn-block{width:100%;justify-content:center;text-align:center}
.auth-links{margin-top:12px;font-size:12px}
.auth-links a{color:var(--muted);font-weight:600;text-decoration:none}
.auth-links a:hover{text-decoration:underline;text-underline-offset:2px;color:var(--grey)}
.auth-err{color:var(--red);font-size:13px;border-radius:10px;max-height:0;opacity:0;overflow:hidden;transition:max-height .35s ease,opacity .25s ease,margin-top .35s ease,padding .35s ease}
.auth-err:not(:empty){background:var(--danger-bg);margin-top:12px;padding:10px 12px;max-height:60px;opacity:1}
.auth-err.ok{color:var(--success);background:transparent}
.auth-copyright{position:absolute;bottom:48px;left:0;right:0;text-align:center;font-size:12px;color:var(--muted)}
.auth-copyright a{color:var(--muted)}

/* ── App shell: fixed left sidebar + main content ── */
.app-shell{display:flex;align-items:stretch;min-height:100vh}
.sidebar{width:248px;flex-shrink:0;background:var(--white);border-right:1px solid var(--grey-light);display:flex;flex-direction:column;padding:22px 14px;position:sticky;top:0;height:100vh;z-index:50}
.sidebar-top{padding:6px 10px 26px}
.nav-logo{height:48px;display:block}

.side-nav{display:flex;flex-direction:column;gap:2px;flex:1;overflow-y:auto}
.side-nav button{display:flex;align-items:center;gap:12px;width:100%;text-align:left;border:0;background:transparent;padding:10px 12px;border-radius:10px;font-size:14px;font-weight:600;color:var(--grey);cursor:pointer;transition:all .15s;font-family:inherit}
.side-nav button:hover{background:var(--grey-fill);color:var(--black)}
.side-nav button.active{background:var(--ink);color:#fff}
.side-nav svg{width:18px;height:18px;flex-shrink:0}
.nav-divider{margin:12px 12px 8px;border-top:1px solid var(--grey-light)}

.sidebar-bottom{margin-top:auto;padding-top:14px;border-top:1px solid var(--grey-light);display:flex;flex-direction:column;gap:10px}
.net-pill{align-self:flex-start;display:flex;align-items:center;gap:6px;font-size:12px;color:var(--grey);border:1px solid var(--grey-light);border-radius:999px;padding:5px 12px;background:var(--white)}
.net-dot{width:8px;height:8px;border-radius:50%;background:var(--success)}
.offline .net-dot{background:var(--red)}

/* account menu */
.account{position:relative}
.account-btn{display:flex;align-items:center;gap:10px;width:100%;background:var(--white);border:1px solid var(--grey-light);border-radius:12px;padding:8px 10px;cursor:pointer;transition:box-shadow .15s;font-family:inherit}
.account-btn:hover{box-shadow:var(--shadow)}
.avatar{width:30px;height:30px;border-radius:50%;background:var(--grey);color:#fff;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.avatar svg{width:17px;height:17px}
.acct-name{flex:1;min-width:0;text-align:left;font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.acct-more{color:var(--grey);font-weight:700}
.account-menu{position:absolute;bottom:calc(100% + 10px);left:0;background:var(--white);border:1px solid var(--grey-light);border-radius:14px;box-shadow:var(--shadow-lift);min-width:230px;padding:8px 0;display:none;z-index:60}
.account-menu.open{display:block}
.account-menu .who{padding:12px 18px 10px;border-bottom:1px solid var(--grey-light)}
.account-menu .who .name{font-weight:700;font-size:14px}
.role-chip{display:inline-block;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;border-radius:999px;padding:2px 10px;margin-top:4px}
.role-chip.scout{background:var(--grey-fill);color:var(--grey)}
.role-chip.admin{background:var(--danger-bg);color:var(--red)}
.role-chip.coordinator{background:var(--ink);color:#fff}
.role-chip.coach{background:transparent;border:1px solid var(--grey-light);color:var(--grey)}
.theme-toggle{margin:10px 18px 2px}
.account-menu button.item{display:block;width:100%;text-align:left;background:none;border:0;padding:11px 18px;font-size:14px;cursor:pointer;font-family:inherit;color:var(--black)}
.account-menu button.item:hover{background:var(--grey-fill)}

/* clickable table row (Users roster, etc.) — opens a detail modal */
.scout-table-row.row-click{cursor:pointer;transition:background .12s}
.scout-table-row.row-click:hover{background:var(--grey-fill)}

.app-main{flex:1;min-width:0}
main{max-width:1080px;margin:0 auto;padding:30px 20px 80px}

.hamburger-btn{display:none;background:none;border:0;padding:8px;margin:0 -8px 0 4px;cursor:pointer;color:var(--black);flex-shrink:0}
.hamburger-btn svg{width:22px;height:22px;display:block}
.side-nav .nav-close-btn{display:none}
.mobile-account-block{display:none}

@media(max-width:800px){
  .app-shell{flex-direction:column}
  .sidebar{width:100%;height:auto;position:sticky;flex-direction:row;align-items:center;justify-content:space-between;padding:10px 16px;gap:16px}
  .sidebar-top{padding:0}
  .nav-logo{height:34px}
  .hamburger-btn{display:flex;align-items:center;justify-content:center}
  .nav-divider{display:none}
  /* Unified single hamburger menu — the account button/dropdown is folded
     into the nav overlay below (see .mobile-account-block), so the
     separate profile control in the top bar is no longer needed here. */
  .sidebar-bottom{display:none}

  /* Full-screen overlay menu, opened by the hamburger button — the
     horizontal in-bar nav it replaces used to overflow behind the
     account button once there were enough tabs. */
  .side-nav{display:none}
  .side-nav.mobile-open{
    display:flex;flex-direction:column;gap:4px;
    position:fixed;inset:0;z-index:300;
    background:var(--white);padding:18px;overflow-y:auto;
  }
  .side-nav.mobile-open .nav-close-btn{
    display:flex;align-self:flex-end;align-items:center;justify-content:center;
    background:none;border:0;padding:10px;margin-bottom:8px;cursor:pointer;color:var(--black);width:auto;
  }
  .side-nav.mobile-open .nav-close-btn svg{width:22px;height:22px}
  .side-nav.mobile-open > button:not(.nav-close-btn){
    flex-direction:row;padding:15px 18px;font-size:16px;border-radius:12px;
  }

  /* Profile/role/theme/sign-out — pinned below the nav items, same
     "account section at the bottom" treatment as the desktop sidebar. */
  .side-nav.mobile-open .mobile-account-block{
    display:block;margin-top:auto;padding-top:16px;border-top:1px solid var(--grey-light);
  }
  .mobile-account-block .who{padding:6px 18px 14px}
  .mobile-account-block .who .name{font-weight:700;font-size:15px}
  .mobile-account-block .theme-toggle{margin:0 18px 14px}
  .mobile-account-block .theme-toggle button{width:auto}
  .mobile-account-block button.item{
    display:block;width:100%;text-align:left;background:none;border:0;
    padding:14px 18px;font-size:16px;font-weight:600;cursor:pointer;font-family:inherit;color:var(--black);
  }
  .mobile-account-block button.item:hover{background:var(--grey-fill)}
}

.card{background:var(--white);border:1px solid var(--grey-light);border-radius:var(--radius);padding:28px;box-shadow:var(--shadow)}
.page-title{font-size:28px;font-weight:800;letter-spacing:-0.02em;margin-bottom:22px}

.subnav{display:flex;align-items:center;gap:10px;margin:2px 0 18px;font-size:14px}
.subnav .back{display:inline-flex;align-items:center;gap:6px;color:var(--grey);font-weight:600;cursor:pointer;background:none;border:0;padding:4px 0;font-family:inherit;font-size:14px}
.subnav .back:hover{color:var(--black)}
.subnav .crumb-sep{color:var(--grey-light)}
.subnav .crumb-current{font-weight:700;color:var(--black)}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:8px 22px}
@media(max-width:640px){.grid2{grid-template-columns:1fr}}

/* ── Fields ── */
label{display:block;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--grey);margin-bottom:6px}
input,select,textarea{
  width:100%;padding:13px 14px;font-size:16px;font-family:inherit;color:var(--black);
  background:var(--white);border:1.5px solid var(--grey-light);border-radius:12px;
  transition:border-color .15s,box-shadow .15s;
}
input::placeholder,textarea::placeholder{color:var(--muted)}
input:hover,select:hover,textarea:hover{border-color:var(--border-hover)}
input:focus,select:focus,textarea:focus{outline:0;border-color:var(--black);box-shadow:0 0 0 3px rgba(15,15,15,.06)}
select{appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center;padding-right:38px}
.field{margin-bottom:18px}
.hint{font-size:13px;color:var(--grey)}
.section-label{font-size:13px;font-weight:800;text-transform:uppercase;letter-spacing:.1em;color:var(--red);margin:4px 0 14px}

.btn{display:inline-flex;align-items:center;gap:8px;border:0;border-radius:12px;padding:13px 24px;font-size:15px;font-weight:700;cursor:pointer;transition:all .15s;font-family:inherit;white-space:nowrap}
.btn svg{width:17px;height:17px;flex-shrink:0}
.btn-primary{background:var(--red);color:#fff}
.btn-primary:hover{background:var(--ember)}
.btn-primary:disabled{opacity:.6;cursor:default}
.btn-ghost{background:var(--white);color:var(--black);border:1.5px solid var(--grey-light)}
.btn-ghost:hover{border-color:var(--black)}

/* ── Player picker (conditional) ── */
.picker-toggle{display:flex;gap:10px;margin-bottom:18px;flex-wrap:wrap}
.picker-toggle button{display:inline-flex;align-items:center;gap:8px;border:1.5px solid var(--grey-light);background:var(--white);border-radius:999px;padding:10px 20px;font-size:14px;font-weight:600;color:var(--grey);cursor:pointer;transition:all .15s;font-family:inherit}
.picker-toggle button:hover{border-color:var(--black);color:var(--black)}
.picker-toggle button.active{border-color:var(--ink);background:var(--ink);color:#fff}
.picker-toggle svg{width:16px;height:16px}

.search-wrap{position:relative}
.search-input-wrap{position:relative}
.search-input-wrap .search-icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:var(--grey);pointer-events:none}
.search-input-wrap input{padding-left:38px}
.search-results{position:absolute;top:calc(100% + 6px);left:0;right:0;background:var(--white);border:1px solid var(--grey-light);border-radius:12px;box-shadow:var(--shadow-lift);max-height:260px;overflow:auto;z-index:40;display:none}
.search-results.open{display:block}
.search-results .sr{padding:11px 16px;cursor:pointer;display:flex;justify-content:space-between;gap:10px;font-size:14px}
.search-results .sr:hover{background:var(--grey-fill)}
.search-results .sr .sub{color:var(--grey);font-size:13px}
.search-results .none{padding:12px 16px;color:var(--grey);font-size:13px}
.selected-player{position:relative;display:none;align-items:center;gap:13px;background:var(--grey-fill);border-radius:14px;padding:14px 40px 14px 16px;margin-bottom:6px}
.selected-player .player-menu-btn{position:absolute;top:50%;right:10px;transform:translateY(-50%)}
.selected-player.show{display:flex}
.selected-player.static{padding-right:16px}
.player-avatar{width:38px;height:38px;border-radius:50%;background:var(--danger-bg);color:var(--red);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.player-avatar svg{width:19px;height:19px}
.player-info{flex:1;min-width:0}
.selected-player b{font-size:17px}
.selected-player .sub{color:var(--grey);font-size:12.5px;display:block;margin-top:1px}
.selected-player button{background:none;border:0;color:var(--red);font-weight:700;cursor:pointer;font-size:12.5px;font-family:inherit;flex-shrink:0}
.selected-player.dark{background:var(--ink);color:#fff}
.selected-player.dark .sub{color:rgba(255,255,255,.65)}

/* ── Collapsible fixture section ── */
details.collapse{border:1.5px solid var(--grey-light);border-radius:14px;margin:22px 0;background:var(--white)}
details.collapse summary{list-style:none;cursor:pointer;padding:16px 20px;display:flex;align-items:center;justify-content:space-between;font-weight:700;font-size:15px;user-select:none}
details.collapse summary::-webkit-details-marker{display:none}
details.collapse summary .chev{transition:transform .2s;color:var(--grey)}
details.collapse[open] summary .chev{transform:rotate(180deg)}
details.collapse summary .sum-hint{font-weight:400;font-size:13px;color:var(--grey)}
details.collapse .inner{padding:4px 20px 20px}

/* ── Scorecard: full-width category rows ── */
.scorecard{margin:26px 0}
.scorecard p.hint{margin-bottom:16px}
.cat-grid{display:grid;grid-template-columns:1fr;gap:10px;margin-top:14px}
.cat-tile{position:relative;display:flex;align-items:center;gap:16px;text-align:left;padding:16px 18px;background:var(--white);border:1.5px solid var(--grey-light);border-radius:16px;cursor:pointer;font-family:inherit;color:var(--grey);transition:all .15s;width:100%}
.cat-tile:hover{border-color:var(--black);color:var(--black)}
.cat-tile svg{width:26px;height:26px;flex-shrink:0}
.cat-left{flex:1;min-width:0}
.cat-tile .cat-label{display:block;font-size:15px;font-weight:700;color:var(--black);line-height:1.2}
.cat-comment{display:block;font-size:13px;color:var(--grey);margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cat-right{flex-shrink:0;display:flex;align-items:center;gap:12px;min-width:64px;justify-content:flex-end}
.cat-tile .cat-score{position:static;font-family:var(--mono);font-weight:800;font-size:22px;color:var(--red)}
.cat-chev{color:var(--border-hover);font-size:18px}
.cat-tile.filled{border-color:var(--black);color:var(--black);background:var(--grey-fill)}
.cat-tile.hi{border-color:var(--red);background:var(--danger-bg)}
.cat-tile.static{cursor:default}
.cat-tile.static:hover{border-color:var(--grey-light);color:var(--grey)}
.cat-tile.static.filled:hover{border-color:var(--black);color:var(--black)}
.cat-tile.static.hi:hover{border-color:var(--red)}
.cat-tile.static .cat-comment{white-space:normal;overflow:visible;text-overflow:clip;margin-top:5px}
.total-bar{display:flex;justify-content:space-between;align-items:center;margin-top:16px;padding:15px 18px;background:var(--ink);color:#fff;border-radius:12px}
.total-bar .num{font-family:var(--mono);font-size:22px;font-weight:800;color:#ff5e73}
.total-bar-label{display:flex;flex-direction:column;align-items:flex-start;gap:7px}
.total-bar .band-pill{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;padding:3px 10px;border-radius:999px;background:rgba(255,255,255,.15);color:#fff}
.report-view-summary{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0 4px}
.report-view-summary .total-bar{margin-top:0}
@media(max-width:480px){.report-view-summary{grid-template-columns:1fr}}
.info-tip{position:relative;display:inline-flex;vertical-align:middle;margin-left:6px}
.info-tip-btn{width:16px;height:16px;border-radius:50%;border:1.5px solid currentColor;background:none;color:inherit;opacity:.75;font-size:10px;font-weight:800;font-family:var(--mono);line-height:1;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0;flex-shrink:0}
.info-tip-btn:hover{opacity:1}
/* text-transform/letter-spacing reset: a tip can sit inside an
   uppercase, tracked-out table header — the bubble copy shouldn't
   inherit that. */
.info-tip-bubble{display:none;position:absolute;top:calc(100% + 8px);left:0;z-index:20;width:260px;max-width:80vw;background:var(--white);color:var(--black);border:1px solid var(--grey-light);border-radius:12px;box-shadow:var(--shadow-lift);padding:14px 16px;font-size:12.5px;font-weight:400;line-height:1.5;text-align:left;white-space:normal;text-transform:none;letter-spacing:normal}
.info-tip-bubble.open{display:block}
.info-tip-bubble.right{left:auto;right:0}
.info-tip-bubble p{margin:0 0 8px}
.info-tip-bubble p:last-child{margin-bottom:0}
.tip-table{width:100%;border-collapse:collapse;margin:6px 0 10px}
.tip-table td{padding:4px 2px;border-bottom:1px solid var(--grey-light);font-size:12px}
.tip-table tr:last-child td{border-bottom:0}
.tip-table td:last-child{text-align:right;font-weight:700}

/* compiled category comments above overall notes */
.comment-digest{background:var(--bg);border:1px solid var(--grey-light);border-radius:12px;padding:14px 16px;margin-bottom:14px;display:none}
.comment-digest.show{display:block}
.comment-digest .cd-title{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.07em;color:var(--grey);margin-bottom:8px}
.comment-digest .cd-row{font-size:14px;padding:4px 0}
.comment-digest .cd-row b{color:var(--red)}

/* ── Fullscreen score pad ── */
.score-pad{position:fixed;inset:0;background:rgba(15,15,15,.55);z-index:150;display:none;align-items:flex-end;justify-content:center}
.score-pad.open{display:flex}
.pad-sheet{background:var(--white);width:100%;max-width:480px;max-height:92vh;overflow-y:auto;border-radius:24px 24px 0 0;padding:24px 20px calc(20px + env(safe-area-inset-bottom));box-shadow:var(--shadow-lift)}
@media(min-width:520px){.score-pad{align-items:center}.pad-sheet{border-radius:24px;padding-bottom:24px}}
.pad-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}
.pad-guidance{margin:0 0 16px;font-size:13px}
.pad-guidance summary{padding:10px 14px;font-size:13px}
.pad-guidance .inner{padding:2px 14px 14px}
.pad-guidance-desc{color:var(--black);margin:0 0 10px;line-height:1.4}
.pad-guidance-sub{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:var(--grey);margin:10px 0 4px}
.pad-guidance ul{margin:0;padding-left:18px;line-height:1.5}
.pad-guidance li{margin-bottom:2px}
.pad-title{font-size:18px;font-weight:800}
.pad-current{font-family:var(--mono);font-size:28px;font-weight:800;color:var(--red);min-width:44px;text-align:right}
.pad-nums{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-bottom:14px}
.pad-num{aspect-ratio:1;font-size:22px;font-weight:800;font-family:var(--mono);background:var(--grey-fill);border:2px solid transparent;border-radius:14px;cursor:pointer;color:var(--black);transition:all .1s}
.pad-num:active{transform:scale(.95)}
.pad-num.sel{background:var(--ink);color:#fff;border-color:var(--ink)}
.pad-num.top.sel{background:var(--red);border-color:var(--red)}
.pad-comment{margin-bottom:14px}
.pad-comment textarea{min-height:64px;resize:vertical}
.pad-actions{display:grid;grid-template-columns:1fr 1fr 1.4fr;gap:10px}
.pad-actions .btn{justify-content:center;padding:14px 0}

/* ── Reports ── */
.report-list{display:grid;gap:12px}
.report{background:var(--white);border:1px solid var(--grey-light);border-radius:var(--radius);padding:16px 18px;display:grid;grid-template-columns:1fr auto;gap:6px;cursor:pointer;box-shadow:var(--shadow);transition:box-shadow .15s,transform .15s}
.report:hover{box-shadow:var(--shadow-lift);transform:translateY(-1px)}
.report .who{font-weight:700;font-size:15px}
.report .meta{font-size:13px;color:var(--grey)}
.report .score-badge{font-family:var(--mono);font-weight:800;font-size:18px;color:var(--red);align-self:center}
.badge{display:inline-block;font-size:11px;font-weight:700;border-radius:999px;padding:2px 10px;text-transform:uppercase;letter-spacing:.04em}
.badge.q{background:var(--danger-bg);color:var(--ember)}
.badge.s{background:var(--grey-fill);color:var(--grey)}
.badge.archived{background:transparent;color:var(--muted);border:1px solid var(--grey-light)}
.badge button{background:none;border:0;color:inherit;cursor:pointer;font-weight:800;margin-left:4px;padding:0;font-size:12px;vertical-align:middle}

.chip-list{display:flex;flex-wrap:wrap;gap:8px;margin:-6px 0 18px}
.chip{display:inline-flex;align-items:center;gap:6px;background:var(--grey-fill);border-radius:999px;padding:6px 8px 6px 14px;font-size:13px;font-weight:600}
.chip svg{width:14px;height:14px;flex-shrink:0}
.chip button{background:none;border:0;color:var(--grey);cursor:pointer;font-size:15px;line-height:1;padding:0 4px}
.chip button:hover{color:var(--red)}
.band-chip{display:inline-block;font-size:11px;font-weight:700;border-radius:999px;padding:2px 10px;text-transform:uppercase;letter-spacing:.04em;margin-left:6px}
.band-chip.band-elite{background:var(--red);color:#fff}
.band-chip.band-high{background:transparent;color:var(--red);border:1.5px solid var(--red)}
.band-chip.band-dev{background:var(--grey-fill);color:var(--grey)}
.band-chip.band-monitor{background:transparent;color:var(--grey)}

/* ── Fixtures ── */
.fixture-card{background:var(--white);border:1px solid var(--grey-light);border-radius:var(--radius);padding:16px 18px;box-shadow:var(--shadow);display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.fixture-card .who{font-weight:700;font-size:15px}
.fixture-card .meta{font-size:13px;color:var(--grey);margin-top:2px}
.fixture-card .badge{margin-left:8px;vertical-align:middle}
.fixture-card.row-click{cursor:pointer;transition:background .12s}
.fixture-card.row-click:hover{background:var(--grey-fill)}
.fixture-assignees{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.fixture-locked{position:relative;background:var(--grey-fill);border-radius:14px;padding:16px 18px;margin:22px 0}
/* fx-top gets right-padding reserved for the menu button so a long team
   name (or its crest) can never grow underneath it — the button's box
   and the flex row's content are never allowed to compete for the same
   pixels, regardless of content width. */
.fx-top{display:flex;align-items:center;gap:14px;padding-right:34px}
.fixture-locked.static .fx-top{padding-right:0}
.fx-crest{width:48px;height:48px;border-radius:9px;background:var(--white);border:1.5px solid var(--grey-light);color:var(--grey);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:12px;flex-shrink:0;overflow:hidden}
.fx-crest img{width:100%;height:100%;object-fit:contain;padding:6px}
.fx-vs{flex:1;min-width:0;text-align:center}
.fx-vs .teams{font-weight:700;font-size:15px}
.fx-date{font-size:12.5px;font-weight:600;color:var(--black);margin-top:3px}
/* Same date/venue/time emphasis hierarchy as the Home page's assignment
   rows (.assign-meta) — bold, dark, icon-led — competition text stays
   the smallest, most muted line (.fx-comp) since it's the least useful
   detail at a glance. */
.fx-meta{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;font-size:12.5px;color:var(--black);font-weight:600;margin-top:5px}
.fx-meta svg{width:13px;height:13px;color:var(--grey);vertical-align:-2px;margin-right:4px;flex-shrink:0}
.fx-comp{font-size:11.5px;color:var(--muted);text-align:center;margin-top:5px}
.fx-menu-btn{position:absolute;top:10px;right:8px;background:none;border:0;color:var(--grey);cursor:pointer;padding:8px;border-radius:8px;line-height:0}
.fx-menu-btn:hover{background:var(--grey-fill);color:var(--black)}
.fx-menu{display:none;position:absolute;top:38px;right:8px;background:var(--white);border:1px solid var(--grey-light);border-radius:12px;box-shadow:var(--shadow-lift);min-width:200px;padding:6px;z-index:5}
.fx-menu.open{display:block}
.fx-menu button{display:block;width:100%;text-align:left;background:none;border:0;padding:10px 12px;font-size:13.5px;font-weight:600;color:var(--black);cursor:pointer;font-family:inherit;border-radius:8px}
.fx-menu button:hover{background:var(--grey-fill)}
.fx-menu button.danger{color:var(--red)}

/* ── Report filing: 2-column layout ── */
.report-form-grid{display:grid;grid-template-columns:1fr 1.4fr;gap:32px;align-items:start;margin-top:20px}
@media(max-width:900px){.report-form-grid{grid-template-columns:1fr}}

/* ── Assignments: "assigned to you" left, all-fixtures management right —
   single-column for roles that only ever see one side (scouts get just
   the left, county coaches get just the right, read-only). ── */
.assignments-grid{display:grid;grid-template-columns:1fr 1fr;gap:32px;align-items:start;margin-top:20px}
.assignments-grid.single-column{grid-template-columns:1fr}
@media(max-width:900px){.assignments-grid{grid-template-columns:1fr}}
.report-overview-card{position:relative;background:var(--white);border:1px solid var(--grey-light);border-radius:var(--radius);box-shadow:var(--shadow);padding:24px}
@media(min-width:901px){.report-overview-card{position:sticky;top:20px}}
.overview-divider{border-top:1px solid var(--grey-light);margin:24px 0 0}
.field-group-label{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:var(--grey);margin:22px 0 10px}
.field-group-label:first-child{margin-top:0}
.pad-sheet .field-group-label{margin-top:0}

/* ── Conditions tile selector ── */
.cond-tiles{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;max-width:460px}
@media(max-width:480px){.cond-tiles{grid-template-columns:repeat(2,1fr)}}
.cond-tile{display:flex;flex-direction:column;align-items:center;gap:7px;background:var(--white);border:1.5px solid var(--grey-light);border-radius:14px;padding:14px 8px;cursor:pointer;font-family:inherit;text-align:center;transition:all .15s}
.cond-tile:hover{border-color:var(--black)}
.cond-tile svg{width:22px;height:22px;color:var(--grey)}
.cond-tile span{font-size:12.5px;font-weight:700;color:var(--grey)}
.cond-tile.sel{border-color:var(--red);background:var(--danger-bg)}
.cond-tile.sel svg,.cond-tile.sel span{color:var(--red)}
.cond-tile.static{cursor:default}
.cond-tile.static:hover{border-color:var(--grey-light)}
.cond-tile.static.sel:hover{border-color:var(--red)}
.fx-player-list{display:grid;gap:8px;margin-top:14px;width:100%}
.fx-player-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;background:var(--grey-fill);border-radius:10px;font-size:14px;font-weight:600}
.fx-player-row .actions{display:flex;align-items:center;gap:8px}
.fx-player-row .badge{margin:0}

/* ── Fixture detail page: assign-a-scout column ── */
#fixtureViewAssignTools{margin-top:32px}
#fixtureViewAssigned .fx-player-row{background:var(--white);border:1px solid var(--grey-light)}
.unassign-btn{width:24px;height:24px;flex-shrink:0;border-radius:50%;background:var(--white);border:0;padding:0;display:inline-flex;align-items:center;justify-content:center;color:var(--grey);font-size:15px;line-height:1;cursor:pointer}
.unassign-btn:hover{background:var(--grey-fill);color:var(--red)}
/* The static (read-only) fixture summary sits inside the already-white
   Fixture Details card here, so it drops the grey-fill "sub card" look
   it has elsewhere (e.g. the report-view Fixture section). */
#fixtureViewDetailsBody .fixture-locked.static{background:var(--white);padding:0;margin:14px 0 0}

/* ── Player Database: card grid ── */
.player-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
@media(max-width:960px){.player-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.player-grid{grid-template-columns:1fr}}
.player-card{background:var(--white);border:1px solid var(--grey-light);border-radius:var(--radius);padding:16px;box-shadow:var(--shadow);cursor:pointer;transition:box-shadow .15s,transform .15s;display:flex;flex-direction:column;gap:10px}
.player-card:hover{box-shadow:var(--shadow-lift);transform:translateY(-1px)}
.player-card-top{display:flex;align-items:center;gap:12px}
.player-card .who{font-weight:700;font-size:15px;line-height:1.3}
.player-card .meta{font-size:12px;color:var(--grey);margin-top:2px}
.player-card-stats{display:flex;justify-content:space-between;align-items:center;margin-top:auto;padding-top:10px;border-top:1px solid var(--grey-light)}
.player-card .score-badge{font-family:var(--mono);font-weight:800;font-size:16px;color:var(--red)}
.club-logo{width:44px;height:44px;border-radius:12px;background:var(--white);border:1.5px solid var(--grey-light);color:var(--grey);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:15px;flex-shrink:0;overflow:hidden}
.player-card-band{font-size:11px;font-weight:600;color:var(--grey);text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}
.club-logo img{width:100%;height:100%;object-fit:contain;padding:4px}
.club-logo.sm{width:26px;height:26px;border-radius:7px;font-size:10px}
.club-logo.sm img{padding:3px}

/* ── Player profile ── */
.group-bars{display:grid;gap:12px;margin-top:16px;max-width:520px}
.group-bar-row{display:grid;grid-template-columns:170px 1fr 40px;align-items:center;gap:12px}
.group-bar-label{font-size:13px;color:var(--grey);font-weight:600}
.group-bar-track{background:var(--grey-fill);border-radius:999px;height:10px;overflow:hidden}
.group-bar-fill{background:var(--red);height:100%;border-radius:999px;width:0;transition:width 1s cubic-bezier(.16,1,.3,1)}
.group-bar-val{font-family:var(--mono);font-weight:800;font-size:14px;text-align:right}
.year-bar-chart{display:flex;align-items:flex-end;gap:12px;flex:1;min-height:180px;padding:10px 4px 0}
.year-bar-col{display:flex;flex-direction:column;align-items:center;height:100%;justify-content:flex-end;flex:1;min-width:0}
.year-bar-value{font-family:var(--mono);font-weight:800;font-size:13px;margin-bottom:6px;color:var(--black)}
.year-bar-track{width:100%;flex:1;display:flex;align-items:flex-end;background:var(--grey-fill);border-radius:8px 8px 0 0;overflow:hidden}
.year-bar-fill{width:100%;background:var(--red);border-radius:8px 8px 0 0;transition:height 1s cubic-bezier(.16,1,.3,1)}
.year-bar-label{margin-top:8px;font-size:12px;font-weight:700;color:var(--grey)}

.scout-table{border:1px solid var(--grey-light);border-radius:var(--radius);overflow:hidden;background:var(--white)}
.scout-table-head,.scout-table-row{display:grid;gap:10px;padding:10px 16px;font-size:13px;align-items:center}
.scout-table-head{background:var(--grey-fill);font-weight:800;text-transform:uppercase;letter-spacing:.05em;font-size:11px;color:var(--grey)}
.scout-table-row{border-top:1px solid var(--grey-light)}

/* ── Player dashboard: hero gauge, stat-cards, preview grid ──
   No white card background here (deliberately) — the player's details
   sit directly on the page background now; the individual stat-card
   badges (below) carry their own white surface instead. */
.hero{display:grid;grid-template-columns:1fr auto;gap:24px;align-items:center;margin-bottom:24px}
@media(max-width:720px){.hero{grid-template-columns:1fr}}
/* Crest + name/club-school-details as one identity block — details
   sit right of the crest, stacked directly under the name. */
.player-header-id{display:flex;align-items:center;gap:14px;margin-bottom:12px}
.player-header-id .page-title{margin-bottom:4px}
.player-header-badges{margin-top:12px;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
/* Back/edit — icon-only circles at opposite ends of the row above the
   hero, matched in size via the shared class. */
.player-subnav{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}
.icon-nav-btn{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;border:1px solid var(--grey-light);background:var(--white);box-shadow:var(--shadow);color:var(--grey);cursor:pointer;transition:all .15s;padding:0}
.icon-nav-btn:hover{border-color:var(--black);color:var(--black)}
.icon-nav-btn svg{width:18px;height:18px}
.hero-gauges{display:flex;gap:14px;align-items:flex-start;flex-wrap:wrap}
.gauge-wrap{display:flex;flex-direction:column;align-items:center;gap:8px}
.gauge{position:relative;width:120px;height:120px;flex-shrink:0}
.gauge.gauge-sm{width:86px;height:86px}
.gauge svg{width:100%;height:100%;transform:rotate(-90deg)}
.gauge .track{fill:none;stroke:var(--grey-fill);stroke-width:10}
.gauge .fill{fill:none;stroke:var(--red);stroke-width:10;stroke-linecap:round;stroke-dasharray:314.16;stroke-dashoffset:314.16;transition:stroke-dashoffset 1.1s cubic-bezier(.16,1,.3,1)}
.gauge-center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:0 6px}
.gauge-num{font-family:var(--mono);font-size:26px;font-weight:800;letter-spacing:-.02em;color:var(--black)}
.gauge.gauge-sm .gauge-num{font-size:18px}
.gauge-band{font-size:11px;font-weight:700;color:var(--red);text-transform:uppercase;letter-spacing:.04em;line-height:1.2;text-align:center;max-width:120px}

.stat-cards{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.stat-card{display:flex;align-items:center;gap:9px;background:var(--white);box-shadow:var(--shadow);border-radius:12px;padding:9px 14px 9px 12px}
.stat-card svg{width:17px;height:17px;color:var(--red);flex-shrink:0}
.stat-card .v{font-weight:700;font-size:13px}

/* ── Greeting + KPI tile hero (Home/Overview) ── */
.greeting-name{font-size:28px;font-weight:800;letter-spacing:-.02em}
.greeting-sub{font-size:14.5px;color:var(--grey);margin-top:6px;display:flex;align-items:center;gap:7px}
.greeting-sub .dot{width:7px;height:7px;border-radius:50%;background:var(--red);flex-shrink:0;box-shadow:0 0 0 3px var(--danger-bg)}
.kpi-hero{background:var(--white);border:1px solid var(--grey-light);border-radius:var(--radius);box-shadow:var(--shadow);padding:26px 28px}
.kpi-tiles{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
@media(max-width:760px){.kpi-tiles{grid-template-columns:repeat(2,1fr)}}
@media(max-width:420px){.kpi-tiles{grid-template-columns:1fr}}
.kpi-tile{background:var(--grey-fill);border-radius:14px;padding:16px;display:flex;flex-direction:column;gap:10px;transition:transform .18s ease,box-shadow .18s ease}
.kpi-tile:hover{transform:translateY(-2px);box-shadow:var(--shadow)}
.kpi-tile-icon{width:34px;height:34px;border-radius:10px;background:var(--white);color:var(--red);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.kpi-tile-icon svg{width:18px;height:18px}
.kpi-tile-num{font-family:var(--mono);font-size:21px;font-weight:800;letter-spacing:-.01em}
.kpi-tile-label{font-size:11.5px;color:var(--grey);font-weight:600;text-transform:uppercase;letter-spacing:.04em}

/* min-width:0 on the grid items is required, not decorative — grid
   items default to min-width:auto, so without it a column refuses to
   shrink below its content's intrinsic width (e.g. a chart canvas) and
   the card overflows sideways instead of the content resizing down.
   grid-auto-flow:dense lets a half-width card (Attribute profile, the
   dash-cards below it) pack into whatever gap comes free next, rather
   than always leaving the rest of a full-width card's row empty. */
.dash-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:22px;grid-auto-flow:dense}
@media(max-width:760px){.dash-grid{grid-template-columns:1fr}}
.dash-card,.chart-card{min-width:0;background:var(--white);border:1px solid var(--grey-light);border-radius:var(--radius);box-shadow:var(--shadow);padding:24px}
/* Flex column so a card's last piece of content (e.g. the year-bar
   chart) can stretch to fill whatever height the grid row stretched
   this card to, rather than leaving dead space below a fixed-height
   chart when a taller sibling card is in the same row. */
.dash-card{display:flex;flex-direction:column}
.dash-card-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:16px;gap:10px}
/* A card heading here is a plain, understated label — not the app-wide
   .section-label default (red/uppercase/tracked) — applied to every
   card component on the page, not a change to .section-label itself. */
.dash-card-head .section-label,.chart-card .section-label{margin:0;font-size:16px;text-transform:none;letter-spacing:normal}
.chart-card-full{grid-column:1/-1}
.chart-card-head{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px 16px;margin-bottom:16px}
.chart-legend{display:flex;flex-wrap:wrap;gap:14px}
.chart-legend-item{display:inline-flex;align-items:center;gap:7px;font-size:12.5px;font-weight:600;color:var(--grey)}
.chart-legend-swatch{width:10px;height:10px;border-radius:3px;flex-shrink:0}
.chart-pill-row{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:24px}
/* The 4 category pills are wrapped in their own right-aligned group
   (margin-left:auto pushes the group, not each pill, to the row's far
   edge) so the switcher stays left and the categories sit right. */
.chart-pill-group-right{display:flex;flex-wrap:wrap;gap:12px;margin-left:auto}
.chart-pill{
  display:inline-flex;align-items:center;justify-content:center;height:36px;
  border:1px solid var(--grey-light);background:var(--white);border-radius:999px;
  padding:0 24px;font-size:13.5px;font-weight:400;color:var(--grey);
  cursor:pointer;transition:all .15s;font-family:inherit;
}
.chart-pill:hover{border-color:var(--black);color:var(--black)}
.chart-pill.active{border-color:var(--ink);background:var(--ink);color:#fff;font-weight:600}
/* Talent Index / Average Rating: a single segmented switcher rather
   than 2 separate pills, since they're both "which number to plot"
   choices. A white background + border (rather than a flat grey fill)
   reads more clearly as its own bordered control, distinguishing it
   from the plain pills next to it. */
.chart-switcher{display:inline-flex;align-items:center;background:var(--white);border:1px solid var(--grey-light);border-radius:999px;padding:0;gap:2px}
.chart-switcher-btn{
  display:inline-flex;align-items:center;justify-content:center;height:36px;
  border:0;background:transparent;border-radius:999px;
  padding:0 24px;font-size:13.5px;font-weight:400;color:var(--grey);
  cursor:pointer;transition:all .15s;font-family:inherit;
}
.chart-switcher-btn:hover{color:var(--black)}
.chart-switcher-btn.active{background:var(--ink);color:#fff;font-weight:600}
/* Card heading — a red breadcrumb rather than the plain uniform
   .section-label used on every other card, per the reference design:
   "Form Lines > Talent Index Scores • All time". */
.chart-breadcrumb{margin:0 0 24px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:16px;line-height:16px;font-weight:800;color:var(--red)}
.chart-breadcrumb-metric,.chart-breadcrumb-range,.chart-breadcrumb-dot{font-weight:500}
.chart-breadcrumb svg{width:16px;height:16px;flex-shrink:0}
/* Time-period filter — a labeled pill (icon + "Time period"/current
   selection + chevron) rather than a native <select>, opening a
   custom popover menu upward from the bottom-left, since that's where
   this control sits in the footer row now. Extra margin-right on the
   wrapper (on top of .chart-footer's own gap) gives this specific
   pair — picker to the text beside it — a wider 24px gap than the
   footer's other gaps. */
.chart-range-picker{position:relative;flex-shrink:0;margin-right:8px}
.chart-period-btn{display:inline-flex;align-items:center;height:60px;border:1px solid var(--grey-light);background:var(--white);box-shadow:var(--shadow);border-radius:18px;padding:0 24px 0 12px;cursor:pointer;font-family:inherit;color:inherit;transition:border-color .15s}
.chart-period-btn:hover{border-color:var(--black)}
.chart-period-icon{width:36px;height:36px;margin-right:12px;border-radius:10px;background:var(--grey-fill);color:var(--grey);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.chart-period-icon svg{width:17px;height:17px}
.chart-period-text{display:flex;flex-direction:column;align-items:flex-start;gap:1px}
.chart-period-label{font-size:12px;color:var(--grey);font-weight:600}
.chart-period-value{font-size:15px;color:var(--black);font-weight:800}
.chart-period-btn>svg{width:16px;height:16px;margin-left:36px;color:var(--grey);flex-shrink:0}
.chart-range-menu{display:none;flex-direction:column;gap:2px;position:absolute;bottom:calc(100% + 8px);left:0;z-index:30;min-width:172px;background:var(--white);border:1px solid var(--grey-light);border-radius:12px;box-shadow:var(--shadow-lift);padding:6px}
.chart-range-menu.open{display:flex}
.chart-range-option{display:block;width:100%;text-align:left;border:0;background:transparent;border-radius:8px;padding:9px 12px;font-size:13.5px;font-weight:600;color:var(--grey);cursor:pointer;font-family:inherit;transition:all .12s}
.chart-range-option:hover{background:var(--grey-fill);color:var(--black)}
.chart-range-option.active{background:var(--ink);color:#fff}
/* Ranges with too few reports to plot (< 2) are greyed out rather than
   hidden — picking one would just land on the "No reports in this
   range" empty state, so this saves the round trip. Not the native
   disabled attribute — see the comment on formTrendRangePickerHTML for
   why (it would also kill the explanatory title-attribute tooltip). */
.chart-range-option.unavailable{opacity:.35;cursor:not-allowed}
.chart-canvas-wrap{position:relative;width:100%;min-width:0}
/* Footer row: time-period picker, a flexible-width explainer sentence,
   and the Reports filed/Form tiles — all on one line, wrapping to
   their own rows on narrow screens. The 2 stat tiles are grouped in
   their own flex wrapper so their mutual gap (12px) can differ from
   the footer's other gaps. */
.chart-footer{margin-top:24px;display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.chart-info-line{flex:1 1 220px;margin:0;font-size:14px;line-height:1.5;color:var(--grey)}
.chart-info-line strong{color:var(--black);font-weight:700}
.chart-footer-stats{display:flex;gap:12px;flex-wrap:wrap}
.chart-footer-stat{display:flex;align-items:center;justify-content:space-between;gap:16px;height:60px;background:var(--grey-fill);border-radius:18px;padding:0 18px;flex-shrink:0}
.chart-footer-stat-label{font-size:14px;color:var(--grey);font-weight:600;white-space:nowrap}
.chart-footer-stat-value{display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:17px;font-weight:800;color:var(--black);white-space:nowrap}
.chart-footer-stat-value svg{width:15px;height:15px}
.chart-footer-stat.up{background:var(--success-bg)}
.chart-footer-stat.up .chart-footer-stat-label,.chart-footer-stat.up .chart-footer-stat-value{color:var(--success)}
/* Negative "Form": red/pink tint (below) plus the icon flipped
   vertically so the same up-trending arrow reads as pointing down,
   rather than a separate icon asset. */
.chart-footer-stat.down .chart-footer-stat-value svg{transform:scaleY(-1)}
.chart-footer-stat.down{background:var(--danger-bg)}
.chart-footer-stat.down .chart-footer-stat-label,.chart-footer-stat.down .chart-footer-stat-value{color:var(--red)}
/* Custom hover tooltip for Form trend lines — Chart.js's own canvas-
   rendered tooltip can't hold a real, clickable <button>, so this is a
   positioned DOM element instead, driven via plugins.tooltip.external.
   Caret coordinates are canvas-relative, and the canvas fills this wrap
   exactly, so they can be used directly as left/top. Hide/show is
   driven by cursor distance from the point (see formTrendTooltipExternal
   in app.js), not Chart.js's own hover signal. */
.chart-tooltip{position:absolute;z-index:20;min-width:190px;max-width:250px;background:var(--white);color:var(--black);border:1px solid var(--grey-light);border-radius:12px;padding:14px 16px;box-shadow:var(--shadow-lift);opacity:0;pointer-events:none;transition:opacity .12s;transform:translate(-50%,calc(-100% - 14px));font-size:13px}
.chart-tooltip::after{content:'';position:absolute;top:100%;left:50%;transform:translateX(-50%);border:6px solid transparent;border-top-color:var(--white)}
.chart-tooltip-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.chart-tooltip-avg{font-size:22px;font-weight:800;line-height:1}
.chart-tooltip-avg-num{color:var(--red)}
.chart-tooltip-avg small{display:block;font-size:11px;font-weight:600;color:var(--grey);margin-top:2px;text-transform:uppercase;letter-spacing:.03em}
.chart-tooltip-open{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;flex-shrink:0;border:1px solid var(--grey-light);border-radius:50%;background:var(--grey-fill);color:var(--grey);cursor:pointer;transition:all .15s}
.chart-tooltip-open svg{width:13px;height:13px}
.chart-tooltip-open:hover{border-color:var(--ink);background:var(--ink);color:#fff}
.chart-tooltip-date{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--grey);margin:6px 0 12px}
.chart-tooltip-date svg{width:13px;height:13px;flex-shrink:0;opacity:.7}
.chart-tooltip-cats{display:flex;flex-direction:column;gap:6px;padding-top:10px;border-top:1px solid var(--grey-light)}
.chart-tooltip-cat{display:flex;justify-content:space-between;align-items:baseline;gap:12px;font-size:12.5px;color:var(--grey)}
.chart-tooltip-cat span:last-child{font-weight:700;color:var(--black)}
.view-all{font-size:12.5px;font-weight:700;color:var(--grey);display:inline-flex;align-items:center;gap:4px;white-space:nowrap;cursor:pointer;background:none;border:0;font-family:inherit;padding:0}
.view-all:hover{color:var(--black)}
.view-all svg{width:12px;height:12px}

.mini-report{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:11px 4px;margin:0 -4px;border-bottom:1px solid var(--grey-light);cursor:pointer;border-radius:8px;transition:background .12s}
.mini-report:hover{background:var(--grey-fill)}
.mini-report:last-child{border-bottom:0}
.mini-report .who{font-weight:700;font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mini-report .meta{font-size:12px;color:var(--grey);margin-top:2px;white-space:normal;overflow-wrap:break-word}
.mini-report-main{display:flex;align-items:center;gap:10px;min-width:0}
.mini-report-icon{width:32px;height:32px;border-radius:9px;background:var(--danger-bg);color:var(--red);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.mini-report-icon svg{width:16px;height:16px}
.mini-report-body{min-width:0}
.mini-report-score{font-family:var(--mono);font-weight:800;font-size:16px;color:var(--red);flex-shrink:0;padding-left:8px}

/* Upcoming-assignment row — date/teams/venue/time emphasized, competition
   relegated to a small trailing detail. */
.assign-row{display:flex;gap:14px;align-items:flex-start;padding:12px 4px;margin:0 -4px;border-bottom:1px solid var(--grey-light);cursor:pointer;border-radius:8px;transition:background .12s}
.assign-row:hover{background:var(--grey-fill)}
.assign-row.no-click{cursor:default}
.assign-row.no-click:hover{background:none}
.assign-row:last-child{border-bottom:0}
.assign-date{flex-shrink:0;width:46px;text-align:center;background:var(--danger-bg);border-radius:10px;padding:6px 0}
.assign-date-day{display:block;font-family:var(--mono);font-size:17px;font-weight:800;color:var(--red);line-height:1.15}
.assign-date-mon{display:block;font-size:10px;font-weight:700;color:var(--red);text-transform:uppercase;letter-spacing:.03em}
.assign-main{flex:1;min-width:0}
.assign-teams{font-weight:700;font-size:14px}
.assign-player{display:flex;align-items:center;gap:5px;margin-top:3px;font-size:13px;font-weight:700;color:var(--red)}
.assign-player svg{width:14px;height:14px;flex-shrink:0}
.assign-meta{display:flex;flex-wrap:wrap;gap:12px;margin-top:4px;font-size:12.5px;color:var(--black);font-weight:600}
.assign-meta svg{width:13px;height:13px;color:var(--grey);vertical-align:-2px;margin-right:4px;flex-shrink:0}
.assign-comp{font-size:11.5px;color:var(--muted);margin-top:4px}
.assign-row .badge{flex-shrink:0;margin-top:3px}

.testing-preview-row{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;flex-wrap:wrap}
.testing-preview-stat .n{font-family:var(--mono);font-size:24px;font-weight:800}
.testing-preview-stat .l{font-size:11.5px;color:var(--grey);margin-top:2px}

@media(prefers-reduced-motion:reduce){
  .gauge .fill,.group-bar-fill,.year-bar-fill,polyline.spark-draw{transition:none !important}
}

/* ── Board ── */
.filters{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px}
.filters select,.filters input{width:auto;min-width:150px}
input[type=checkbox]{width:auto;min-width:0;padding:0;border:0;accent-color:var(--red)}
label.check{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:var(--grey);margin-bottom:18px}
.filters label.check{margin-bottom:0}

/* ── Player Database: search+action toolbar, filter modal trigger ── */
.db-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:18px}
.filter-badge{
  display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;
  padding:0 5px;border-radius:999px;background:var(--red);color:#fff;font-size:11px;font-weight:800;
}
#playerActiveFilters{margin-bottom:18px}
/* Toggle chip (e.g. "Dual players only" inside the filter modal) — a
   checkbox that looks like a segmented-pill button, not a checkbox. */
.filter-toggle{
  position:relative;display:inline-flex;align-items:center;
  background:var(--white);border:1.5px solid var(--grey-light);border-radius:10px;
  padding:9px 14px;font-size:13.5px;font-weight:600;color:var(--grey);
  cursor:pointer;transition:all .15s;user-select:none;margin:0;text-transform:none;letter-spacing:normal;
}
.filter-toggle:hover{border-color:var(--border-hover);color:var(--black)}
.filter-toggle input{position:absolute;opacity:0;width:1px;height:1px}
.filter-toggle:has(input:checked){background:var(--ink);border-color:var(--ink);color:#fff}
.filter-toggle:has(input:focus-visible){outline:2px solid var(--black);outline-offset:2px}
.stat-row{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:20px}
@media(max-width:640px){.stat-row{grid-template-columns:1fr}}
.stat{background:var(--white);border:1px solid var(--grey-light);border-radius:var(--radius);padding:18px 20px;box-shadow:var(--shadow);position:relative;overflow:hidden}
.stat::before{content:'';position:absolute;top:0;left:0;right:0;height:3px;background:var(--grey-light)}
/* Explicit rather than :nth-child — the accent belongs to Avg Talent
   Index specifically, not to whatever card happens to sit third. */
.stat.accent::before{background:var(--red)}
.stat .n{font-family:var(--mono);font-size:27px;font-weight:800;color:var(--black);letter-spacing:-0.02em}
.stat .l{font-size:12px;color:var(--grey);font-weight:600;margin-top:3px}
/* Secondary figure sharing a card with the headline number — the
   hairline ties it to that number rather than letting it read as its
   own standalone stat. */
.stat-sub{margin-top:10px;padding-top:10px;border-top:1px solid var(--grey-light);font-size:12px;color:var(--grey);font-weight:600}

/* ── Talent Hub controls ── */
.segmented{display:inline-flex;background:var(--grey-fill);border-radius:999px;padding:4px;gap:2px;flex-shrink:0}
.segmented button{border:0;background:transparent;padding:9px 16px;border-radius:999px;font-size:13px;font-weight:700;color:var(--grey);cursor:pointer;font-family:inherit;transition:all .15s;white-space:nowrap}
.segmented button:hover{color:var(--black)}
.segmented button.active{background:var(--ink);color:#fff}

/* Age-grade scope — multi-select pills at the top of the page, the
   primary lens for everything below (stat cards included). Same pill
   language as Form Lines' metric pills (36px, 1px border, 400/600
   weights). Wraps rather than scrolling so every grade stays visible. */
.age-tabs{display:flex;flex-wrap:wrap;gap:12px;margin:0 0 24px}
.age-tabs button{height:36px;border:1px solid var(--grey-light);background:var(--white);color:var(--grey);padding:0 18px;border-radius:999px;font-size:13.5px;font-weight:400;cursor:pointer;font-family:inherit;transition:all .15s;white-space:nowrap}
.age-tabs button:hover{border-color:var(--black);color:var(--black)}
.age-tabs button.active{background:var(--ink);border-color:var(--ink);color:#fff;font-weight:600}

/* View toggle + search + Filters disclosure on one row above the table. */
/* Shared controls row (Talent Hub, Reports): primary action / search /
   Filters disclosure on one line, wrapping on narrow screens. */
.page-controls{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-bottom:24px}
.filters-toggle{display:inline-flex;align-items:center;gap:10px;border:1px solid var(--grey-light);background:var(--white);box-shadow:var(--shadow);border-radius:14px;padding:0 18px;height:51px;font-size:14px;font-weight:600;color:var(--black);cursor:pointer;font-family:inherit;transition:border-color .15s;flex-shrink:0}
.filters-toggle:hover{border-color:var(--black)}
.filters-toggle svg{width:16px;height:16px;color:var(--grey);flex-shrink:0}
.filters-toggle .chev{transition:transform .2s}
.filters-toggle.open .chev{transform:rotate(180deg)}
/* The count badge is also the clear control — reads "3 ×", clears all
   accordion filters on tap. It sits inside the Filters toggle (a click
   anywhere else on the toggle opens/closes the panel), so it can't be
   read as a close button for the panel itself. */
.filter-count-badge{min-width:20px;height:20px;border-radius:999px;background:var(--red);color:#fff;font-size:11.5px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:0 7px;cursor:pointer;transition:background .15s}
.filter-count-badge:hover{background:#b3152a}
.filter-count-badge .x{font-size:13px;line-height:1;opacity:.85}
/* The filter accordion: every option exposed as a pill under its group
   heading — no dropdowns to open, current state always visible. */
.filter-panel{display:none;background:var(--white);border:1px solid var(--grey-light);border-radius:var(--radius);box-shadow:var(--shadow);padding:24px;margin-bottom:24px}
.filter-panel.open{display:block}
.filter-group{margin-bottom:24px}
.filter-group:last-of-type{margin-bottom:0}
.filter-group-label{margin:0 0 12px;font-size:12px;font-weight:700;color:var(--grey);text-transform:uppercase;letter-spacing:.05em}
.filter-pill-row{display:flex;flex-wrap:wrap;gap:12px}
/* No margin-top of its own: the preceding .filter-group's 24px
   margin-bottom is the gap above the divider (that group can't match
   the :last-of-type margin-reset above — last div here is this foot). */
.filter-panel-foot{padding-top:24px;border-top:1px solid var(--grey-light);display:flex;justify-content:flex-end}

/* ── Talent ID rankings: rank badges, index bar, delta pills, squad groups ── */
.rank-badge{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;font-family:var(--mono);font-weight:800;font-size:12px;background:var(--grey-fill);color:var(--grey);flex-shrink:0}
.rank-badge.rank-1{background:var(--red);color:#fff}
.rank-badge.rank-top{background:var(--ink);color:#fff}
.idx-cell{display:flex;align-items:center;gap:8px;min-width:0}
.idx-num{font-family:var(--mono);font-weight:800;min-width:22px;flex-shrink:0}
.idx-bar{flex:1;height:6px;background:transparent;border-radius:999px;overflow:hidden;min-width:36px}
.idx-bar-fill{height:100%;background:var(--red);border-radius:999px}
.delta-pill{display:inline-block;font-family:var(--mono);font-weight:800;font-size:12px;padding:2px 8px;border-radius:999px;white-space:nowrap}
.delta-pill.up{background:var(--success-bg);color:var(--success)}
.delta-pill.down{background:var(--danger-bg);color:var(--red)}
.squad-group{margin-bottom:26px}
.squad-group-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:10px}
.squad-group-head h3{font-size:16px;font-weight:800}

/* ── Modal / toast / queue ── */
.overlay{position:fixed;inset:0;background:rgba(15,15,15,.5);display:none;align-items:center;justify-content:center;z-index:100;padding:20px}
.overlay.open{display:flex}
.modal{background:var(--white);border-radius:20px;max-width:640px;width:100%;max-height:85vh;overflow:auto;padding:28px}
/* The Create-assignment modal hosts a whole fixtures browser. */
.modal.wide{max-width:900px}
.modal .sub{color:var(--grey);font-size:13px;margin-bottom:16px}
.mini-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px 20px;margin:14px 0}
@media(max-width:560px){.mini-grid{grid-template-columns:1fr}}
.mini-grid div{display:flex;justify-content:space-between;font-size:14px;padding:5px 0;border-bottom:1px solid var(--grey-light)}
.mini-grid b{font-family:var(--mono);color:var(--red)}
.field-stat{display:flex;flex-direction:column;align-items:flex-start;gap:7px}
.field-stat-label{font-size:11.5px;color:var(--grey);font-weight:600;text-transform:uppercase;letter-spacing:.04em}
.badge.field-value{background:var(--grey-fill);color:var(--black);font-weight:800;text-transform:none;letter-spacing:0;font-size:13px;padding:4px 13px}
.report-view-title-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:22px}
.report-view-title-row .page-title{margin-bottom:0}
.badge.submitted-pill{text-transform:none;letter-spacing:0;font-size:12.5px;font-weight:700;padding:5px 13px;display:inline-flex;align-items:center;gap:5px;background:var(--white);box-shadow:var(--shadow);color:var(--success)}
.badge.submitted-pill svg{width:13px;height:13px;flex-shrink:0}
.selected-player .player-avatar{background:var(--white)}
.notes-box{background:var(--bg);border-left:3px solid var(--red);padding:12px 14px;border-radius:8px;font-size:14px;margin-top:12px}
.toast{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:var(--ink);color:#fff;padding:12px 22px;border-radius:999px;font-size:14px;opacity:0;transition:opacity .3s;pointer-events:none;z-index:200;box-shadow:var(--shadow-lift)}
.toast.show{opacity:1}
.queue-note{background:var(--danger-bg);border:1px solid var(--danger-border);border-radius:12px;padding:12px 16px;font-size:13px;margin-bottom:16px;display:none}
.queue-note.show{display:block}
.empty{text-align:center;color:var(--grey);padding:40px 0;font-size:14px}

/* ── Invite button states ── */
.btn-invite{min-width:150px;justify-content:center;position:relative;transition:background .2s}
.btn-invite .spinner{display:none;width:16px;height:16px;border:2.5px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.btn-invite.loading .spinner{display:inline-block}
.btn-invite.loading{pointer-events:none;opacity:.85}
.btn-invite.success{background:var(--success);pointer-events:none}
input:disabled{opacity:.55;cursor:not-allowed}
