@charset "UTF-8";
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/plus-jakarta-sans.woff") format("woff");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --primary: #008a09;
  --primary-hover: #007607;
  --primary-soft: #eaf8ef;
  --accent: #03ac0e;
  --theme-hover: #f4faf6;
  --theme-surface: #fafcfb;
  --theme-border: #dcefe2;
  --theme-border-strong: #a8cdb4;
  --focus-ring: rgb(0 138 9 / 12%);
  --hero-start: #008a09;
  --hero-end: #03ac0e;
  --hero-muted: #d0f5d9;
  --hero-text: #e0f8e6;
  --green: #008a09;
  --blue: var(--primary);
  --blue-dark: var(--primary-hover);
  --text: #212121;
  --ink: var(--text);
  --muted: #6d7580;
  --border: #e8e9eb;
  --line: var(--border);
  --surface: #fff;
  --background: #f6f7f8;
  --orange: #bf6a13;
  --shadow: 0 2px 12px rgb(29 40 36 / 4%);
  --sidebar-width: 244px;
  --header-height: 72px;
  --bottom-height: 66px;
}
/* The server selects the palette from the signed-in account, on every page. */
body[data-cbt-theme] {
  --blue: var(--primary);
  --blue-dark: var(--primary-hover);
}
body[data-cbt-theme="smp"] {
  --primary: #2164e8;
  --primary-hover: #174db5;
  --primary-soft: #edf3ff;
  --accent: #3f7df1;
  --theme-hover: #f5f8ff;
  --theme-surface: #fafbff;
  --theme-border: #d9e5fa;
  --theme-border-strong: #abc3ee;
  --focus-ring: rgb(33 100 232 / 12%);
  --hero-start: #1e59cf;
  --hero-end: #3f7df1;
  --hero-muted: #cfdeff;
  --hero-text: #e8f0ff;
}
body[data-cbt-theme="ma"] {
  --primary: #b85c0a;
  --primary-hover: #974904;
  --primary-soft: #fff2e7;
  --accent: #ef7b22;
  --theme-hover: #fff8f2;
  --theme-surface: #fffcf9;
  --theme-border: #f2dac6;
  --theme-border-strong: #e6bc97;
  --focus-ring: rgb(184 92 10 / 12%);
  --hero-start: #b85c0a;
  --hero-end: #ef7b22;
  --hero-muted: #ffe2c9;
  --hero-text: #fff2e8;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 90px; }
body { margin: 0; color: var(--text); font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; }
button:disabled { cursor: wait; opacity: .65; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 750; line-height: 1.35; }
input, select, textarea { width: 100%; max-width: 100%; min-width: 0; min-height: 46px; padding: 11px 13px; color: var(--text); background: #fff; border: 1px solid #cbd0d5; border-radius: 8px; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: #969ca3; opacity: 1; }
input:focus, select:focus, textarea:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
input[readonly] { color: var(--muted); background: #f6f7f8; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); }
textarea { resize: vertical; line-height: 1.7; }
select { cursor: pointer; }
button, input, select, textarea { scroll-margin-top: 92px; scroll-margin-bottom: 90px; }
a:focus-visible, button:focus-visible, .table-scroll:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.icon { flex-shrink: 0; width: 21px; height: 21px; }
.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; }
.skip-link { position: fixed; top: -100px; left: 12px; z-index: 100; padding: 10px 16px; background: #fff; border: 2px solid var(--primary); border-radius: 8px; }
.skip-link:focus { top: 12px; }

/* Brand and shared controls */
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 8px); grid-template-rows: repeat(2, 8px); gap: 3px; place-content: center; flex: 0 0 auto; width: 38px; height: 38px; background: var(--accent); border-radius: 10px; }
.brand-mark span { background: #fff; border-radius: 2px; }
.brand-mark span:last-child { opacity: .6; }
.brand-copy { display: flex; flex-direction: column; min-width: 0; }
.brand-copy strong { color: var(--primary); font-size: 21px; font-weight: 800; letter-spacing: -.8px; line-height: 1.3; }
.brand-copy small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--primary); font-size: 10px; font-weight: 750; letter-spacing: 1px; }
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 10px 17px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 750; text-align: center; line-height: 1.5; transition: background .15s, border-color .15s; }
.button-primary { color: #fff; background: var(--primary); box-shadow: none; }
.button-primary:hover { background: var(--primary-hover); }
.button-secondary { color: #434a50; background: #fff; border-color: #d3d7db; }
.button-secondary:hover { background: var(--theme-hover); border-color: var(--theme-border-strong); }
.button-light { color: var(--primary); background: #fff; border-color: #fff; }
.button-light:hover { background: var(--primary-soft); }
.button-danger-soft { color: #b62933; background: #fff6f6; border-color: #f3d4d7; }
.button-danger-soft:hover { background: #ffeded; }
.button-small { min-height: 36px; padding: 7px 12px; border-radius: 7px; font-size: 12px; white-space: nowrap; }
.button .icon { width: 17px; height: 17px; }
.button.is-loading { opacity: .65; }
.disabled { opacity: .4; pointer-events: none; }
.text-link { display: inline-flex; align-items: center; gap: 7px; color: var(--primary); font-size: 13px; font-weight: 700; }
.text-link:hover { text-decoration: underline; }
.text-link .icon { width: 16px; height: 16px; }
.field { min-width: 0; margin-bottom: 20px; }
.field label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 650; }
.field-help { color: var(--muted); font-size: 12px; line-height: 1.7; margin-top: 6px; }
.field-help .text-link { font-size: inherit; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 54px; }
.password-toggle { display: grid; place-items: center; position: absolute; right: 2px; top: 2px; bottom: 2px; width: 42px; border-radius: 6px; color: #7a818a; background: transparent; }
.password-toggle:hover, .password-toggle[aria-pressed="true"] { color: var(--primary); background: var(--primary-soft); }
.notice { padding: 13px 16px; border: 1px solid; border-radius: 8px; font-size: 13px; margin-bottom: 20px; overflow-wrap: anywhere; }
.notice-error { color: #aa2833; background: #fff4f4; border-color: #f3d2d5; }
.notice-success { color: #08713b; background: #eefaf2; border-color: #bfe6cc; }
.notice ul { margin: 8px 0 0; padding-left: 20px; }
.unit-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-block; border-radius: 5px; padding: 4px 8px; font-size: 11px; font-weight: 750; line-height: 1.4; }
.pill-green { color: #087942; background: #e8f7ee; }
.pill-blue { color: #2457ad; background: #edf2ff; }
.pill-orange { color: #a56013; background: #fff2df; }
.unit-green { --unit-color: #008a09; --unit-soft: #e8f7ee; --unit-border: #cae9d6; }
.unit-blue { --unit-color: #346fc6; --unit-soft: #edf2ff; --unit-border: #d5e2fb; }
.unit-orange { --unit-color: #bf6a13; --unit-soft: #fff2df; --unit-border: #f3dfbd; }
.unit-symbol { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 10px; color: var(--unit-color); background: var(--unit-soft); font-size: 15px; font-weight: 800; }

/* Login */
.login-body { background: #fff; }
.login-shell { display: flex; flex-direction: column; align-items: center; min-height: 100vh; min-height: 100svh; padding: 32px 24px 22px; }
.login-brand { margin-bottom: 24px; }
.login-brand .brand-mark { width: 40px; height: 40px; }
.login-brand .brand-copy strong { font-size: 26px; }
.login-brand .brand-copy small { font-size: 11px; }
.login-stage { display: grid; grid-template-columns: minmax(0, 430px) minmax(0, 380px); gap: 80px; align-items: center; width: 100%; max-width: 890px; margin: auto 0; padding: 28px 0 44px; }
.login-art { padding: 24px 8px; }
.art-kicker { color: var(--primary); font-size: 10px; font-weight: 750; letter-spacing: 1.4px; }
.login-art h2 { font-size: 34px; font-weight: 800; letter-spacing: -1px; margin: 14px 0 16px; }
.login-art > p { color: var(--muted); font-size: 14px; line-height: 1.8; }
.art-units { position: relative; display: grid; gap: 12px; margin-top: 28px; padding: 18px 8px 18px 0; }
.art-units::before { content: ""; position: absolute; inset: 0 -12px 0 20px; background: #effaf3; border-radius: 24px; }
.art-unit { position: relative; display: flex; align-items: center; gap: 13px; padding: 14px 16px; background: #fff; border: 1px solid #e0ece4; border-radius: 12px; box-shadow: 0 5px 18px rgb(26 85 49 / 5%); }
.art-unit:nth-child(2) { margin-left: 18px; }
.art-unit:nth-child(3) { margin-left: 8px; }
.art-unit > div { min-width: 0; }
.art-unit strong { display: block; font-size: 13px; font-weight: 750; }
.art-unit small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.art-unit-dot { flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--unit-color); margin-left: auto; }
.art-footer { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); margin-top: 24px; }
.art-footer .icon { width: 16px; height: 16px; color: var(--primary); }
.login-main { min-width: 0; }
.login-content { padding: 28px; border: 1px solid #e7e9e8; border-radius: 12px; background: #fff; box-shadow: 0 4px 28px rgb(21 50 31 / 7%); }
.login-school-chip { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-size: 9px; font-weight: 750; letter-spacing: .7px; }
.login-school-chip .icon { width: 14px; height: 14px; }
.login-content h1 { font-size: 22px; letter-spacing: -.7px; margin: 12px 0 9px; }
.login-lead { color: var(--muted); font-size: 12px; line-height: 1.8; margin-bottom: 26px; }
.login-form .field { margin-bottom: 19px; }
.login-submit { width: 100%; justify-content: center; min-height: 46px; margin-top: 3px; }
.login-caption { margin-top: 19px; color: var(--muted); text-align: center; font-size: 11px; }
.login-help { border-top: 1px solid var(--border); margin-top: 21px; padding-top: 17px; color: var(--muted); font-size: 10px; text-align: center; line-height: 1.8; }
.login-footer { max-width: 780px; color: var(--muted); text-align: center; font-size: 10px; line-height: 1.8; }

/* Desktop navigation */
.admin-body { background: var(--background); }
.admin-shell { min-height: 100vh; min-height: 100svh; }
.sidebar { display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 30; width: var(--sidebar-width); padding: 26px 18px 20px; background: #fff; border-right: 1px solid var(--border); overflow-y: auto; overscroll-behavior: contain; }
.sidebar-brand-row { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 8px; }
.sidebar .brand-copy strong { font-size: 20px; }
.sidebar .brand-copy small { font-size: 10px; }
.sidebar-close { display: none; width: 42px; height: 42px; border-radius: 8px; color: var(--muted); background: transparent; font-size: 28px; }
.sidebar-label { font-size: 10px; font-weight: 700; color: #8a9097; letter-spacing: 1px; margin: 30px 12px 12px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 45px; padding: 10px 12px; border-radius: 8px; color: #68717a; font-size: 12px; font-weight: 550; }
.nav-item .icon { width: 19px; height: 19px; }
.nav-item:hover { color: var(--primary); background: var(--theme-hover); }
.nav-item.active { color: var(--primary); background: var(--primary-soft); font-weight: 750; }
.sidebar-school { flex-shrink: 0; margin-top: 26px; padding: 15px; border: 1px solid var(--theme-border); border-radius: 10px; background: var(--theme-surface); }
.sidebar-school-label { display: block; color: #858e86; font-size: 9px; font-weight: 700; letter-spacing: .7px; }
.sidebar-school strong { display: block; font-size: 12px; margin: 7px 0 11px; }
.sidebar-bottom { flex-shrink: 0; margin-top: auto; padding-top: 26px; }
.sidebar-profile { display: flex; align-items: center; gap: 10px; min-width: 0; border-bottom: 1px solid var(--border); padding: 0 5px 15px; }
.avatar { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 750; }
.sidebar-profile > div { min-width: 0; }
.sidebar-profile strong { display: block; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-profile small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.logout-button { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 8px; padding: 9px; color: var(--muted); background: transparent; font-size: 11px; }
.logout-button:hover { color: #b62933; }
.logout-button .icon { width: 17px; height: 17px; }
.admin-workspace { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; min-height: 100svh; margin-left: var(--sidebar-width); }
.topbar { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 40; height: var(--header-height); padding: 0 30px; gap: 18px; background: #fff; border-bottom: 1px solid var(--border); }
.topbar-leading, .topbar-account { display: flex; align-items: center; gap: 16px; min-width: 0; }
.topbar-title { color: #4a525a; font-size: 13px; font-weight: 650; }
.topbar-profile { display: flex; align-items: center; gap: 9px; min-width: 0; }
.topbar-user-name { max-width: 160px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; font-weight: 650; }
.access-badge { display: flex; align-items: center; gap: 6px; flex-shrink: 0; padding: 5px 9px; border: 1px solid var(--theme-border); border-radius: 6px; background: var(--theme-hover); color: var(--primary); font-size: 10px; }
.access-badge .icon { width: 13px; height: 13px; }
.menu-toggle, .topbar-mobile-brand, .mobile-nav { display: none; }
.menu-backdrop { position: fixed; inset: 0; z-index: 60; background: rgb(18 34 27 / 40%); }
.page-content { width: 100%; max-width: 1390px; margin: 0 auto; padding: 30px; }
.page-content:focus { outline: none; }
.page-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin-bottom: 23px; }
.page-heading > div { min-width: 0; flex: 1 1 240px; }
.page-heading h1 { font-size: 24px; letter-spacing: -.8px; margin: 6px 0 8px; overflow-wrap: anywhere; }
.page-heading p { color: var(--muted); font-size: 12px; line-height: 1.75; }
.date-chip { display: flex; align-items: center; gap: 6px; flex-shrink: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; color: var(--muted); background: #fff; font-size: 10px; }
.date-chip .icon { width: 14px; height: 14px; }
.page-footer { display: flex; justify-content: space-between; gap: 16px; padding: 17px 30px; margin-top: auto; border-top: 1px solid var(--border); color: #828990; font-size: 10px; }
.page-footer > span:last-child { max-width: 65%; text-align: right; }

/* Dashboard */
.dashboard-hero { display: flex; align-items: center; justify-content: space-between; position: relative; overflow: hidden; gap: 24px; padding: 30px; border-radius: 14px; color: #fff; background: linear-gradient(105deg, var(--hero-start) 0%, var(--hero-end) 100%); }
.hero-kicker { font-size: 9px; font-weight: 750; letter-spacing: 1.6px; color: var(--hero-muted); }
.dashboard-hero h2 { font-size: 32px; font-weight: 800; letter-spacing: -1px; margin: 7px 0; }
.dashboard-hero p { max-width: 420px; font-size: 12px; line-height: 1.8; color: var(--hero-text); }
.dashboard-hero .button { min-height: 38px; padding: 8px 14px; margin-top: 18px; font-size: 11px; }
.hero-emblem { display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; width: 130px; height: 130px; border-radius: 50%; border: 1px solid #ffffff40; margin: 0 22px; background: #ffffff10; box-shadow: 0 0 0 22px #ffffff08, 0 0 0 44px #ffffff05; }
.hero-emblem span { font-size: 39px; font-weight: 800; letter-spacing: -3px; }
.hero-emblem small { text-align: center; line-height: 1.8; font-size: 8px; letter-spacing: 1px; color: var(--hero-muted); }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 20px 0 28px; }
.metric { display: flex; flex-direction: column; position: relative; min-width: 0; padding: 21px; border: 1px solid var(--border); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.metric-icon { display: grid; place-items: center; position: absolute; top: 19px; right: 19px; width: 35px; height: 35px; border-radius: 9px; }
.metric-icon .icon { width: 18px; height: 18px; }
.metric-blue { color: var(--primary); background: var(--primary-soft); }
.metric-indigo { color: #5275bc; background: #eff3fc; }
.metric-orange { color: #bf6a13; background: #fff4e5; }
.metric-label { padding-right: 30px; color: var(--muted); font-size: 11px; margin-bottom: 8px; }
.metric > strong { font-size: 28px; line-height: 1.4; letter-spacing: -.7px; font-weight: 800; overflow-wrap: anywhere; }
.metric > small { color: #8a9299; font-size: 10px; margin-top: 5px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 13px; margin-bottom: 19px; }
.section-heading h2 { font-size: 17px; letter-spacing: -.3px; }
.section-heading p { color: var(--muted); font-size: 12px; margin-top: 4px; }
.subtle-badge { font-size: 8px; font-weight: 650; letter-spacing: .7px; color: #7a8289; background: #ebeeec; padding: 6px 9px; border-radius: 5px; }
.unit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.unit-card { min-width: 0; padding: 21px 20px 15px; border: 1px solid var(--border); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.unit-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.unit-card-top > .icon { width: 25px; height: 25px; color: var(--unit-color); opacity: .4; }
.unit-card h3 { font-size: 14px; letter-spacing: -.2px; }
.unit-card p { font-size: 10px; color: var(--muted); margin-top: 6px; }
.unit-card-footer { display: flex; align-items: center; gap: 6px; margin-top: 17px; padding-top: 13px; border-top: 1px solid var(--border); color: var(--muted); font-size: 10px; }
.unit-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--unit-color); }
.unit-card-links { gap: 17px; }
.unit-card-links a { display: flex; align-items: center; min-height: 30px; color: var(--unit-color); font-size: 11px; font-weight: 750; }
.unit-card-links a:hover { text-decoration: underline; }
.account-summary { display: flex; align-items: center; gap: 14px; padding: 19px 21px; margin-top: 24px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.summary-icon { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); }
.summary-icon .icon { width: 19px; height: 19px; }
.account-summary > div:nth-child(2) { min-width: 0; }
.account-summary h2 { font-size: 12px; }
.account-summary p { color: var(--muted); font-size: 11px; margin-top: 3px; overflow-wrap: anywhere; }
.last-login { display: flex; flex-direction: column; flex-shrink: 0; margin-left: auto; padding-left: 16px; font-size: 10px; }
.last-login span { color: #8b9198; }
.last-login strong { margin-top: 4px; font-weight: 550; color: #626e67; }
.account-summary .text-link { flex-shrink: 0; margin-left: 10px; font-size: 11px; }

/* Forms and account cards */
.panel, .profile-card { min-width: 0; padding: 25px; border: 1px solid var(--border); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.account-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; align-items: start; }
.profile-card { padding: 26px 20px; text-align: center; }
.large-avatar { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px; color: var(--primary); background: var(--primary-soft); font-size: 26px; font-weight: 750; }
.profile-card h2 { font-size: 17px; overflow-wrap: anywhere; }
.profile-card p { margin-top: 6px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.profile-role { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 5px 8px; border-radius: 6px; color: var(--primary); background: var(--theme-hover); font-size: 10px; }
.profile-role .icon { width: 13px; height: 13px; }
.profile-card .unit-pills { justify-content: center; margin-top: 14px; }
.form-divider { height: 1px; background: var(--border); margin: 26px 0; }
.form-section-title { font-size: 16px; margin-bottom: 6px; }
.form-description { margin-bottom: 23px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 26px; }
.management-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; align-items: start; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.field-wide, .field-full { grid-column: 1 / -1; }
.form-side { padding: 22px; }
.form-side h2, .member-panel h2 { margin: 12px 0 10px; font-size: 17px; }
.form-side p, .member-panel p { color: var(--muted); font-size: 12px; line-height: 1.8; }
.side-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; color: var(--primary); background: var(--primary-soft); }
.info-list { display: grid; grid-template-columns: minmax(0, 110px) minmax(0, 1fr); gap: 13px 16px; margin: 20px 0 0; font-size: 12px; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.narrow-panel { max-width: 700px; }
.credential-details { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 13px; font-size: 13px; margin: 5px 0 25px; }
.credential-details dt { color: var(--muted); }
.credential-details dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.management-form textarea { min-height: 170px; background: #fafcfb; }
.member-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 22px; }
.member-panel .info-list { grid-template-columns: minmax(0, 130px) minmax(0, 1fr); }

/* Data tables: only the table region scrolls horizontally. */
.data-panel { padding: 0; overflow: hidden; }
.data-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 23px 24px 0; }
.data-heading h2 { font-size: 17px; letter-spacing: -.3px; }
.data-heading p { color: var(--muted); font-size: 12px; margin-top: 5px; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 22px 24px; }
.filter-bar > div { flex: 0 1 145px; min-width: 130px; }
.filter-bar .filter-search { flex: 1 1 220px; }
.filter-bar .filter-class { flex: 1 1 190px; }
.filter-bar input, .filter-bar select { min-height: 42px; padding: 10px 12px; font-size: 12px; }
.filter-bar .button { min-height: 42px; font-size: 12px; }
.filter-reset { display: flex; align-items: center; min-height: 40px; padding: 8px; color: var(--muted); font-size: 12px; }
.filter-reset:hover { color: var(--primary); }
.table-scroll { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; font-size: 12px; }
.data-table th { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 14px 21px; background: #f8faf9; color: #66736a; font-size: 10px; font-weight: 750; }
.data-table td { border-bottom: 1px solid #eef0ef; padding: 16px 21px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfdfc; }
.data-table strong { display: block; min-width: 115px; max-width: 250px; white-space: normal; overflow-wrap: anywhere; font-weight: 700; }
.cell-secondary { display: block; max-width: 235px; margin-top: 4px; color: var(--muted); font-size: 10px; white-space: normal; overflow-wrap: anywhere; }
.username-text { display: inline-block; max-width: 220px; color: #4d5c54; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
.row-actions { display: flex; align-items: center; gap: 7px; }
.row-actions form { margin: 0; }
.status-label { display: inline-flex; align-items: center; gap: 5px; border-radius: 5px; padding: 4px 7px; font-size: 10px; font-weight: 700; }
.status-label::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-active { color: #09753e; background: #edf9f1; }
.status-inactive { color: #707b76; background: #f0f3f1; }
.table-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; border-top: 1px solid var(--border); padding: 17px 24px; color: var(--muted); font-size: 11px; }
.pagination-buttons { display: flex; align-items: center; gap: 9px; }
.pagination-current { padding: 0 3px; font-size: 10px; }
.empty-state { max-width: 550px; margin: auto; padding: 52px 24px 58px; text-align: center; }
.empty-state > .icon { width: 48px; height: 48px; border-radius: 12px; padding: 11px; margin-bottom: 14px; color: var(--primary); background: var(--primary-soft); }
.empty-state h3 { font-size: 18px; margin-bottom: 10px; }
.empty-state p { font-size: 12px; line-height: 1.8; color: var(--muted); }
.empty-state .button { margin-top: 22px; }
.list-summary { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-bottom: 22px; font-size: 12px; color: var(--muted); }
.list-summary strong { padding-right: 5px; font-size: 19px; color: var(--text); }

/* Match the question-bank module to the shared theme. */
.field textarea { padding: 12px 13px; border: 1px solid #cbd0d5; border-radius: 8px; font-size: 14px; color: var(--text); }
.bank-summary, .question-tags, .question-row-copy p, .section-heading p, .media-input > label span, .media-input input[type="file"], .check-label, .preview-audio { color: var(--muted); }
.bank-summary strong, .question-text, .option-text { color: var(--text); }
.question-number, .step-number, .row-number, .question-type, .option-letter { color: var(--primary); background: var(--primary-soft); }
.preview-notice { color: var(--primary); background: var(--theme-hover); border-color: var(--theme-border); border-radius: 8px; }
.media-input { border-color: var(--theme-border-strong); border-radius: 10px; background: var(--theme-surface); }
.media-input input[type="file"]::file-selector-button { color: var(--primary); background: var(--primary-soft); border: 1px solid var(--theme-border); border-radius: 6px; min-height: 36px; }
.check-label input, .correct-choice input { accent-color: var(--primary); }
.preview-option { border-color: var(--border); border-radius: 8px; }
.preview-option.is-correct { border-color: var(--theme-border-strong); background: var(--theme-hover); }
.answer-key, .answer-aliases span { color: #08713b; background: #e8f7ee; }
.question-row { border-color: var(--border); }
.question-row-copy p { color: #3d4b43; }
.question-form-panel, .question-preview { padding: 25px; }
.question-editor-grid { grid-template-columns: minmax(0, 1fr) 270px; gap: 22px; }
.question-editor-side { top: 94px; }
.question-preview > .question-text { font-size: 15px; }
.question-image { max-width: 100%; }
.question-audio { max-width: 100%; }
.answer-summary { border-color: var(--border); }

@media (min-width: 1500px) {
  .page-content { padding: 34px 42px; }
  .topbar, .page-footer { padding-left: 42px; padding-right: 42px; }
}
@media (max-width: 1199px) {
  :root { --sidebar-width: 224px; }
  .sidebar { padding-left: 14px; padding-right: 14px; }
  .sidebar .brand-copy strong { font-size: 18px; }
  .page-content { padding: 25px; }
  .topbar { padding: 0 25px; }
  .account-grid, .management-form-grid { grid-template-columns: minmax(0, 1fr); }
  .account-side { display: none; }
  .account-summary { flex-wrap: wrap; }
  .account-summary .text-link { margin-left: auto; }
  .unit-grid, .metrics { gap: 12px; }
  .unit-card { padding: 19px 16px 14px; }
  .metric { padding: 19px 16px; }
  .metric-icon { right: 14px; }
  .hero-emblem { margin-right: 8px; }
  .question-editor-grid { grid-template-columns: minmax(0, 1fr); }
  .question-editor-side { position: static; }
  .bank-save-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .question-row { flex-wrap: wrap; }
  .question-row > .row-actions { margin-left: 52px; }
}
@media (max-width: 1023px) {
  :root { --header-height: 64px; }
  .admin-workspace { margin-left: 0; }
  .sidebar { z-index: 70; top: 0; width: min(300px, calc(100vw - 32px)); padding: calc(20px + env(safe-area-inset-top, 0px)) 20px calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-110%); visibility: hidden; transition: transform .2s, visibility .2s; box-shadow: 8px 0 32px rgb(20 42 29 / 12%); }
  .sidebar.is-open { transform: translateX(0); visibility: visible; }
  .sidebar .brand-copy strong { font-size: 20px; }
  .sidebar-close { display: grid; place-items: center; }
  .sidebar-label { margin-top: 27px; }
  .nav-item { min-height: 46px; font-size: 13px; }
  .menu-open { overflow: hidden; }
  .menu-toggle { display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; padding: 9px; border-radius: 8px; background: transparent; color: #68717a; }
  .menu-toggle:hover { background: var(--primary-soft); color: var(--primary); }
  .topbar { padding: 0 22px; }
  .topbar-leading { gap: 10px; }
  .topbar-mobile-brand { display: block; color: var(--primary); font-size: 20px; font-weight: 800; letter-spacing: -.8px; }
  .topbar-title { display: none; }
  .topbar-user-name { max-width: 140px; }
  .login-stage { gap: 40px; grid-template-columns: minmax(0, 1fr) minmax(0, 370px); max-width: 800px; }
  .login-art h2 { font-size: 30px; }
}
@media (max-width: 767px) {
  .login-shell { padding: 25px 22px; }
  .login-brand { margin-bottom: 20px; }
  .login-stage { display: block; width: 100%; max-width: 400px; padding: 16px 0 32px; }
  .login-art { display: none; }
  .login-content { padding: 28px; }
  .login-content h1 { font-size: 23px; }
  .login-content input { font-size: 16px; }
  .login-footer { max-width: 360px; }
  .admin-workspace { padding-bottom: calc(var(--bottom-height) + env(safe-area-inset-bottom, 0px)); }
  .topbar { padding: env(safe-area-inset-top, 0px) 14px 0; height: calc(var(--header-height) + env(safe-area-inset-top, 0px)); }
  .topbar-account { gap: 9px; }
  .topbar-user-name { display: none; }
  .topbar-mobile-brand { font-size: 19px; }
  .access-badge { padding: 5px 7px; font-size: 9px; }
  .access-badge .icon { width: 12px; height: 12px; }
  .topbar-profile .avatar { width: 32px; height: 32px; }
  .page-content { padding: 22px 18px 28px; }
  .page-heading { gap: 13px; align-items: flex-start; margin-bottom: 20px; }
  .page-heading h1 { font-size: 22px; }
  .page-heading > div { flex-basis: 100%; }
  .page-heading > .button { min-height: 42px; }
  .page-heading p { font-size: 12px; }
  .date-chip { font-size: 10px; }
  .dashboard-hero { padding: 25px; }
  .dashboard-hero h2 { font-size: 29px; }
  .hero-emblem { width: 100px; height: 100px; margin: 0 8px; }
  .hero-emblem span { font-size: 31px; }
  .hero-emblem small { font-size: 7px; }
  .metric { padding: 17px 13px; }
  .metric-icon { position: static; width: 30px; height: 30px; margin-bottom: 11px; }
  .metric-label { padding: 0; font-size: 10px; margin-bottom: 5px; }
  .metric > strong { font-size: 26px; }
  .metric > small { font-size: 9px; }
  .unit-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .unit-card { padding: 19px 18px 13px; }
  .unit-card-top { float: left; margin: 0 14px 0 0; }
  .unit-card-top > .icon { display: none; }
  .unit-card h3 { padding-top: 5px; font-size: 14px; }
  .unit-card p { font-size: 11px; margin-top: 5px; }
  .unit-card-footer { clear: both; margin-top: 19px; padding-top: 10px; }
  .unit-card-links { gap: 26px; }
  .unit-card-links a { min-height: 34px; font-size: 12px; }
  .section-heading { align-items: flex-start; }
  .section-heading h2 { font-size: 16px; }
  .account-summary { gap: 11px; padding: 18px; }
  .account-summary > div:nth-child(2) { flex: 1; }
  .account-summary .last-login { flex-basis: calc(100% - 50px); margin-left: 49px; padding: 0; }
  .account-summary .text-link { flex-basis: calc(100% - 50px); margin-left: 49px; min-height: 34px; font-size: 12px; }
  .panel { padding: 22px; }
  .data-panel { padding: 0; }
  .form-grid, .member-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid { gap: 0; }
  input, select, textarea, .field textarea, .filter-bar input, .filter-bar select { font-size: 16px; }
  .filter-bar { padding: 18px; }
  .filter-bar > div, .filter-bar .filter-class { flex: 1 1 140px; }
  .filter-bar .filter-search { flex: 1 1 100%; }
  .filter-bar input, .filter-bar select { min-height: 44px; }
  .filter-bar .button { min-height: 44px; }
  .data-heading { padding: 20px 18px 0; }
  .data-table td, .data-table th { padding-left: 16px; padding-right: 16px; }
  .data-table .button-small { min-height: 40px; }
  .table-pagination { padding: 16px 18px; }
  .table-pagination > span { width: 100%; }
  .pagination-buttons { width: 100%; justify-content: space-between; }
  .page-footer { padding: 17px 18px; font-size: 9px; }
  .mobile-nav { display: flex; align-items: stretch; justify-content: space-around; position: fixed; bottom: 0; left: 0; right: 0; z-index: 45; min-height: calc(var(--bottom-height) + env(safe-area-inset-bottom, 0px)); padding: 5px max(6px, env(safe-area-inset-left, 0px)) calc(5px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -3px 16px rgb(21 40 28 / 3%); }
  .mobile-nav-item { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 54px; min-width: 0; padding: 4px; border-radius: 7px; color: #778078; background: transparent; font-size: 9px; font-weight: 600; line-height: 1.4; }
  .mobile-nav-item .icon { width: 22px; height: 22px; }
  .mobile-nav-item.active, .mobile-nav-item[aria-expanded="true"] { color: var(--primary); font-weight: 800; }
  .mobile-nav-item:hover { background: var(--theme-hover); }
  .question-form-panel, .question-preview { padding: 22px; }
  .question-list { padding: 0 18px; }
  .question-editor-main { gap: 20px; }
  .media-input-grid { grid-template-columns: minmax(0, 1fr); }
  .bank-filter select { max-width: 100%; }
  .bank-save-actions { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 479px) {
  .login-shell { padding: 26px 20px 22px; }
  .login-stage { margin-top: 12px; padding-top: 12px; }
  .login-content { border: 0; box-shadow: none; padding: 12px 0 22px; }
  .login-brand { align-self: flex-start; }
  .login-content h1 { font-size: 24px; }
  .login-lead { font-size: 13px; }
  .login-help { font-size: 11px; }
  .topbar { padding-left: 10px; padding-right: 12px; }
  .topbar-leading { gap: 4px; }
  .topbar-mobile-brand { font-size: 18px; }
  .access-badge { max-width: 90px; line-height: 1.3; }
  .access-badge .icon { display: none; }
  .topbar-account { gap: 6px; }
  .page-content { padding: 21px 14px 26px; }
  .page-heading h1 { font-size: 21px; }
  .page-heading > .button { width: 100%; }
  .dashboard-hero { padding: 24px 22px; }
  .hero-emblem { display: none; }
  .dashboard-hero h2 { font-size: 28px; }
  .metrics { gap: 8px; margin: 16px 0 26px; }
  .metric { padding: 14px 10px; }
  .metric-label { font-size: 10px; line-height: 1.6; min-height: 32px; }
  .metric > strong { font-size: 23px; }
  .metric > small { font-size: 9px; line-height: 1.7; }
  .subtle-badge { font-size: 7px; padding: 5px 6px; }
  .section-heading p { font-size: 11px; }
  .panel, .question-form-panel, .question-preview { padding: 20px 17px; }
  .data-panel { padding: 0; }
  .filter-bar { padding: 16px; }
  .filter-bar > div { min-width: 110px; }
  .filter-bar .filter-search { min-width: 0; }
  .filter-bar > .button { flex: 1; }
  .form-actions { gap: 14px; }
  .form-actions .button { width: 100%; }
  .form-actions > .text-link { justify-content: center; min-height: 40px; width: 100%; }
  .member-panel .info-list { grid-template-columns: minmax(0, 95px) minmax(0, 1fr); gap: 12px; }
  .credential-details { grid-template-columns: minmax(0, 90px) minmax(0, 1fr); gap: 12px; }
  .page-footer { padding: 17px 14px; }
  .statement-editor { grid-template-columns: 28px minmax(0, 1fr); }
  .statement-editor > .field:last-child { grid-column: 2; }
  .pair-editor { grid-template-columns: 28px minmax(0, 1fr); }
  .pair-editor .pair-arrow { display: none; }
  .pair-editor > .field:last-child { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
