/* PRISM 1.0 — the few rules the live portal needs on top of the design CSS.
   Everything else comes from prism.css, which is the approved design. */

.wrap{max-width:1240px; margin:0 auto; padding:14px 16px 40px}
.app{overflow:visible}

/* the sidebar, as links rather than the design's mock <i> elements */
.side a.navi{display:flex; gap:9px; align-items:center; padding:8px 14px;
  color:var(--on-navy); font-size:13px; text-decoration:none;
  border-left:3px solid transparent}
.side a.navi svg{width:15px; height:15px; opacity:.8; flex:none}
.side a.navi:hover{background:rgba(255,255,255,.06); color:#fff}
.side a.navi.on{background:rgba(255,255,255,.1); color:#fff; font-weight:600;
  border-left-color:var(--gold)}
.side a.navi.on svg{opacity:1}

/* real controls, styled like the design's mock ones */
a.btn{text-decoration:none; display:inline-flex; align-items:center}
button.btn{font:inherit; cursor:pointer}
.btn.signout{background:rgba(255,255,255,.12); border-color:rgba(255,255,255,.26); color:#fff}
.btn.signout:hover{background:rgba(255,255,255,.2)}

select.control, input.control, textarea.control{font:inherit; color:var(--ink);
  background:var(--card); border:1px solid var(--line); border-radius:7px;
  padding:6px 9px; min-height:32px}
select.control{padding-right:24px}
input.control:focus, select.control:focus, textarea.control:focus{
  outline:2px solid var(--gold); outline-offset:1px}

form.inline{display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap}

input.mk{width:62px; text-align:right; font-variant-numeric:tabular-nums;
  border:1px solid var(--line); border-radius:6px; padding:4px 6px; font:inherit;
  background:var(--card); color:var(--ink)}
input.mk:focus{outline:2px solid var(--gold); outline-offset:1px}
input.mk.bad{border-color:var(--bad); background:var(--bad-soft)}
input.mk[readonly]{background:var(--line-soft); color:var(--ink-3)}

.pill{display:inline-flex; gap:5px; align-items:center; padding:6px 10px;
  border:1px solid var(--line); border-radius:999px; font-size:12.5px;
  cursor:pointer; user-select:none; background:var(--card)}
.pill.present{border-color:var(--ok); background:var(--ok-soft); color:var(--ok)}
.pill.absent {border-color:var(--bad); background:var(--bad-soft); color:var(--bad)}
.pill.leave  {border-color:var(--warn); background:var(--warn-soft); color:var(--warn)}
.pillwrap{display:flex; flex-wrap:wrap; gap:7px}

.empty{padding:26px 14px; text-align:center; color:var(--ink-3); font-size:13px}
.bar{height:7px; border-radius:4px; background:var(--line-soft); overflow:hidden}
.bar span{display:block; height:100%; background:var(--navy-3)}
.minibar{display:flex; align-items:center; gap:7px}
.minibar .bar{flex:1; min-width:70px}

table.rowlink tbody tr:hover{background:var(--line-soft)}
a.plain{color:inherit; text-decoration:none}
a.plain:hover{text-decoration:underline}

.loginpage{max-width:380px; margin:8vh auto; text-align:center}
.loginpage .panel{text-align:left}
.loginpage input.control{width:100%}

@media print{
  .side, .burger, .navtoggle, .topbar, .caption, .btn, form.inline{display:none !important}
  .wrap{max-width:none; padding:0}
  .app{border:0; box-shadow:none}
  .body{display:block}
}

/* the parent slip, printed two to an A4 */
.slip{background:#fff; color:#111; border:1px solid #999; padding:14px 16px;
  font-family:var(--ui); font-size:12px; margin-bottom:12px; break-inside:avoid}
.slip table{width:100%; border-collapse:collapse; font-size:11px}
.slip table.grid th, .slip table.grid td{border:1px solid #999; padding:3px 5px}
.slip .head{text-align:center; border-bottom:1.5px solid #111; padding-bottom:7px;
  margin-bottom:9px}
.slip .sigs{display:flex; justify-content:space-between; margin-top:26px; font-size:10.5px}
.slip .foot{text-align:center; font-size:9px; color:#555; margin-top:9px;
  border-top:1px dotted #999; padding-top:5px}

/* ---------------------------------------------------------------------
 *  The phone.
 *
 *  On a laptop the menu is a column down the left and the toggle does not
 *  exist.  On a phone that column would be taller than the screen before
 *  the page began, so it collapses behind a Menu bar that says which screen
 *  you are on.  A checkbox drives it, not a script: it works before any
 *  JavaScript has run, and no error elsewhere can leave it stuck open.
 * ------------------------------------------------------------------- */
.navtoggle{position:absolute; width:1px; height:1px; opacity:0; pointer-events:none}
.burger{display:none}

@media (max-width:760px){
  .wrap{padding:0 0 30px}
  .app{border-radius:0}
  .body{grid-template-columns:1fr !important}
  .topbar{flex-wrap:wrap; gap:7px; padding:10px 14px}
  .topbar .who, .topbar .sess{display:none}
  .topbar .logo small{display:none}

  /* the bar you tap */
  .burger{display:flex; align-items:center; gap:10px; padding:12px 16px;
    background:var(--navy-2); color:#fff; font-family:var(--ui); font-size:14px;
    cursor:pointer; position:sticky; top:0; z-index:40; user-select:none;
    border-bottom:1px solid rgba(255,255,255,.12)}
  .burger svg{width:21px; height:21px; flex:none}
  .burger .cross{display:none}
  .burger b{font-weight:600}
  .burger span{margin-left:auto; font-size:12.5px; color:rgba(255,255,255,.62);
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:52%}
  .navtoggle:focus-visible ~ .burger{outline:2px solid var(--gold); outline-offset:-2px}

  /* shut by default, and the icon becomes a cross when it is open */
  .side{display:none; min-height:0; padding:6px 0 10px; max-height:72vh; overflow-y:auto}
  .navtoggle:checked ~ .side{display:block}
  .navtoggle:checked ~ .burger .bars{display:none}
  .navtoggle:checked ~ .burger .cross{display:inline}

  /* a row you can hit with a thumb */
  .side h5{display:block; margin:10px 16px 4px}
  .side a.navi{padding:12px 16px; font-size:14.5px; border-left:3px solid transparent}
  .side a.navi svg{width:17px; height:17px}
  .main{padding:13px}
}

/* The monthly attendance register: a narrow column per marked day, so a
   month of 24 days still fits beside the names on a laptop. */
table.register{font-variant-numeric:tabular-nums}
table.register th, table.register td{padding:3px 5px; font-size:11.5px}
table.register th:nth-child(2), table.register td:nth-child(2){
  position:sticky; left:0; background:var(--card); min-width:150px; text-align:left}
table.register th:first-child, table.register td:first-child{min-width:34px}

/* The grade-band editor: fixed columns, and inputs that fill their own cell
   rather than fighting the 120px minimum every other control wants. */
table.bandedit{width:100%; table-layout:fixed}
table.bandedit th, table.bandedit td{padding:4px 6px}
table.bandedit col.c-code{width:21%}
table.bandedit col.c-num{width:20%}
table.bandedit col.c-label{width:39%}
table.bandedit input.control{width:100%; min-width:0; min-height:28px; padding:3px 7px}
