/* Shared visual system. Screen-only so school documents retain their print layouts. */
@media screen {
:root { --ui-brand:var(--theme-primary,#245eaa); --ui-brand-hover:var(--theme-primary-hover,#174a8a); --ui-ink:#18304f; --ui-canvas:#edf2f8; --ui-surface:#fff; --ui-line:#d7e1ee; --ui-muted:#536780; --ui-shadow:0 7px 25px #16345c0b; }
html[data-color-mode=night] { --ui-ink:#e5eefc; --ui-canvas:#101c2e; --ui-surface:#192940; --ui-line:#34465e; --ui-muted:#b2c3d9; --ui-shadow:0 7px 25px #00000024; }
body .app-container .main-wrapper { background:radial-gradient(ellipse at top right,color-mix(in srgb,var(--ui-brand) 9%,transparent),transparent 60%),var(--ui-canvas); }
body .app-container .sidebar { background:linear-gradient(170deg,#172e4e,#102138); border-right:1px solid #304868; box-shadow:4px 0 24px #10213818; }
body .app-container .sidebar-brand,body .app-container .sidebar-footer { background:#ffffff04; border-color:#ffffff18; }
body .app-container .sidebar .brand-name,body .app-container .sidebar .user-name { color:#f2f7ff; }
body .app-container .sidebar .user-role { color:#acbfd9; }
body .app-container .sidebar .sidebar-item a { color:#c6d5e9; border:1px solid transparent; border-radius:9px; font-weight:600; }
body .app-container .sidebar .sidebar-item a svg { color:#9db6d8; }
body .app-container .sidebar .sidebar-item a:hover { background:#ffffff0d; color:#fff; border-color:#ffffff12; }
body .app-container .sidebar .sidebar-item.active a { background:linear-gradient(110deg,var(--ui-brand),color-mix(in srgb,var(--ui-brand) 70%,#0d9488)); color:#fff; border-color:#ffffff25; box-shadow:0 4px 12px #00000020; }
body .app-container .sidebar .sidebar-item.active a svg { color:#fff; }
body .app-container .sidebar .sidebar-group-toggle { background:#ffffff07; border-color:#ffffff16; color:#bacde7; border-radius:8px; }
body .app-container .sidebar .sidebar-group-toggle:hover,body .app-container .sidebar .sidebar-group-toggle[aria-expanded=true] { background:#ffffff10; color:#eff6ff; border-color:#ffffff24; }
body .app-container .sidebar .user-profile-summary { background:#ffffff08; border-color:#ffffff18; }
body .app-container .main-header { background:var(--ui-surface); border-bottom:1px solid var(--ui-line); box-shadow:0 3px 16px #17345a06; }
body .app-container .main-header .header-school-name { color:var(--ui-ink); }
body .app-container .content-body,body .app-container .ad-content,body .app-container .rd-content { color:var(--ui-ink); }
body .app-container :is(.card,.stat-card,.ad-panel,.rd-panel,.ad-focus-card) { border:1px solid var(--ui-line); border-radius:15px; box-shadow:var(--ui-shadow); background-color:var(--ui-surface); }
body .app-container :is(.card-header,.ad-panel>header,.rd-panel>header) { background:linear-gradient(100deg,color-mix(in srgb,var(--ui-brand) 7%,var(--ui-surface)),var(--ui-surface)); border-bottom:1px solid var(--ui-line); }
body .app-container :is(.ad-panel>header h2,.rd-panel>header h2,.card-header h2,.card-header h3) { color:var(--ui-ink); font-weight:700; }
body .app-container .btn { border-radius:9px; font-weight:600; transition:background-color .18s,box-shadow .18s; }
body .app-container .btn-primary { color:#fff; background:linear-gradient(115deg,var(--ui-brand),var(--ui-brand-hover)); border-color:var(--ui-brand); box-shadow:0 4px 10px color-mix(in srgb,var(--ui-brand) 20%,transparent); }
body .app-container .btn-primary:hover:not(:disabled) { background:var(--ui-brand-hover); box-shadow:0 6px 16px color-mix(in srgb,var(--ui-brand) 28%,transparent); }
body .app-container .btn-secondary { background:var(--ui-surface); color:var(--ui-ink); border:1px solid var(--ui-line); }
body .app-container .btn-secondary:hover:not(:disabled) { background:color-mix(in srgb,var(--ui-brand) 8%,var(--ui-surface)); border-color:var(--ui-brand); }
body .app-container :is(.form-control,.form-select) { border-radius:9px; }
body .app-container :is(button,a,input,select,textarea):focus-visible { outline:3px solid color-mix(in srgb,var(--ui-brand) 70%,#38bdf8); outline-offset:3px; }
body .app-container .table-container { border:1px solid var(--ui-line); border-radius:12px; }
body .app-container :is(.content-body,.rd-content) table thead th { background:#1c3656; color:#eff6ff; font-weight:600; font-size:12px; border-color:#ffffff18; }
body .app-container :is(.content-body,.rd-content) table tbody tr:nth-child(even) { background:color-mix(in srgb,var(--ui-brand) 3%,var(--ui-surface)); }
body .app-container :is(.content-body,.rd-content) table tbody tr:hover { background:color-mix(in srgb,var(--ui-brand) 7%,var(--ui-surface)); }
body .app-container :is(.stat-card,.ad-focus-card) { border-top:3px solid var(--ui-brand); }
body .app-container :is(.stat-card,.ad-focus-card):nth-child(3n+2) { border-top-color:#0d9488; }
body .app-container :is(.stat-card,.ad-focus-card):nth-child(3n+3) { border-top-color:#a162cb; }
body .app-container :is(.exam-hero,.rd-heading,.ad-welcome) { padding:26px; border-radius:18px; background:linear-gradient(115deg,#152d4e,#24557c 68%,#137477); color:#fff; box-shadow:0 10px 24px #16345c1a; }
body .app-container :is(.exam-hero,.rd-heading,.ad-welcome) :is(h1,h2) { color:#fff; }
body .app-container :is(.exam-hero,.rd-heading,.ad-welcome) p { color:#d4e5f5; }
body .app-container .exam-hero .exam-eyebrow { color:#96f0de; }
body .app-container :is(.exam-hero,.rd-heading,.ad-welcome) .btn-secondary { background:#ffffff16; color:#fff; border-color:#ffffff50; }
body .app-container .ad-content { font-family:Inter,system-ui,sans-serif; }
body.admin-reference { --ad-surface:var(--ui-surface); --ad-ink:var(--ui-ink); --ad-muted:var(--ui-muted); --ad-line:var(--ui-line); --ad-primary:var(--ui-brand); }
body .app-container .ad-panel[data-tone] { border-top:3px solid var(--panel-accent,var(--ui-brand)); }
body .app-container .ad-panel[data-tone=mint],body .app-container .ad-panel[data-tone=cyan] { --panel-accent:#0d9488; }
body .app-container .ad-panel[data-tone=rose] { --panel-accent:#d2557e; }
body .app-container .ad-panel[data-tone=amber] { --panel-accent:#c08020; }
body .app-container .ad-panel[data-tone=violet] { --panel-accent:#8462cc; }
body .app-container .rd-welcome,body .app-container .rd-profile { background:linear-gradient(120deg,#173457,#226176); border-radius:16px; }
body .app-container .ad-quick a { border:1px solid var(--ui-line); border-radius:12px; }
body .app-container .ad-action-strip a { border-radius:12px; box-shadow:var(--ui-shadow); }
/* Public and platform surfaces use their own layout, with the same finish. */
body .platform-sidebar { background:linear-gradient(170deg,#172e4e,#102138); color:#e6effb; }
body .platform-sidebar :is(a,button,.brand,.nav-label) { color:#c6d5e9; }
body .platform-sidebar nav button.selected { background:#285d8f; color:#fff; }
body :is(.login-card,.login-box,.auth-card) { border-radius:22px; box-shadow:0 24px 70px #17345a26; border:1px solid #b7c9e0; }
@media(max-width:768px) {
 body .app-container :is(.exam-hero,.rd-heading,.ad-welcome) { padding:20px; gap:16px; flex-wrap:wrap; }
 body .app-container :is(.ad-content,.rd-content) { padding:18px; }
}
@media(prefers-reduced-motion:reduce) { body .app-container .btn { transition:none; } }
}
@media screen {
body .app-container .page-header { padding:20px 24px; border:1px solid var(--ui-line); border-left:4px solid var(--ui-brand); border-radius:14px; background:var(--ui-surface); box-shadow:var(--ui-shadow); gap:16px; flex-wrap:wrap; }
body .app-container .page-header h1,body .app-container .page-header h2 { color:var(--ui-ink); letter-spacing:-.5px; }
body .login-container,body .login-form { border-radius:22px; border:1px solid #b7c9e0; box-shadow:0 24px 70px #17345a26; }
body .login-container .btn-login { background:linear-gradient(115deg,#204e82,#0f766e); box-shadow:0 6px 18px #0f766e30; border-radius:10px; }
body .control-card { border-radius:15px; box-shadow:var(--ui-shadow); }
body .hero-visual { box-shadow:0 24px 65px #17345a20; }
body .intelligence-card { border-radius:18px; box-shadow:0 10px 30px #17345a10; }
}
@media screen{body .app-container .sidebar .dashboard-menu-item:has(a[aria-current=page])>.dashboard-menu-toggle{border-color:#ffffff35;background:#ffffff12}body .app-container .sidebar .dashboard-menu-toggle:focus-visible{outline:3px solid #7dd3fc;outline-offset:3px}}

@media screen {
body .app-container .sidebar .dashboard-menu-toggle{display:flex;align-items:center;gap:10px;width:100%;padding:11px;border:1px solid #ffffff20;border-radius:9px;color:#e5efff;background:#ffffff09;font:600 13px Inter,system-ui,sans-serif;cursor:pointer;text-align:left}
.dashboard-menu-toggle>span{flex:1}.dashboard-menu-toggle>svg{width:18px;height:18px}.dashboard-menu-toggle>svg:last-child{width:14px;transition:transform .18s}.dashboard-menu-toggle[aria-expanded=true]>svg:last-child{transform:rotate(180deg)}
.dashboard-submenu{list-style:none;padding:8px 0 4px 12px;margin:5px 0 0 8px;border-left:1px solid #ffffff26;display:grid;gap:4px}.dashboard-submenu[hidden]{display:none!important}
body .app-container .sidebar .dashboard-submenu .sidebar-item a{font-size:12px;padding:9px 10px;line-height:1.5;white-space:normal}

}

/* Platform-wide finish and narrow-screen safeguards. Screen-only to preserve documents. */
@media screen {
  body .app-container .main-wrapper {min-width:0}
  body .app-container :is(.content-body,.ad-content,.rd-content) {min-width:0;overflow-wrap:anywhere}
  body .app-container :is(.form-control,.form-select) {min-width:0;max-width:100%;min-height:42px;border-color:var(--ui-line);background:var(--ui-surface);color:var(--ui-ink)}
  body .app-container textarea.form-control {min-height:100px;resize:vertical}
  body .app-container .form-group label {font-weight:600;line-height:1.5}
  body .app-container :is(.table-container,.table-responsive,.table-wrap) {max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}
  body .app-container .table-container:focus-within {border-color:var(--ui-brand)}
  body .app-container :is(.filter-bar,.filter-controls,.tabs,.tab-nav,.card-actions,.header-actions) {flex-wrap:wrap;gap:10px}
  body .app-container :is(.section-header,.card-header) {gap:14px;flex-wrap:wrap}
  body:not(.front-desk-page) .content-body>.section-header {padding:22px 24px;border:1px solid var(--ui-line);border-left:4px solid var(--ui-brand);border-radius:16px;background:linear-gradient(115deg,color-mix(in srgb,var(--ui-brand) 7%,var(--ui-surface)),var(--ui-surface));box-shadow:var(--ui-shadow);margin-bottom:22px}
  body .app-container .section-title {color:var(--ui-ink);letter-spacing:-.5px;line-height:1.3}
  body .app-container .card {overflow-wrap:anywhere}
  body .app-container :is(.form-section,.settings-section) {border-radius:14px}
  body .app-container .modal-content {max-height:calc(100vh - 28px);max-height:calc(100dvh - 28px);border-radius:18px;display:flex;flex-direction:column;overflow:hidden}
  body .app-container .modal-body {min-height:0;overflow-y:auto;overscroll-behavior:contain}
  /* Most ERP dialogs are siblings of the app container. */
  body.dashboard-page>.modal .modal-content {max-height:calc(100vh - 28px);max-height:calc(100dvh - 28px);border-radius:18px;overflow-y:auto;overscroll-behavior:contain}
  body .app-container .btn {min-height:40px;white-space:normal}
  body .app-container :is(button,a,input,textarea,select):disabled {cursor:not-allowed}
  body .app-container :is(.badge,.status-badge) {line-height:1.5;white-space:normal;overflow-wrap:anywhere}
  body .platform-main {min-width:0;background:radial-gradient(ellipse at top right,#e7effa,transparent 60%),#f5f7fb}
  body .platform-main>.page-title {padding:22px 24px;background:linear-gradient(115deg,#172e4e,#31598b 65%,#177f83);color:white;border:1px solid #ffffff24;border-radius:18px;box-shadow:0 8px 24px #17345a14;gap:16px;flex-wrap:wrap}
  body .platform-main>.page-title :is(h1,h2) {color:#fff;letter-spacing:-.6px}
  body .platform-main>.page-title :is(p,.eyebrow) {color:#d3e8f4}
  body .platform-main>.page-title .primary {background:#fff;border-color:#fff;color:#23496f}
  body .platform-main :is(.stats-band,.control-card,.school-card,.assistant-panel) {border:1px solid #d7e1ee;border-radius:16px;box-shadow:0 5px 20px #17345a08;overflow-wrap:anywhere}
  body .platform-main .stats-band {background:#fff}
  body .platform-main .stats-band>div {min-width:0}
  body .platform-main :is(input,select,textarea) {max-width:100%;min-width:0;min-height:42px;border-radius:9px}
  body :is(#create-school-dialog,#school-detail-dialog) {max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);border-radius:18px;box-shadow:0 24px 70px #17345a35}
  body .platform-main :is(button,a):focus-visible,body .platform-sidebar :is(a,button):focus-visible {outline:3px solid #60a5fa;outline-offset:3px}
}
@media screen and (max-width:768px) {
  body .app-container :is(.content-body,.ad-content,.rd-content) {padding-left:14px;padding-right:14px}
  body .app-container :is(.form-control,.form-select) {font-size:16px;min-height:44px}
  body .app-container .btn {min-height:44px}
  body.dashboard-page .modal-content {max-width:calc(100vw - 28px)}
  body:not(.front-desk-page) .content-body>.section-header {padding:18px}
  body .app-container .main-header {height:auto;min-height:var(--header-height,64px);flex-wrap:wrap;gap:10px}
  body .app-container .main-header .page-title {min-width:0;font-size:18px;overflow-wrap:anywhere}
  body .app-container :is(.modal-header,.modal-footer) {gap:10px;flex-wrap:wrap}
  body .platform-main>.page-title {padding:20px}
  body .platform-main :is(input,select,textarea) {font-size:16px;min-height:44px}
  body .platform-main :is(.control-grid,.form-grid) {grid-template-columns:minmax(0,1fr)}
  body .platform-main .stats-band {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media screen and (prefers-reduced-motion:reduce) {
  body .app-container *,body .platform-main * {scroll-behavior:auto!important}
}

/* White navigation labels on the dark ERP and SaaS sidebars. */
@media screen {
body .app-container .sidebar :is(.sidebar-item a,.sidebar-group-toggle,.sidebar-section-label,.dashboard-menu-toggle,.user-name,.user-role,.brand-name,.btn-logout),
body .app-container .sidebar :is(.sidebar-item a,.sidebar-group-toggle,.dashboard-menu-toggle) :is(span,svg),
body .platform-sidebar :is(a,button,.brand,.nav-label,.owner-block,.owner-block small) {color:#fff}
}

/* Rich navy and teal navigation with white labels. */
@media screen {
body .app-container .sidebar,body .platform-sidebar {background:radial-gradient(ellipse at top left,#3971a34a,transparent 48%),radial-gradient(ellipse at bottom right,#0d94883b,transparent 56%),linear-gradient(160deg,#192c51 0%,#122740 48%,#103e48 100%);border-right:1px solid #8ec9df30;box-shadow:6px 0 30px #0b203526}
body .app-container .sidebar :is(.sidebar-brand,.sidebar-footer) {background:#ffffff06;border-color:#ffffff1a}
body .app-container .sidebar .sidebar-group-toggle {background:#ffffff08;border:1px solid #ffffff12;border-radius:10px;letter-spacing:.5px}
body .app-container .sidebar .sidebar-item a {border-radius:11px;border:1px solid transparent;transition:background .18s,border-color .18s,box-shadow .18s}
body .app-container .sidebar .sidebar-item a:hover,body .platform-sidebar nav button:hover {background:#ffffff12;color:#fff;border-color:#ffffff20}
body .app-container .sidebar .sidebar-item.active>a,body .app-container .sidebar .sidebar-subitem.active>a,body .platform-sidebar nav button.selected {background:linear-gradient(110deg,#3272b0,#187f88);border-color:#8edce84a;color:#fff;box-shadow:0 5px 16px #071e4033,inset 3px 0 0 #8fe4d8}
body .app-container .sidebar .dashboard-menu-toggle[aria-expanded=true] {background:linear-gradient(110deg,#ffffff16,#38bdf80d);border-color:#ffffff26}
body .app-container .sidebar .user-profile-summary {background:#ffffff09;border:1px solid #ffffff16;border-radius:12px}
body .app-container .sidebar :is(.sidebar-item a,.dashboard-menu-toggle,.sidebar-group-toggle) svg {color:#fff}
}
@media screen and (prefers-reduced-motion:reduce) {body .app-container .sidebar .sidebar-item a {transition:none}}

/* Readable, touch-friendly account actions on the dark sidebar. */
@media screen {
body .app-container .sidebar .sidebar-account-actions{display:grid;gap:8px;margin-top:12px}
body .app-container .sidebar .sidebar-account-action{display:flex;align-items:center;justify-content:flex-start;gap:11px;width:100%;min-height:44px;margin:0;padding:11px 14px;border:1px solid #ffffff26;border-radius:11px;color:#fff;background:#ffffff0b;font:600 12px/1.4 Inter,system-ui,sans-serif;letter-spacing:.1px;text-align:left;cursor:pointer;box-shadow:inset 0 1px 0 #ffffff06;transition:background .16s,border-color .16s}
body .app-container .sidebar .sidebar-account-action svg{width:18px;height:18px;flex-shrink:0;color:#fff}
body .app-container .sidebar .sidebar-password{background:#3b82f61c;border-color:#8bb9f847}
body .app-container .sidebar .sidebar-password:hover{background:#3b82f633;border-color:#93c5fd80;color:#fff}
body .app-container .sidebar .sidebar-signout{background:#ed718c16;border-color:#f59bb535}
body .app-container .sidebar .sidebar-signout:hover{background:#ed718c2e;border-color:#fda4af80;color:#fff}
body .app-container .sidebar .sidebar-account-action:focus-visible{outline:3px solid #7dd3fc;outline-offset:3px}
body .app-container .sidebar .sidebar-account-action:active{background:#ffffff24}
}
@media screen and (prefers-reduced-motion:reduce){body .app-container .sidebar .sidebar-account-action{transition:none}}

@media screen {
body .app-container .sidebar .sidebar-position-control{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:12px 0;color:white;font:600 12px/1.4 Inter,system-ui,sans-serif}
body .app-container .sidebar .sidebar-position-control select{min-width:88px;min-height:40px;padding:8px 10px;background:#17334f;color:#fff;border:1px solid #ffffff40;border-radius:9px;font:inherit;cursor:pointer}
body .app-container .sidebar .sidebar-position-control select option{background:#17334f;color:#fff}
body[data-menu-position=right] .app-container .sidebar{left:auto;right:0;border-right:0;border-left:1px solid #8ec9df30}
body[data-menu-position=right] .app-container .main-wrapper{margin-left:0;margin-right:230px}
}
@media screen and (min-width:901px) {
body[data-menu-position=right] .app-container .sidebar{width:230px;transform:none}
body[data-menu-position=top] .app-container .sidebar{left:0;right:0;top:0;width:100%;height:220px;transform:none;display:grid;grid-template-columns:minmax(170px,1fr) auto;grid-template-rows:76px minmax(0,1fr);border-right:0;border-bottom:1px solid #8ec9df40;box-shadow:0 6px 24px #0b203526}
body[data-menu-position=top] .app-container .sidebar .sidebar-brand{grid-row:1;grid-column:1;height:76px;min-width:0;padding:12px 20px;border-bottom:1px solid #ffffff20}
body[data-menu-position=top] .app-container .sidebar .sidebar-footer{grid-row:1;grid-column:2;display:flex;align-items:center;gap:16px;padding:10px 18px;border-top:0;border-bottom:1px solid #ffffff20}
body[data-menu-position=top] .app-container .sidebar .user-profile-summary{display:none}
body[data-menu-position=top] .app-container .sidebar .sidebar-position-control{margin:0;gap:8px}
body[data-menu-position=top] .app-container .sidebar .sidebar-account-actions{display:flex;margin:0;gap:8px}
body[data-menu-position=top] .app-container .sidebar .sidebar-account-action{width:auto;min-height:42px;padding:10px 12px}
body[data-menu-position=top] .app-container .sidebar .sidebar-menu{grid-row:2;grid-column:1/-1;display:flex;flex-direction:row;flex-wrap:wrap;align-items:flex-start;align-content:flex-start;gap:8px;min-height:0;margin:0;padding:12px 18px;overflow:auto;scrollbar-width:thin}
body[data-menu-position=top] .app-container .sidebar .sidebar-menu>.sidebar-item,body[data-menu-position=top] .app-container .sidebar .sidebar-section-label{width:auto;margin:0;padding:0;flex:0 0 auto}
body[data-menu-position=top] .app-container .sidebar .sidebar-item>a,body[data-menu-position=top] .app-container .sidebar .sidebar-group-toggle{min-height:40px;padding:9px 12px}
body[data-menu-position=top] .app-container .sidebar .dashboard-submenu{display:flex;gap:6px;flex-wrap:wrap;max-width:560px}
body[data-menu-position=top] .app-container .sidebar [hidden]{display:none!important}
body[data-menu-position=top] .app-container .main-wrapper{margin-left:0;margin-right:0;margin-top:220px;min-height:calc(100vh - 220px)}
}
/* Small screens retain a usable drawer for every saved desktop layout. */
@media screen and (max-width:900px) {
body[data-menu-position] .app-container .sidebar{width:min(300px,86vw);height:100vh;height:100dvh;left:0;right:auto;transform:translateX(-100%);z-index:120;transition:transform .2s ease}
body[data-menu-position=right] .app-container .sidebar{left:auto;right:0;transform:translateX(100%)}
body[data-menu-position].sidebar-open .app-container .sidebar{transform:translateX(0)}
body[data-menu-position] .app-container .main-wrapper{margin-left:0;margin-right:0;margin-top:0}
body[data-menu-position] .app-container .mobile-menu-toggle{display:grid;place-items:center;min-width:40px;min-height:40px}
body[data-menu-position] .app-container .sidebar-overlay{position:fixed;inset:0;display:block;background:#10213866;opacity:0;pointer-events:none;z-index:110;border:0}
body[data-menu-position].sidebar-open .app-container .sidebar-overlay{opacity:1;pointer-events:auto}
}
@media screen and (prefers-reduced-motion:reduce){body[data-menu-position] .app-container .sidebar{transition:none}}

@media screen and (min-width:901px){body[data-menu-position=top] .app-container .main-header{top:220px}}

/* Shared ERP page layout, pill toggles, action rows & mobile-admin Night/Day polish */
.erp-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}
@media (max-width: 960px) {
  .erp-two-col { grid-template-columns: 1fr; }
}

.erp-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.erp-link-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px;
}
.erp-link-pills a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--ui-line);
  background: color-mix(in srgb, var(--ui-brand) 6%, var(--ui-surface));
  color: var(--ui-ink);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.erp-link-pills a:hover {
  border-color: var(--ui-brand);
  background: color-mix(in srgb, var(--ui-brand) 14%, var(--ui-surface));
}

.erp-fieldset {
  border: 1px solid var(--ui-line);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 18px 0;
  background: color-mix(in srgb, var(--ui-brand) 3%, var(--ui-surface));
}
.erp-fieldset legend {
  padding: 0 8px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ui-ink);
}

.erp-month-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.erp-month-pills label,
.erp-check-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid var(--ui-line);
  border-radius: 999px;
  background: var(--ui-surface);
  color: var(--ui-ink);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.12s ease;
}
.erp-month-pills label:hover,
.erp-check-chip:hover {
  border-color: var(--ui-brand);
  background: color-mix(in srgb, var(--ui-brand) 8%, var(--ui-surface));
}
.erp-month-pills label:has(input:checked),
.erp-check-chip:has(input:checked) {
  border-color: var(--ui-brand);
  background: color-mix(in srgb, var(--ui-brand) 14%, var(--ui-surface));
  color: color-mix(in srgb, var(--ui-brand) 80%, var(--ui-ink));
}
html[data-color-mode="night"] .erp-month-pills label:has(input:checked),
html[data-color-mode="night"] .erp-check-chip:has(input:checked) {
  color: #ffffff;
}
.erp-month-pills input[type="checkbox"],
.erp-check-chip input[type="checkbox"],
body .app-container table input[type="checkbox"] {
  accent-color: var(--ui-brand);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.erp-status-note {
  margin: 12px 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--ui-brand) 6%, var(--ui-surface));
  border: 1px solid var(--ui-line);
  color: var(--ui-muted);
  font-size: 0.88rem;
}
.erp-status-note:empty { display: none; }

.erp-error-banner {
  color: #be123c;
  padding: 12px 16px;
  background: color-mix(in srgb, #e11d48 9%, var(--ui-surface));
  border: 1px solid color-mix(in srgb, #e11d48 35%, var(--ui-line));
  border-radius: 12px;
  margin-bottom: 16px;
  font-weight: 600;
}
html[data-color-mode="night"] .erp-error-banner {
  color: #fda4af;
}

body .app-container .mobile-admin :is(.application-grid article, #admin-controls > section) {
  background: var(--ui-surface);
  border: 1px solid var(--ui-line);
  border-radius: 16px;
  box-shadow: var(--ui-shadow);
  padding: 20px;
}
body .app-container .mobile-admin .app-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  align-items: end;
  margin-bottom: 22px;
}
body .app-container .mobile-admin .app-form label {
  display: grid;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ui-ink);
}
body .app-container .mobile-admin :is(input:not([type=checkbox]):not([type=radio]), select) {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  background: var(--ui-surface);
  color: var(--ui-ink);
  font: inherit;
}
body .app-container .mobile-admin #capability-options {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  padding: 12px 14px;
}
body .app-container .mobile-admin #capability-options legend {
  padding: 0 6px;
  font-weight: 700;
  color: var(--ui-ink);
}
body .app-container .mobile-admin #capability-options label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
}
html[data-color-mode="night"] body .app-container .mobile-admin .app-tabs button {
  background: var(--ui-surface);
  color: var(--ui-ink);
  border-color: var(--ui-line);
}
html[data-color-mode="night"] body .app-container .mobile-admin .app-tabs button[aria-selected="true"] {
  background: var(--ui-brand);
  color: #ffffff;
  border-color: var(--ui-brand);
}
