/* Hyde SciOly Prep admin page (admin.html). Builds on lab.css tokens. */
.admin-top{justify-content:space-between;}
.page-title{font-family:var(--f-display); font-size:clamp(30px, 6vw, 40px); line-height:1.1; color:var(--brand); margin:0 0 6px;}
.stage{padding:24px 0; color:var(--muted);}
.stage .card{max-width:520px;}
.muted{color:var(--muted);}
.mono{font-family:var(--f-mono); font-size:14px;}

.adm-section{margin:34px 0 0;}
.adm-head{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:8px;}
.adm-head .section-label{margin:0;}
.adm-card{
  background:var(--paper); border:1px solid var(--line); border-radius:var(--r-card);
  padding:16px 18px; box-shadow:var(--shadow); margin:0 0 12px;
}
.adm-card h3{font-family:var(--f-display); font-size:20px; line-height:1.2; color:var(--ink); margin:0 0 4px;}
.adm-card p{margin:0 0 6px;}
.adm-card .row{display:flex; justify-content:space-between; align-items:flex-start; gap:12px; flex-wrap:wrap;}
.adm-card .acts{display:flex; gap:8px; flex-wrap:wrap;}
.adm-card.past{opacity:.75;}
.season-card{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;}
.season-card p{margin:0;}

.event-sum{display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:12px;}
.ev-card{margin:0;}
.ev-card p{font-size:15px;}
.ev-card .k{display:inline-block; min-width:72px; font-family:var(--f-mono); font-size:12px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--muted);}

.chips{display:flex; flex-wrap:wrap; gap:6px; list-style:none; margin:8px 0 0; padding:0;}
.chips li{font-size:13px; font-weight:600; color:var(--ink-2); background:var(--paper-alt); border:1px solid var(--line); border-radius:999px; padding:3px 10px;}
.role{display:inline-block; vertical-align:3px; margin-left:4px; font-family:var(--f-mono); font-size:11px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; padding:2px 8px; border-radius:999px; background:var(--paper-alt); color:var(--muted);}
.role.admin, .role.coadmin{background:var(--hero-bg); color:var(--hero-ink);}
.role.off{background:var(--bad-bg); color:var(--bad-ink);}

.btn-sm{
  display:inline-flex; align-items:center; min-height:40px; padding:0 14px; font:inherit; font-size:14px; font-weight:600;
  color:var(--ink); background:var(--paper); border:1px solid var(--line); border-radius:var(--r-ctl); cursor:pointer; white-space:nowrap;
}
.btn-sm:hover{border-color:var(--brand);}
.btn-sm.primary{color:var(--hero-ink); background:var(--hero-bg); border-color:var(--hero-bg);}
.btn-sm:disabled{opacity:.6; cursor:progress;}

.stu{margin-top:14px; padding-top:14px; border-top:1px solid var(--line);}
.tablewrap{overflow-x:auto; position:relative;}
.adm-table{width:100%; border-collapse:collapse; font-size:15px;}
.adm-table th{text-align:left; font-family:var(--f-mono); font-size:12px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); padding:6px 10px 6px 0; border-bottom:1px solid var(--line);}
.adm-table td{padding:8px 10px 8px 0; border-bottom:1px solid var(--line);}
.add-stu{display:flex; align-items:flex-end; gap:10px; flex-wrap:wrap; margin-top:14px;}
.add-stu .field{margin:0; flex:1 1 180px;}
.add-stu .field.ini{flex:0 1 110px;}
.add-stu .field input{min-height:44px; font-size:16px;}
.add-stu .btn-sm{min-height:44px;}
.ok{margin:12px 0 0; padding:10px 14px; border-radius:var(--r-ctl); background:var(--paper-alt); color:var(--ink); font-size:15px; font-weight:600;}
.ok[hidden]{display:none;}

.adm-dlg{width:min(480px, calc(100vw - 32px)); border:1px solid var(--line); border-radius:var(--r-card); background:var(--paper); color:var(--ink); padding:22px 20px; box-shadow:var(--shadow-lift);}
.adm-dlg::backdrop{background:rgba(5,10,30,.45);}
.adm-dlg h2{font-family:var(--f-display); font-size:24px; color:var(--brand); margin:0 0 8px;}
.adm-dlg fieldset{border:0; padding:0; margin:0 0 16px;}
.adm-dlg legend{font-family:var(--f-mono); font-size:12px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin-bottom:6px; padding:0;}
/* Checkboxes inside a .field: not the text-field label and input styles. */
.field .check{display:flex; margin:0; font-family:inherit; font-size:16px; font-weight:400; letter-spacing:normal; text-transform:none; color:var(--ink);}
.field .check input{width:20px; height:20px; min-height:0; padding:0; margin:0; flex:none; border:0;}
.adm-dlg .field select{width:100%; min-height:48px; padding:10px 14px; font:inherit; font-size:17px; color:var(--ink); background:var(--bg); border:2px solid var(--line); border-radius:var(--r-ctl);}
.adm-dlg .field select:focus-visible{outline:2px solid var(--focus); outline-offset:3px; border-color:var(--brand);}
.check{display:flex; align-items:center; gap:10px; min-height:40px; font-size:16px; cursor:pointer;}
.check input{width:20px; height:20px; accent-color:var(--brand);}
.dlg-btns{display:flex; justify-content:flex-end; gap:10px; margin-top:16px;}
.adm-more{margin:30px 0 0; font-size:14px; color:var(--muted);}
.note-warn{margin:8px 0 0; font-size:14px; color:var(--bad-ink); background:var(--bad-bg); border-radius:var(--r-ctl); padding:6px 10px; display:inline-block;}

/* Coach dashboard (coach.html) */
.tabs{display:flex; gap:6px; flex-wrap:wrap; margin:6px 0 0;}
.tab{min-height:40px; padding:0 16px; font:inherit; font-size:15px; font-weight:600; color:var(--ink-2); background:var(--paper); border:1px solid var(--line); border-radius:999px; cursor:pointer;}
.tab[aria-selected="true"]{color:var(--hero-ink); background:var(--hero-bg); border-color:var(--hero-bg);}
.dash-h{font-family:var(--f-display); font-size:24px; line-height:1.15; color:var(--brand); margin:0 0 2px;}
.adm-card .tablewrap{margin-top:12px;}
.pbar{display:inline-block; vertical-align:middle; width:110px; height:8px; border-radius:999px; background:var(--paper-alt); border:1px solid var(--line); overflow:hidden;}
.pbar span{display:block; height:100%; background:var(--kicker);}
.adm-table td .chips{margin-top:6px;}
.adm-table td .chips li{font-size:12px; padding:1px 8px;}
a.btn-sm{text-decoration:none; white-space:normal; text-align:center; line-height:1.3; padding-top:6px; padding-bottom:6px;}
.adm-table td:last-child{white-space:nowrap;}
@media (min-width:600px){ .adm-table th{white-space:nowrap;} }

/* Admin tabs, ⋯ menus, collapsible sections, page views */
.sr-only{position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;}
.adm-tabs{margin:18px 0 18px; border-bottom:1px solid var(--line); padding-bottom:12px;}
.adm-panel > .adm-head{align-items:flex-start;}
.adm-panel > .adm-head .section-sub{flex:1 1 280px; margin:0;}
.show-pw{display:inline-flex; margin:0 0 10px; font-size:14px; min-height:36px;}
.show-pw input{width:18px; height:18px;}
.menuwrap{position:relative; display:inline-block;}
.morebtn{min-width:40px; justify-content:center; font-size:18px; line-height:1; padding:0 10px;}
.menu{position:absolute; right:0; top:calc(100% + 4px); z-index:40; min-width:210px; padding:6px; background:var(--paper); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow-lift); display:flex; flex-direction:column;}
.menu[hidden]{display:none;}
.menu button{display:block; width:100%; text-align:left; min-height:40px; padding:0 12px; font:inherit; font-size:14px; font-weight:600; color:var(--ink); background:none; border:0; border-radius:8px; cursor:pointer;}
.menu button:hover, .menu button:focus-visible{background:var(--paper-alt);}
.menu button.rm{color:var(--bad-ink);}
.btn-sm.danger{color:var(--bad-ink); background:var(--bad-bg); border-color:var(--bad-bg);}
.fold > summary{list-style:none; cursor:pointer; display:flex; align-items:flex-start; gap:10px;}
.fold > summary::-webkit-details-marker{display:none;}
.fold > summary::before{content:""; flex:none; width:9px; height:9px; margin-top:9px; border-right:2px solid var(--muted); border-bottom:2px solid var(--muted); transform:rotate(-45deg); transition:transform .15s;}
.fold[open] > summary::before{transform:rotate(45deg);}
.fold > summary h2, .fold > summary h3{margin:0 0 2px;}
.sum-main{display:block; flex:1;}
.group-wrap{position:relative;}
.group-acts{position:absolute; top:14px; right:16px;}
.group-wrap > .group > summary{padding-right:52px;}
.group .stu{margin-top:10px;}
.adm-table td:last-child .menuwrap{float:right;}
.linkfield{display:block; width:100%; margin-top:8px; font:inherit; font-size:13px; padding:8px 10px; border:1px solid var(--line); border-radius:8px; background:var(--bg); color:var(--ink);}
.pv-range{margin:10px 0 12px;}
.pv-range .tab[aria-pressed="true"]{color:var(--hero-ink); background:var(--hero-bg); border-color:var(--hero-bg);}
.pv-tiles{display:grid; grid-template-columns:repeat(3, 1fr); gap:10px; margin-bottom:14px;}
.pv-tile{background:var(--paper-alt); border-radius:var(--r-ctl); padding:10px 12px;}
.pv-tile b{display:block; font-family:var(--f-display); font-size:26px; color:var(--brand);}
.pv-tile span{font-size:13px; color:var(--muted);}
.pv-chart{display:flex; align-items:flex-end; gap:3px; height:120px; padding:6px 0; border-bottom:1px solid var(--line);}
.pv-chart div{flex:1; background:var(--kicker); border-radius:3px 3px 0 0; min-height:1px;}
.pv-axis{display:flex; justify-content:space-between; font-size:12px; color:var(--muted); margin:4px 0 14px;}
.pv-cols{display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); gap:18px;}
.pv-cols h3{font-family:var(--f-mono); font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin:10px 0 4px;}
.pv-cols td.n{text-align:right; font-variant-numeric:tabular-nums;}
.pv-bar{display:block; height:4px; margin-top:4px; border-radius:2px; background:var(--kicker); opacity:.6;}
@media (max-width:420px){ .adm-tabs .tab{padding:0 12px; font-size:14px;} .adm-tabs{gap:4px;} }
.group .tablewrap{overflow:visible;}
.check[hidden]{display:none;}
/* Coach cards: the "⋯" menu stays in the top-right corner at every width. */
.adm-card.coach .row{flex-wrap:nowrap;}
.adm-card.coach .row > div:first-child{min-width:0; flex:1;}
.adm-card.coach .row > .acts{flex:none;}
.adm-card.coach h3, .adm-card.coach .muted{overflow-wrap:anywhere;}


/* Coach dashboard: a student's login card (Login card / Reset password in
   each row's menu). The menu is fixed to the screen there, placed by script. */
.menu.fixed{position:fixed; right:auto; top:0; left:0;}
.act-cell{width:1%; white-space:nowrap; text-align:right;}
.logincard{border:2px dashed var(--line); border-radius:12px; padding:12px 14px; background:var(--paper); display:flex; gap:12px; align-items:flex-start; margin:12px 0 4px;}
.logincard .lc-text{flex:1; min-width:0;}
.logincard .lc-for{font-weight:800; font-size:17px; color:var(--ink); margin-bottom:6px;}
.logincard .lc-t{font-family:'IBM Plex Mono',monospace; font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); font-weight:700;}
.logincard .lc-v{font-family:'IBM Plex Mono',monospace; font-weight:700; font-size:17px; color:var(--ink); word-break:break-all;}
.logincard .lc-v + .lc-t{margin-top:6px;}
.logincard .lc-qr{flex:none; width:96px; text-align:center; font-size:11px; font-weight:600; color:var(--muted);}
.logincard .lc-qr svg{display:block; width:96px; height:96px; background:#fff; border-radius:6px;}
#printArea{display:none;}
@media print{
  body > .wrap, dialog{display:none !important;}
  #printArea{display:block;}
  #printArea .logincard{background:#fff; border-color:#999; color:#000; max-width:420px;}
}
/* Boomilever build photos on the coach dashboard (Team builds) */
.photo-dlg{width:min(900px, calc(100vw - 24px));}
.photo-dlg img{display:block; max-width:100%; max-height:75vh; margin:0 auto; border-radius:8px;}

/* Login cards (student and group ⋯ menus) */
.cards-dlg{width:min(720px, calc(100vw - 32px));}
.lcards{display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:10px; margin:6px 0 4px;}
.lcard{display:flex; gap:12px; align-items:flex-start; border:2px dashed var(--line); border-radius:12px; padding:12px 14px; background:var(--bg); text-align:left;}
.lcard .lc-text{flex:1; min-width:0;}
.lcard .lc-for{font-weight:700; font-size:16px; color:var(--ink); margin-bottom:6px;}
.lcard .lc-t{font-family:var(--f-mono); font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); font-weight:600;}
.lcard .lc-v{font-family:var(--f-mono); font-weight:600; font-size:16px; color:var(--brand); word-break:break-all;}
.lcard .lc-v + .lc-t{margin-top:6px;}
.lcard .lc-qr{flex:none; width:96px; text-align:center; font-size:11px; color:var(--muted); font-weight:600;}
.lcard .lc-qr svg{display:block; width:96px; height:96px; background:#fff; border-radius:6px;}
.print-area{display:none;}
@media print{
  body{background:#fff !important; padding:0;}
  body > *:not(.print-area){display:none !important;}
  .print-area{display:block !important;}
  .print-area .lcards{grid-template-columns:repeat(2, 1fr);}
  .print-area .lcard{break-inside:avoid; border-color:#999; background:#fff;}
  .print-area .lc-for{color:#000;} .print-area .lc-v{color:#02168F;} .print-area .lc-t, .print-area .lc-qr{color:#444;}
}
/* A long table (Boomilever's Team builds) scrolls in its own box after
   about 10 rows; coachdash.js sets the height. The header row stays put. */
.tablewrap.scrollrows{overflow:auto; border-bottom:1px solid var(--line);}
.tablewrap.scrollrows thead th{position:sticky; top:0; z-index:1; background:var(--paper);}
.tablewrap.scrollrows:focus-visible{outline:2px solid var(--focus); outline-offset:3px;}

/* Meetings (coach dashboard, meetings.js) */
.meet-card .row{align-items:flex-start;}
.meet{border-top:1px solid var(--line); padding:12px 0 2px; margin-top:12px;}
.meet-head{display:flex; align-items:flex-start; justify-content:space-between; gap:10px;}
.meet-head > div:first-child{min-width:0; flex:1;}
.meet h3{font-size:16px; margin:0 0 2px; color:var(--ink);}
.meet p{margin:0;}
.meet .meet-when{font-weight:600; color:var(--ink-2);}
.meet .meet-where{display:flex; align-items:flex-start; gap:6px; color:var(--ink-2); overflow-wrap:anywhere;}
.meet .meet-where .icon{flex:none; width:16px; height:16px; margin-top:3px;}
.meet .meet-where a{color:var(--brand); font-weight:600;}
.meet .meet-memo{display:flex; align-items:flex-start; gap:6px; margin-top:4px; color:var(--ink-2); overflow-wrap:anywhere;}
.meet .meet-memo .icon{flex:none; width:16px; height:16px; margin-top:3px;}
.meet .meet-sub{margin-top:8px; font-family:var(--f-mono); font-size:11px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--muted);}
.meet-dates, .meet-ex{list-style:none; margin:4px 0 0; padding:0; display:flex; flex-wrap:wrap; gap:6px 14px; font-size:14px; color:var(--ink-2);}
.meet-ex{display:grid; gap:4px;}
.meet .tag{font-size:11px; font-weight:700; color:var(--brand); background:var(--paper-alt); border:1px solid var(--line); border-radius:999px; padding:0 6px;}
.linkish{background:none; border:0; padding:0 0 0 6px; font:inherit; font-size:13px; font-weight:600; color:var(--brand); text-decoration:underline; cursor:pointer;}
.meet-dlg .meet-row{display:flex; gap:10px;}
.meet-dlg .meet-row .field{flex:1; min-width:0;}
.meet-dlg .field select{width:100%; min-height:48px; padding:10px 14px; font:inherit; font-size:17px; color:var(--ink); background:var(--bg); border:2px solid var(--line); border-radius:var(--r-ctl);}
.meet-dlg .field textarea{width:100%; padding:10px 14px; font:inherit; font-size:17px; line-height:1.4; color:var(--ink); background:var(--bg); border:2px solid var(--line); border-radius:var(--r-ctl); resize:none;}
.meet-dlg .field textarea:focus-visible{outline:2px solid var(--focus); outline-offset:3px; border-color:var(--brand);}
.meet-dlg .field[hidden]{display:none;}
.meet-dlg .sub{margin:0 0 12px;}

/* Parents tab */
.parent-invite textarea{width:100%; min-height:120px; padding:10px 14px; font:inherit; font-size:16px; color:var(--ink); background:var(--bg); border:2px solid var(--line); border-radius:var(--r-ctl); resize:vertical;}
.parent-invite textarea:focus-visible, .parent-invite select:focus-visible{outline:2px solid var(--focus); outline-offset:3px; border-color:var(--brand);}
.parent-invite select{width:100%; min-height:48px; padding:10px 14px; font:inherit; font-size:16px; color:var(--ink); background:var(--bg); border:2px solid var(--line); border-radius:var(--r-ctl);}
.parent-invite .ok p{margin:0 0 4px;}
.parents-h{margin:22px 0 8px; font-size:20px;}
.parent-invite h2{margin-bottom:12px;}

.menu.floating{position:fixed; right:auto; bottom:auto;}

/* Coach cards: whether they've taken up their invite */
.signin-line{margin:2px 0 6px; font-size:13px;}
.signin-st{color:var(--muted);}
.signin-st.warn{color:var(--bad-ink); background:var(--bad-bg); border-radius:999px; padding:1px 8px; font-weight:600;}
/* Coach dashboard picker (coach.html) */
a.pick-card{display:block; text-decoration:none; color:inherit;}
a.pick-card:hover{border-color:var(--brand);}
a.pick-card:focus-visible{outline:2px solid var(--focus); outline-offset:3px;}

/* Parents tab: a parent's linked students */
.kids{list-style:none; margin:0; padding:0; display:grid; gap:8px; font-size:14px;}
.kids .linkish{padding:0; font-size:13px;}
.coach-kids{margin:8px 0 0; font-size:14px;} .coach-kids .kids{margin-top:4px;}

/* Events tab (the event catalog) */
.btn-sm[hidden]{display:none;}
.cstat{display:inline-block; font-family:var(--f-mono); font-size:11px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; padding:2px 8px; border-radius:999px; background:var(--paper-alt); color:var(--muted); white-space:nowrap;}
.cstat.native{background:var(--hero-bg); color:var(--hero-ink);}
.cstat.engine{background:var(--paper-alt); color:var(--ink); border:1px solid var(--line);}
.cat-table td{vertical-align:top;}
/* Keeps the hidden "Actions" header label inside the table's scroll box. */
#catList .tablewrap{position:relative;}
.cat-count{margin:0 0 8px; font-size:14px;}
.field.checks{max-height:min(50vh, 420px); overflow-y:auto;}
.field.checks .check{align-items:flex-start;}
.field.checks .check .muted{display:block; font-size:13px;}
/* Phones: each event is a small card (name, course, type, authors) with its
   menu on the right, instead of a table that scrolls sideways. */
@media (max-width:640px){
  .cat-table thead{display:none;}
  .cat-table, .cat-table tbody{display:block;}
  .cat-table tr{display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:12px; padding:10px 0; border-bottom:1px solid var(--line);}
  .cat-table tr:last-child{border-bottom:0;}
  .cat-table td{display:block; border:0; padding:0;}
  .cat-table td:nth-child(1){grid-row:1;}
  .cat-table td:nth-child(3){grid-row:2; margin-top:4px;}
  .cat-table td.c-type{grid-row:3; margin-top:2px; font-size:13px; color:var(--muted);}
  .cat-table td.c-auth{grid-row:4; margin-top:2px; font-size:13px;}
  .cat-table td.c-auth:empty{display:none;}
  .cat-table td.c-auth::before{content:"Authors: "; color:var(--muted);}
  .cat-table td:nth-child(5){grid-column:2; grid-row:1 / span 4; align-self:start;}
}

/* Roster import preview */
.roster-sum{margin:10px 0 8px;}
.roster-table td{vertical-align:top; font-size:14px;}
.roster-table .r-tag{display:inline-block; font-size:12px; font-weight:700; border-radius:999px; padding:1px 8px; background:var(--paper-alt); border:1px solid var(--line);}
.roster-table .r-ok .r-tag{color:var(--brand);}
.roster-table .r-error .r-tag{background:var(--bad-bg); color:var(--bad-ink); border-color:transparent;}
.roster-import .acts{display:flex; gap:8px; margin-top:12px;}
.roster-import input[type=file]{font:inherit; max-width:100%;}
details.roster-import > summary{cursor:pointer; margin:0; list-style-position:inside;}
details.roster-import[open] > summary{margin-bottom:8px;}
details.roster-import > summary:focus-visible{outline:2px solid var(--focus); outline-offset:3px; border-radius:6px;}

/* ---------- courses tab (engine content review) ---------- */
.rev-switch h3, .rev-course h3{margin:0 0 4px;}
.rev-switch p{margin:0;}
.rev-course > p{margin:6px 0; font-size:15px;}
.rev-course .k{display:inline-block; min-width:72px; font-family:var(--f-mono); font-size:12px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--muted);}
.rev-panel{margin-top:12px; padding-top:12px; border-top:1px solid var(--line);}
.rev-panel h4{margin:0 0 8px; font-size:16px;}
.rev-panel ul{margin:4px 0 10px; padding-left:20px; font-size:14px; line-height:1.45;}
.rev-panel li{margin:3px 0; overflow-wrap:anywhere;}
.rev-changes summary{cursor:pointer;}
.rev-changes p{margin:4px 0 0;}
.rev-acts{margin-top:12px;}
.rev-vers{margin-top:10px;}
.rev-vers summary{cursor:pointer; font-size:14px; color:var(--muted);}
.adm-dlg .field textarea{width:100%; font:inherit; font-size:16px; padding:10px 12px; border:1px solid var(--line); border-radius:var(--r-ctl); background:var(--paper); color:var(--ink); resize:vertical;}
.adm-dlg .field textarea:focus-visible{outline:2px solid var(--focus); outline-offset:2px;}
.role.past{background:transparent; color:var(--dev-hat, #C27C00); box-shadow:inset 0 0 0 1px currentColor;}
#wrapOut h3{font-size:1rem; margin:16px 0 4px;}
