/*
 * NGM College ERP Portal
 * Tokens: --erp-primary / --erp-accent come from Settings (inline style).
 */
:root,
.ngm-erp-embed {
	--erp-primary: #0f5d63;
	--erp-accent: #d99a00;
	--erp-ink: #1b2a33;
	--erp-muted: #56666f;
	--erp-paper: #f2f5f5;
	--erp-surface: #ffffff;
	--erp-line: #d5dfe1;
	--erp-line-strong: #b6c4c8;
	--erp-ok: #1f7a4d;
	--erp-warn: #9a5b00;
	--erp-bad: #b3261e;
	--erp-info: #1f5f99;
	--erp-tint: color-mix(in srgb, var(--erp-primary) 8%, #fff);
	--erp-primary-ink: var(--erp-primary); /* primary used as text: lightened in the dark theme */
	--erp-font: "Noto Sans", "Noto Sans Tamil", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--erp-serif: "Noto Serif", Georgia, "Times New Roman", serif;
	--erp-r-sm: 6px;
	--erp-r-md: 10px;
	--erp-gap: 1rem;
	--erp-focus: 0 0 0 3px color-mix(in srgb, var(--erp-accent) 55%, transparent);
}

/* ------------------------------------------------------------------ *
 * Document (portal domain only)
 * ------------------------------------------------------------------ */
.erp-body {
	margin: 0;
	background: var(--erp-paper);
	color: var(--erp-ink);
	font: 400 15.5px/1.55 var(--erp-font);
	-webkit-font-smoothing: antialiased;
}
.erp-body *, .erp-body *::before, .erp-body *::after { box-sizing: border-box; }
.erp-body img { max-width: 100%; height: auto; }
.erp-body a { color: var(--erp-primary-ink); text-underline-offset: 2px; }
.erp-body a:hover { color: color-mix(in srgb, var(--erp-primary) 75%, #000); }
.erp-body h1, .erp-body h2, .erp-body h3 { line-height: 1.25; margin: 0 0 .6em; }
.erp-body h1 { font: 700 1.75rem/1.2 var(--erp-serif); letter-spacing: -.01em; }
.erp-body h2 { font-size: 1.2rem; font-weight: 650; }
.erp-body h3 { font-size: 1rem; font-weight: 650; }
.erp-body :focus-visible { outline: none; box-shadow: var(--erp-focus); border-radius: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.erp-skip { position: absolute; left: -999px; top: 0; background: var(--erp-ink); color: #fff !important; padding: .6rem 1rem; z-index: 1000; }
.erp-skip:focus { left: 1rem; top: 1rem; }

/* Brand */
.erp-brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: inherit !important; }
.erp-brand__logo { width: 40px; height: 40px; object-fit: contain; }
.erp-brand__mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--erp-accent); color: var(--erp-ink); font: 700 1.2rem var(--erp-serif); }
.erp-brand__name { font: 700 1.05rem/1.2 var(--erp-serif); }

/* ------------------------------------------------------------------ *
 * Public site
 * ------------------------------------------------------------------ */
.erp-site-head { background: var(--erp-surface); border-bottom: 3px solid var(--erp-primary); position: sticky; top: 0; z-index: 50; }
.erp-site-head__inner { max-width: 1200px; margin: 0 auto; padding: .7rem 1.25rem; display: flex; align-items: center; gap: 1.5rem; }
.erp-site-head__toggle { display: none; margin-left: auto; background: none; border: 0; padding: .4rem; cursor: pointer; color: var(--erp-ink); }
.erp-site-nav { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.erp-site-nav ul { display: flex; flex-wrap: wrap; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.erp-site-nav a:not(.erp-btn) { display: block; padding: .45rem .6rem; color: var(--erp-ink); text-decoration: none; font-weight: 500; border-radius: var(--erp-r-sm); }
.erp-site-nav a:not(.erp-btn):hover { background: var(--erp-tint); color: var(--erp-primary-ink); }
.erp-site-nav a[aria-current="page"] { color: var(--erp-primary-ink); box-shadow: inset 0 -2px 0 var(--erp-accent); border-radius: 0; }
.erp-site-main { min-height: 60vh; }
.erp-page-head { max-width: 1200px; margin: 0 auto; padding: 2rem 1.25rem .5rem; }
.erp-site-content { max-width: 1200px; margin: 0 auto; padding: 1rem 1.25rem 3rem; }
.erp-home .erp-site-content { padding-top: 0; }
.erp-crumbs { font-size: .85rem; color: var(--erp-muted); display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .35rem; }
.erp-crumbs a { color: var(--erp-muted); }
.erp-crumb { white-space: nowrap; display: inline-flex; gap: .35rem; }
.erp-site-foot { background: var(--erp-ink); color: #d7e1e3; padding: 2.5rem 1.25rem 1.5rem; }
.erp-site-foot__inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
.erp-site-foot a { color: #fff; }
.erp-site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.erp-site-foot__note { max-width: 1200px; margin: 1.5rem auto 0; font-size: .85rem; color: #9fb1b5; }

@media (max-width: 900px) {
	.erp-site-head__toggle { display: block; }
	.erp-site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--erp-surface); flex-direction: column; align-items: stretch; padding: .5rem 1.25rem 1rem; border-bottom: 1px solid var(--erp-line); }
	.erp-site-nav.is-open { display: flex; }
	.erp-site-nav ul { flex-direction: column; }
	.erp-site-foot__inner { grid-template-columns: 1fr; }
}

/* Hero */
.erp-hero { margin: 0 -1.25rem; padding: 3.5rem 1.25rem 3rem; background: var(--erp-primary); color: #fff; position: relative; overflow: hidden; }
.erp-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--erp-accent); }
.erp-hero__text { max-width: 1200px; margin: 0 auto; }
.erp-hero h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 3rem); max-width: 22ch; margin-bottom: .4rem; }
.erp-hero p { color: color-mix(in srgb, #fff 85%, var(--erp-primary)); font-size: 1.1rem; margin: 0 0 1.5rem; max-width: 60ch; }
.erp-hero__search { display: flex; gap: .5rem; max-width: 640px; }
.erp-hero__search input { flex: 1; padding: .85rem 1rem; font-size: 1rem; border: 0; border-radius: var(--erp-r-sm); }
@media (min-width: 1240px) { .erp-hero { margin: 0 calc(50% - 50vw); } }

/* Services as a ledger of entries rather than identical cards */
.erp-services { margin: 2rem 0; }
.erp-tiles--services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); border-top: 1px solid var(--erp-line); border-left: 1px solid var(--erp-line); background: var(--erp-surface); }
.erp-tiles--services li { border-right: 1px solid var(--erp-line); border-bottom: 1px solid var(--erp-line); }
.erp-service { display: grid; grid-template-columns: auto 1fr; gap: .1rem .8rem; padding: 1.1rem 1.2rem; text-decoration: none; color: var(--erp-ink) !important; height: 100%; }
.erp-service .dashicons { grid-row: span 2; width: 36px; height: 36px; font-size: 26px; color: var(--erp-primary-ink); }
.erp-service__title { font-weight: 650; }
.erp-service__text { color: var(--erp-muted); font-size: .9rem; }
.erp-service:hover { background: var(--erp-tint); }
.erp-service:hover .erp-service__title { color: var(--erp-primary-ink); text-decoration: underline; }

/* Numbers */
.erp-numbers ul { list-style: none; margin: 2rem 0 0; padding: 1.5rem 0; display: flex; flex-wrap: wrap; gap: 2rem 3rem; border-top: 1px solid var(--erp-line); }
.erp-numbers li { display: flex; flex-direction: column; }
.erp-numbers__n { font: 700 2rem/1 var(--erp-serif); color: var(--erp-primary-ink); }
.erp-numbers__l { color: var(--erp-muted); font-size: .9rem; margin-top: .25rem; }
.erp-numbers--small .erp-numbers__n { font-size: 1.4rem; }

/* ------------------------------------------------------------------ *
 * App (logged-in portal)
 * ------------------------------------------------------------------ */
.erp-app { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.erp-sidebar { background: color-mix(in srgb, var(--erp-primary) 88%, #000); color: #e6eff0; padding: 1rem .75rem 2rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.erp-sidebar__brand { padding: .25rem .5rem 1rem; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: .75rem; }
.erp-sidebar .erp-brand__name { color: #fff; }
.erp-nav ul { list-style: none; margin: 0; padding: 0; }
.erp-nav a { display: flex; align-items: center; gap: .55rem; padding: .42rem .6rem; color: #dbe7e8 !important; text-decoration: none; border-radius: var(--erp-r-sm); font-size: .93rem; }
.erp-nav a:hover { background: rgba(255,255,255,.08); color: #fff !important; }
.erp-nav a[aria-current="page"] { background: rgba(255,255,255,.14); color: #fff !important; box-shadow: inset 3px 0 0 var(--erp-accent); }
.erp-nav a.is-tool::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--erp-accent); margin-left: 2px; }
.erp-nav .dashicons { font-size: 18px; width: 18px; height: 18px; opacity: .85; }
.erp-nav__group { margin-top: .5rem; }
.erp-nav__group summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .55rem; padding: .45rem .6rem; color: #fff; font-weight: 600; font-size: .9rem; border-radius: var(--erp-r-sm); }
.erp-nav__group summary::-webkit-details-marker { display: none; }
.erp-nav__group summary::after { content: "+"; margin-left: auto; opacity: .6; }
.erp-nav__group[open] summary::after { content: "–"; }
.erp-nav__group ul { padding-left: 1.6rem; }
.erp-count-pill { margin-left: auto; background: var(--erp-accent); color: var(--erp-ink); border-radius: 999px; padding: 0 .45rem; font-size: .75rem; font-weight: 700; }
.erp-app__body { min-width: 0; display: flex; flex-direction: column; }
.erp-topbar { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.75rem; background: var(--erp-surface); border-bottom: 1px solid var(--erp-line); }
.erp-topbar__menu { display: none; background: none; border: 0; cursor: pointer; padding: .3rem; color: var(--erp-ink); }
.erp-topbar__title { flex: 1; min-width: 0; }
.erp-topbar h1 { margin: 0; font-size: 1.45rem; }
.erp-topbar__user { display: flex; align-items: center; gap: .75rem; }
.erp-user { display: flex; align-items: center; gap: .45rem; text-decoration: none; color: var(--erp-ink) !important; font-weight: 500; }
.erp-user__avatar { border-radius: 50%; }
.erp-actions { display: flex; flex-wrap: wrap; gap: .5rem; padding: .9rem 1.75rem 0; }
.erp-main { padding: 1.25rem 1.75rem 3rem; }
@media (max-width: 960px) {
	.erp-app { grid-template-columns: 1fr; }
	.erp-sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 100; transform: translateX(-100%); transition: transform .2s ease; }
	.erp-sidebar.is-open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
	.erp-topbar__menu { display: block; }
	.erp-user__name { display: none; }
	.erp-main, .erp-topbar, .erp-actions { padding-left: 1rem; padding-right: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .erp-sidebar { transition: none; } }

/* Login */
.erp-bare { min-height: 100vh; display: grid; place-content: center; padding: 2rem 1rem; }
.erp-login { width: min(400px, 92vw); background: var(--erp-surface); border-top: 5px solid var(--erp-primary); border-radius: var(--erp-r-md); padding: 2rem; box-shadow: 0 10px 30px rgba(15, 40, 45, .08); }
.erp-login__brand { text-align: center; margin-bottom: 1.25rem; }
.erp-login__brand img { width: 72px; height: 72px; object-fit: contain; }
.erp-login__brand h1 { font-size: 1.3rem; margin: .5rem 0 .2rem; }
.erp-login__brand p { color: var(--erp-muted); margin: 0; }
.erp-login__links { font-size: .9rem; text-align: center; margin-top: 1rem; }
.erp-bare__back { text-align: center; font-size: .9rem; }

/* Print shell */
.erp-print { max-width: 900px; margin: 0 auto; padding: 1.5rem; background: #fff; }
.erp-print__bar { display: flex; gap: .5rem; }

/* @components-start */
/* ------------------------------------------------------------------ *
 * Components (also used by the embed stylesheet)
 * ------------------------------------------------------------------ */
.erp-muted { color: var(--erp-muted); }
.erp-center { text-align: center; }
.erp-narrow { max-width: 680px; }
.erp-hp { position: absolute; left: -9999px; }
.erp-yes { color: var(--erp-ok); font-weight: 600; }
.erp-code { background: var(--erp-ink); color: #e9f1f2; padding: 1rem; border-radius: var(--erp-r-sm); overflow-x: auto; font-size: .85rem; white-space: pre-wrap; }
.erp-prose { max-width: 75ch; }
.erp-prose p { margin: 0 0 1em; }
.erp-prose img { border-radius: var(--erp-r-sm); }

/* Buttons */
.erp-btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: .55rem 1rem; border: 1px solid var(--erp-line-strong); background: var(--erp-surface); color: var(--erp-ink) !important; font: 600 .92rem/1.2 var(--erp-font); border-radius: var(--erp-r-sm); text-decoration: none !important; cursor: pointer; }
.erp-btn:hover { border-color: var(--erp-primary); color: var(--erp-primary-ink) !important; }
.erp-btn--primary { background: var(--erp-primary); border-color: var(--erp-primary); color: #fff !important; }
.erp-btn--primary:hover { background: color-mix(in srgb, var(--erp-primary) 82%, #000); color: #fff !important; }
.erp-btn--accent { background: var(--erp-accent); border-color: var(--erp-accent); color: var(--erp-ink) !important; }
.erp-btn--danger { color: var(--erp-bad) !important; border-color: color-mix(in srgb, var(--erp-bad) 40%, #fff); }
.erp-btn--danger:hover { background: var(--erp-bad); color: #fff !important; border-color: var(--erp-bad); }
.erp-btn--quiet { background: var(--erp-tint); border-color: transparent; color: var(--erp-primary-ink) !important; }
.erp-btn--link { background: none; border-color: transparent; color: var(--erp-primary-ink) !important; padding-left: .3rem; padding-right: .3rem; }
.erp-btn--link:hover { text-decoration: underline !important; }
.erp-btn--block { display: flex; width: 100%; margin-bottom: .5rem; }
.erp-btn[disabled], .erp-btn.is-busy { opacity: .6; cursor: progress; }
.erp-btnrow { display: flex; flex-wrap: wrap; gap: .5rem; }
.erp-cta { margin: 1.5rem 0; }

/* Badges & notices */
.erp-badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #e8eef0; color: var(--erp-muted); white-space: nowrap; }
.erp-badge--ok, .erp-badge--valid, .erp-badge--genuine, .erp-badge--active, .erp-badge--completed, .erp-badge--received, .erp-badge--confirmed { background: color-mix(in srgb, var(--erp-ok) 14%, #fff); color: var(--erp-ok); }
.erp-badge--warn, .erp-badge--pending, .erp-badge--waitlist, .erp-badge--submitted, .erp-badge--in-review { background: color-mix(in srgb, var(--erp-accent) 22%, #fff); color: var(--erp-warn); }
.erp-badge--bad, .erp-badge--error, .erp-badge--revoked, .erp-badge--expired, .erp-badge--rejected, .erp-badge--not-genuine, .erp-badge--lost, .erp-badge--overdue { background: color-mix(in srgb, var(--erp-bad) 12%, #fff); color: var(--erp-bad); }
.erp-badge--new { background: var(--erp-accent); color: var(--erp-ink); }
.erp-badge--muted { background: #eef2f3; color: var(--erp-muted); }
.erp-notice { padding: .8rem 1rem; border-radius: var(--erp-r-sm); margin: 0 0 1rem; border-left: 4px solid var(--erp-ok); background: color-mix(in srgb, var(--erp-ok) 8%, #fff); }
.erp-notice--error { border-color: var(--erp-bad); background: color-mix(in srgb, var(--erp-bad) 8%, #fff); }
.erp-notice--warning { border-color: var(--erp-accent); background: color-mix(in srgb, var(--erp-accent) 12%, #fff); }
.erp-notice--info { border-color: var(--erp-info); background: color-mix(in srgb, var(--erp-info) 8%, #fff); }
.erp-notice code { word-break: break-all; }
.erp-empty { text-align: center; padding: 2.5rem 1rem; background: var(--erp-surface); border: 1px dashed var(--erp-line-strong); border-radius: var(--erp-r-md); color: var(--erp-muted); }

/* Panels & layout */
.erp-panel { background: var(--erp-surface); border: 1px solid var(--erp-line); border-radius: var(--erp-r-md); padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.erp-panel > h2:first-child, .erp-panel > h3:first-child { margin-top: 0; }
.erp-panel > h3 { font-size: .95rem; color: var(--erp-muted); font-weight: 650; }
details.erp-panel > summary { cursor: pointer; font-weight: 600; }
.erp-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 1rem; align-items: start; }
.erp-columns--wide-left { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
.erp-columns--home { margin-top: 1rem; }
@media (max-width: 860px) { .erp-columns--wide-left { grid-template-columns: 1fr; } }
.erp-section { margin: 2rem 0; }
.erp-section > h2 { padding-bottom: .4rem; border-bottom: 2px solid var(--erp-line); }
.erp-hello h2 { font: 700 1.5rem var(--erp-serif); margin-bottom: 0; }
.erp-hello { margin-bottom: 1.25rem; }

/* Stats */
.erp-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .6rem; }
@media (max-width: 520px) { .erp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .erp-stat__num { font-size: 1.35rem; } }
.erp-stat { display: flex; flex-direction: column; padding: .85rem 1rem; border: 1px solid var(--erp-line); border-radius: var(--erp-r-sm); text-decoration: none; color: var(--erp-ink) !important; position: relative; }
.erp-stat:hover { border-color: var(--erp-primary); }
.erp-stat__num { font: 700 1.6rem/1.1 var(--erp-serif); color: var(--erp-primary-ink); }
.erp-stat__label { color: var(--erp-muted); font-size: .88rem; }
.erp-stat__flag { margin-top: .35rem; font-size: .78rem; font-weight: 600; color: var(--erp-warn); }
.erp-tiles { display: flex; flex-wrap: wrap; gap: .6rem; }
.erp-tile { display: flex; align-items: center; gap: .5rem; padding: .7rem 1rem; background: var(--erp-tint); border-radius: var(--erp-r-sm); text-decoration: none; font-weight: 600; color: var(--erp-primary-ink) !important; }
.erp-tile:hover { background: var(--erp-primary); color: #fff !important; }
.erp-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.erp-chip { display: inline-block; padding: .35rem .8rem; border: 1px solid var(--erp-line-strong); border-radius: 999px; text-decoration: none; font-size: .88rem; color: var(--erp-ink) !important; background: var(--erp-surface); }
.erp-chip:hover { border-color: var(--erp-primary); color: var(--erp-primary-ink) !important; }
.erp-progress { height: 8px; background: #e6edee; border-radius: 999px; overflow: hidden; }
.erp-progress > span, .erp-progress > i { display: block; height: 100%; background: var(--erp-primary); }
.erp-chart { position: relative; height: 320px; margin: 1rem 0; }
.erp-chart--small { height: 200px; margin: .5rem 0; }

/* Tabs */
.erp-tabs { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 2px solid var(--erp-line); margin-bottom: 1rem; }
.erp-tabs a, .erp-tabs button { appearance: none; background: none; border: 0; padding: .55rem .9rem; font: 600 .92rem var(--erp-font); color: var(--erp-muted); text-decoration: none; cursor: pointer; margin-bottom: -2px; border-bottom: 2px solid transparent; }
.erp-tabs a:hover, .erp-tabs button:hover { color: var(--erp-primary-ink); }
.erp-tabs a[aria-current="page"], .erp-tabs button[aria-selected="true"] { color: var(--erp-primary-ink); border-bottom-color: var(--erp-accent); }
.erp-tabpanel { padding-top: .25rem; }

/* Forms */
.erp-form { max-width: 100%; }
.erp-fieldset { border: 1px solid var(--erp-line); border-radius: var(--erp-r-md); background: var(--erp-surface); padding: 1rem 1.25rem .4rem; margin: 0 0 1rem; min-width: 0; }
.erp-fieldset > legend { font-weight: 650; padding: 0 .4rem; color: var(--erp-primary-ink); }
.erp-grid { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.erp-field { flex: 1 1 100%; margin-bottom: .9rem; min-width: 0; }
.erp-w-half { flex: 1 1 calc(50% - .5rem); }
.erp-w-auto { flex: 1 1 140px; }
@media (max-width: 640px) { .erp-w-half { flex-basis: 100%; } }
.erp-label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .3rem; }
.erp-req { color: var(--erp-bad); }
.erp-help { font-size: .82rem; color: var(--erp-muted); margin: .3rem 0 0; }
.erp-form input[type="text"], .erp-form input[type="email"], .erp-form input[type="url"], .erp-form input[type="tel"],
.erp-form input[type="number"], .erp-form input[type="date"], .erp-form input[type="time"], .erp-form input[type="datetime-local"],
.erp-form input[type="password"], .erp-form input[type="search"], .erp-form input:not([type]), .erp-form select, .erp-form textarea,
.erp-filters input, .erp-filters select, .erp-inline-form input, .erp-inline-form select, .erp-input {
	width: 100%; padding: .55rem .7rem; font: 400 .95rem/1.4 var(--erp-font); color: var(--erp-ink); background: var(--erp-surface);
	border: 1px solid var(--erp-line-strong); border-radius: var(--erp-r-sm); min-height: 40px;
}
.erp-form textarea { min-height: 90px; resize: vertical; }
.erp-form input:focus, .erp-form select:focus, .erp-form textarea:focus, .erp-filters input:focus, .erp-filters select:focus, .erp-inline-form input:focus { outline: none; border-color: var(--erp-primary); box-shadow: var(--erp-focus); }
.erp-input--xl { font-size: 1.3rem !important; padding: .8rem 1rem !important; letter-spacing: .03em; }
.erp-form .is-invalid input, .erp-form .is-invalid select, .erp-form .is-invalid textarea, .erp-form input:user-invalid, .erp-form textarea:user-invalid, .erp-form select:user-invalid { border-color: var(--erp-bad); }
.erp-readonly { padding: .45rem 0; }
.erp-check { display: flex; align-items: flex-start; gap: .45rem; font-size: .93rem; margin: .2rem 0; cursor: pointer; }
.erp-check input { margin-top: .25rem; }
.erp-checks { display: flex; flex-wrap: wrap; gap: .1rem 1.2rem; }
.erp-checks--scroll { max-height: 200px; overflow-y: auto; border: 1px solid var(--erp-line); border-radius: var(--erp-r-sm); padding: .45rem .7rem; flex-direction: column; flex-wrap: nowrap; }
.erp-checks--cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .4rem 1rem; }
.erp-check--card { flex-direction: column; border: 1px solid var(--erp-line); border-radius: var(--erp-r-sm); padding: .7rem .8rem; }
.erp-check--card:has(input:checked) { border-color: var(--erp-primary); background: var(--erp-tint); }

.erp-toggle { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; font-weight: 500; padding: .3rem 0; }
.erp-toggle input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.erp-toggle__ui { width: 40px; height: 22px; border-radius: 999px; background: #c4d0d3; position: relative; flex: none; transition: background .15s; }
.erp-toggle__ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.erp-toggle input:checked + .erp-toggle__ui { background: var(--erp-primary); }
.erp-toggle input:checked + .erp-toggle__ui::after { transform: translateX(18px); }
.erp-toggle input:focus-visible + .erp-toggle__ui { box-shadow: var(--erp-focus); }

/* Form layout with side panel */
.erp-form:has(> .erp-form__side) { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1rem; align-items: start; }
.erp-form__side { position: sticky; top: 1rem; }
.erp-form__submit p { margin-top: 0; }
@media (max-width: 1020px) { .erp-form:has(> .erp-form__side) { grid-template-columns: 1fr; } .erp-form__side { position: static; } }

/* Media */
.erp-media { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.erp-media__preview:empty { display: none; }
.erp-media__preview img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--erp-r-sm); border: 1px solid var(--erp-line); display: block; }
.erp-media__preview a { word-break: break-all; }
.erp-gallery__thumbs { list-style: none; padding: 0; margin: 0 0 .5rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.erp-gallery__thumbs li { position: relative; }
.erp-gallery__thumbs img { width: 80px; height: 80px; object-fit: cover; border-radius: var(--erp-r-sm); display: block; }
.erp-gallery__remove, .erp-rel__remove { border: 0; background: var(--erp-ink); color: #fff; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; line-height: 1; font-size: 14px; }
.erp-gallery__remove { position: absolute; top: -6px; right: -6px; }

/* Relation picker */
.erp-rel { position: relative; }
.erp-rel__chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.erp-rel__chips:not(:empty) { margin-bottom: .4rem; }
.erp-rel__chips li { display: inline-flex; align-items: center; gap: .35rem; background: var(--erp-tint); color: var(--erp-primary-ink); padding: .2rem .3rem .2rem .7rem; border-radius: 999px; font-size: .88rem; font-weight: 500; }
.erp-rel__remove { background: color-mix(in srgb, var(--erp-primary) 70%, #fff); width: 18px; height: 18px; font-size: 12px; }
.erp-rel__results { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; list-style: none; margin: .2rem 0 0; padding: .25rem; background: var(--erp-surface); color: var(--erp-ink); border: 1px solid var(--erp-line-strong); border-radius: var(--erp-r-sm); box-shadow: 0 8px 24px rgba(0,0,0,.1); max-height: 260px; overflow-y: auto; }
.erp-rel__results li { padding: .45rem .6rem; cursor: pointer; border-radius: 4px; font-size: .92rem; }
.erp-rel__results li[aria-selected="true"], .erp-rel__results li:hover { background: var(--erp-tint); }
.erp-rel__results li.is-empty { cursor: default; color: var(--erp-muted); }
.erp-rel[data-multiple="0"] .erp-rel__chips:not(:empty) + .erp-rel__search { display: none; }

/* Repeater */
.erp-repeater__rows { display: grid; gap: .5rem; margin-bottom: .5rem; }
.erp-repeater__row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; padding: .6rem; border: 1px solid var(--erp-line); border-radius: var(--erp-r-sm); background: #fbfcfc; }
.erp-repeater__cell { flex: 1 1 140px; min-width: 0; }
.erp-repeater__cell .erp-label { font-size: .78rem; color: var(--erp-muted); font-weight: 500; }
.erp-repeater__tools { display: flex; gap: .25rem; }
.erp-repeater__tools button { border: 1px solid var(--erp-line-strong); background: var(--erp-surface); color: var(--erp-ink); width: 32px; height: 32px; border-radius: var(--erp-r-sm); cursor: pointer; }
.erp-repeater__tools button:hover { border-color: var(--erp-bad); color: var(--erp-bad); }

/* Filters */
.erp-filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.erp-filter { flex: 0 1 190px; }
.erp-filter--search { flex: 1 1 260px; }
.erp-filters--public { background: var(--erp-surface); padding: .75rem; border: 1px solid var(--erp-line); border-radius: var(--erp-r-md); }
.erp-inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.erp-inline-form input { width: auto; flex: 1 1 200px; }
.erp-count { color: var(--erp-muted); font-size: .88rem; margin: 0 0 .5rem; }

/* Tables */
.erp-table-wrap { overflow-x: auto; border: 1px solid var(--erp-line); border-radius: var(--erp-r-md); background: var(--erp-surface); margin-bottom: 1rem; }
.erp-panel .erp-table-wrap { border-radius: var(--erp-r-sm); }
.erp-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.erp-table th, .erp-table td { padding: .6rem .75rem; text-align: left; border-bottom: 1px solid var(--erp-line); vertical-align: top; }
.erp-table thead th { background: #f6f9f9; font-size: .8rem; color: var(--erp-muted); font-weight: 650; white-space: nowrap; }
.erp-table thead th a { color: inherit; text-decoration: none; }
.erp-table tbody tr:last-child td { border-bottom: 0; }
.erp-table tbody tr:hover { background: #fafcfc; }
.erp-table--compact th, .erp-table--compact td { padding: .4rem .6rem; }
.erp-table tr.is-overdue td, .erp-table tr.is-fail td { color: var(--erp-bad); }
.erp-table input[type="number"] { width: 90px; }
.erp-col-check { width: 32px; }
.erp-col-title a { font-weight: 600; }
.erp-col-title { display: flex; align-items: center; gap: .55rem; }
.erp-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; }
.erp-col-actions { white-space: nowrap; text-align: right; }
.erp-bulk { display: flex; gap: .5rem; align-items: center; }
.erp-bulk select { width: auto; }
@media (max-width: 720px) {
	.erp-bulk-form .erp-table thead { display: none; }
	.erp-bulk-form .erp-table tr { display: block; border-bottom: 1px solid var(--erp-line); padding: .4rem 0; }
	.erp-bulk-form .erp-table td { display: flex; gap: .5rem; border: 0; padding: .2rem .75rem; }
	.erp-bulk-form .erp-table td[data-label]::before { content: attr(data-label); min-width: 40%; color: var(--erp-muted); font-size: .82rem; }
}
.erp-pages { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1rem 0; }
.erp-pages span { color: var(--erp-muted); font-size: .9rem; }

/* Definition lists */
.erp-dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .1rem 1.5rem; }
.erp-dl__row { padding: .45rem 0; border-bottom: 1px solid #edf2f3; }
.erp-dl__row.is-wide { grid-column: 1 / -1; }
.erp-dl dt { font-size: .8rem; color: var(--erp-muted); font-weight: 600; }
.erp-dl dd { margin: .1rem 0 0; }
.erp-meta { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .35rem .9rem; font-size: .92rem; }
.erp-meta dt { color: var(--erp-muted); }
.erp-meta dd { margin: 0; }
.erp-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.erp-facts--card { background: var(--erp-tint); padding: 1rem; border-radius: var(--erp-r-md); }
.erp-list { margin: 0; padding-left: 1.1rem; }
.erp-list li { margin: .3rem 0; }
.erp-bullets { padding-left: 1.2rem; }
.erp-bullets li { margin: .25rem 0; }

/* Item view */
.erp-view { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1rem; align-items: start; }
.erp-view__photo img { width: 160px; height: 160px; object-fit: cover; border-radius: var(--erp-r-md); margin-bottom: 1rem; }
@media (max-width: 1020px) { .erp-view { grid-template-columns: 1fr; } }
.erp-reviewbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .8rem 1rem; border: 1px solid var(--erp-accent); background: color-mix(in srgb, var(--erp-accent) 10%, #fff); border-radius: var(--erp-r-md); margin-bottom: 1rem; }
.erp-reviewbar p { margin: 0; flex: 1 1 100%; }
.erp-reviewbar input { flex: 1 1 240px; padding: .5rem .7rem; border: 1px solid var(--erp-line-strong); border-radius: var(--erp-r-sm); }
.erp-file::before { content: "\f497"; font-family: dashicons; margin-right: .3rem; vertical-align: -2px; }
.erp-img { max-width: 220px; border-radius: var(--erp-r-sm); }
.erp-gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; }
.erp-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--erp-r-sm); display: block; }

/* Public cards */
.erp-cards { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.erp-card { background: var(--erp-surface); border: 1px solid var(--erp-line); border-radius: var(--erp-r-md); overflow: hidden; display: flex; flex-direction: column; }
.erp-card:hover { border-color: var(--erp-line-strong); }
.erp-card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--erp-ink) !important; }
.erp-card__media { display: block; aspect-ratio: 16 / 9; background: var(--erp-tint); overflow: hidden; }
.erp-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.erp-card__body { display: flex; flex-direction: column; gap: .3rem; padding: .9rem 1rem 1rem; flex: 1; }
.erp-card__title { font-weight: 650; font-size: 1.02rem; line-height: 1.3; }
.erp-card__link:hover .erp-card__title { color: var(--erp-primary-ink); text-decoration: underline; }
.erp-card__dept, .erp-card__role { color: var(--erp-muted); font-size: .86rem; }
.erp-card__excerpt { color: var(--erp-muted); font-size: .9rem; }
.erp-card__facts { list-style: none; margin: .2rem 0 0; padding: 0; font-size: .86rem; display: grid; gap: .15rem; }
.erp-card__k { color: var(--erp-muted); }
.erp-card__k::after { content: ":"; }
.erp-card__body .erp-btn { align-self: flex-start; margin-top: auto; }
/* People: portrait first */
.erp-card--person .erp-card__link { flex-direction: row; align-items: center; gap: .9rem; padding: .9rem; }
.erp-card--person .erp-card__body { padding: 0; }
.erp-card__avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; background: var(--erp-tint); display: grid; place-items: center; font: 700 1.3rem var(--erp-serif); color: var(--erp-primary-ink); }
.erp-card--dept .erp-card__media { aspect-ratio: auto; height: 6px; background: var(--erp-primary); }
.erp-card--doc .erp-card__body { gap: .45rem; }
.erp-card--line { flex-direction: row; }
.erp-cards--list { grid-template-columns: 1fr; gap: .5rem; }
.erp-more { margin: .25rem 0 1rem; }

/* Single pages */
.erp-single__head { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; margin-bottom: 1.5rem; }
.erp-single__photo img { width: 220px; border-radius: var(--erp-r-md); }
.erp-single__intro { flex: 1 1 320px; }
.erp-single__dept { color: var(--erp-muted); margin: 0 0 .4rem; }
.erp-single__lede { font-size: 1.1rem; max-width: 65ch; }

/* Department, profile, events, clubs */
.erp-dept__head, .erp-profile__head { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; padding: 1.5rem; background: var(--erp-surface); border: 1px solid var(--erp-line); border-top: 4px solid var(--erp-primary); border-radius: var(--erp-r-md); margin-bottom: 1.25rem; }
.erp-dept__logo { width: 88px; height: 88px; object-fit: contain; }
.erp-dept__meta { color: var(--erp-muted); display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.erp-profile__photo { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; border: 4px solid var(--erp-tint); }
.erp-profile__initials { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; background: var(--erp-tint); color: var(--erp-primary-ink); font: 700 2.6rem var(--erp-serif); }
.erp-profile__role { font-size: 1.05rem; margin: 0; }
.erp-profile__dept { color: var(--erp-muted); margin: .2rem 0 0; }
.erp-people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem; }
.erp-pubs { margin: 0; padding-left: 1.2rem; }
.erp-pubs li { margin: .5rem 0; }
.erp-pubs--single { padding: 0; list-style: none; }

.erp-events { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.erp-event { display: flex; gap: .9rem; align-items: flex-start; }
.erp-event__date { flex: none; width: 54px; text-align: center; border: 1px solid var(--erp-line); border-radius: var(--erp-r-sm); overflow: hidden; background: var(--erp-surface); }
.erp-event__mon { display: block; background: var(--erp-primary); color: #fff; font-size: .72rem; font-weight: 600; padding: .1rem 0; }
.erp-event__day { display: block; font: 700 1.35rem/1.6 var(--erp-serif); }
.erp-event__body { min-width: 0; }
.erp-event__title { font-weight: 600; }
.erp-event__meta { color: var(--erp-muted); font-size: .86rem; }
.erp-events--large .erp-event { background: var(--erp-surface); border: 1px solid var(--erp-line); border-radius: var(--erp-r-md); padding: .9rem; }
.erp-eventpage__grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.5rem; align-items: start; }
.erp-eventpage__side { position: sticky; top: 90px; }
@media (max-width: 960px) { .erp-eventpage__grid { grid-template-columns: 1fr; } .erp-eventpage__side { position: static; } }
.erp-poster { width: 100%; border-radius: var(--erp-r-md); }
.erp-timeline { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--erp-line); }
.erp-timeline li { position: relative; padding: 0 0 1rem .75rem; }
.erp-timeline li::before { content: ""; position: absolute; left: -1.43rem; top: .4rem; width: 10px; height: 10px; border-radius: 50%; background: var(--erp-accent); }
.erp-register { border-top: 4px solid var(--erp-accent); }

/* Notices & ticker */
.erp-notices { list-style: none; margin: 0; padding: 0; }
.erp-notice-item { display: flex; gap: .75rem; align-items: baseline; padding: .55rem 0; border-bottom: 1px solid #edf2f3; }
.erp-notice-item:last-child { border-bottom: 0; }
.erp-notice-item time { flex: none; width: 3.6rem; color: var(--erp-muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.erp-notice-item.is-pinned a { font-weight: 650; }
.erp-notice-item.is-pinned time::before { content: "\f537"; font-family: dashicons; color: var(--erp-accent); margin-right: .15rem; }
.erp-ticker { display: flex; align-items: center; gap: 1rem; margin: 0 -1.25rem; padding: .55rem 1.25rem; background: color-mix(in srgb, var(--erp-accent) 18%, #fff); border-bottom: 1px solid color-mix(in srgb, var(--erp-accent) 35%, #fff); overflow: hidden; }
@media (min-width: 1240px) { .erp-ticker { margin: 0 calc(50% - 50vw); padding-left: calc(50vw - 600px + 1.25rem); } }
.erp-ticker__label { flex: none; font-size: .85rem; }
.erp-ticker__track { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.erp-ticker__items { display: inline-flex; gap: 2.5rem; white-space: nowrap; animation: erp-ticker 40s linear infinite; padding-left: 100%; }
.erp-ticker:hover .erp-ticker__items, .erp-ticker:focus-within .erp-ticker__items { animation-play-state: paused; }
.erp-ticker a { color: var(--erp-ink); }
@keyframes erp-ticker { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .erp-ticker__items { animation: none; padding-left: 0; flex-wrap: wrap; white-space: normal; } }

/* Look-up forms (results, verification, tracking) */
.erp-lookup { background: var(--erp-surface); border: 1px solid var(--erp-line); border-radius: var(--erp-r-md); padding: 1.25rem; max-width: 560px; }
.erp-form__result:empty { display: none; }
.erp-form__result { margin-top: 1rem; }
.erp-verified { border-left: 5px solid var(--erp-ok); background: color-mix(in srgb, var(--erp-ok) 6%, #fff); padding: 1rem 1.25rem; border-radius: var(--erp-r-sm); }
.erp-verify-card { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; background: var(--erp-surface); border: 1px solid var(--erp-line); border-radius: var(--erp-r-md); padding: 1.25rem; }
.erp-verify-card img { width: 110px; border-radius: var(--erp-r-sm); }
.erp-halls { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.erp-upi { display: flex; gap: 1rem; align-items: center; padding: 1rem; background: var(--erp-tint); border-radius: var(--erp-r-md); }
.erp-qr { display: inline-block; line-height: 0; }
.erp-qr svg, .erp-qr img { display: block; }

/* Surveys */
.erp-survey { max-width: 760px; }
.erp-question { border: 1px solid var(--erp-line); border-radius: var(--erp-r-md); padding: 1rem 1.1rem; margin: 0 0 .8rem; background: var(--erp-surface); }
.erp-question legend { font-weight: 600; padding: 0 .3rem; }
.erp-scale { display: flex; flex-wrap: wrap; gap: .4rem; }
.erp-scale label { position: relative; }
.erp-scale input { position: absolute; opacity: 0; }
.erp-scale span { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 .6rem; border: 1px solid var(--erp-line-strong); border-radius: var(--erp-r-sm); cursor: pointer; font-weight: 600; }
.erp-scale input:checked + span { background: var(--erp-primary); color: #fff; border-color: var(--erp-primary); }
.erp-scale input:focus-visible + span { box-shadow: var(--erp-focus); }

/* Library */
.erp-opac { margin-bottom: 1rem; }
.erp-opac__results { list-style: none; margin: 0; padding: 0; }
.erp-opac__results > li { padding: .8rem 0; border-bottom: 1px solid var(--erp-line); }
.erp-opac__title { font-weight: 650; font-size: 1.02rem; }
.erp-gate input { font-size: 1.4rem; }

/* Marksheet */
.erp-marksheet { background: #fff; border: 1px solid var(--erp-line-strong); padding: 1.5rem; position: relative; }
.erp-marksheet__head { display: flex; gap: 1rem; align-items: center; border-bottom: 2px solid var(--erp-ink); padding-bottom: .75rem; margin-bottom: .75rem; }
.erp-marksheet__head > div { flex: 1; display: flex; flex-direction: column; }
.erp-marksheet__head strong { font: 700 1.2rem var(--erp-serif); }
.erp-marksheet__logo { width: 64px; height: 64px; object-fit: contain; }
.erp-marksheet__who { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .5rem 1rem; margin: 0 0 1rem; }
.erp-marksheet__who dt { font-size: .78rem; color: var(--erp-muted); }
.erp-marksheet__who dd { margin: 0; font-weight: 600; }
.erp-marksheet__photo { position: absolute; right: 1.5rem; top: 7.5rem; width: 80px; border: 1px solid var(--erp-line); }
.erp-marksheet__sum { display: flex; flex-wrap: wrap; gap: 1.5rem; font-size: 1rem; }
.erp-marksheet__foot { font-size: .78rem; color: var(--erp-muted); border-top: 1px solid var(--erp-line); padding-top: .5rem; margin-top: 1rem; }
.erp-receipt { background: #fff; border: 1px solid var(--erp-line-strong); padding: 1.5rem; max-width: 720px; }

/* ID cards (CR80, 85.6 × 54 mm) */
.erp-cardsheet { display: flex; flex-wrap: wrap; gap: 6mm; }
.erp-idcard { width: 85.6mm; height: 54mm; border-radius: 3mm; overflow: hidden; background: #fff; border: 1px solid var(--erp-line-strong); display: flex; flex-direction: column; font-size: 7.5pt; line-height: 1.25; break-inside: avoid; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.erp-idcard__band { background: var(--erp-primary); color: #fff; display: flex; align-items: center; gap: 2mm; padding: 1.5mm 3mm; font-weight: 700; font-size: 8pt; }
.erp-idcard__band img { width: 7mm; height: 7mm; object-fit: contain; background: #fff; border-radius: 50%; }
.erp-idcard__body { flex: 1; display: flex; gap: 3mm; padding: 2mm 3mm; align-items: flex-start; }
.erp-idcard__photo { width: 20mm; height: 25mm; background: #eef3f4; border: .3mm solid var(--erp-line); flex: none; overflow: hidden; }
.erp-idcard__photo img { width: 100%; height: 100%; object-fit: cover; }
.erp-idcard__text { flex: 1; display: flex; flex-direction: column; gap: .4mm; min-width: 0; }
.erp-idcard__text strong { font-size: 9pt; }
.erp-idcard__body .erp-qr { flex: none; }
.erp-idcard__foot { background: var(--erp-accent); color: var(--erp-ink); padding: 1mm 3mm; font-weight: 600; }
.erp-idcard--alumni .erp-idcard__band { background: var(--erp-ink); }
.erp-cardsheet--preview .erp-idcard { box-shadow: 0 6px 20px rgba(0,0,0,.08); }

/* Widgets */
.erp-widget { font-family: var(--erp-font); color: var(--erp-ink); }
.erp-widget__title { font: 700 1.3rem var(--erp-serif); }
/* @components-end */

/* ------------------------------------------------------------------ *
 * Attendance & CIA (portal only)
 * ------------------------------------------------------------------ */
.erp-att-day { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .5rem; text-align: center; background: var(--erp-surface); border: 1px solid var(--erp-line); border-radius: var(--erp-r-md); padding: .6rem; margin-bottom: 1rem; }
.erp-att-slots { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .6rem; }
.erp-att-slot a { display: grid; grid-template-columns: 5.5rem 1fr auto; gap: .8rem; align-items: center; padding: .85rem 1rem; background: var(--erp-surface); border: 1px solid var(--erp-line); border-left: 5px solid var(--erp-accent); border-radius: var(--erp-r-md); text-decoration: none; color: var(--erp-ink) !important; }
.erp-att-slot.is-marked a { border-left-color: var(--erp-ok); }
.erp-att-slot a:hover { border-color: var(--erp-primary); }
.erp-att-slot__hour { font: 700 1.05rem var(--erp-serif); display: flex; flex-direction: column; }
.erp-att-slot__hour small { font: 400 .78rem var(--erp-font); color: var(--erp-muted); }
.erp-att-slot__body { display: flex; flex-direction: column; min-width: 0; }
@media (max-width: 560px) { .erp-att-slot a { grid-template-columns: 4.2rem 1fr; } .erp-att-slot .erp-badge { grid-column: 2; justify-self: start; } }
.erp-att-title { margin-bottom: .1rem; }
.erp-att-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; align-items: center; background: var(--erp-surface); border: 1px solid var(--erp-line); border-radius: var(--erp-r-md); padding: .6rem .9rem; margin: .5rem 0; }
.erp-att-bar strong { font: 700 1.3rem var(--erp-serif); }
.erp-att-bar [data-att-absent] { color: var(--erp-bad); }
.erp-att-bar__tools { margin-left: auto; }
.erp-att-list { list-style: none; margin: 0 0 1rem; padding: 0; border: 1px solid var(--erp-line); border-radius: var(--erp-r-md); background: var(--erp-surface); overflow: hidden; }
.erp-att-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--erp-line); }
.erp-att-row:last-child { border-bottom: 0; }
.erp-att-who { flex: 1; display: grid; grid-template-columns: 2rem 7.5rem 1fr auto; gap: .6rem; align-items: center; padding: .75rem .9rem; cursor: pointer; min-height: 52px; user-select: none; }
.erp-att-who input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.erp-att-who:focus-within { box-shadow: inset var(--erp-focus); }
.erp-att-no { color: var(--erp-muted); font-size: .85rem; text-align: right; }
.erp-att-reg { font-variant-numeric: tabular-nums; font-weight: 600; }
.erp-att-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.erp-att-state::after { content: "P"; display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: color-mix(in srgb, var(--erp-ok) 14%, #fff); color: var(--erp-ok); font-weight: 700; }
.erp-att-row.is-absent { background: color-mix(in srgb, var(--erp-bad) 9%, #fff); }
.erp-att-row.is-absent .erp-att-state::after { content: "A"; background: var(--erp-bad); color: #fff; }
.erp-att-row.is-od .erp-att-state::after { content: "OD"; background: color-mix(in srgb, var(--erp-info) 15%, #fff); color: var(--erp-info); font-size: .75rem; }
.erp-att-od { display: flex; align-items: center; gap: .3rem; padding: 0 .9rem; border-left: 1px solid var(--erp-line); font-size: .85rem; color: var(--erp-muted); cursor: pointer; }
@media (max-width: 560px) { .erp-att-who { grid-template-columns: 1.5rem 1fr auto; } .erp-att-reg { grid-column: 2; } .erp-att-name { grid-column: 2; grid-row: 2; font-size: .9rem; color: var(--erp-muted); } .erp-att-state { grid-column: 3; grid-row: 1 / span 2; } .erp-att-no { grid-row: 1 / span 2; } }
.erp-att-submit { position: sticky; bottom: 0; padding: .6rem 0; background: linear-gradient(to top, var(--erp-paper) 70%, transparent); }
.erp-att-overall { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: 1rem 1.25rem; border-radius: var(--erp-r-md); background: var(--erp-surface); border: 1px solid var(--erp-line); border-left: 6px solid var(--erp-ok); margin-bottom: 1rem; }
.erp-att-overall--condonation { border-left-color: var(--erp-accent); }
.erp-att-overall--shortage { border-left-color: var(--erp-bad); }
.erp-att-overall__pct { font: 700 2rem/1 var(--erp-serif); }
.erp-att-grid th, .erp-att-grid td { text-align: center; padding: .3rem .35rem; }
.erp-att-grid th[scope="row"] { text-align: left; white-space: nowrap; }
.erp-att-cell--a { background: color-mix(in srgb, var(--erp-bad) 14%, #fff); color: var(--erp-bad); font-weight: 700; }
.erp-att-cell--od { color: var(--erp-info); font-weight: 600; }
.erp-marks__table input[type="number"] { width: 6rem; }
.erp-print-only { display: none; }
@media print { .erp-print-only { display: block; } .erp-att-sheet .erp-att-bar__tools { display: none; } }

/* ------------------------------------------------------------------ *
 * Designs (print output and editor canvas share these rules)
 * ------------------------------------------------------------------ */
.erp-dz-page { position: relative; overflow: hidden; background: #fff no-repeat center / 100% 100%; box-sizing: border-box; color: #1b2a33; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.erp-dz-el { position: absolute; box-sizing: border-box; overflow: hidden; }
.erp-dz-text { display: flex; flex-direction: column; overflow-wrap: anywhere; }
.erp-dz-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.erp-dz-photo img { object-fit: cover; }
.erp-dz-qr .erp-qr, .erp-dz-qr svg { display: block; width: 100% !important; height: 100% !important; }
.erp-dz-qr { background: #fff; }
.erp-dz-table table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.erp-dz-table th, .erp-dz-table td { border: .5pt solid; padding: .6mm 1.2mm; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.erp-dz-table th { font-weight: 700; }
.erp-print:has(.erp-dz-sheet) { max-width: none; padding: 1rem; background: #e9eef0; }
.erp-dz-sheet { margin: 0 auto 8mm; width: max-content; box-shadow: 0 2px 12px rgba(0,0,0,.12); background: #fff; }
.erp-dz-sheet--nup { display: grid; padding: 8mm; width: 210mm; min-height: 297mm; box-sizing: border-box; justify-content: center; align-content: start; }
.erp-dz-sheet--nup .erp-dz-page { outline: .2mm dashed #c4d0d3; }
.erp-dz-page--blank { visibility: hidden; }
@media print {
	.erp-print:has(.erp-dz-sheet) { padding: 0; background: none; }
	.erp-dz-sheet { margin: 0; box-shadow: none; break-after: page; page-break-after: always; }
	.erp-dz-sheet:last-child { break-after: auto; page-break-after: auto; }
	.erp-dz-sheet--nup .erp-dz-page { outline: none; }
}

/* Editor */
.erp-dz-head { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; margin-bottom: .75rem; }
.erp-dz-head .erp-input { max-width: 22rem; font-weight: 600; }
.erp-dz-head .erp-btn--primary { margin-left: auto; }
.erp-dz-toolbar { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; padding: .55rem .7rem; background: var(--erp-surface); border: 1px solid var(--erp-line); border-radius: var(--erp-r-md) var(--erp-r-md) 0 0; position: sticky; top: 0; z-index: 20; }
.erp-dz-group { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.erp-dz-toolbar .erp-btn { padding: .4rem .65rem; font-size: .85rem; }
.erp-dz-toolbar select, .erp-dz-toolbar input[type="search"] { padding: .4rem .5rem; border: 1px solid var(--erp-line-strong); border-radius: var(--erp-r-sm); font: inherit; font-size: .85rem; }
.erp-dz-sides [aria-selected="true"] { background: var(--erp-primary); color: #fff !important; }
.erp-dz-sample { position: relative; margin-left: auto; }
.erp-dz-sample .erp-rel__results { min-width: 260px; }
.erp-dz-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; border: 1px solid var(--erp-line); border-top: 0; border-radius: 0 0 var(--erp-r-md) var(--erp-r-md); background: var(--erp-surface); min-height: 70vh; }
@media (max-width: 1100px) { .erp-dz-main { grid-template-columns: 1fr; } }
.erp-dz-stage { overflow: auto; padding: 20px; background: repeating-conic-gradient(#e7ecee 0% 25%, #f2f5f6 0% 50%) 0 0 / 20px 20px; max-height: calc(100vh - 160px); }
.erp-dz-zoombox { position: relative; margin: 0 auto; }
.erp-dz-page--edit { position: absolute; left: 0; top: 0; transform-origin: 0 0; box-shadow: 0 4px 18px rgba(0,0,0,.18); user-select: none; touch-action: none; }
.erp-dz-page--edit.has-grid { background-image: linear-gradient(rgba(15,93,99,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(15,93,99,.08) 1px, transparent 1px); background-size: 5mm 5mm; }
.erp-dz-page--edit .erp-dz-el { cursor: move; outline: 1px dashed transparent; overflow: visible; }
.erp-dz-page--edit .erp-dz-el > * { overflow: hidden; }
.erp-dz-page--edit .erp-dz-el:hover { outline-color: rgba(15,93,99,.45); }
.erp-dz-page--edit .erp-dz-el.is-selected { outline: 1.5px solid var(--erp-primary); z-index: 1000; }
.erp-dz-page--edit .erp-dz-el.is-locked { cursor: default; }
.erp-dz-page--edit .erp-dz-el:focus-visible { outline: 2px solid var(--erp-accent); }
.erp-dz-handle { position: absolute; width: 9px; height: 9px; background: #fff; border: 1.5px solid var(--erp-primary); border-radius: 2px; }
.erp-dz-handle--nw { left: -5px; top: -5px; cursor: nwse-resize; }
.erp-dz-handle--ne { right: -5px; top: -5px; cursor: nesw-resize; }
.erp-dz-handle--sw { left: -5px; bottom: -5px; cursor: nesw-resize; }
.erp-dz-handle--se { right: -5px; bottom: -5px; cursor: nwse-resize; }
.erp-dz-ph { display: grid; place-items: center; width: 100%; height: 100%; background: repeating-linear-gradient(45deg, #eef2f3, #eef2f3 4px, #e2e9eb 4px, #e2e9eb 8px); color: var(--erp-muted); font: 600 9px var(--erp-font); }
.erp-dz-props { border-left: 1px solid var(--erp-line); padding: .75rem .9rem 2rem; overflow-y: auto; max-height: calc(100vh - 160px); font-size: .9rem; }
.erp-dz-props h3 { margin: .2rem 0 .6rem; }
.erp-dz-sec { border: 0; border-top: 1px solid var(--erp-line); padding: .6rem 0 .2rem; margin: 0; }
.erp-dz-sec legend { font-weight: 650; font-size: .82rem; color: var(--erp-primary-ink); padding: 0 .3rem 0 0; }
.erp-dz-props .erp-field { margin-bottom: .55rem; }
.erp-dz-props input[type="number"], .erp-dz-props input[type="text"], .erp-dz-props select, .erp-dz-props textarea { width: 100%; padding: .35rem .45rem; border: 1px solid var(--erp-line-strong); border-radius: var(--erp-r-sm); font: inherit; font-size: .88rem; box-sizing: border-box; }
.erp-dz-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.erp-dz-color { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.erp-dz-color input[type="color"] { width: 34px; height: 28px; padding: 0; border: 1px solid var(--erp-line-strong); border-radius: 4px; }
.erp-dz-swatch { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--erp-line-strong); cursor: pointer; padding: 0; }
.erp-dz-cols { display: grid; gap: .3rem; margin-bottom: .4rem; }
.erp-dz-colrow { display: grid; grid-template-columns: 1fr 1fr 3.6rem auto; gap: .25rem; align-items: center; }
.erp-dz-listprint select { width: auto; }

/* Custom fields screen */
.erp-cf-row.is-hidden td { opacity: .55; }
.erp-cf-row.is-dragging { opacity: .4; }
.erp-cf-handle { white-space: nowrap; cursor: grab; color: var(--erp-muted); }
.erp-cf-move { border: 1px solid var(--erp-line); background: var(--erp-surface); color: var(--erp-ink); border-radius: 4px; width: 24px; height: 24px; cursor: pointer; margin-left: 2px; }
.erp-cf-order.is-changed > .erp-btn:not(.erp-btn--link) { background: var(--erp-accent); border-color: var(--erp-accent); }

/* ------------------------------------------------------------------ *
 * Phone app: scanner, toasts, offline banner
 * ------------------------------------------------------------------ */
.erp-scanner { position: fixed; inset: 0; z-index: 100000; background: #0b1416; color: #fff; display: grid; grid-template-rows: 1fr auto auto auto; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.erp-scanning { overflow: hidden; }
.erp-scanner__view { position: relative; overflow: hidden; display: grid; place-items: center; }
.erp-scanner__view video { width: 100%; height: 100%; object-fit: cover; }
.erp-scanner__frame { position: absolute; width: min(68vw, 300px); aspect-ratio: 1; border-radius: 18px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); border: 3px solid var(--erp-accent); }
.erp-scanner__status { margin: 0; padding: .8rem 1rem; text-align: center; font-weight: 600; min-height: 3.2em; }
.erp-scanner__manual { display: flex; gap: .5rem; padding: 0 1rem .6rem; }
.erp-scanner__manual input { flex: 1; padding: .7rem .8rem; border-radius: var(--erp-r-sm); border: 0; font: inherit; font-size: 1rem; }
.erp-scanner__bar { display: flex; justify-content: space-between; gap: .5rem; padding: 0 1rem 1rem; }
.erp-scanner__bar .erp-btn { flex: 1; padding: .8rem; }
.erp-scan-btn { margin-left: .35rem; vertical-align: middle; padding: .45rem .6rem; }
.erp-scan-btn .dashicons { font-size: 20px; width: 20px; height: 20px; }
.erp-scan__result { margin-top: 1rem; }
.erp-scan-card { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem; border-radius: var(--erp-r-md); border: 1px solid var(--erp-line); border-left: 6px solid var(--erp-line-strong); background: var(--erp-surface); }
.erp-scan-card--ok { border-left-color: var(--erp-ok); }
.erp-scan-card--bad { border-left-color: var(--erp-bad); background: color-mix(in srgb, var(--erp-bad) 5%, #fff); }
.erp-scan-card img { width: 84px; height: 104px; object-fit: cover; border-radius: var(--erp-r-sm); }
.erp-scan-card p { margin: 0 0 .25rem; }
.erp-scan-card__status { font-weight: 700; font-size: 1.1rem; }
.erp-scan-card--ok .erp-scan-card__status { color: var(--erp-ok); }
.erp-scan-card--bad .erp-scan-card__status { color: var(--erp-bad); }
.erp-scan-card__title { font: 700 1.15rem var(--erp-serif); }
.erp-scan__log { list-style: none; margin: .8rem 0 0; padding: 0; max-height: 50vh; overflow-y: auto; }
.erp-scan__log li { padding: .45rem .7rem; border-bottom: 1px solid var(--erp-line); }
.erp-scan__log li.is-ok::before { content: "✓ "; color: var(--erp-ok); font-weight: 700; }
.erp-scan__log li.is-warn::before { content: "↺ "; color: var(--erp-warn); font-weight: 700; }
.erp-scan__log li.is-bad::before { content: "✗ "; color: var(--erp-bad); font-weight: 700; }
.erp-scan-count { font: 700 1.6rem var(--erp-serif); color: var(--erp-primary-ink); margin: 0; }
.erp-toast { position: fixed; left: 50%; bottom: calc(1.2rem + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100001; background: var(--erp-ink); color: #fff; padding: .7rem 1.1rem; border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.25); max-width: 92vw; transition: opacity .4s, transform .4s; }
.erp-toast--bad { background: var(--erp-bad); }
.erp-toast.is-out { opacity: 0; transform: translate(-50%, 10px); }
.erp-offline-banner { position: sticky; top: 0; z-index: 9999; background: var(--erp-ink); color: #fff; padding: .55rem 1rem; font-size: .9rem; text-align: center; }
.erp-app-card > * { margin: 0 0 .5rem; }
.erp-app-card__push { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.erp-ticket { text-align: center; }
.erp-ticket .erp-qr { display: inline-block; padding: .6rem; background: #fff; border: 1px solid var(--erp-line); border-radius: var(--erp-r-md); }
.erp-ticket__code { font-size: 1.1rem; letter-spacing: .05em; }
@media (display-mode: standalone) { .erp-topbar { padding-top: max(1rem, env(safe-area-inset-top)); } }

/* ------------------------------------------------------------------ *
 * Payments & fees
 * ------------------------------------------------------------------ */
.erp-pay { text-align: left; }
.erp-pay__amount { font: 700 2.4rem/1.1 var(--erp-serif); color: var(--erp-primary-ink); margin: .2rem 0 .8rem; }
.erp-pay__go { font-size: 1.1rem; padding: .9rem; margin-top: .8rem; }
.erp-pay__msg { min-height: 1.4em; font-weight: 600; text-align: center; }
.erp-pay__msg.is-bad { color: var(--erp-bad); }
.erp-pay__upi { margin-top: 1rem; border-top: 1px solid var(--erp-line); padding-top: .8rem; }
.erp-pay__upi summary { cursor: pointer; font-weight: 600; color: var(--erp-primary-ink); }
.erp-center { text-align: center; }
.erp-fee__pay .erp-check { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; }
.erp-fee__custom { width: 9rem; display: inline-block; }
.erp-fee-counter { border-top: 1px solid var(--erp-line); padding-top: .8rem; margin-top: .8rem; }
.erp-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.erp-receipt { max-width: 180mm; margin: 0 auto; background: #fff; padding: 10mm 12mm; border: 1px solid var(--erp-line); }
.erp-receipt__head { display: flex; gap: 1rem; align-items: center; border-bottom: 2px solid var(--erp-primary); padding-bottom: .6rem; margin-bottom: .6rem; }
.erp-receipt__head strong { font: 700 1.25rem var(--erp-serif); }
.erp-receipt h2 { text-align: center; letter-spacing: .08em; text-transform: uppercase; font-size: 1.05rem; margin: .6rem 0; }
.erp-receipt__meta, .erp-receipt__items { width: 100%; border-collapse: collapse; margin-bottom: .8rem; }
.erp-receipt__meta td { padding: .3rem .4rem; vertical-align: top; }
.erp-receipt__meta td:nth-child(odd) { color: var(--erp-muted); width: 22%; }
.erp-receipt__items th, .erp-receipt__items td { border: 1px solid var(--erp-line-strong); padding: .4rem .6rem; text-align: left; }
.erp-receipt__items thead th { background: var(--erp-paper); }
.erp-receipt__items .erp-num { text-align: right; }
.erp-receipt__foot { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; }
@media print { .erp-receipt { border: 0; padding: 0; } }

/* ------------------------------------------------------------------ *
 * Hall ticket & exam hall
 * ------------------------------------------------------------------ */
.erp-ht { max-width: 190mm; margin: 0 auto; background: #fff; padding: 9mm 11mm; border: 1.5px solid var(--erp-ink); }
.erp-ht__head { display: flex; gap: 1rem; align-items: center; border-bottom: 2px solid var(--erp-primary); padding-bottom: .5rem; }
.erp-ht__head strong { font: 700 1.25rem var(--erp-serif); }
.erp-ht h2 { text-align: center; text-transform: uppercase; letter-spacing: .06em; font-size: 1.05rem; margin: .6rem 0; }
.erp-ht__who { display: grid; grid-template-columns: 1fr 32mm; gap: 1rem; align-items: start; }
.erp-ht__photo { width: 32mm; height: 40mm; border: 1px solid var(--erp-line-strong); display: grid; place-items: center; overflow: hidden; color: var(--erp-muted); font-size: .75rem; }
.erp-ht__photo img { width: 100%; height: 100%; object-fit: cover; }
.erp-ht__sign { min-width: 28mm; }
.erp-ht__foot { display: flex; gap: 1rem; align-items: flex-start; margin-top: .6rem; }
.erp-ht__rules { font-size: .82rem; margin: 0; padding-left: 1.1rem; }
.erp-ht__signs { display: flex; justify-content: space-between; gap: 1rem; margin-top: 14mm; font-size: .82rem; }
.erp-ht__signs span { border-top: 1px solid var(--erp-ink); padding-top: .2rem; flex: 1; text-align: center; }
.erp-scan-face { width: 72px; height: 72px; object-fit: cover; border-radius: 50%; margin-top: .4rem; }
@media print { .erp-ht { border-width: 1px; } }

/* ------------------------------------------------------------------ *
 * Admissions
 * ------------------------------------------------------------------ */
.erp-adm__photo { width: 90px; height: 110px; object-fit: cover; border-radius: var(--erp-r-sm); border: 1px solid var(--erp-line); display: block; margin-bottom: .4rem; }
.erp-adm__head { display: flex; gap: 1rem; align-items: flex-start; }
.erp-adm__head h2 { margin: 0 0 .2rem; }
.erp-adm__offer { border: 2px solid var(--erp-ok); border-radius: var(--erp-r-md); padding: 1rem 1.2rem; margin: 1rem 0; background: color-mix(in srgb, var(--erp-ok) 6%, #fff); }
.erp-adm__offer-title { font: 700 1.2rem var(--erp-serif); margin: 0 0 .3rem; }
.erp-steps { margin: .5rem 0 0; padding-left: 1.2rem; display: grid; gap: .8rem; }

/* ------------------------------------------------------------------ *
 * OBE
 * ------------------------------------------------------------------ */
.erp-obe-matrix th, .erp-obe-matrix td { text-align: center; }
.erp-obe-matrix th[scope="row"] { text-align: left; white-space: nowrap; }
.erp-obe-matrix select { padding: .15rem .2rem; min-width: 3rem; }
.erp-obe-cell--3 { background: color-mix(in srgb, var(--erp-primary) 26%, #fff); font-weight: 700; }
.erp-obe-cell--2 { background: color-mix(in srgb, var(--erp-primary) 15%, #fff); }
.erp-obe-cell--1 { background: color-mix(in srgb, var(--erp-primary) 7%, #fff); }
.erp-obe-barcol { width: 30%; min-width: 120px; }
.erp-obe-bar { display: block; height: .7rem; border-radius: 99px; background: var(--erp-bad); min-width: 2px; }
.erp-obe-bar.is-met { background: var(--erp-ok); }
.erp-obe-rate { border: 0; border-top: 1px solid var(--erp-line); padding: .6rem 0; margin: 0; }
.erp-obe-rate legend { padding: 0; margin-bottom: .3rem; }
.erp-obe-rate label { display: inline-flex; gap: .25rem; align-items: center; margin-right: 1rem; min-height: 44px; cursor: pointer; }

/* ------------------------------------------------------------------ *
 * Classroom
 * ------------------------------------------------------------------ */
.erp-cls-materials, .erp-cls-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.erp-cls-materials li, .erp-cls-list li { padding: .6rem 0; border-bottom: 1px solid var(--erp-line); }
.erp-cls-answer { white-space: normal; background: var(--erp-paper); border: 1px solid var(--erp-line); border-radius: var(--erp-r-sm); padding: .6rem .8rem; max-height: 18rem; overflow: auto; }
.erp-cls-grade textarea { width: 100%; min-width: 12rem; font: inherit; padding: .3rem; }
.erp-cls-mark { width: 5rem; }
.erp-cls-score { font: 700 1.3rem var(--erp-serif); color: var(--erp-primary-ink); }

/* ------------------------------------------------------------------ *
 * Module manager
 * ------------------------------------------------------------------ */
.erp-mods__group { margin: 1.5rem 0 .6rem; }
.erp-mods__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .9rem; }
.erp-mods__card { border: 1px solid var(--erp-line); border-left: 5px solid var(--erp-line-strong); border-radius: var(--erp-r-md); background: var(--erp-surface); padding: .8rem 1rem; opacity: .78; transition: opacity .2s, border-color .2s; }
.erp-mods__card.is-on { border-left-color: var(--erp-ok); opacity: 1; }
.erp-mods__card header { display: flex; align-items: center; gap: .5rem; }
.erp-mods__card header strong { flex: 1; }
.erp-mods__switch { margin: 0; }
.erp-mods__meta { font-size: .8rem; color: var(--erp-muted); margin: .3rem 0 0; }
.erp-mods__note { font-size: .82rem; color: var(--erp-warn); font-weight: 600; margin: .2rem 0 0; min-height: 0; }
.erp-mods__limits { margin-top: .5rem; font-size: .88rem; }
.erp-mods__limits summary { cursor: pointer; color: var(--erp-primary-ink); font-weight: 600; }
.erp-mods__limits fieldset { border: 0; padding: .4rem 0 0; margin: 0; }
.erp-mods__limits legend { font-size: .8rem; color: var(--erp-muted); padding: 0; }
.erp-mods__save { position: sticky; bottom: 0; padding: .8rem 0; background: linear-gradient(to top, var(--erp-paper) 70%, transparent); }

/* ------------------------------------------------------------------ *
 * Parent view
 * ------------------------------------------------------------------ */
.erp-par-kids { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.erp-par-head { display: flex; gap: 1rem; align-items: center; }
.erp-par-head img { width: 72px; height: 88px; object-fit: cover; border-radius: var(--erp-r-sm); }
.erp-par-head h2 { margin: 0; }

/* ------------------------------------------------------------------ *
 * Seating & invigilation
 * ------------------------------------------------------------------ */
.erp-seat-form { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.erp-seat-form details { width: 100%; }
.erp-seat-prints { font-size: .82rem; width: 100%; }
.erp-seat-page { break-after: page; page-break-after: always; margin-bottom: 2rem; }
.erp-seat-page:last-child { break-after: auto; page-break-after: auto; }
.erp-seat-head { text-align: center; margin-bottom: .6rem; }
.erp-seat-head h2 { margin: .3rem 0 0; font-size: 1.3rem; }
.erp-seat-board { text-align: center; border: 1px dashed var(--erp-line-strong); padding: .2rem; font-size: .8rem; color: var(--erp-muted); margin: 0 auto .5rem; max-width: 60%; }
.erp-seat-grid { width: 100%; border-collapse: separate; border-spacing: 6px; table-layout: fixed; }
.erp-seat-bench { border: 1.5px solid var(--erp-ink); border-radius: 4px; padding: 2px; display: table-cell; }
.erp-seat-bench { white-space: nowrap; }
.erp-seat-cell { display: inline-block; width: calc(50% - 4px); vertical-align: top; text-align: center; padding: 2px; font-size: 9pt; line-height: 1.2; }
.erp-seat-bench .erp-seat-cell:only-child { width: 100%; }
.erp-seat-cell small { display: block; color: var(--erp-muted); font-size: 7pt; }
.erp-seat-cell strong { display: block; }
.erp-seat-cell.is-empty { color: var(--erp-muted); }
.erp-seat-cols { columns: 2 18rem; }
.erp-stickers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.erp-sticker { height: 34mm; box-sizing: border-box; padding: 3mm 4mm; border: .2mm dashed #c4d0d3; display: flex; flex-direction: column; justify-content: center; font-size: 9pt; line-height: 1.3; overflow: hidden; break-inside: avoid; }
.erp-sticker strong { font-size: 15pt; letter-spacing: .03em; }
@media print { .erp-sticker { border-color: transparent; } }

/* ------------------------------------------------------------------ *
 * Print
 * ------------------------------------------------------------------ */
@media print {
	@page { margin: 12mm; }
	.erp-body { background: #fff; font-size: 11pt; }
	.erp-noprint, .erp-offline-banner, .erp-toast, .erp-sidebar, .erp-topbar, .erp-actions, .erp-site-head, .erp-site-foot, .erp-ticker, .erp-filters, .erp-pages, .erp-skip, .erp-print__bar, #wpadminbar { display: none !important; }
	.erp-app { display: block; }
	.erp-main, .erp-site-content, .erp-print { padding: 0; max-width: none; }
	.erp-panel, .erp-table-wrap { border-color: #999; break-inside: avoid; }
	.erp-marksheet { border: 0; padding: 0; }
	a { color: inherit !important; text-decoration: none !important; }
}


/* ------------------------------------------------------------------ *
 * ERP 2.0 — dark theme, header tools, sign-in, dashboard, HR, payslip
 * ------------------------------------------------------------------ */
:root[data-theme="dark"] {
	--erp-ink: #e4ecee; --erp-muted: #a3b3b9; --erp-paper: #0f1719; --erp-surface: #172225;
	--erp-line: #2a3a3f; --erp-line-strong: #3b5057; --erp-ok: #5ec48f; --erp-warn: #e3a64a; --erp-bad: #ff8a80; --erp-info: #8ab8ec;
	--erp-tint: color-mix(in srgb, var(--erp-primary) 22%, #172225); color-scheme: dark;
	--erp-primary-ink: color-mix(in srgb, var(--erp-primary) 40%, #fff);
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--erp-ink: #e4ecee; --erp-muted: #a3b3b9; --erp-paper: #0f1719; --erp-surface: #172225;
		--erp-line: #2a3a3f; --erp-line-strong: #3b5057; --erp-ok: #5ec48f; --erp-warn: #e3a64a; --erp-bad: #ff8a80; --erp-info: #8ab8ec;
		--erp-tint: color-mix(in srgb, var(--erp-primary) 22%, #172225); color-scheme: dark;
		--erp-primary-ink: color-mix(in srgb, var(--erp-primary) 40%, #fff);
	}
}
:root[data-theme="dark"] .erp-body a:not(.erp-btn) { color: color-mix(in srgb, var(--erp-primary) 45%, #fff); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .erp-body a:not(.erp-btn) { color: color-mix(in srgb, var(--erp-primary) 45%, #fff); } }
.erp-body input, .erp-body select, .erp-body textarea { background: var(--erp-surface); color: var(--erp-ink); }

.erp-topbar__tools { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.erp-search input { width: 14rem; max-width: 40vw; padding: .45rem .7rem; border: 1px solid var(--erp-line-strong); border-radius: 999px; font: inherit; }
.erp-bell { position: relative; }
.erp-bell > summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; position: relative; }
.erp-bell > summary::-webkit-details-marker { display: none; }
.erp-bell > summary:hover { background: var(--erp-tint); }
.erp-bell__n { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--erp-bad); color: #fff; font: 700 11px/18px var(--erp-font); text-align: center; }
.erp-bell__panel { position: absolute; right: 0; top: calc(100% + 6px); width: min(360px, 92vw); max-height: 70vh; overflow: auto; background: var(--erp-surface); border: 1px solid var(--erp-line); border-radius: var(--erp-r-md); box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: .75rem; z-index: 80; }
.erp-bell__title { font-size: .95rem !important; margin-bottom: .5rem !important; }
.erp-bell__panel ul { list-style: none; margin: 0; padding: 0; }
.erp-bell__panel li a { display: block; padding: .5rem; border-radius: var(--erp-r-sm); text-decoration: none; color: var(--erp-ink); }
.erp-bell__panel li a:hover { background: var(--erp-tint); }
.erp-bell__panel small { display: block; color: var(--erp-muted); }
.erp-roleswitch select { padding: .4rem .6rem; border: 1px solid var(--erp-line-strong); border-radius: var(--erp-r-sm); font: inherit; max-width: 13rem; }
.erp-rolebadge { padding: .25rem .6rem; border-radius: 999px; background: var(--erp-tint); color: var(--erp-primary-ink); font-size: .85rem; font-weight: 600; }
.erp-theme { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--erp-ink); cursor: pointer; }
.erp-theme:hover { background: var(--erp-tint); }
@media (max-width: 900px) {
	.erp-topbar { flex-wrap: wrap; }
	.erp-topbar__tools { order: 3; width: 100%; margin-left: 0; }
	.erp-search { flex: 1; }
	.erp-search input { width: 100%; max-width: none; }
	.erp-user__name { display: none; }
}

/* Sign-in */
.erp-pass { display: flex; gap: .4rem; }
.erp-pass input { flex: 1; }
.erp-pass__toggle { min-width: 4.5rem; }
.erp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.erp-roles { border: 0; padding: 0; margin: 0 0 .75rem; display: grid; gap: .5rem; }
.erp-role { display: flex; gap: .65rem; align-items: flex-start; padding: .75rem .85rem; border: 1px solid var(--erp-line-strong); border-radius: var(--erp-r-md); cursor: pointer; background: var(--erp-surface); }
.erp-role:has(input:checked) { border-color: var(--erp-primary); box-shadow: inset 0 0 0 1px var(--erp-primary); background: var(--erp-tint); }
.erp-role input { margin-top: .2rem; }
.erp-role small { display: block; color: var(--erp-muted); font-size: .85rem; }

/* Dashboard */
.erp-quick { margin: 0 0 1rem; }
.erp-panel--attention { border-left: 4px solid var(--erp-warn); }
.erp-feed { list-style: none; margin: 0; padding: 0; }
.erp-feed li { padding: .4rem 0; border-bottom: 1px solid var(--erp-line); }
.erp-feed li:last-child { border-bottom: 0; }
.erp-feed time { display: inline-block; min-width: 6.5rem; color: var(--erp-muted); font-size: .85rem; }
.erp-customize > summary { cursor: pointer; font-weight: 600; }
.erp-stat__n { display: block; font: 700 1.6rem/1.1 var(--erp-serif); }
.erp-stat__l { display: block; color: var(--erp-muted); font-size: .85rem; }
.erp-table td.num, .erp-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.erp-table tr.is-bad td { background: color-mix(in srgb, var(--erp-bad) 8%, transparent); }
.erp-notice--info { border-left: 4px solid var(--erp-info); }

/* Payslip */
.erp-payslip { max-width: 820px; margin: 0 auto; }
.erp-payslip header { display: flex; gap: 1rem; align-items: center; border-bottom: 2px solid var(--erp-ink); padding-bottom: .5rem; margin-bottom: 1rem; }
.erp-payslip header h1 { font-size: 1.3rem; margin: 0; }
.erp-payslip header h2 { font-size: 1rem; margin: .25rem 0 0; }
.erp-payslip__net { font-size: 1.1rem; border: 1px solid var(--erp-line-strong); padding: .75rem; border-radius: var(--erp-r-sm); }
@media print { .erp-payslip .erp-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; } }

@media (prefers-reduced-motion: reduce) { .erp-body * { transition: none !important; animation: none !important; } }

/* ERP 2.0: busy state while a form is being sent (double-submit guard). */
form[aria-busy="true"] button.is-busy, form[aria-busy="true"] input[type="submit"].is-busy { opacity: .7; cursor: progress; }
form[aria-busy="true"] button.is-busy::after { content: ""; display: inline-block; width: .8em; height: .8em; margin-left: .45em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -.1em; animation: erp-spin .7s linear infinite; }
@keyframes erp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { form[aria-busy="true"] button.is-busy::after { animation: none; } }

/* ------------------------------------------------------------------ *
 * AQAR builder
 * ------------------------------------------------------------------ */
.erp-aqar-head__meta { margin: 0 0 .6rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.erp-aqar-progress { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; font-size: .92rem; }
.erp-aqar-progress .erp-progress { flex: 1 1 220px; max-width: 360px; }
.erp-aqar-crit { font: 700 1.25rem var(--erp-serif); margin: 1rem 0 .75rem; }
.erp-aqar-metric { border-left: 4px solid var(--erp-line-strong); scroll-margin-top: 5rem; }
.erp-aqar-metric.is-done { border-left-color: var(--erp-ok); }
.erp-aqar-metric__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .6rem; margin-bottom: .6rem; }
.erp-aqar-metric__head h3 { flex: 1 1 18rem; margin: 0; font-size: 1rem; line-height: 1.4; }
.erp-aqar-num { font: 700 .95rem var(--erp-font); color: var(--erp-primary); min-width: 3.4rem; }
.erp-aqar-done { margin-left: auto; font-weight: 600; }
.erp-aqar-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .6rem; margin: 0 0 .6rem; }
.erp-aqar-value strong { font: 700 1.35rem/1.2 var(--erp-serif); color: var(--erp-ink); }
.erp-aqar-note { flex-basis: 100%; color: var(--erp-muted); font-size: .9rem; }
.erp-aqar-data { margin: .4rem 0; font-size: .92rem; }
.erp-aqar-gaps { margin: .3rem 0 .6rem; padding-left: 1.1rem; font-size: .9rem; }
.erp-aqar-gaps a { color: var(--erp-warn); }
.erp-aqar-paste summary, .erp-aqar-helper summary { cursor: pointer; font-size: .92rem; color: var(--erp-primary); margin: .3rem 0; }
.erp-aqar-rows { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; white-space: pre; }
.erp-aqar-words.is-over { color: var(--erp-bad); font-weight: 600; }
.erp-aqar-grade { max-width: 30rem; }
.erp-aqar-evidence { margin: .6rem 0 0; font-size: .9rem; }
.erp-aqar-text { padding: .6rem .8rem; background: var(--erp-tint); border-radius: var(--erp-r-sm); }
.erp-aqar-save { position: sticky; bottom: 0; margin: 0; padding: .75rem 0; background: linear-gradient(to top, var(--erp-paper) 70%, transparent); z-index: 2; }
.erp-aqar-gaplist { columns: 2 16rem; }
.erp-aqar-report header { text-align: center; margin-bottom: 1rem; }
.erp-aqar-report h2 { font: 700 1.4rem var(--erp-serif); margin: 0; }
.erp-aqar-report h3 { margin: 1.4rem 0 .5rem; font-size: 1.05rem; }
.erp-aqar-report td p { margin: .35rem 0 0; }
@media print {
	.erp-aqar-report table { page-break-inside: auto; }
	.erp-aqar-report tr { page-break-inside: avoid; }
	.erp-aqar-save, .erp-aqar-paste, .erp-aqar-evidence { display: none !important; }
}
.erp-aqar-ready { min-width: 8rem; }
.erp-aqar-ready .erp-progress { display: inline-block; width: 5.5rem; vertical-align: middle; }
