/* static/css/app.css */

/* =========================
   THEME (Light + Dark Left Nav)
   ========================= */
:root{
  /* Light app canvas */
  --bg: #f5f7fb;            /* page background */
  --panel: #ffffff;         /* cards/panels */
  --panel2: #eef6ff;        /* topbar tint */
  --border: rgba(12, 24, 48, .14);

  /* Text */
  --text: rgba(12, 24, 48, .92);
  --muted: rgba(12, 24, 48, .62);

  /* Accent (navy) */
  --accent: #0b2a5b;
  --accent2: #cfe9ff;       /* light blue highlight */

  /* Left nav (dark) */
  --navbg: #0f141a;
  --navborder: rgba(255,255,255,.08);
  --navtext: rgba(255,255,255,.78);
  --navmuted: rgba(255,255,255,.60);

  /* Buttons */
  --btnbg: rgba(12, 24, 48, .06);
  --btnborder: rgba(12, 24, 48, .14);
  --btnhover: rgba(12, 24, 48, .09);

  --primarybg: rgba(11, 42, 91, .10);
  --primaryborder: rgba(11, 42, 91, .22);
  --primarytext: #0b2a5b;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.app{
  display:flex;
  height:100vh;
  overflow:hidden;
}

/* =========================
   LEFT NAV (Dark)
   ========================= */
.nav{
  width:72px;
  background: var(--navbg);
  border-right: 1px solid var(--navborder);
  display:flex;
  flex-direction:column;
  align-items:center;
}

.nav__brand{
  width:44px;
  height:44px;
  margin:12px 0 8px;
  border-radius:12px;
  display:grid;
  place-items:center;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.90);
  font-weight:800;
  letter-spacing:.5px;
}

.nav__items{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  padding:8px 0 12px;
}

.nav__item{
  width:44px;
  height:44px;
  border-radius:12px;
  display:grid;
  place-items:center;
  text-decoration:none;
  color: var(--navmuted);
  border: 1px solid transparent;
}

.nav__item:hover{
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
}

.nav__item.is-active{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.18);
  color: rgba(255,255,255,.95);
}

.nav__icon{ font-size:18px; }
.nav__spacer{ flex:1; }

/* =========================
   SHELL + TOPBAR (Light)
   ========================= */
.shell{
  flex:1;
  display:flex;
  flex-direction:column;
  min-width:0;
}

.topbar{
  height:56px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 16px;
  background: var(--panel2);
  border-bottom: 1px solid var(--border);
}

.topbar__title{
  font-weight:800;
  letter-spacing:.2px;
  color: var(--accent);
}

.topbar__actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.topbar__search{
  width:320px;
  max-width:40vw;
  height:36px;
  border-radius:10px;
  border:1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  padding:0 12px;
  outline:none;
}

.topbar__search::placeholder{
  color: rgba(12,24,48,.45);
}

.topbar__user{
  width:36px;
  height:36px;
  border-radius:10px;
  display:grid;
  place-items:center;
  background: #ffffff;
  border:1px solid var(--border);
  color: rgba(12,24,48,.70);
  font-size:12px;
}

/* =========================
   3-PANE GRID
   ========================= */
.grid{
  flex:1;
  display:grid;
  grid-template-columns: 1fr 380px;
  gap:12px;
  padding:12px;
  min-height:0;
}

.main, .right{
  min-height:0;
  overflow:auto;
}

.main{
  background: var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  padding:14px;
}

.right{
  background: transparent;
}

/* Panel component */
.panel{
  background: var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  overflow:hidden;
}

.panel__title{
  padding:12px 14px;
  border-bottom:1px solid var(--border);
  font-weight:800;
  color: rgba(12,24,48,.88);
}

.panel__body{
  padding:14px;
  color: var(--muted);
}

/* =========================
   TABLE (Access-like density)
   ========================= */
.table{
  width:100%;
  border-collapse:collapse;
  font-size:14px;
}

.table th, .table td{
  padding:10px 8px;
  border-bottom:1px solid rgba(12,24,48,.10);
  text-align:left;
  vertical-align:top;
}

.table th{
  color: rgba(12,24,48,.62);
  font-weight:700;
}

.table tr:hover td{
  background: rgba(11,42,91,.04);
}

.rowlink{ cursor:pointer; }
.rowlink td{ transition: background .12s ease; }

/* Badge */
.badge{
  display:inline-block;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid rgba(12,24,48,.14);
  font-size:12px;
  color: rgba(12,24,48,.70);
  background: rgba(12,24,48,.03);
}

/* =========================
   DETAIL PAGE HEADER + TABS
   ========================= */
.pagehead{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.pagehead__actions{
  display:flex;
  gap:8px;
  align-items:center;
}

.h2{
  margin:2px 0 4px;
  font-size:22px;
  color: rgba(12,24,48,.92);
}

.kicker{
  color: rgba(12,24,48,.55);
  font-size:12px;
  margin-bottom:2px;
}

.meta{
  color: rgba(12,24,48,.74);
  font-size:13px;
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.dot{
  color: rgba(12,24,48,.35);
}

/* Tabs (fix: dark readable text on light bg) */
.tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  padding:10px 0 2px;
  border-bottom:1px solid rgba(12,24,48,.12);
  margin-bottom:12px;
}

.tab{
  text-decoration:none;
  color: rgba(12,24,48,.72);
  padding:8px 10px;
  border-radius:10px;
  border:1px solid rgba(12,24,48,.12);
  background: rgba(255,255,255,.80);
}

.tab:hover{
  color: rgba(12,24,48,.92);
  background: rgba(11,42,91,.04);
  border-color: rgba(11,42,91,.18);
}

.tab.is-active{
  color: var(--accent);
  border-color: rgba(11,42,91,.22);
  background: rgba(207,233,255,.70);
}

/* =========================
   BUTTONS
   ========================= */
.btn{
  height:36px;
  padding:0 12px;
  border-radius:10px;
  border:1px solid var(--btnborder);
  background: var(--btnbg);
  color: rgba(12,24,48,.84);
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.btn:hover{
  background: var(--btnhover);
}

.btn--primary{
  border-color: var(--primaryborder);
  background: var(--primarybg);
  color: var(--primarytext);
  font-weight:700;
}

/* Right panel helpers */
.stack{ display:flex; flex-direction:column; gap:8px; }
.divider{ height:1px; background: rgba(12,24,48,.12); margin:14px 0; }

.mini{ display:flex; flex-direction:column; gap:8px; font-size:13px; color: rgba(12,24,48,.78); }
.mini__row{ display:flex; justify-content:space-between; gap:12px; }
.muted{ color: var(--muted); }

/* =========================
   ACCESS-STYLE REPORT GRID (label beside value)
   ========================= */
.report-grid{
  display:grid;
  grid-template-columns: 180px 1fr 180px 1fr;
  column-gap: 18px;
  row-gap: 6px;
  padding-top:10px;
}

.r-label{
  font-size:12px;
  color: rgba(12,24,48,.62);
  text-align:right;
  padding-right:6px;
  white-space:nowrap;
}

.r-value{
  font-size:14px;
  color: rgba(12,24,48,.92);
  border-bottom:1px solid rgba(12,24,48,.08);
  padding:2px 0;
}

.notes-block{
  margin-top:18px;
}

.notes-value{
  margin-top:6px;
  padding:10px;
  border:1px solid rgba(12,24,48,.12);
  border-radius:10px;
  background: rgba(12,24,48,.03);
  font-size:14px;
  color: rgba(12,24,48,.90);
  min-height:72px;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 1100px){
  .grid{ grid-template-columns: 1fr; }
  .report-grid{
    grid-template-columns: 160px 1fr;
  }
  .r-label{
    text-align:left;
    padding-right:0;
    white-space:normal;
  }
}

/* ===== Step 27: Access-style form layout ===== */
.sc-form-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 26px;
  align-items:start;
}

/* Each row is label-left, field-right */
.sc-form-row{
  display:grid;
  grid-template-columns: 190px 1fr;
  gap: 10px;
  align-items:center;
  margin: 8px 0;
}

.sc-form-row label{
  text-align:right;
  font-weight:600;
  color: rgba(12,24,48,.80);
  white-space:nowrap;
}

.sc-form-row .sc-help{
  grid-column: 2 / 3;
  margin-top: 4px;
  font-size: 12px;
  color: rgba(12,24,48,.60);
}

.sc-input,
.sc-select{
  width:100%;
  height:36px;
  padding:0 10px;
  border-radius:10px;
  border:1px solid var(--border);
  background: #fff;
  color: rgba(12,24,48,.84);
  outline:none;
}

.sc-input:focus,
.sc-select:focus{
  border-color: var(--primaryborder);
  box-shadow: 0 0 0 3px rgba(43,126,255,.12);
}

.sc-actions{
  display:flex;
  gap: 10px;
  margin-top: 16px;
}

.sc-alert{
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 12px;
  margin: 0 0 12px 0;
  font-weight:600;
}
.sc-alert--ok{
  background: rgba(46, 204, 113, .10);
  border-color: rgba(46, 204, 113, .35);
}
.sc-alert--error{
  background: rgba(231, 76, 60, .10);
  border-color: rgba(231, 76, 60, .35);
}

/* Responsive: stack columns */
@media (max-width: 980px){
  .sc-form-grid{ grid-template-columns: 1fr; }
  .sc-form-row{ grid-template-columns: 160px 1fr; }
  .sc-form-row label{ white-space:normal; }
}

/* Semi-live foundation: authentication/admin/local simulation */
.simple-page{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:24px;
  background:var(--bg);
}
.simple-card{
  width:min(460px, 100%);
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:16px;
  padding:28px;
  box-shadow:0 12px 40px rgba(12,24,48,.08);
}
.simple-card--center{text-align:center;}
.simple-card h1,.admin-main h1,.form-card h1{margin:0 0 8px;}
.simple-logo{
  width:52px;height:52px;border-radius:14px;display:grid;place-items:center;
  margin:0 auto 18px;background:var(--accent);color:white;font-weight:800;
}
.muted{color:var(--muted);}
.stack-form{display:grid;gap:14px;margin-top:20px;}
.stack-form label{display:grid;gap:6px;font-weight:650;}
.check-row{display:flex!important;align-items:center;gap:9px;font-weight:500!important;}
.btn--primary{background:var(--accent);border-color:var(--accent);color:#fff;}
.btn--small{padding:6px 9px;font-size:12px;}
.button-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.topbar__module{font-size:12px;color:var(--accent);font-weight:700;}
.topbar__username{font-size:13px;color:var(--muted);}
.admin-page{min-height:100vh;background:var(--bg);}
.admin-topbar{
  min-height:60px;padding:10px 20px;background:var(--panel);border-bottom:1px solid var(--border);
  display:flex;align-items:center;justify-content:space-between;gap:12px;
}
.admin-brand{font-weight:800;color:var(--accent);text-decoration:none;}
.admin-topbar__right{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:13px;}
.admin-topbar__right form{margin:0;}
.admin-main{max-width:1180px;margin:0 auto;padding:24px;}
.section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px;}
.section-heading p{margin:4px 0 0;}
.school-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px;}
.school-card{display:block;background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:16px;text-decoration:none;color:var(--text);}
.school-card:hover{border-color:rgba(11,42,91,.35);}
.school-card__head{display:flex;align-items:center;justify-content:space-between;gap:10px;}
.school-card__meta,.school-card__module{margin-top:9px;color:var(--muted);font-size:13px;}
.status-pill{display:inline-block;padding:4px 9px;border-radius:999px;border:1px solid var(--border);font-size:12px;font-weight:700;}
.status-pill--ok{background:#edf9f0;color:#246b35;border-color:#bfe5c8;}
.status-pill--paused{background:#fff4e8;color:#8a4d12;border-color:#efd0ac;}
.summary-row{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 16px;}
.table-actions{text-align:right!important;}
.form-card{max-width:620px;background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:20px;}
@media (max-width:800px){
  .grid{grid-template-columns:1fr;}.right{display:none}.section-heading{flex-direction:column}.admin-main{padding:16px}
}

/* Unified Administration Management Centre — single-root local development */
.admin-mgmt-page{background:#f4f6fa;color:#10213d}.admin-mgmt-shell{min-height:100vh;display:grid;grid-template-columns:220px minmax(0,1fr)}.admin-mgmt-sidebar{background:#17345d;color:#fff;min-height:100vh;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.admin-mgmt-brand{display:flex;gap:10px;align-items:center;padding:18px 14px;color:#fff;text-decoration:none;border-bottom:1px solid rgba(255,255,255,.12)}.admin-mgmt-logo{width:38px;height:38px;border-radius:9px;background:#fff;color:#17345d;display:grid;place-items:center;font-weight:900}.admin-mgmt-brand strong,.admin-mgmt-brand small{display:block}.admin-mgmt-brand small{color:#c7d2e2;font-size:11px}.admin-mgmt-nav{display:flex;flex-direction:column;gap:4px;padding:14px 8px}.admin-mgmt-nav a,.admin-mgmt-nav-disabled{padding:10px;border-radius:8px;color:#e1e8f2;text-decoration:none;font-size:13px}.admin-mgmt-nav a:hover,.admin-mgmt-nav a.is-active{background:rgba(255,255,255,.13);color:#fff}.admin-mgmt-nav-heading{text-transform:uppercase;font-size:10px;letter-spacing:.08em;color:#8ea4c1;padding:15px 10px 5px}.admin-mgmt-nav-disabled{display:flex;justify-content:space-between;opacity:.5}.admin-mgmt-nav-disabled em{font-style:normal;font-size:9px;border:1px solid rgba(255,255,255,.3);padding:2px 5px;border-radius:999px}.admin-mgmt-sidefoot{margin-top:auto;padding:14px;border-top:1px solid rgba(255,255,255,.12);font-size:11px;color:#b8c7da}.admin-mgmt-sidefoot strong,.admin-mgmt-sidefoot span{display:block}.admin-mgmt-content{min-width:0}.admin-mgmt-topbar{height:58px;background:#fff;border-bottom:1px solid #dbe2eb;display:flex;align-items:center;justify-content:space-between;padding:0 22px}.admin-mgmt-env{font-size:10px;font-weight:800;background:#e7effb;color:#234d86;padding:5px 8px;border-radius:999px}.admin-mgmt-note{font-size:12px;color:#6a778b;margin-left:9px}.admin-mgmt-user{display:flex;align-items:center;gap:12px;font-size:12px}.admin-mgmt-user form{margin:0}.admin-mgmt-main{padding:25px;max-width:1500px;margin:auto}.mgmt-pagehead{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:18px}.mgmt-pagehead h1{font-size:29px;margin:2px 0 4px}.mgmt-pagehead p{margin:0;color:#6d798d}.mgmt-kicker{text-transform:uppercase;letter-spacing:.08em;font-weight:800;font-size:10px;color:#59749a}.mgmt-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:14px}.mgmt-metrics a{background:#fff;border:1px solid #dbe2eb;border-radius:11px;padding:15px;color:#10213d;text-decoration:none}.mgmt-metrics span{display:block;color:#6a778b;font-size:12px}.mgmt-metrics strong{display:block;font-size:27px;margin-top:5px}.mgmt-card{background:#fff;border:1px solid #dbe2eb;border-radius:11px;padding:16px;margin-bottom:14px}.mgmt-cardhead{display:flex;justify-content:space-between;gap:12px;margin-bottom:10px}.mgmt-cardhead h2{margin:0;font-size:18px}.mgmt-cardhead p{margin:3px 0;color:#788499;font-size:12px}.mgmt-project-row{display:grid;grid-template-columns:1.2fr 180px 1.3fr;gap:16px;padding:12px 0;border-top:1px solid #edf0f4;color:#10213d;text-decoration:none}.mgmt-project-row:first-of-type{border-top:0}.mgmt-project-row small,.mgmt-project-row span{display:block;color:#6d798d;font-size:11px}.mgmt-project-row strong{display:block;margin:2px 0}.mgmt-progress{height:8px;background:#e8edf3;border-radius:999px;overflow:hidden}.mgmt-progress span{display:block;height:100%;background:#3269ad}.mgmt-pill{display:inline-flex;border:1px solid #ccd5df;background:#f5f7fa;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:700}.mgmt-two{display:grid;grid-template-columns:1fr 1fr;gap:14px}.mgmt-line{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid #edf0f4}.mgmt-line:first-of-type{border-top:0}.mgmt-line strong,.mgmt-line small{display:block}.mgmt-line small{color:#768298}.mgmt-school-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.mgmt-school-card{display:flex;justify-content:space-between;gap:12px;background:#fff;border:1px solid #dbe2eb;border-radius:11px;padding:16px;color:#10213d;text-decoration:none}.mgmt-school-card strong,.mgmt-school-card span{display:block}.mgmt-school-card div span{font-size:12px;color:#6d798d;margin-top:4px}.mgmt-filters{display:grid;grid-template-columns:minmax(240px,2fr) repeat(3,minmax(140px,1fr)) auto auto;gap:8px;margin-bottom:12px}.mgmt-filters input,.mgmt-filters select,.mgmt-form input,.mgmt-form select,.mgmt-form textarea,.mgmt-inline textarea,.mgmt-action select{width:100%;box-sizing:border-box;border:1px solid #cbd4df;border-radius:7px;padding:9px;background:#fff}.mgmt-tablewrap{background:#fff;border:1px solid #dbe2eb;border-radius:11px;overflow:auto}.mgmt-tablewrap .table{margin:0}.mgmt-form{display:grid;grid-template-columns:1fr 1fr;gap:11px 16px;background:#fff;border:1px solid #dbe2eb;border-radius:11px;padding:18px;max-width:900px}.mgmt-form.onecol{display:block}.mgmt-form label{font-weight:700;font-size:12px}.mgmt-form label input,.mgmt-form label select,.mgmt-form label textarea{display:block;margin-top:5px;font-weight:400}.mgmt-form.onecol label{display:block;margin-bottom:10px}.mgmt-form .span2{grid-column:1/-1}.mgmt-dl{display:grid;grid-template-columns:130px 1fr;gap:10px;margin:0}.mgmt-dl dt{color:#768298}.mgmt-dl dd{margin:0}.mgmt-inline{display:flex;gap:8px;align-items:flex-end}.mgmt-inline textarea{flex:1}.mgmt-update{border-left:3px solid #d8e3f0;padding:4px 0 12px 12px;margin:12px 0}.mgmt-update strong,.mgmt-update small{display:block}.mgmt-update small{color:#7a879a}.mgmt-update p{white-space:pre-wrap}.mgmt-action{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #edf0f4;padding:10px 0}.mgmt-action small,.mgmt-action strong,.mgmt-action span{display:block}.mgmt-action span{font-size:11px;color:#768298}.audit-filters{grid-template-columns:minmax(260px,2fr) 180px 180px 130px auto auto}.mgmt-audit-summary{font-size:12px;color:#6d798d;margin:8px 0}.mgmt-tablewrap pre{white-space:pre-wrap;max-width:500px}.mgmt-pager{display:flex;justify-content:center;align-items:center;gap:10px;margin-top:12px}.admin-login-dev{background:#edf4fe;border:1px solid #c9d9ef;border-radius:8px;padding:9px 11px;margin:12px 0;font-size:12px}.admin-login-dev strong,.admin-login-dev span{display:block}.admin-login-dev span{color:#5f7088;margin-top:2px}
@media(max-width:1000px){.admin-mgmt-shell{grid-template-columns:190px 1fr}.mgmt-metrics{grid-template-columns:1fr 1fr}.mgmt-two,.mgmt-school-grid{grid-template-columns:1fr}.mgmt-project-row{grid-template-columns:1fr}.mgmt-filters,.audit-filters{grid-template-columns:1fr 1fr}}@media(max-width:700px){.admin-mgmt-shell{display:block}.admin-mgmt-sidebar{position:static;height:auto;min-height:0}.admin-mgmt-nav-disabled,.admin-mgmt-nav-heading,.admin-mgmt-sidefoot{display:none}.admin-mgmt-main{padding:15px}.mgmt-pagehead{display:block}.mgmt-pagehead .btn{margin-top:10px}.mgmt-metrics{grid-template-columns:1fr 1fr}.mgmt-form,.mgmt-filters,.audit-filters{display:block}.mgmt-form>* ,.mgmt-filters>* ,.audit-filters>*{margin-bottom:8px}}

/* Administration Phase 1 Step 2 — Documents, Storage Locations & Handovers */
.admin-mgmt-nav .step2-nav-link{display:block}.mgmt-tabs{display:flex;gap:4px;border-bottom:1px solid #dbe2eb;margin:0 0 14px}.mgmt-tabs a{padding:9px 12px;text-decoration:none;color:#53647d;font-size:12px}.mgmt-tabs a.is-active{border-bottom:3px solid #174a8b;color:#153d70;font-weight:800}.button-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.button-row form{margin:0}.docs-filters{grid-template-columns:minmax(260px,2fr) 190px 150px 220px 90px auto auto}.storage-filters{grid-template-columns:minmax(260px,2fr) 190px 230px 150px 90px auto auto}.document-form small,.storage-form small{display:block;color:#768298;margin-top:4px;font-weight:400}.document-preview{max-height:560px;overflow:auto;background:#f7f9fb;border:1px solid #dce2eb;border-radius:8px;padding:14px;white-space:pre-wrap;word-break:break-word}.path-text{max-width:520px;word-break:break-word}.hash-text{font-size:10px;word-break:break-all}.conflict-pill{background:#fff0f0;border-color:#e2a2a2;color:#8e2020}.form-actions{display:flex;gap:8px}.mgmt-inline select,.mgmt-inline input{min-height:38px;border:1px solid #cbd4df;border-radius:7px;padding:8px;background:#fff}.text-action{background:none;border:0;color:#174a8b;text-decoration:underline;cursor:pointer;padding:0}
@media(max-width:1000px){.docs-filters,.storage-filters{grid-template-columns:1fr 1fr}}@media(max-width:700px){.mgmt-tabs{overflow:auto}.docs-filters,.storage-filters{display:block}.button-row{margin-top:10px}}

/* Administration Phase 1 Step 3 — Intake, Reconciliation & List Standards */

/* Binding design rule: list/table/section first. Cards are not the default Admin pattern. */
.admin-mgmt-page .mgmt-card,
.admin-mgmt-page .card,
.admin-mgmt-page .form-card{
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
  padding:16px 0;
  margin:0;
  border-top:1px solid #dbe2eb;
}
.mgmt-section{padding:16px 0;border-top:1px solid #dbe2eb;margin:0}
.mgmt-section:first-of-type{border-top:0}
.mgmt-sectionhead{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:10px}
.mgmt-sectionhead h2{margin:0;font-size:18px}
.mgmt-sectionhead p{margin:3px 0;color:#788499;font-size:12px}
.mgmt-list-summary{font-size:12px;color:#6d798d;margin:8px 0}
.mgmt-attention-list{border-top:1px solid #dbe2eb}
.mgmt-attention-list a{display:flex;justify-content:space-between;gap:16px;padding:10px 0;border-bottom:1px solid #edf0f4;color:#10213d;text-decoration:none}
.mgmt-attention-list a:hover strong{text-decoration:underline}
.mgmt-attention-list span{color:#6d798d}
.mgmt-details{border-top:1px solid #dbe2eb;padding:10px 0}
.mgmt-details summary{cursor:pointer;font-weight:700;color:#10213d}
.mgmt-details[open] summary{margin-bottom:12px}
.intake-checks select,.intake-checks input{width:100%;box-sizing:border-box;border:1px solid #cbd4df;border-radius:7px;padding:8px;background:#fff}
.intake-state-form{margin-top:12px}
.intake-state-form label{display:flex;gap:8px;align-items:center;font-weight:700}
.intake-state-form select{border:1px solid #cbd4df;border-radius:7px;padding:8px;background:#fff}
.school-filters{grid-template-columns:minmax(260px,2fr) 180px 140px auto auto}
.project-filters{grid-template-columns:minmax(220px,1.6fr) repeat(4,minmax(125px,1fr)) 135px 135px auto auto}
.action-filters{grid-template-columns:minmax(220px,1.6fr) repeat(5,minmax(125px,1fr)) 135px auto auto}
.admin-mgmt-page .mgmt-tablewrap{border-radius:0}
.admin-mgmt-page .mgmt-form{border-radius:0;background:transparent;border:0;border-top:1px solid #dbe2eb;padding:14px 0}
.admin-mgmt-page .mgmt-metrics{display:none}
@media(max-width:1150px){
  .project-filters,.action-filters,.school-filters{grid-template-columns:1fr 1fr}
}
@media(max-width:700px){
  .project-filters,.action-filters,.school-filters{display:block}
  .mgmt-sectionhead{display:block}
  .mgmt-attention-list a{display:block}
  .intake-state-form{display:block}
}

/* Schools & CRM — list/table-first foundation */
.crm-subnav{display:flex;gap:4px;flex-wrap:wrap;border-bottom:1px solid #d8e0ea;margin:0 0 18px;padding:0}.crm-subnav a,.crm-subnav span{display:inline-block;padding:9px 12px;text-decoration:none;color:#52647c;border-bottom:3px solid transparent}.crm-subnav a.is-active{color:#173d70;border-bottom-color:#2d64a8;font-weight:800}.crm-subnav .is-disabled{opacity:.5}.crm-form{max-width:1050px}.crm-form-section{padding:0 0 22px;margin:0 0 22px;border-bottom:1px solid #dfe5ed}.crm-form-section h2{font-size:18px;margin:0 0 12px}.crm-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px}.crm-form-grid label,.crm-form>label{font-size:12px;font-weight:700}.crm-form input,.crm-form select,.crm-form textarea,.crm-inline-form select{display:block;width:100%;margin-top:5px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;padding:9px 10px;font:inherit;color:#17263e}.crm-form small{display:block;color:#738096;font-weight:400;margin-top:4px}.crm-form-grid .span-2{grid-column:1/-1}.required{font-size:10px;text-transform:uppercase;color:#7d4b00;margin-left:4px}.crm-check-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px}.crm-check-list label{font-weight:400}.crm-definition{display:grid;grid-template-columns:190px minmax(0,1fr);gap:9px 18px;margin:0}.crm-definition dt{color:#6b788d;font-size:12px}.crm-definition dd{margin:0;min-width:0}.pre-wrap{white-space:pre-wrap}.crm-inline-form{display:flex;align-items:end;gap:10px;margin-top:14px;padding-top:14px;border-top:1px solid #e1e6ed}.crm-inline-form label{min-width:220px;font-size:12px;font-weight:700}.crm-filters{grid-template-columns:minmax(220px,2fr) repeat(3,minmax(150px,1fr)) auto auto}.table .path-text{max-width:430px;overflow-wrap:anywhere}.check-row{display:flex!important;gap:8px;align-items:center}.check-row input{width:auto!important;margin:0!important}@media(max-width:850px){.crm-form-grid,.crm-check-list{grid-template-columns:1fr}.crm-form-grid .span-2{grid-column:auto}.crm-definition{grid-template-columns:1fr}.crm-inline-form{display:block}.crm-inline-form label,.crm-inline-form .btn{display:block;width:100%;margin-bottom:9px}.crm-filters{display:block}.crm-filters>*{margin-bottom:7px;width:100%}}

/* Schools & CRM Step 2 — action workflow and navigation */
.action-link-row{display:flex;gap:18px;flex-wrap:wrap;margin-bottom:16px}.action-comments article{border-top:1px solid #d9e0ea;padding:12px 0}.action-comments article:first-child{border-top:0}.action-comments article div{display:flex;justify-content:space-between;gap:12px}.action-comments article div span{color:#68758a;font-size:12px}.action-comments article p{margin:6px 0 0}.action-manage-form{align-items:end}

/* B2 Users & Access — compact permission management */
.btn--danger { border-color: #a53030; color: #8e2020; background: #fff; }
.btn--danger:hover { background: #fff3f3; }
.permission-check { display: inline-flex; align-items: center; gap: .35rem; margin: 0; }
.permission-check input { width: auto; margin: 0; }
.permission-check + small { display: block; margin-top: .15rem; }

.permission-group-row th{padding-top:12px;padding-bottom:5px;font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:#667085;background:transparent;border-bottom:1px solid #d8dde6;}

/* B2/B3 password-reset test enablement */
.login-help{margin:12px 0 0;text-align:center;font-size:13px}.login-help a{color:#174a8b}.simple-card h2{margin:8px 0 10px;font-size:20px}.sc-alert ul{margin:0;padding-left:20px}.mgmt-form h2{margin:0 0 4px}.mgmt-form .permission-check{font-weight:400}.mgmt-form .permission-check input{display:inline-block;margin:0;width:auto}
/* SC-BLOCK4-ADMIN-MOBILE — 2026-10-13
   Responsive Administration shell. Desktop behaviour remains unchanged. */
.admin-mgmt-menu-toggle,
.admin-mgmt-nav-backdrop{
  display:none;
}

@media (max-width:700px){
  .admin-mgmt-shell{
    display:block;
    min-height:100vh;
  }

  .admin-mgmt-sidebar{
    position:fixed;
    inset:0 auto 0 0;
    width:min(84vw,300px);
    height:100dvh;
    min-height:0;
    overflow-y:auto;
    z-index:1002;
    transform:translateX(-102%);
    transition:transform .18s ease;
    box-shadow:8px 0 24px rgba(7,23,45,.22);
  }

  .sc-admin-nav-open .admin-mgmt-sidebar{
    transform:translateX(0);
  }

  .admin-mgmt-nav-heading,
  .admin-mgmt-sidefoot{
    display:block;
  }

  .admin-mgmt-nav-backdrop{
    position:fixed;
    inset:0;
    z-index:1001;
    width:100%;
    height:100%;
    border:0;
    border-radius:0;
    padding:0;
    background:rgba(7,23,45,.42);
    cursor:pointer;
  }

  .sc-admin-nav-open .admin-mgmt-nav-backdrop{
    display:block;
  }

  .sc-admin-nav-open{
    overflow:hidden;
  }

  .admin-mgmt-content{
    min-width:0;
    width:100%;
  }

  .admin-mgmt-topbar{
    min-height:58px;
    height:auto;
    padding:8px 12px;
    gap:8px;
    flex-wrap:wrap;
    position:sticky;
    top:0;
    z-index:900;
  }

  .admin-mgmt-menu-toggle{
    display:inline-flex;
    align-items:center;
    gap:6px;
    flex:0 0 auto;
  }

  .admin-mgmt-topbar > div:first-of-type{
    min-width:0;
    flex:1 1 180px;
  }

  .admin-mgmt-note{
    display:none;
  }

  .admin-mgmt-user{
    flex:0 1 auto;
    min-width:0;
    gap:8px;
  }

  .admin-mgmt-user > span{
    max-width:38vw;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .admin-mgmt-main{
    padding:12px;
    max-width:none;
  }

  .mgmt-pagehead{
    margin-bottom:14px;
  }
}

@media (prefers-reduced-motion:reduce){
  .admin-mgmt-sidebar{
    transition:none;
  }
}
/* SC-BLOCK6-ADMIN-CONSISTENCY - 2026-10-13
   Compact Administration controls and consistent action treatment. */
.admin-mgmt-context{font-size:12px;font-weight:700;color:#6a778b}
.admin-mgmt-page .btn{min-height:var(--sc-ui-control-height);height:var(--sc-ui-control-height);padding:0 10px;border-radius:5px;line-height:1.15}
.admin-mgmt-page .btn--small{min-height:30px;height:30px;padding:0 8px}
.admin-mgmt-page .mgmt-form input,
.admin-mgmt-page .mgmt-form select,
.admin-mgmt-page .mgmt-form textarea,
.admin-mgmt-page .mgmt-filters input,
.admin-mgmt-page .mgmt-filters select,
.admin-mgmt-page .crm-form input,
.admin-mgmt-page .crm-form select,
.admin-mgmt-page .crm-form textarea,
.admin-mgmt-page .crm-inline-form select,
.admin-mgmt-page .mgmt-action select{border-radius:4px;padding:7px 8px}
.admin-mgmt-page .mgmt-card,
.admin-mgmt-page .mgmt-tablewrap,
.admin-mgmt-page .mgmt-metrics a,
.admin-mgmt-page .mgmt-school-card{border-radius:6px}
.admin-mgmt-page .mgmt-sectionhead > a:not(.btn),
.admin-mgmt-page .mgmt-cardhead > a:not(.btn),
.admin-mgmt-page .mgmt-tablewrap .table td:last-child > a:not(.btn),
.admin-mgmt-page .mgmt-tablewrap .table td.table-actions > a:not(.btn){min-height:30px;padding:4px 9px;border:1px solid var(--btnborder);border-radius:5px;background:var(--btnbg);color:rgba(12,24,48,.84);text-decoration:none;display:inline-flex;align-items:center;justify-content:center;line-height:1.15;white-space:nowrap}
.admin-mgmt-page .mgmt-sectionhead > a:not(.btn):hover,
.admin-mgmt-page .mgmt-cardhead > a:not(.btn):hover,
.admin-mgmt-page .mgmt-tablewrap .table td:last-child > a:not(.btn):hover,
.admin-mgmt-page .mgmt-tablewrap .table td.table-actions > a:not(.btn):hover{background:var(--btnhover)}
.admin-mgmt-page .form-actions--top{margin-bottom:4px}

/* FINAL UI HEALTH ADMIN SHELL */
.admin-mgmt-sidebar{overflow-y:auto}
.mgmt-pagehead h1{font-size:27px}

.release-inline-form{display:inline}
.release-status-form{margin-top:.75rem}
.release-col-project{width:22%}
.release-col-compact{width:12%}
.release-change-summary{width:100%;min-width:18rem;box-sizing:border-box}
.release-add-item-form{margin-top:1rem}
@media(max-width:700px){.release-change-summary{min-width:0}.release-col-project,.release-col-compact{width:auto}}
