:root {
  color-scheme: light;
  --navy-950: #030b25;
  --navy-900: #06143d;
  --navy-850: #081b51;
  --navy-800: #0a2463;
  --blue-700: #005be8;
  --blue-600: #0878f9;
  --blue-500: #00a8ff;
  --cyan-400: #18d3ff;
  --amber-500: #f3b61f;
  --amber-100: #fff4cc;
  --green-600: #0d9f6e;
  --green-100: #dff8ee;
  --red-600: #d84545;
  --red-100: #ffe8e8;
  --orange-600: #dc7819;
  --orange-100: #fff0dc;
  --violet-600: #7554d8;
  --violet-100: #eee9ff;
  --pink-600: #c84289;
  --pink-100: #ffe7f4;
  --teal-600: #078f97;
  --teal-100: #dcf7f5;
  --indigo-600: #3d58c8;
  --indigo-100: #e6eaff;
  --slate-950: #111827;
  --slate-900: #172033;
  --slate-800: #273449;
  --slate-700: #3b4a61;
  --slate-600: #53637a;
  --slate-500: #718096;
  --slate-400: #98a5b7;
  --slate-300: #cbd3df;
  --slate-200: #e2e8f0;
  --slate-150: #edf1f6;
  --slate-100: #f4f7fb;
  --slate-50: #f8fafc;
  --white: #fff;
  --surface: #fff;
  --surface-soft: #f7faff;
  --line: #e1e8f2;
  --line-strong: #cbd5e1;
  --text: #172033;
  --muted: #6a788c;
  --focus: #00a8ff;
  --shadow-xs: 0 1px 2px rgba(8, 27, 81, .05);
  --shadow-sm: 0 8px 24px rgba(8, 27, 81, .08);
  --shadow-md: 0 18px 48px rgba(8, 27, 81, .13);
  --shadow-lg: 0 28px 80px rgba(3, 11, 37, .22);
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --sidebar-width: 286px;
  --topbar-height: 78px;
  --transition: 180ms cubic-bezier(.2,.8,.2,1);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100%; font-family: var(--font); color: var(--text); background: var(--slate-100); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; }
img { max-width: 100%; }
svg { width: 1.2em; height: 1.2em; fill: currentColor; }
::selection { background: rgba(0, 168, 255, .22); }

.skip-link { position: fixed; top: 10px; left: 10px; z-index: 9999; transform: translateY(-160%); padding: 10px 14px; border-radius: 10px; background: var(--navy-900); color: #fff; text-decoration: none; }
.skip-link:focus { transform: translateY(0); }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Login */
body.login-mode { background: var(--navy-950); overflow-x: hidden; }
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(420px, .82fr); background: #fff; }
.login-brand-panel { position: relative; overflow: hidden; min-height: 100vh; padding: 48px clamp(38px, 6vw, 88px); display: flex; flex-direction: column; color: #fff; background:
  radial-gradient(circle at 72% 18%, rgba(24, 211, 255, .35), transparent 30%),
  radial-gradient(circle at 18% 82%, rgba(0, 91, 232, .42), transparent 36%),
  linear-gradient(145deg, var(--navy-950), var(--navy-850) 45%, #06348e 100%);
}
.login-brand-panel::before { content: ""; position: absolute; inset: -20%; opacity: .24; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 44px 44px; transform: perspective(500px) rotateX(58deg) rotateZ(-9deg) translateY(20%); transform-origin: center; }
.login-brand-panel::after { content: ""; position: absolute; width: 540px; height: 540px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; right: -180px; top: 100px; box-shadow: 0 0 0 64px rgba(255,255,255,.025), 0 0 0 128px rgba(255,255,255,.018); }
.login-brand-panel > * { position: relative; z-index: 1; }
.login-brand-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.login-brand-badge { display: inline-flex; align-items: center; gap: 9px; padding: 8px 13px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(255,255,255,.08); backdrop-filter: blur(12px); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.login-brand-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan-400); box-shadow: 0 0 16px var(--cyan-400); }
.login-version { color: rgba(255,255,255,.64); font-size: 12px; }
.login-hero { flex: 1; display: grid; align-items: center; grid-template-columns: minmax(0, .96fr) minmax(280px, .72fr); gap: clamp(28px, 4vw, 70px); padding: 42px 0 34px; }
.login-copy { max-width: 700px; }
.login-copy .eyebrow { color: #7ee8ff; }
.login-copy h1 { margin: 14px 0 18px; max-width: 760px; font-size: clamp(42px, 5.6vw, 78px); line-height: .98; letter-spacing: -.055em; font-weight: 850; }
.login-copy h1 span { display: block; color: #7ee8ff; }
.login-copy > p { margin: 0; max-width: 690px; color: rgba(255,255,255,.78); font-size: clamp(16px, 1.4vw, 19px); line-height: 1.72; }
.login-feature-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 34px; }
.login-feature { min-height: 122px; padding: 18px; border: 1px solid rgba(255,255,255,.14); border-radius: 18px; background: rgba(255,255,255,.075); backdrop-filter: blur(14px); transition: transform var(--transition), background var(--transition); }
.login-feature:hover { transform: translateY(-3px); background: rgba(255,255,255,.11); }
.login-feature svg { width: 24px; height: 24px; color: var(--cyan-400); }
.login-feature strong { display: block; margin: 12px 0 5px; font-size: 13px; }
.login-feature span { display: block; color: rgba(255,255,255,.64); font-size: 11px; line-height: 1.5; }
.login-logo-stage { position: relative; display: grid; place-items: center; min-height: 440px; }
.login-logo-halo { position: absolute; width: min(34vw, 460px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(0,174,255,.3), rgba(0,91,232,.08) 55%, transparent 72%); filter: blur(2px); }
.login-logo-card { position: relative; z-index: 1; width: min(31vw, 430px); aspect-ratio: 1; display: grid; place-items: center; padding: 24px; border: 1px solid rgba(255,255,255,.18); border-radius: 42px; background: linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.05)); box-shadow: 0 36px 90px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.2); backdrop-filter: blur(16px); transform: rotate(-1.5deg); }
.login-logo-card img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 18px 28px rgba(0,0,0,.28)); }
.login-brand-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; color: rgba(255,255,255,.55); font-size: 11px; }
.login-brand-footer strong { color: rgba(255,255,255,.86); }
.login-panel { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: clamp(34px, 6vw, 90px); background: linear-gradient(180deg, #fff, #f6f9ff); }
.login-card { width: min(100%, 510px); }
.login-mobile-logo { display: none; width: 170px; margin: 0 auto 18px; }
.login-card__header { margin-bottom: 32px; }
.login-card__header h2 { margin: 8px 0 8px; font-size: clamp(30px, 3.5vw, 44px); letter-spacing: -.035em; }
.login-card__header p { margin: 0; color: var(--muted); line-height: 1.6; }
.login-form { display: grid; gap: 18px; }
.login-form .button { width: 100%; min-height: 52px; justify-content: center; }
.login-help-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 12px; }
.login-help-row button { border: 0; padding: 0; color: var(--blue-700); background: none; font-weight: 700; cursor: pointer; }
.demo-access { margin-top: 8px; padding-top: 25px; border-top: 1px solid var(--line); }
.demo-access__title { display: flex; align-items: end; justify-content: space-between; margin-bottom: 12px; }
.demo-access__title strong { font-size: 12px; }
.demo-access__title span { color: var(--muted); font-size: 10px; }
.demo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.demo-account { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 13px; background: #fff; text-align: left; cursor: pointer; transition: border var(--transition), transform var(--transition), box-shadow var(--transition); }
.demo-account:hover { border-color: rgba(0,120,249,.4); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.demo-account__avatar { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; color: #fff; background: linear-gradient(145deg, var(--navy-800), var(--blue-600)); font-size: 10px; font-weight: 800; }
.demo-account strong { display: block; font-size: 11px; }
.demo-account small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.login-security-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; padding: 13px 15px; border-radius: 13px; background: #f0f7ff; color: #3a5c85; font-size: 10px; line-height: 1.55; }
.login-security-note svg { flex: 0 0 auto; margin-top: 1px; color: var(--blue-600); }

/* Shell */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); background: var(--slate-100); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: var(--sidebar-width); display: flex; flex-direction: column; overflow: hidden; color: #fff; background:
  radial-gradient(circle at 30% 4%, rgba(0,168,255,.22), transparent 22%),
  linear-gradient(180deg, var(--navy-950), var(--navy-900) 55%, #051033);
  box-shadow: 10px 0 34px rgba(5, 16, 51, .14);
}
.sidebar__brand { display: flex; align-items: center; gap: 12px; min-height: 92px; padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar__brand-logo { width: 62px; height: 62px; flex: 0 0 auto; display: grid; place-items: center; padding: 3px; border-radius: 17px; background: rgba(255,255,255,.96); box-shadow: 0 10px 25px rgba(0,0,0,.24); }
.sidebar__brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.sidebar__brand-copy strong { display: block; font-size: 16px; letter-spacing: -.02em; }
.sidebar__brand-copy span { display: block; margin-top: 3px; color: rgba(255,255,255,.55); font-size: 9px; line-height: 1.4; }
.sidebar__school { padding: 16px 18px 10px; }
.school-chip { display: flex; gap: 10px; align-items: center; padding: 11px 12px; border: 1px solid rgba(255,255,255,.09); border-radius: 14px; background: rgba(255,255,255,.05); }
.school-chip__icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; color: #7ee8ff; background: rgba(0,168,255,.12); }
.school-chip strong { display: block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.school-chip span { display: block; margin-top: 3px; color: rgba(255,255,255,.45); font-size: 8px; }
.sidebar__nav { flex: 1; overflow-y: auto; padding: 6px 12px 22px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.nav-group-label { padding: 17px 10px 7px; color: rgba(255,255,255,.33); font-size: 8px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.nav-link { position: relative; width: 100%; display: flex; align-items: center; gap: 11px; min-height: 42px; margin: 2px 0; padding: 9px 11px; border: 0; border-radius: 12px; color: rgba(255,255,255,.66); background: transparent; text-align: left; cursor: pointer; transition: color var(--transition), background var(--transition), transform var(--transition); }
.nav-link svg { width: 17px; height: 17px; flex: 0 0 auto; }
.nav-link span:not(.nav-badge) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 650; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.07); transform: translateX(2px); }
.nav-link.is-active { color: #fff; background: linear-gradient(90deg, rgba(0,120,249,.38), rgba(0,168,255,.14)); box-shadow: inset 3px 0 #22ccff; }
.nav-link.is-active::after { content: ""; position: absolute; right: 9px; width: 5px; height: 5px; border-radius: 50%; background: #7ee8ff; box-shadow: 0 0 10px #7ee8ff; }
.nav-badge { min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; border-radius: 999px; color: #fff; background: rgba(243,182,31,.88); font-size: 8px; font-weight: 850; }
.sidebar__footer { padding: 13px 14px 16px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; }
.sidebar-user .avatar { flex: 0 0 auto; }
.sidebar-user__copy { flex: 1; min-width: 0; }
.sidebar-user__copy strong, .sidebar-user__copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user__copy strong { font-size: 10px; }
.sidebar-user__copy span { margin-top: 3px; color: rgba(255,255,255,.45); font-size: 8px; }
.sidebar-user .icon-button { color: rgba(255,255,255,.55); }

.app-workspace { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 40; min-height: var(--topbar-height); display: flex; align-items: center; gap: 16px; padding: 0 28px; border-bottom: 1px solid rgba(203,213,225,.75); background: rgba(255,255,255,.9); backdrop-filter: blur(18px); }
.mobile-menu-button { display: none; }
.topbar__title { min-width: 190px; }
.topbar__title strong { display: block; font-size: 14px; letter-spacing: -.015em; }
.topbar__title span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.topbar-search { position: relative; flex: 1; max-width: 560px; }
.topbar-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--slate-400); }
.topbar-search input { width: 100%; height: 42px; padding: 0 16px 0 40px; border: 1px solid var(--line); border-radius: 13px; background: var(--slate-50); outline: none; font-size: 10px; transition: border var(--transition), box-shadow var(--transition), background var(--transition); }
.topbar-search input:focus { border-color: rgba(0,120,249,.45); background: #fff; box-shadow: 0 0 0 4px rgba(0,168,255,.1); }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.term-selector { height: 39px; max-width: 150px; padding: 0 30px 0 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--slate-700); background: #fff; font-size: 9px; font-weight: 700; outline: none; }
.sync-status { display: flex; align-items: center; gap: 8px; height: 39px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--slate-600); font-size: 8px; font-weight: 750; cursor: pointer; }
.sync-status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-600); box-shadow: 0 0 0 4px rgba(13,159,110,.11); }
.sync-status.has-pending .sync-status__dot { background: var(--amber-500); box-shadow: 0 0 0 4px rgba(243,182,31,.12); }
.sync-status.is-offline .sync-status__dot { background: var(--red-600); box-shadow: 0 0 0 4px rgba(216,69,69,.1); }
.topbar-icon { position: relative; }
.topbar-count { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; border: 2px solid #fff; border-radius: 999px; background: var(--red-600); color: #fff; font-size: 7px; font-weight: 850; }
.main-content { min-height: calc(100vh - var(--topbar-height)); padding: 27px 28px 48px; }
.page { width: min(100%, 1540px); margin: 0 auto; animation: page-in 260ms ease both; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.offline-banner { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 12px 15px; border: 1px solid #f7c8c8; border-radius: 14px; background: #fff5f5; color: #9d3535; font-size: 10px; }
.offline-banner svg { flex: 0 0 auto; }

/* Typography and generic */
.eyebrow { margin: 0; color: var(--blue-700); font-size: 8px; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.page-header__copy { max-width: 820px; }
.page-header h1, .page-header h2 { margin: 7px 0 6px; font-size: clamp(25px, 3vw, 36px); line-height: 1.1; letter-spacing: -.038em; }
.page-header p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.page-header__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 26px 0 13px; }
.section-heading h2, .section-heading h3 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.section-heading a, .section-heading button.link-button { border: 0; padding: 0; background: none; color: var(--blue-700); font-size: 9px; font-weight: 750; cursor: pointer; }

.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid--sidebar { grid-template-columns: minmax(0, 1.55fr) minmax(290px, .75fr); }
.grid--wide-sidebar { grid-template-columns: minmax(0, 1.35fr) minmax(340px, .85fr); }
.stack { display: grid; gap: 14px; }
.cluster { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.spacer { flex: 1; }

.card { position: relative; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-xs); overflow: hidden; }
.card--padded { padding: 20px; }
.card--soft { background: var(--surface-soft); }
.card--interactive { transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
.card--interactive:hover { transform: translateY(-3px); border-color: rgba(0,120,249,.22); box-shadow: var(--shadow-sm); }
.card__header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px 12px; }
.card__header h3 { margin: 0; font-size: 13px; }
.card__header p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.card__body { padding: 0 20px 20px; }
.card__footer { display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--slate-50); }

.hero-card { position: relative; min-height: 250px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .65fr); align-items: center; gap: 28px; padding: 34px; overflow: hidden; border: 0; border-radius: 25px; color: #fff; background:
  radial-gradient(circle at 86% 16%, rgba(24,211,255,.3), transparent 24%),
  radial-gradient(circle at 18% 130%, rgba(0,168,255,.32), transparent 38%),
  linear-gradient(135deg, var(--navy-950), #08256b 58%, #005be8 140%);
  box-shadow: 0 20px 52px rgba(7,26,75,.22);
}
.hero-card::after { content: ""; position: absolute; width: 330px; height: 330px; right: -115px; bottom: -170px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; box-shadow: 0 0 0 48px rgba(255,255,255,.025), 0 0 0 96px rgba(255,255,255,.018); }
.hero-card > * { position: relative; z-index: 1; }
.hero-card .eyebrow { color: #74e6ff; }
.hero-card h1 { margin: 9px 0 12px; max-width: 760px; font-size: clamp(30px, 4vw, 48px); line-height: 1.05; letter-spacing: -.045em; }
.hero-card p { margin: 0; max-width: 700px; color: rgba(255,255,255,.72); font-size: 11px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.hero-card .button--ghost { color: #fff; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.08); }
.hero-visual { display: grid; place-items: center; }
.hero-logo { width: 200px; height: 200px; padding: 13px; border-radius: 30px; background: rgba(255,255,255,.93); box-shadow: 0 25px 50px rgba(0,0,0,.24); transform: rotate(2deg); }
.hero-logo img { width: 100%; height: 100%; object-fit: contain; }
.hero-profile { width: 100%; padding: 20px; border: 1px solid rgba(255,255,255,.13); border-radius: 20px; background: rgba(255,255,255,.08); backdrop-filter: blur(12px); }
.hero-profile__top { display: flex; align-items: center; gap: 12px; }
.hero-profile strong { display: block; font-size: 13px; }
.hero-profile span { display: block; margin-top: 3px; color: rgba(255,255,255,.58); font-size: 9px; }
.hero-profile__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 17px; }
.hero-profile__stat { padding: 10px 8px; border-radius: 12px; background: rgba(0,0,0,.14); text-align: center; }
.hero-profile__stat b { display: block; font-size: 17px; }
.hero-profile__stat small { color: rgba(255,255,255,.54); font-size: 7px; text-transform: uppercase; letter-spacing: .08em; }

.metric-card { min-height: 128px; display: flex; align-items: flex-start; gap: 15px; padding: 19px; }
.metric-card__icon { width: 43px; height: 43px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 13px; color: var(--blue-700); background: #e9f4ff; }
.metric-card__icon svg { width: 21px; height: 21px; }
.metric-card__value { font-size: 27px; font-weight: 850; line-height: 1; letter-spacing: -.04em; }
.metric-card__label { margin-top: 6px; color: var(--slate-700); font-size: 10px; font-weight: 750; }
.metric-card__note { margin-top: 5px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.metric-card--green .metric-card__icon { color: var(--green-600); background: var(--green-100); }
.metric-card--amber .metric-card__icon { color: var(--orange-600); background: var(--orange-100); }
.metric-card--violet .metric-card__icon { color: var(--violet-600); background: var(--violet-100); }
.metric-card--red .metric-card__icon { color: var(--red-600); background: var(--red-100); }
.metric-card--teal .metric-card__icon { color: var(--teal-600); background: var(--teal-100); }

.button { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 1px solid transparent; border-radius: 11px; font-size: 9px; font-weight: 800; line-height: 1; cursor: pointer; transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition), color var(--transition); text-decoration: none; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button svg { width: 15px; height: 15px; }
.button--primary { color: #fff; background: linear-gradient(135deg, var(--blue-700), var(--blue-500)); box-shadow: 0 9px 22px rgba(0,120,249,.22); }
.button--primary:hover { box-shadow: 0 12px 26px rgba(0,120,249,.3); }
.button--secondary { color: #fff; background: var(--navy-800); }
.button--outline { border-color: var(--line-strong); color: var(--slate-700); background: #fff; }
.button--outline:hover { border-color: rgba(0,120,249,.4); color: var(--blue-700); }
.button--ghost { border-color: transparent; color: var(--slate-600); background: transparent; }
.button--danger { color: var(--red-600); border-color: #f2c5c5; background: #fff5f5; }
.button--success { color: #fff; background: var(--green-600); }
.button--small { min-height: 31px; padding: 0 10px; border-radius: 9px; font-size: 8px; }
.button--block { width: 100%; }
.icon-button { position: relative; width: 37px; height: 37px; flex: 0 0 auto; display: grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 11px; background: transparent; cursor: pointer; transition: background var(--transition), color var(--transition), border var(--transition); }
.icon-button:hover { color: var(--blue-700); border-color: var(--line); background: #fff; }
.icon-button svg { width: 17px; height: 17px; }
.link-button { border: 0; background: none; color: var(--blue-700); font-weight: 750; cursor: pointer; }

.avatar { width: 37px; height: 37px; display: inline-grid; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(145deg, var(--blue-700), var(--cyan-400)); box-shadow: 0 6px 18px rgba(0,91,232,.2); font-size: 10px; font-weight: 850; }
.avatar--large { width: 52px; height: 52px; border-radius: 15px; font-size: 14px; }
.avatar--xl { width: 72px; height: 72px; border-radius: 20px; font-size: 19px; }
.avatar--parent { background: linear-gradient(145deg, var(--violet-600), var(--pink-600)); }
.avatar--admin { background: linear-gradient(145deg, var(--navy-800), var(--blue-500)); }

.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 23px; padding: 0 8px; border-radius: 999px; color: var(--slate-600); background: var(--slate-150); font-size: 7px; font-weight: 850; letter-spacing: .02em; white-space: nowrap; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .75; }
.badge--success { color: #087d58; background: var(--green-100); }
.badge--warning { color: #a65b0b; background: var(--orange-100); }
.badge--danger { color: #b63636; background: var(--red-100); }
.badge--info { color: #075fb5; background: #e1f1ff; }
.badge--violet { color: #5e45b8; background: var(--violet-100); }
.badge--neutral { color: var(--slate-600); background: var(--slate-150); }
.badge--no-dot::before { display: none; }

.progress { height: 7px; overflow: hidden; border-radius: 999px; background: var(--slate-150); }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue-700), var(--cyan-400)); }
.progress--green > span { background: linear-gradient(90deg, var(--green-600), #3ed7a2); }
.progress--amber > span { background: linear-gradient(90deg, var(--orange-600), var(--amber-500)); }

/* Forms */
.field { display: grid; gap: 7px; min-width: 0; }
.field label { color: var(--slate-700); font-size: 9px; font-weight: 760; }
.field label span { color: var(--muted); font-weight: 500; }
.input, .select, .textarea { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 11px; color: var(--text); background: #fff; outline: none; font-size: 10px; transition: border var(--transition), box-shadow var(--transition); }
.textarea { min-height: 104px; resize: vertical; line-height: 1.55; }
.input:focus, .select:focus, .textarea:focus { border-color: rgba(0,120,249,.55); box-shadow: 0 0 0 4px rgba(0,168,255,.1); }
.input:disabled, .select:disabled, .textarea:disabled { color: var(--slate-500); background: var(--slate-100); }
.field-help { color: var(--muted); font-size: 8px; line-height: 1.45; }
.field-error { color: var(--red-600); font-size: 8px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-span-2 { grid-column: span 2; }
.form-span-full { grid-column: 1 / -1; }
.checkbox-row, .radio-row { display: flex; align-items: flex-start; gap: 9px; color: var(--slate-700); font-size: 9px; line-height: 1.45; cursor: pointer; }
.checkbox-row input, .radio-row input { margin-top: 2px; accent-color: var(--blue-700); }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.form-section { padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--slate-50); }
.form-section h4 { margin: 0 0 12px; font-size: 11px; }

/* Toolbars and filters */
.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 15px; padding: 11px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.toolbar__search { position: relative; flex: 1; min-width: 220px; }
.toolbar__search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--slate-400); }
.toolbar__search input { width: 100%; height: 37px; padding: 0 12px 0 35px; border: 1px solid var(--line); border-radius: 10px; outline: none; font-size: 9px; }
.toolbar select { height: 37px; min-width: 130px; padding: 0 29px 0 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 9px; }
.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--slate-100); }
.segmented button { min-height: 31px; padding: 0 11px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 8px; font-weight: 800; cursor: pointer; }
.segmented button.is-active { color: var(--blue-700); background: #fff; box-shadow: var(--shadow-xs); }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 17px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: #fff; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab-button { flex: 0 0 auto; min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-size: 9px; font-weight: 780; cursor: pointer; }
.tab-button svg { width: 15px; height: 15px; }
.tab-button.is-active { color: #fff; background: linear-gradient(135deg, var(--navy-800), var(--blue-700)); box-shadow: 0 8px 18px rgba(0,91,232,.18); }

/* Tables */
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 9px; }
.data-table th { position: sticky; top: 0; z-index: 1; padding: 11px 12px; border-bottom: 1px solid var(--line); color: var(--slate-500); background: #f8fafc; text-align: left; font-size: 7px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 12px; border-bottom: 1px solid var(--line); color: var(--slate-700); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: #f8fbff; }
.data-table .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .center { text-align: center; }
.data-table input.score-input { width: 64px; height: 32px; padding: 0 7px; border: 1px solid var(--line-strong); border-radius: 8px; text-align: center; font-size: 9px; }
.data-table input.score-input:focus { outline: 0; border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(0,168,255,.1); }
.table-person { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.table-person strong, .table-person span { display: block; }
.table-person strong { color: var(--text); font-size: 9px; }
.table-person span { margin-top: 3px; color: var(--muted); font-size: 7px; }
.table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.sticky-col { position: sticky; left: 0; z-index: 2; background: inherit; }
.class-record-table { min-width: 1080px; }
.class-record-table thead th { text-align: center; }
.class-record-table th:first-child, .class-record-table td:first-child { position: sticky; left: 0; z-index: 2; min-width: 210px; text-align: left; background: #fff; box-shadow: 7px 0 14px rgba(17,32,51,.04); }
.class-record-table thead th:first-child { z-index: 3; background: #f8fafc; }
.class-record-table .category-heading { color: #fff; background: var(--navy-800); }
.class-record-summary { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.record-stat { padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.record-stat span { display: block; color: var(--muted); font-size: 7px; text-transform: uppercase; letter-spacing: .08em; }
.record-stat strong { display: block; margin-top: 5px; font-size: 18px; }

/* Subjects, materials, assignments */
.subject-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 15px; }
.subject-card { --subject: var(--blue-600); min-height: 195px; padding: 20px; border: 1px solid var(--line); border-radius: 19px; background: #fff; box-shadow: var(--shadow-xs); cursor: pointer; transition: transform var(--transition), box-shadow var(--transition), border var(--transition); }
.subject-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--subject) 32%, var(--line)); box-shadow: var(--shadow-sm); }
.subject-card__top { display: flex; justify-content: space-between; gap: 12px; }
.subject-card__icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; color: var(--subject); background: color-mix(in srgb, var(--subject) 12%, white); }
.subject-card__code { align-self: flex-start; padding: 5px 7px; border-radius: 8px; color: var(--subject); background: color-mix(in srgb, var(--subject) 10%, white); font-size: 7px; font-weight: 850; }
.subject-card h3 { margin: 17px 0 5px; font-size: 13px; letter-spacing: -.02em; }
.subject-card p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.subject-card__meta { display: flex; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--slate-500); font-size: 8px; }
.subject-card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.subject-card[data-accent="red"] { --subject: var(--red-600); }
.subject-card[data-accent="violet"] { --subject: var(--violet-600); }
.subject-card[data-accent="teal"] { --subject: var(--teal-600); }
.subject-card[data-accent="amber"] { --subject: var(--orange-600); }
.subject-card[data-accent="green"] { --subject: var(--green-600); }
.subject-card[data-accent="pink"] { --subject: var(--pink-600); }
.subject-card[data-accent="orange"] { --subject: var(--orange-600); }
.subject-card[data-accent="indigo"] { --subject: var(--indigo-600); }
.subject-card[data-accent="slate"] { --subject: var(--slate-500); }

.resource-list { display: grid; gap: 11px; }
.resource-card { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: #fff; transition: border var(--transition), box-shadow var(--transition); }
.resource-card:hover { border-color: rgba(0,120,249,.22); box-shadow: var(--shadow-sm); }
.resource-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; color: var(--blue-700); background: #e8f4ff; }
.resource-icon svg { width: 21px; height: 21px; }
.resource-card h3 { margin: 0; font-size: 11px; }
.resource-card p { margin: 5px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.resource-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; color: var(--slate-500); font-size: 7px; }
.resource-card__actions { display: flex; align-items: center; gap: 6px; }
.assignment-card { padding: 18px; }
.assignment-card__top { display: flex; justify-content: space-between; gap: 12px; }
.assignment-card h3 { margin: 10px 0 7px; font-size: 12px; }
.assignment-card p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.55; }
.assignment-card__meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 15px; }
.mini-stat { padding: 9px; border-radius: 10px; background: var(--slate-50); }
.mini-stat span { display: block; color: var(--muted); font-size: 6px; text-transform: uppercase; letter-spacing: .08em; }
.mini-stat strong { display: block; margin-top: 4px; font-size: 9px; }
.assignment-card__footer { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }

/* Lists, timeline, notifications */
.list { display: grid; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item__icon { width: 39px; height: 39px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; color: var(--blue-700); background: #e9f4ff; }
.list-item__body { flex: 1; min-width: 0; }
.list-item__body strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.list-item__body p { margin: 4px 0 0; color: var(--muted); font-size: 8px; line-height: 1.4; }
.list-item__meta { color: var(--muted); font-size: 7px; text-align: right; }
.timeline { display: grid; }
.timeline-item { position: relative; display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 12px; padding-bottom: 18px; }
.timeline-item:not(:last-child)::after { content: ""; position: absolute; left: 20px; top: 38px; bottom: 0; width: 1px; background: var(--line); }
.timeline-date { width: 42px; height: 42px; display: grid; place-items: center; align-content: center; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.timeline-date strong { font-size: 13px; line-height: 1; }
.timeline-date span { margin-top: 2px; color: var(--muted); font-size: 6px; text-transform: uppercase; }
.timeline-copy { padding-top: 3px; }
.timeline-copy strong { display: block; font-size: 9px; }
.timeline-copy p { margin: 4px 0 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.notification-item { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 10px; padding: 13px; border-bottom: 1px solid var(--line); cursor: pointer; }
.notification-item.is-unread { background: #f4f9ff; }
.notification-item__dot { width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: var(--blue-600); box-shadow: 0 0 0 4px rgba(0,120,249,.1); }
.notification-item.is-read .notification-item__dot { background: var(--slate-300); box-shadow: none; }
.notification-item strong { display: block; font-size: 9px; }
.notification-item p { margin: 4px 0 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.notification-item time { color: var(--muted); font-size: 7px; }

/* Gallery and portfolio */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 17px; }
.gallery-card { overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: #fff; box-shadow: var(--shadow-xs); transition: transform var(--transition), box-shadow var(--transition); }
.gallery-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.gallery-card__media { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; color: #fff; background: linear-gradient(145deg, var(--navy-800), var(--blue-500)); }
.gallery-card__media img { width: 100%; height: 100%; object-fit: cover; }
.gallery-card__monogram { font-size: 62px; font-weight: 900; letter-spacing: -.08em; opacity: .75; }
.gallery-card__overlay { position: absolute; inset: auto 0 0; display: flex; justify-content: space-between; align-items: end; padding: 14px; background: linear-gradient(transparent, rgba(3,11,37,.8)); }
.gallery-card__body { padding: 16px; }
.gallery-card h3 { margin: 0; font-size: 12px; }
.gallery-card p { margin: 7px 0 0; color: var(--muted); font-size: 8px; line-height: 1.55; }
.gallery-card__learner { display: flex; align-items: center; gap: 9px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.gallery-card__learner strong { display: block; font-size: 9px; }
.gallery-card__learner span { display: block; margin-top: 2px; color: var(--muted); font-size: 7px; }
.gallery-card__actions { margin-left: auto; display: flex; align-items: center; gap: 5px; }
.reaction-button { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--slate-600); font-size: 8px; cursor: pointer; }
.reaction-button.is-active { color: var(--blue-700); border-color: #b8ddff; background: #eef8ff; }
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.portfolio-card { min-height: 170px; padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.portfolio-card__icon { width: 41px; height: 41px; display: grid; place-items: center; border-radius: 12px; color: var(--violet-600); background: var(--violet-100); }
.portfolio-card h3 { margin: 14px 0 6px; font-size: 10px; }
.portfolio-card p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.portfolio-card__meta { margin-top: 12px; color: var(--slate-500); font-size: 7px; }

/* Calendar */
.calendar-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 16px; }
.calendar-month { padding: 18px; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays div { padding: 8px; color: var(--slate-500); font-size: 7px; font-weight: 850; text-align: center; text-transform: uppercase; }
.calendar-day { min-height: 104px; padding: 8px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); background: #fff; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.is-muted { background: var(--slate-50); color: var(--slate-400); }
.calendar-day.is-today { box-shadow: inset 0 0 0 2px rgba(0,120,249,.45); }
.calendar-day__number { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; font-size: 8px; font-weight: 800; }
.calendar-day.is-today .calendar-day__number { color: #fff; background: var(--blue-700); }
.calendar-event { display: block; margin-top: 5px; padding: 5px 6px; overflow: hidden; border-radius: 6px; color: #075fb5; background: #e7f4ff; font-size: 6px; font-weight: 760; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event--amber { color: #95570f; background: var(--orange-100); }
.calendar-event--green { color: #087d58; background: var(--green-100); }
.calendar-event--violet { color: #5e45b8; background: var(--violet-100); }
.calendar-event--teal { color: #08777d; background: var(--teal-100); }
.calendar-agenda { padding: 18px; }

/* Messaging */
.messaging-shell { height: min(720px, calc(100vh - 190px)); display: grid; grid-template-columns: 300px minmax(0,1fr); border: 1px solid var(--line); border-radius: 20px; background: #fff; overflow: hidden; }
.message-contacts { border-right: 1px solid var(--line); overflow-y: auto; }
.message-contacts__header { position: sticky; top: 0; z-index: 1; padding: 15px; border-bottom: 1px solid var(--line); background: #fff; }
.contact-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 15px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; cursor: pointer; }
.contact-item:hover, .contact-item.is-active { background: #f3f8ff; }
.contact-item__copy { flex: 1; min-width: 0; }
.contact-item strong, .contact-item span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-item strong { font-size: 9px; }
.contact-item span { margin-top: 3px; color: var(--muted); font-size: 7px; }
.message-panel { display: grid; grid-template-rows: auto minmax(0,1fr) auto; min-width: 0; }
.message-panel__header { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 12px 17px; border-bottom: 1px solid var(--line); }
.message-panel__header strong, .message-panel__header span { display: block; }
.message-panel__header strong { font-size: 10px; }
.message-panel__header span { margin-top: 3px; color: var(--muted); font-size: 7px; }
.message-stream { display: flex; flex-direction: column; gap: 10px; padding: 20px; overflow-y: auto; background: #f7f9fd; }
.message-bubble { align-self: flex-start; max-width: min(72%, 560px); padding: 11px 13px; border: 1px solid var(--line); border-radius: 15px 15px 15px 5px; background: #fff; box-shadow: var(--shadow-xs); font-size: 9px; line-height: 1.55; }
.message-bubble.is-own { align-self: flex-end; color: #fff; border-color: transparent; border-radius: 15px 15px 5px 15px; background: linear-gradient(135deg, var(--blue-700), var(--blue-500)); }
.message-bubble time { display: block; margin-top: 6px; color: var(--muted); font-size: 6px; }
.message-bubble.is-own time { color: rgba(255,255,255,.62); }
.message-composer { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.message-composer input[type="text"] { height: 39px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; outline: none; font-size: 9px; }

/* Analytics */
.chart-card { padding: 20px; }
.chart-card h3 { margin: 0; font-size: 12px; }
.chart-card p { margin: 5px 0 0; color: var(--muted); font-size: 8px; }
.bar-chart { height: 230px; display: flex; align-items: flex-end; gap: 12px; padding-top: 26px; }
.bar-chart__item { flex: 1; min-width: 24px; display: grid; justify-items: center; align-items: end; height: 100%; }
.bar-chart__bar { width: min(100%, 40px); min-height: 3px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--cyan-400), var(--blue-700)); box-shadow: 0 8px 16px rgba(0,120,249,.14); }
.bar-chart__item strong { margin-top: 7px; font-size: 7px; }
.bar-chart__item span { margin-top: 3px; color: var(--muted); font-size: 6px; text-align: center; }
.horizontal-bars { display: grid; gap: 13px; margin-top: 18px; }
.horizontal-bar__head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: 8px; }
.risk-item { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.risk-item:last-child { border-bottom: 0; }
.risk-item strong { display: block; font-size: 9px; }
.risk-item p { margin: 3px 0 0; color: var(--muted); font-size: 7px; }

/* Bulletin, payments, awards */
.bulletin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 15px; }
.bulletin-card { padding: 18px; }
.bulletin-card.is-pinned { border-color: #b8dcff; box-shadow: inset 4px 0 var(--blue-600); }
.bulletin-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bulletin-card h3 { margin: 13px 0 7px; font-size: 12px; }
.bulletin-card p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.6; }
.bulletin-card__footer { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 7px; }
.payment-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.payment-summary__item { padding: 16px; border-radius: 14px; background: var(--slate-50); }
.payment-summary__item span { display: block; color: var(--muted); font-size: 7px; text-transform: uppercase; letter-spacing: .07em; }
.payment-summary__item strong { display: block; margin-top: 6px; font-size: 20px; }
.award-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 15px; }
.award-card { position: relative; min-height: 220px; padding: 22px; overflow: hidden; border: 1px solid #f0d98b; border-radius: 20px; background: linear-gradient(145deg, #fffdf3, #fff8d9); }
.award-card::after { content: ""; position: absolute; width: 160px; height: 160px; right: -65px; top: -70px; border-radius: 50%; background: rgba(243,182,31,.13); }
.award-card__icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; color: #9a6910; background: #ffefb2; }
.award-card h3 { margin: 18px 0 7px; font-size: 14px; }
.award-card p { margin: 0; color: #756531; font-size: 8px; line-height: 1.55; }
.award-card__number { margin-top: 16px; color: #8c762d; font-size: 7px; font-weight: 800; letter-spacing: .06em; }

/* Settings and system */
.settings-grid { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 16px; }
.settings-menu { padding: 10px; }
.settings-menu button { width: 100%; min-height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 11px; border: 0; border-radius: 10px; color: var(--slate-600); background: transparent; text-align: left; font-size: 9px; font-weight: 750; cursor: pointer; }
.settings-menu button.is-active { color: var(--blue-700); background: #edf7ff; }
.settings-panel { padding: 22px; }
.settings-panel h3 { margin: 0; font-size: 14px; }
.settings-panel > p { margin: 6px 0 20px; color: var(--muted); font-size: 9px; line-height: 1.6; }
.security-card { display: flex; align-items: center; gap: 13px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.security-card__icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--green-600); background: var(--green-100); }
.security-card strong { display: block; font-size: 9px; }
.security-card p { margin: 4px 0 0; color: var(--muted); font-size: 8px; }
.security-card .spacer + * { margin-left: auto; }
.ai-feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 14px; }
.ai-card { min-height: 180px; padding: 18px; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(145deg, #fff, #f7f5ff); }
.ai-card__icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 13px; color: var(--violet-600); background: var(--violet-100); }
.ai-card h3 { margin: 15px 0 6px; font-size: 11px; }
.ai-card p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.55; }
.ai-card .badge { margin-top: 13px; }

/* Empty and informational */
.empty-state { min-height: 250px; display: grid; place-items: center; align-content: center; padding: 32px; text-align: center; }
.empty-state__icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; color: var(--blue-700); background: #e9f4ff; }
.empty-state__icon svg { width: 28px; height: 28px; }
.empty-state h3 { margin: 15px 0 6px; font-size: 13px; }
.empty-state p { max-width: 430px; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.empty-state .button { margin-top: 16px; }
.info-banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid #bddfff; border-radius: 14px; color: #2f5f8d; background: #eef8ff; }
.info-banner--warning { border-color: #f1d29f; color: #85581c; background: #fff9ea; }
.info-banner--danger { border-color: #f0c5c5; color: #9b3838; background: #fff4f4; }
.info-banner__icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.7); }
.info-banner strong { display: block; font-size: 9px; }
.info-banner p { margin: 4px 0 0; font-size: 8px; line-height: 1.5; }

/* Modal, panels, toast */
.modal { width: min(760px, calc(100vw - 28px)); max-height: min(88vh, 920px); padding: 0; border: 0; border-radius: 22px; background: #fff; box-shadow: var(--shadow-lg); overflow: hidden; }
.modal::backdrop, .quick-panel::backdrop { background: rgba(3,11,37,.62); backdrop-filter: blur(5px); }
.modal[open] { animation: modal-in 180ms ease both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal form { display: grid; grid-template-rows: auto minmax(0,1fr) auto; max-height: inherit; }
.modal__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 21px 23px 17px; border-bottom: 1px solid var(--line); }
.modal__header h2 { margin: 6px 0 0; font-size: 19px; letter-spacing: -.025em; }
.modal__description { margin: 5px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.modal__body { overflow-y: auto; padding: 21px 23px; }
.modal__actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 23px; border-top: 1px solid var(--line); background: var(--slate-50); }
.modal--wide { width: min(1040px, calc(100vw - 28px)); }
.modal--compact { width: min(520px, calc(100vw - 28px)); }
.quick-panel { width: min(430px, calc(100vw - 20px)); height: min(680px, calc(100vh - 30px)); margin: 15px 15px 15px auto; padding: 0; border: 0; border-radius: 20px; background: #fff; box-shadow: var(--shadow-lg); }
.quick-panel[open] { animation: panel-in 180ms ease both; }
@keyframes panel-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.quick-panel__header { display: flex; justify-content: space-between; align-items: flex-start; padding: 19px; border-bottom: 1px solid var(--line); }
.quick-panel__header h2 { margin: 5px 0 0; font-size: 17px; }
.quick-panel__body { height: calc(100% - 73px); overflow-y: auto; }
.toast-region { position: fixed; z-index: 120; right: 22px; bottom: 22px; display: grid; gap: 9px; width: min(370px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 10px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-md); pointer-events: auto; animation: toast-in 220ms ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.toast__icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: var(--green-600); background: var(--green-100); }
.toast--danger .toast__icon { color: var(--red-600); background: var(--red-100); }
.toast--warning .toast__icon { color: var(--orange-600); background: var(--orange-100); }
.toast strong { display: block; font-size: 9px; }
.toast p { margin: 4px 0 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.toast button { border: 0; background: none; color: var(--slate-400); cursor: pointer; }

.print-root { display: none; }

/* Responsive */
@media (max-width: 1280px) {
  :root { --sidebar-width: 260px; }
  .grid--5 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .login-hero { grid-template-columns: 1fr; }
  .login-logo-stage { display: none; }
  .login-copy h1 { font-size: clamp(42px, 6vw, 68px); }
}
@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid--sidebar, .grid--wide-sidebar, .calendar-layout { grid-template-columns: 1fr; }
  .topbar-search { max-width: none; }
  .topbar__title { display: none; }
  .hero-card { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-menu { display: flex; overflow-x: auto; }
  .settings-menu button { width: auto; flex: 0 0 auto; }
}
@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-brand-panel { display: none; }
  .login-panel { padding: 34px 22px; }
  .login-mobile-logo { display: block; }
  .app-shell { display: block; }
  .sidebar { transform: translateX(-103%); transition: transform var(--transition); }
  .sidebar.is-open { transform: translateX(0); }
  .app-workspace { margin-left: 0; }
  .mobile-menu-button { display: grid; }
  .topbar { padding: 0 16px; }
  .main-content { padding: 20px 16px 38px; }
  .term-selector { display: none; }
  .sync-status span:last-child { display: none; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .messaging-shell { grid-template-columns: 240px minmax(0,1fr); }
}
@media (max-width: 680px) {
  .page-header { align-items: flex-start; flex-direction: column; }
  .page-header__actions { justify-content: flex-start; }
  .grid--2, .grid--3, .grid--4, .grid--5 { grid-template-columns: 1fr; }
  .form-grid, .form-grid--3, .form-grid--4 { grid-template-columns: 1fr; }
  .form-span-2 { grid-column: auto; }
  .hero-card { min-height: 0; padding: 25px 20px; }
  .hero-card h1 { font-size: 30px; }
  .topbar-search { display: none; }
  .sync-status { margin-left: auto; }
  .demo-grid { grid-template-columns: 1fr; }
  .login-card__header { text-align: center; }
  .assignment-card__meta, .payment-summary { grid-template-columns: 1fr; }
  .resource-card { grid-template-columns: auto minmax(0,1fr); }
  .resource-card__actions { grid-column: 1 / -1; }
  .messaging-shell { height: auto; grid-template-columns: 1fr; }
  .message-contacts { max-height: 260px; border-right: 0; border-bottom: 1px solid var(--line); }
  .message-panel { min-height: 560px; }
  .class-record-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .calendar-day { min-height: 76px; padding: 5px; }
  .calendar-event { display: none; }
  .modal__body, .modal__header { padding-left: 17px; padding-right: 17px; }
  .modal__actions { padding: 12px 17px; }
}

@media print {
  body { background: #fff !important; }
  #app, .modal, .quick-panel, .toast-region { display: none !important; }
  .print-root { display: block !important; padding: 18mm; color: #000; font-family: Arial, sans-serif; }
  .print-report h1 { margin: 0 0 4px; font-size: 20px; }
  .print-report h2 { margin: 18px 0 8px; font-size: 14px; }
  .print-report p { margin: 3px 0; font-size: 9px; }
  .print-report table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 8px; }
  .print-report th, .print-report td { padding: 5px; border: 1px solid #bbb; text-align: left; }
  .print-report th { background: #eee; }
  .certificate-print { min-height: 180mm; display: grid; place-items: center; padding: 15mm; border: 8px double #163d8f; text-align: center; }
  .certificate-print img { width: 110px; }
  .certificate-print h1 { margin: 16px 0 8px; font-size: 32px; color: #163d8f; }
  .certificate-print h2 { margin: 18px 0 8px; font-size: 26px; }
  .certificate-print p { font-size: 12px; line-height: 1.7; }
}

/* v0.2.0 interactive workflow additions */
.modal-section-heading {
  margin: 8px 0 2px;
  color: var(--navy-900);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .02em;
}
.form-help { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.form-span-full { grid-column: 1 / -1; }
.checkbox-stack { display: grid; gap: 10px; }
.quiz-question-list { display: grid; gap: 14px; margin-top: 12px; }
.quiz-question-editor {
  position: relative;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(145deg, #fff, #f6faff);
  box-shadow: 0 8px 22px rgba(31, 54, 95, .06);
}
.quiz-question-editor__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.quiz-question-editor__header strong { font-size: 13px; color: var(--navy-900); }
.quiz-question-editor .form-grid { margin: 0; }
.quiz-question {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(26, 54, 93, .05);
}
.quiz-question + .quiz-question { margin-top: 16px; }
.quiz-question__prompt { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; color: var(--navy-900); font-weight: 750; line-height: 1.5; }
.quiz-question__number {
  display: inline-grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-700), var(--cyan-500));
  font-size: 12px;
  font-weight: 850;
}
.quiz-question__image { display: block; max-width: min(100%, 620px); max-height: 360px; margin: 12px 0 16px; border-radius: 14px; object-fit: contain; border: 1px solid var(--border); }
.choice-list { display: grid; gap: 9px; }
.choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-soft);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.choice:hover { border-color: #9cc9ff; background: #f1f8ff; transform: translateY(-1px); }
.choice input { margin-top: 2px; accent-color: var(--blue-600); }
.quiz-answer-sheet { display: grid; gap: 16px; }
.quiz-review-row { padding: 16px; border: 1px solid var(--border); border-radius: 15px; background: #fff; }
.quiz-review-row.is-correct { border-left: 4px solid var(--success); }
.quiz-review-row.is-incorrect { border-left: 4px solid var(--danger); }
.quiz-review-row strong { color: var(--navy-900); }
.submission-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.submission-overview__item { padding: 13px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-soft); }
.submission-overview__item small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.submission-overview__item strong { color: var(--navy-900); font-size: 13px; }
.history-strip { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 18px; }
.history-strip span { padding: 8px 11px; border-radius: 999px; background: #eff6ff; color: var(--navy-800); font-size: 11px; }
.feedback-panel { padding: 15px; border: 1px solid #cce2ff; border-radius: 15px; background: #f4f9ff; }
.feedback-panel h4 { margin: 0 0 7px; font-size: 13px; }
.feedback-panel p { margin: 0; color: var(--muted); line-height: 1.55; }
.grade-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 24px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(130deg, var(--navy-950), var(--blue-800) 65%, var(--cyan-600));
}
.grade-hero h3 { margin: 4px 0 8px; color: #fff; font-size: clamp(22px, 3vw, 34px); }
.grade-hero p { margin: 0; color: rgba(255,255,255,.76); }
.grade-hero__score { min-width: 112px; text-align: center; }
.grade-hero__score strong { display: block; font-size: 42px; line-height: 1; }
.grade-hero__score small { display: block; margin-top: 8px; color: rgba(255,255,255,.72); }
.file-preview { display: grid; gap: 7px; padding: 12px; border: 1px dashed #9fc6f7; border-radius: 13px; background: #f3f8ff; }
.file-preview strong { color: var(--navy-900); }
.file-preview small { color: var(--muted); }
.print-document { display: none; }
.certificate-canvas { position: relative; padding: 58px; border: 14px double #0c3d96; background: #fff; text-align: center; color: #0a1733; }
.certificate-canvas::before, .certificate-canvas::after { content: ''; position: absolute; inset: 16px; border: 1px solid #efb526; pointer-events: none; }
.certificate-canvas::after { inset: 23px; border-color: #74c8ff; }
.certificate-canvas__logo { width: 120px; height: 120px; object-fit: contain; }
.certificate-canvas__eyebrow { margin-top: 18px; color: #0d58be; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.certificate-canvas h1 { margin: 13px 0 5px; font-family: Georgia, serif; font-size: 48px; color: #092968; }
.certificate-canvas h2 { margin: 20px 0 10px; font-family: Georgia, serif; font-size: 34px; color: #0d58be; }
.certificate-canvas p { max-width: 720px; margin: 10px auto; font-size: 17px; line-height: 1.7; }
.certificate-number { margin-top: 18px; color: #576780; font-size: 12px; letter-spacing: .08em; }
.certificate-signatures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 70px; margin-top: 55px; }
.certificate-signature { padding-top: 10px; border-top: 1px solid #34496a; }
.certificate-signature strong { display: block; }
.certificate-signature small { color: #68768d; }

@media (max-width: 720px) {
  .submission-overview { grid-template-columns: 1fr; }
  .grade-hero { grid-template-columns: 1fr; }
  .grade-hero__score { text-align: left; }
  .certificate-signatures { gap: 26px; }
}

@media print {
  @page { size: A4; margin: 12mm; }
  body > *:not(.print-root) { display: none !important; }
  .print-root, .print-root[aria-hidden="true"], .print-root[aria-hidden="false"] { display: block !important; position: static !important; width: auto !important; height: auto !important; overflow: visible !important; }
  .print-document { display: block !important; color: #000; background: #fff; font-family: Arial, sans-serif; }
  .print-document h1, .print-document h2, .print-document h3 { color: #000; }
  .print-header { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 2px solid #123a78; }
  .print-header img { width: 68px; height: 68px; object-fit: contain; }
  .print-header h1 { margin: 0; font-size: 22px; }
  .print-header p { margin: 4px 0 0; font-size: 11px; }
  .print-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; font-size: 11px; }
  .print-table { width: 100%; border-collapse: collapse; font-size: 9px; }
  .print-table th, .print-table td { padding: 6px; border: 1px solid #777; text-align: left; vertical-align: top; }
  .print-table th { background: #eaf2ff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-footer { margin-top: 16px; color: #555; font-size: 9px; text-align: right; }
  .certificate-canvas { display: block !important; min-height: 255mm; box-sizing: border-box; }
}

/* ========================================================================== 
   e-Klase v0.7.2 payment and branding revision
   Reworked from the user-supplied login and learner-dashboard references.
   ========================================================================== */
:root {
  --sidebar-width: 274px;
  --topbar-height: 132px;
  --earal-blue-950: #061752;
  --earal-blue-900: #082778;
  --earal-blue-800: #0a3ba8;
  --earal-blue-700: #0b55da;
  --earal-blue-600: #0878f8;
  --earal-cyan-500: #08b8ff;
  --earal-page: #f5f8fd;
  --earal-ink: #0b225c;
  --earal-muted: #637292;
  --earal-border: #dfe7f3;
  --radius-panel: 20px;
}

body:not(.login-mode) {
  background: linear-gradient(145deg, #061a63 0%, #0737a0 48%, #0872e9 100%);
  font-size: 14px;
}

/* New institutional login */
body.login-mode { background: #edf5ff; }
.login-page--school {
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.05fr) minmax(520px, .95fr);
  overflow: hidden;
  background: linear-gradient(145deg, #f7fbff 0%, #dcecff 52%, #0b4ac7 100%);
}
.login-showcase {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  align-items: center;
  padding: 34px clamp(34px, 5vw, 76px) 22px;
  color: var(--earal-ink);
  isolation: isolate;
  background:
    radial-gradient(circle at 8% 8%, rgba(34, 143, 255, .34), transparent 27%),
    radial-gradient(circle at 88% 28%, rgba(255,255,255,.96), transparent 38%),
    linear-gradient(145deg, #f8fbff 0%, #eef6ff 58%, #cde3ff 100%);
}
.login-showcase::before,
.login-showcase::after {
  content: "";
  position: absolute;
  z-index: -2;
  border-radius: 50%;
  pointer-events: none;
}
.login-showcase::before {
  width: 120%;
  aspect-ratio: 1;
  left: -35%;
  top: -52%;
  border: 76px solid rgba(255,255,255,.55);
  box-shadow: 0 0 0 55px rgba(98,170,255,.1), 0 0 0 150px rgba(255,255,255,.25);
}
.login-showcase::after {
  width: 78%;
  aspect-ratio: 1;
  right: -30%;
  bottom: -43%;
  background: linear-gradient(145deg, rgba(19,116,244,.16), rgba(0,44,143,.76));
  box-shadow: 0 0 0 90px rgba(28,112,238,.11);
}
.login-showcase__marks { align-self: start; width: min(430px, 62%); }
.login-showcase__marks img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }
.login-showcase__brand {
  position: relative;
  z-index: 2;
  align-self: center;
  justify-self: center;
  width: min(620px, 82%);
  margin-top: -8px;
  text-align: center;
}
.login-showcase__logo { display: block; width: min(520px, 100%); max-height: 520px; margin: 0 auto; object-fit: contain; filter: drop-shadow(0 28px 42px rgba(8,53,145,.18)); }
.login-showcase__brand p { margin: -16px 0 0; color: #102b68; font-size: clamp(13px, 1.15vw, 17px); letter-spacing: .015em; }
.login-showcase__brand p strong { color: #056fee; }
.login-showcase__devices { position: absolute; z-index: 1; left: 0; bottom: 144px; width: min(690px, 79%); height: auto; object-fit: contain; mix-blend-mode: multiply; pointer-events: none; }
.login-showcase__features {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-self: end;
  margin-top: 10px;
  padding: 15px 13px;
  border: 1px solid rgba(89,149,247,.55);
  border-radius: 25px;
  color: #fff;
  background: linear-gradient(140deg, rgba(3,33,102,.97), rgba(4,52,142,.96));
  box-shadow: 0 16px 34px rgba(4,40,116,.22);
}
.login-showcase__features div { min-width: 0; padding: 4px 10px; text-align: center; border-right: 1px solid rgba(255,255,255,.26); }
.login-showcase__features div:last-child { border-right: 0; }
.login-showcase__features svg { width: 25px; height: 25px; margin-bottom: 5px; }
.login-showcase__features strong { display: block; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.login-showcase__features span { display: block; margin-top: 4px; color: rgba(255,255,255,.78); font-size: 8px; line-height: 1.35; }
.login-showcase__footer { position: relative; z-index: 3; display: flex; justify-content: space-between; gap: 16px; margin-top: 15px; color: #24416f; font-size: 10px; }
.login-showcase__footer span { display: flex; align-items: center; gap: 7px; }

.login-panel--school {
  position: relative;
  min-height: 100vh;
  padding: 48px clamp(30px, 5vw, 80px);
  background:
    radial-gradient(circle at 85% 85%, rgba(8,104,236,.32), transparent 31%),
    linear-gradient(155deg, rgba(248,252,255,.96) 0%, #edf5ff 58%, #0b49c6 130%);
}
.login-card--school {
  width: min(100%, 660px);
  overflow: hidden;
  border: 1px solid rgba(200,218,243,.95);
  border-radius: 34px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 32px 72px rgba(10,52,137,.22);
  backdrop-filter: blur(18px);
}
.login-card__welcome { display: grid; grid-template-columns: minmax(0,1fr) 220px; gap: 12px; align-items: center; padding: 34px 38px 18px; }
.login-card__welcome p { margin: 0; color: var(--earal-ink); font-size: 24px; font-weight: 750; }
.login-card__welcome h1 { margin: -4px 0 6px; color: #092570; font-size: clamp(46px, 5vw, 68px); line-height: 1; letter-spacing: -.055em; }
.login-card__welcome h1 span { color: #0b91f3; font-size: 1.2em; }
.login-card__welcome small { display: block; max-width: 360px; color: #34456e; font-size: 14px; line-height: 1.5; }
.login-card__welcome img { width: 100%; height: 170px; object-fit: contain; mix-blend-mode: multiply; }
.login-role-tabs { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); margin: 0 38px 28px; overflow: hidden; border: 1px solid #ccd8e9; border-radius: 16px; background: #fff; }
.login-role-tab { min-height: 62px; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 8px 10px; border: 0; border-right: 1px solid #d9e2ee; color: #283861; background: #fff; font-size: 13px; cursor: pointer; transition: .18s ease; }
.login-role-tab:last-child { border-right: 0; }
.login-role-tab svg { width: 21px; height: 21px; }
.login-role-tab:hover { color: #065bd7; background: #f3f8ff; }
.login-role-tab.is-active { color: #fff; background: linear-gradient(135deg, #073ec9, #08a5fb); box-shadow: 0 8px 20px rgba(5,94,220,.23); }
.login-form--school { padding: 0 38px 26px; gap: 17px; }
.login-input-wrap { position: relative; min-height: 62px; display: flex; align-items: center; gap: 14px; padding: 0 17px; border: 1px solid #cbd8e8; border-radius: 15px; background: #fff; color: #243966; transition: border-color .18s ease, box-shadow .18s ease; }
.login-input-wrap:focus-within { border-color: #0a80f5; box-shadow: 0 0 0 4px rgba(8,128,245,.1); }
.login-input-wrap > svg { flex: 0 0 auto; width: 24px; height: 24px; }
.login-input-wrap input { width: 100%; height: 58px; padding: 17px 42px 0 0; border: 0; outline: 0; color: #0b235c; background: transparent; font-size: 15px; }
.login-input-wrap input::placeholder { color: transparent; }
.login-input-wrap > span { position: absolute; left: 56px; top: 20px; color: #7784a5; font-size: 14px; pointer-events: none; transition: .16s ease; }
.login-input-wrap input:focus + span,
.login-input-wrap input:not(:placeholder-shown) + span { top: 8px; color: #0b67de; font-size: 10px; font-weight: 750; }
.password-toggle { position: absolute; right: 12px; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 10px; color: #526384; background: transparent; cursor: pointer; }
.password-toggle:hover, .password-toggle.is-visible { color: #096fe7; background: #eef6ff; }
.login-help-row { font-size: 13px; }
.login-help-row .checkbox-row { gap: 8px; }
.login-submit { min-height: 62px !important; border-radius: 14px !important; font-size: 18px !important; background: linear-gradient(100deg, #083bc6, #0aa4f8) !important; box-shadow: 0 12px 26px rgba(6,88,220,.25); }
.login-divider { position: relative; margin: 2px 0; color: #334263; text-align: center; font-size: 12px; }
.login-divider::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: #d7e0ec; }
.login-divider span { position: relative; padding: 0 15px; background: #fff; }
.login-sso-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.login-sso-grid button { min-height: 82px; display: grid; place-items: center; align-content: center; gap: 7px; padding: 10px; border: 1px solid #cad8e9; border-radius: 15px; color: #233761; background: #fff; cursor: pointer; transition: .18s ease; }
.login-sso-grid button:hover { transform: translateY(-2px); border-color: #7db6f9; box-shadow: 0 10px 22px rgba(16,72,157,.1); }
.login-sso-grid svg, .sso-mark { width: 24px; height: 24px; display: grid; place-items: center; font-size: 24px; }
.login-sso-grid strong { font-size: 12px; font-weight: 650; }
.sso-mark--google { color: #4285f4; font-weight: 900; }
.sso-mark--microsoft { color: #f25022; }
.demo-access--school { margin-top: 3px; padding: 0; border-top: 0; }
.demo-access--school summary { cursor: pointer; color: #0b66d9; font-size: 11px; font-weight: 750; text-align: center; }
.demo-access--school[open] summary { margin-bottom: 10px; }
.demo-access--school .demo-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.login-card__support { min-height: 58px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 20px; color: #29406d; background: linear-gradient(90deg,#edf5ff,#dfeeff); font-size: 12px; }
.login-card__support svg { width: 24px; height: 24px; }
.login-trust-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; padding: 18px 24px 22px; color: #173775; background: rgba(232,243,255,.72); }
.login-trust-row span { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 9px; text-transform: uppercase; letter-spacing: .04em; }
.login-trust-row svg { width: 18px; height: 18px; }

/* Framed application shell */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0,1fr);
  gap: 16px;
  padding: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(19,142,255,.45), transparent 30%),
    linear-gradient(145deg, #06195f, #073baf 52%, #0871e4);
}
.sidebar {
  position: sticky;
  inset: auto;
  top: 16px;
  z-index: 50;
  width: auto;
  height: calc(100vh - 32px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% -5%, rgba(25,138,255,.36), transparent 30%),
    linear-gradient(180deg,#061d65 0%,#082d86 52%,#061d62 100%);
  box-shadow: 0 24px 56px rgba(0,23,87,.28);
}
.sidebar__brand, .sidebar__school { display: none; }
.sidebar__brand-card { margin: 0; min-height: 157px; display: grid; place-items: center; align-content: center; padding: 14px; border-radius: 25px 25px 19px 19px; color: #15336f; background: #fff; box-shadow: 0 12px 30px rgba(1,30,91,.2); }
.sidebar__brand-card img { width: 205px; height: 112px; object-fit: contain; }
.sidebar__brand-card span { margin-top: -8px; color: #33578f; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.sidebar__profile-card { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 12px; align-items: center; margin: 14px 16px 8px; padding: 9px 8px; color: #fff; }
.sidebar__profile-card .avatar { width: 50px; height: 50px; border: 3px solid rgba(255,255,255,.5); border-radius: 50%; font-size: 13px; background: linear-gradient(145deg,#fff,#bfe2ff); color: #0a3c9a; }
.sidebar__profile-card strong, .sidebar__profile-card span, .sidebar__profile-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__profile-card strong { font-size: 13px; }
.sidebar__profile-card span { margin-top: 2px; color: rgba(255,255,255,.75); font-size: 10px; }
.sidebar__profile-card small { width: fit-content; margin-top: 6px; padding: 3px 9px; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; color: #fff; font-size: 9px; }
.profile-online-dot { position: absolute; width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; background: #35cb7a; }
.sidebar__profile-card > .profile-online-dot { left: 47px; top: 43px; }
.sidebar__nav { padding: 4px 13px 18px; }
.app-shell[data-role="learner"] .nav-group-label,
.app-shell[data-role="parent"] .nav-group-label { display: none; }
.nav-group-label { padding: 14px 10px 5px; font-size: 9px; }
.nav-link { min-height: 43px; margin: 1px 0; padding: 9px 13px; border-radius: 10px; }
.nav-link svg { width: 19px; height: 19px; }
.nav-link span:not(.nav-badge) { font-size: 12px; }
.nav-link.is-active { background: linear-gradient(100deg,#0d5ce8,#178cf7); box-shadow: 0 10px 22px rgba(0,46,147,.28), inset 0 0 0 1px rgba(255,255,255,.12); }
.nav-link.is-active::after { display: none; }
.sidebar__footer { padding: 10px 14px 14px; }
.sidebar-logout { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid rgba(255,255,255,.38); border-radius: 12px; color: #fff; background: rgba(13,75,175,.25); font-size: 13px; cursor: pointer; }
.sidebar-logout:hover { background: rgba(21,120,246,.45); }
.sidebar-school-name { margin-top: 10px; text-align: center; }
.sidebar-school-name strong, .sidebar-school-name span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-school-name strong { color: rgba(255,255,255,.7); font-size: 8px; }
.sidebar-school-name span { margin-top: 3px; color: rgba(255,255,255,.42); font-size: 7px; }
.app-workspace { grid-column: 2; min-width: 0; min-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(255,255,255,.5); border-radius: 26px; background: var(--earal-page); box-shadow: 0 28px 70px rgba(0,24,92,.25); }
.topbar { position: sticky; top: 0; min-height: var(--topbar-height); display: grid; grid-template-columns: minmax(270px,1fr) minmax(150px,230px) auto; grid-template-rows: auto auto; align-items: center; gap: 4px 20px; padding: 22px 30px 17px; border-bottom: 1px solid #dce5f1; background: rgba(255,255,255,.96); }
.topbar__greeting { min-width: 0; grid-row: 1 / 3; }
.topbar__greeting span { display: block; color: #1c3470; font-size: 14px; }
.topbar__greeting strong { display: block; margin-top: 2px; color: #0b2668; font-size: clamp(22px,2.1vw,31px); line-height: 1.05; letter-spacing: -.035em; }
.topbar__greeting strong b { font-size: .72em; font-weight: 400; }
.topbar__greeting small { display: block; margin-top: 7px; color: #18346d; font-size: 11px; }
.topbar__institution { grid-row: 1 / 3; align-self: center; }
.topbar__institution img { display: block; width: 210px; max-height: 70px; object-fit: contain; mix-blend-mode: multiply; }
.topbar__actions { grid-column: 3; grid-row: 1 / 3; display: grid; grid-template-columns: repeat(5,auto); align-items: center; justify-content: end; gap: 8px 10px; }
.topbar__actions .term-selector { grid-column: span 2; max-width: 150px; height: 34px; font-size: 9px; }
.topbar__actions .icon-button { width: 39px; height: 39px; color: #203a78; }
.topbar-profile { position: relative; width: 47px; height: 47px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.topbar-profile .avatar { width: 44px; height: 44px; border-radius: 50%; }
.topbar-profile .profile-online-dot { right: 0; bottom: 2px; }
.topbar__date { grid-column: 1 / 4; display: flex; align-items: center; justify-content: flex-end; gap: 7px; color: #20396f; font-size: 10px; white-space: nowrap; }
.topbar__date svg { color: #2f63bb; }
.sync-status { grid-column: 4 / 6; justify-self: end; height: 31px; border: 0; background: #eef7ff; font-size: 8px; }
.main-content { flex: 1; min-height: 0; padding: 14px 20px 22px; background: var(--earal-page); }
.page { width: 100%; max-width: none; }
.page-context-label { display: none; margin: 0 0 14px; }
.page-context-label strong { display: block; color: var(--earal-ink); font-size: 20px; }
.page-context-label span { display: block; margin-top: 3px; color: var(--earal-muted); font-size: 11px; }
.app-shell:not([data-role="learner"]):not([data-role="parent"]) .page-context-label,
.app-shell[data-role="learner"] .page:not(:has(.learner-dashboard)) .page-context-label,
.app-shell[data-role="parent"] .page:not(:has(.learner-dashboard)) .page-context-label { display: block; }
.app-footer { min-height: 32px; display: flex; align-items: center; justify-content: center; gap: clamp(20px,5vw,72px); padding: 7px 20px; color: rgba(255,255,255,.9); background: linear-gradient(90deg,#07368f,#052264); font-size: 8px; }
.app-footer span { display: flex; align-items: center; gap: 6px; }

/* Improve readability across the existing administrative, teacher, and record pages. */
.eyebrow { font-size: 9px; }
.page-header h1, .page-header h2 { font-size: clamp(27px,2.6vw,38px); }
.page-header p:not(.eyebrow) { font-size: 12px; }
.section-heading h2, .section-heading h3 { font-size: 18px; }
.section-heading p, .section-heading button.link-button { font-size: 11px; }
.card { border-color: var(--earal-border); border-radius: 17px; box-shadow: 0 8px 24px rgba(25,57,115,.06); }
.card--padded { padding: 21px; }
.card__header h2 { font-size: 17px; }
.button { font-size: 11px; }
.data-table { font-size: 11px; }
.data-table th { font-size: 9px; }
.data-table td span { font-size: 9px; }
.input, .select, .textarea { font-size: 12px; }
.hero-card { border-radius: 22px; background: linear-gradient(135deg,#073999,#087ee8); }

/* Learner and parent dashboard matching the supplied layout */
.learner-dashboard { display: grid; gap: 16px; }
.monitoring-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid #cfe0f5; border-radius: 14px; color: #204276; background: #eef7ff; }
.monitoring-banner svg { width: 23px; height: 23px; color: #1677e8; }
.monitoring-banner strong, .monitoring-banner span { display: block; }
.monitoring-banner strong { font-size: 12px; }
.monitoring-banner span { margin-top: 2px; color: #687795; font-size: 9px; }
.dashboard-stat-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 14px; }
.dashboard-stat-card { position: relative; min-width: 0; min-height: 145px; display: grid; grid-template-columns: 52px minmax(0,1fr); grid-template-rows: 1fr auto; gap: 8px 12px; padding: 18px 17px 14px; border: 1px solid var(--earal-border); border-radius: 17px; color: var(--earal-ink); background: #fff; text-align: left; cursor: pointer; box-shadow: 0 8px 22px rgba(24,56,112,.06); transition: transform .18s ease, box-shadow .18s ease; }
.dashboard-stat-card:hover { transform: translateY(-3px); box-shadow: 0 15px 32px rgba(24,56,112,.12); }
.dashboard-stat-card__icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(145deg,#2584ff,#4a68ee); box-shadow: 0 8px 18px rgba(29,100,230,.2); }
.dashboard-stat-card__icon svg { width: 25px; height: 25px; }
.dashboard-stat-card__copy { min-width: 0; }
.dashboard-stat-card__copy small { display: block; margin-bottom: 5px; color: #2f6edf; font-size: 10px; font-weight: 750; }
.dashboard-stat-card__copy strong { display: block; overflow: hidden; color: #092460; font-size: clamp(21px,2vw,29px); line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-stat-card__copy em { display: block; margin-top: 6px; color: #1c3162; font-size: 9px; font-style: normal; }
.dashboard-stat-card__link { grid-column: 1 / -1; display: flex; align-items: center; gap: 4px; color: #0b61df; font-size: 9px; }
.dashboard-stat-card__link svg { width: 11px; height: 11px; }
.dashboard-stat-card--green .dashboard-stat-card__icon { background: linear-gradient(145deg,#41c27f,#68c899); }
.dashboard-stat-card--green .dashboard-stat-card__copy small { color: #26935c; }
.dashboard-stat-card--violet .dashboard-stat-card__icon { background: linear-gradient(145deg,#7654eb,#9b6cf3); }
.dashboard-stat-card--violet .dashboard-stat-card__copy small { color: #7451dc; }
.dashboard-stat-card--orange .dashboard-stat-card__icon { background: linear-gradient(145deg,#f38c14,#ffaf32); }
.dashboard-stat-card--orange .dashboard-stat-card__copy small { color: #ef750e; }
.dashboard-stat-card--red .dashboard-stat-card__icon { background: linear-gradient(145deg,#f02e55,#ff5b71); }
.dashboard-stat-card--red .dashboard-stat-card__copy small { color: #e4314d; }
.dashboard-layout-top { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(260px,.95fr) minmax(280px,1fr); gap: 15px; align-items: stretch; }
.dashboard-layout-bottom { display: grid; grid-template-columns: minmax(0,1.75fr) minmax(340px,.95fr); gap: 15px; align-items: stretch; }
.dashboard-panel { min-width: 0; overflow: hidden; border: 1px solid var(--earal-border); border-radius: 17px; background: #fff; box-shadow: 0 8px 22px rgba(24,56,112,.06); }
.dashboard-panel > header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #e5ebf4; }
.dashboard-panel > header > div { display: flex; align-items: center; gap: 10px; }
.dashboard-panel > header svg { color: #0b5fdb; }
.dashboard-panel > header h2 { margin: 0; color: #0a245e; font-size: 15px; }
.dashboard-panel > header button { display: flex; align-items: center; gap: 4px; padding: 0; border: 0; color: #0b63df; background: none; font-size: 9px; cursor: pointer; }
.dashboard-panel > header button svg { width: 11px; height: 11px; }
.deadline-list { padding: 0 18px 6px; }
.deadline-row { width: 100%; min-height: 71px; display: grid; grid-template-columns: 45px minmax(0,1fr) auto 16px; gap: 12px; align-items: center; padding: 10px 0; border: 0; border-bottom: 1px solid #e8edf5; color: var(--earal-ink); background: transparent; text-align: left; cursor: pointer; }
.deadline-row:last-child { border-bottom: 0; }
.deadline-date { width: 43px; overflow: hidden; border: 1px solid #dce5f2; border-radius: 9px; text-align: center; box-shadow: 0 3px 8px rgba(17,52,115,.07); }
.deadline-date small { display: block; padding: 4px 2px; color: #fff; background: #397cf1; font-size: 8px; }
.deadline-date strong { display: block; padding: 5px 2px; color: #13336f; font-size: 15px; }
.deadline-copy { min-width: 0; }
.deadline-copy em, .deadline-copy strong, .deadline-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deadline-copy em { color: #1765d8; font-size: 9px; font-style: normal; }
.deadline-copy strong { margin-top: 3px; color: #0b245e; font-size: 12px; }
.deadline-copy small { margin-top: 3px; color: #73809a; font-size: 8px; }
.deadline-status { padding: 6px 10px; border-radius: 999px; color: #52617c; background: #f0f3f8; font-size: 8px; white-space: nowrap; }
.deadline-status.is-urgent { color: #e1454e; background: #fff0f1; }
.deadline-status.is-overdue { color: #b22835; background: #ffe5e7; }
.deadline-status.is-done { color: #198253; background: #e6f8ef; }
.deadline-row > svg { color: #6680aa; }
.mini-calendar { padding: 10px 15px 16px; }
.mini-calendar__month { display: grid; grid-template-columns: 25px 1fr 25px; align-items: center; margin: 2px 0 13px; text-align: center; }
.mini-calendar__month strong { color: #112b65; font-size: 12px; }
.mini-calendar__month button { width: 25px; height: 25px; display: grid; place-items: center; border: 0; color: #0b68e4; background: transparent; cursor: pointer; }
.mini-calendar__month button:first-child { transform: rotate(180deg); }
.mini-calendar__weekdays, .mini-calendar__grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.mini-calendar__weekdays { margin-bottom: 7px; color: #5d6e8e; font-size: 7px; text-align: center; }
.mini-calendar__day { aspect-ratio: 1; display: grid; place-items: center; border: 0; border-radius: 50%; color: #17336e; background: transparent; font-size: 9px; cursor: pointer; }
.mini-calendar__day:hover { background: #eef5ff; }
.mini-calendar__day.is-today { color: #fff; background: #3479ef; }
.mini-calendar__day.has-event:not(.is-today) { color: #fff; background: #66c18f; }
.mini-calendar__day.is-amber { background: #f59d31 !important; }
.mini-calendar__day.is-violet { background: #8266eb !important; }
.mini-calendar__day.is-empty { visibility: hidden; }
.announcement-list { padding: 0 15px; }
.announcement-row { width: 100%; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 9px; padding: 13px 0; border: 0; border-bottom: 1px solid #e6ecf4; background: transparent; text-align: left; cursor: pointer; }
.announcement-row:last-child { border-bottom: 0; }
.announcement-tag { align-self: start; padding: 4px 7px; border-radius: 5px; color: #fff; background: #387cf1; font-size: 7px; font-weight: 800; }
.announcement-tag--info { background: #3187e8; }
.announcement-tag--reminder { background: #ff4c43; }
.announcement-row strong, .announcement-row small, .announcement-row em { display: block; }
.announcement-row strong { color: #0d2962; font-size: 10px; }
.announcement-row small { max-height: 30px; overflow: hidden; margin-top: 3px; color: #68758f; font-size: 8px; line-height: 1.45; }
.announcement-row em { margin-top: 4px; color: #3f527a; font-size: 7px; font-style: normal; }
.dashboard-panel__footer-button { width: calc(100% - 30px); min-height: 32px; margin: 8px 15px 13px; border: 1px solid #d6e2f2; border-radius: 7px; color: #17366f; background: #eef5ff; font-size: 8px; cursor: pointer; }
.learning-card-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; padding: 15px 17px 17px; }
.learning-card { min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.learning-card img { width: 100%; aspect-ratio: 16 / 9; display: block; object-fit: cover; border-radius: 9px; box-shadow: 0 7px 16px rgba(25,58,118,.11); transition: transform .18s ease; }
.learning-card:hover img { transform: translateY(-3px); }
.learning-card span, .learning-card strong, .learning-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.learning-card span { margin-top: 7px; color: #1767d8; font-size: 8px; }
.learning-card strong { margin-top: 4px; color: #0c275f; font-size: 10px; }
.learning-card small { margin-top: 3px; color: #64718c; font-size: 8px; }
.progress-summary { min-height: 206px; display: grid; grid-template-columns: 135px minmax(0,1fr); gap: 18px; align-items: center; padding: 18px; }
.progress-ring { --progress: 0; width: 128px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(#2e78ee calc(var(--progress) * 1%), #e4eaf4 0); }
.progress-ring::before { content: ""; grid-area: 1 / 1; width: 100px; aspect-ratio: 1; border-radius: 50%; background: #fff; }
.progress-ring > div { position: relative; grid-area: 1 / 1; text-align: center; }
.progress-ring strong { display: block; color: #123473; font-size: 25px; }
.progress-ring small { display: block; color: #8290a8; font-size: 7px; }
.progress-breakdown { display: grid; gap: 13px; }
.progress-line { display: grid; grid-template-columns: 93px minmax(0,1fr) 29px; gap: 8px; align-items: center; }
.progress-line > span { display: flex; align-items: center; gap: 7px; color: #1d376f; }
.progress-line > span svg { width: 18px; height: 18px; padding: 3px; border-radius: 5px; color: #fff; background: #4f8df1; }
.progress-line strong { font-size: 8px; }
.progress-line .progress { height: 4px; }
.progress-line em { color: #243f76; font-size: 8px; font-style: normal; text-align: right; }

@media (max-width: 1380px) {
  .login-page--school { grid-template-columns: minmax(0,1fr) minmax(500px,.92fr); }
  .login-showcase__features span { display: none; }
  .dashboard-stat-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .dashboard-layout-top { grid-template-columns: minmax(0,1.45fr) minmax(270px,.85fr); }
  .dashboard-announcements { grid-column: 1 / -1; }
  .announcement-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
  .announcement-row { border-right: 1px solid #e6ecf4; border-bottom: 0; padding-right: 12px; }
  .announcement-row:last-child { border-right: 0; }
  .topbar__institution { display: none; }
  .topbar { grid-template-columns: minmax(270px,1fr) auto; }
  .topbar__actions { grid-column: 2; }
}

@media (max-width: 1100px) {
  .login-page--school { grid-template-columns: 1fr; }
  .login-showcase { display: none; }
  .login-panel--school { padding: 28px 22px; }
  .login-card--school { margin: auto; }
  .dashboard-layout-top, .dashboard-layout-bottom { grid-template-columns: 1fr; }
  .dashboard-announcements { grid-column: auto; }
  .learning-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .topbar__date { display: none; }
  .topbar__actions { grid-template-columns: repeat(4,auto); }
  .sync-status { grid-column: 1 / 5; }
}

@media (max-width: 900px) {
  body:not(.login-mode) { background: var(--earal-page); }
  .app-shell { display: block; padding: 0; background: var(--earal-page); }
  .sidebar { position: fixed; inset: 0 auto 0 0; top: 0; width: min(86vw,310px); height: 100vh; border-radius: 0 24px 24px 0; transform: translateX(-103%); }
  .sidebar.is-open { transform: translateX(0); }
  .app-workspace { min-height: 100vh; border: 0; border-radius: 0; }
  .topbar { min-height: 92px; grid-template-columns: auto minmax(0,1fr) auto; grid-template-rows: 1fr; padding: 14px 16px; }
  .mobile-menu-button { display: grid; }
  .topbar__greeting { grid-column: 2; grid-row: 1; }
  .topbar__greeting span, .topbar__greeting small { display: none; }
  .topbar__greeting strong { font-size: 20px; }
  .topbar__actions { grid-column: 3; grid-row: 1; display: flex; }
  .topbar__actions .term-selector, .topbar__actions .sync-status, .topbar__actions .topbar-profile { display: none; }
  .main-content { padding: 14px 13px 22px; }
  .app-footer { display: none; }
}

@media (max-width: 680px) {
  .login-panel--school { align-items: flex-start; padding: 12px; }
  .login-card--school { border-radius: 22px; }
  .login-card__welcome { grid-template-columns: 1fr; padding: 24px 22px 14px; text-align: center; }
  .login-card__welcome img { display: none; }
  .login-card__welcome p { font-size: 18px; }
  .login-card__welcome h1 { font-size: 48px; }
  .login-card__welcome small { margin: auto; font-size: 12px; }
  .login-role-tabs { grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0 22px 20px; }
  .login-role-tab { min-height: 50px; border-bottom: 1px solid #d9e2ee; }
  .login-form--school { padding: 0 22px 22px; }
  .login-sso-grid { grid-template-columns: 1fr; }
  .login-trust-row { grid-template-columns: 1fr; }
  .dashboard-stat-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-stat-card { min-height: 130px; grid-template-columns: 42px minmax(0,1fr); padding: 14px; }
  .dashboard-stat-card__icon { width: 42px; height: 42px; }
  .dashboard-stat-card__copy strong { font-size: 20px; }
  .dashboard-stat-card:last-child { grid-column: 1 / -1; }
  .announcement-list { display: block; }
  .announcement-row { border-right: 0; border-bottom: 1px solid #e6ecf4; }
  .learning-card-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .progress-summary { grid-template-columns: 1fr; justify-items: center; }
  .progress-breakdown { width: 100%; }
  .deadline-row { grid-template-columns: 42px minmax(0,1fr) 16px; }
  .deadline-status { display: none; }
}

/* v0.7.2 login composition refinement */
.login-showcase__devices { display: none; }
.login-showcase { grid-template-rows: auto minmax(0,1fr) auto auto; }
.login-showcase__brand { width: min(690px, 90%); margin-top: 0; }
.login-showcase__logo { width: min(650px, 100%); max-height: 650px; }
.login-showcase__brand p { margin: -8px 0 0; }
.login-card__welcome img { max-width: 200px; justify-self: end; }

/* Desktop visibility and compact currency values */
.mobile-menu-button { display: none; }
.dashboard-stat-card--orange .dashboard-stat-card__copy strong,
.dashboard-stat-card--red .dashboard-stat-card__copy strong { font-size: clamp(16px, 1.5vw, 23px); letter-spacing: -.04em; }
@media (max-width: 900px) { .mobile-menu-button { display: grid; } }

/* ========================================================================== 
   e-Klase v0.7.2 brand and finance revision
   ========================================================================== */
.topbar__institution {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-width: 245px;
}
.topbar__institution img {
  width: 68px;
  height: 68px;
  max-height: 68px;
  flex: 0 0 auto;
  object-fit: contain;
  mix-blend-mode: normal;
}
.topbar__institution div { min-width: 0; }
.topbar__institution strong,
.topbar__institution span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar__institution strong { color: #0b2668; font-size: 13px; letter-spacing: .015em; text-transform: uppercase; }
.topbar__institution span { margin-top: 5px; color: #506284; font-size: 9px; }
.sidebar__brand-card img { width: 215px; height: 128px; }
.sidebar__brand-card span { display: none; }
.login-card__welcome h1 { font-size: clamp(44px, 4.7vw, 66px); }
.login-showcase__logo { max-height: 580px; }

.record-tabs.payment-view-tabs {
  display: inline-flex;
  gap: 6px;
  margin: 0 0 16px;
  padding: 5px;
  border: 1px solid #d7e2f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(20,55,115,.06);
}
.payment-view-tabs .record-tab {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border: 0;
  border-radius: 10px;
  color: #405171;
  background: transparent;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}
.payment-view-tabs .record-tab svg { width: 17px; height: 17px; }
.payment-view-tabs .record-tab.is-active {
  color: #fff;
  background: linear-gradient(110deg,#0849d5,#1598f6);
  box-shadow: 0 8px 18px rgba(9,83,210,.22);
}
.card__header--padded { padding: 18px 20px 10px; }
.card__header--padded p:not(.eyebrow) { margin: 6px 0 0; color: #64728d; font-size: 10px; line-height: 1.55; }
.payment-schedule-table { min-width: 1280px; }
.payment-schedule-table th,
.payment-schedule-table td { white-space: nowrap; }
.payment-schedule-table td:nth-child(1),
.payment-schedule-table td:nth-child(9) { white-space: normal; min-width: 120px; }
.table-subtext { display: block; margin-top: 4px; color: #7a879e; font-size: 8px; }
.payment-fee-editor {
  padding: 17px;
  border: 1px solid #d9e4f1;
  border-radius: 15px;
  background: linear-gradient(145deg,#f9fcff,#eef6ff);
}
.payment-fee-editor h3 { margin: 2px 0 4px; color: #102d6a; font-size: 15px; }
.payment-fee-editor p:not(.eyebrow) { margin: 0 0 14px; color: #687895; font-size: 10px; }
.payment-fee-editor .form-grid { margin-top: 10px; }
.form-grid--5 { grid-template-columns: repeat(5,minmax(0,1fr)); }
.fee-chip-list { display: flex; flex-wrap: wrap; gap: 5px; min-width: 250px; }
.fee-chip-list span {
  padding: 4px 7px;
  border-radius: 999px;
  color: #31517e;
  background: #eef5ff;
  font-size: 8px;
  white-space: nowrap;
}
.monthly-account-table { min-width: 850px; }
.info-banner--success { border-color: #bfe8d1; background: #effbf5; }
.info-banner--success .info-banner__icon { color: #168052; background: #d8f5e5; }

@media (max-width: 1380px) {
  .topbar__institution { min-width: 205px; }
  .topbar__institution strong { font-size: 11px; }
  .topbar__institution span { font-size: 8px; }
}
@media (max-width: 1100px) {
  .form-grid--5 { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 680px) {
  .record-tabs.payment-view-tabs { width: 100%; }
  .payment-view-tabs .record-tab { flex: 1; justify-content: center; }
  .form-grid--5 { grid-template-columns: 1fr; }
}

/* ========================================================================== 
   e-Klase v0.7.2 class record, school bulletin, and calendar revision
   ========================================================================== */
.class-record-layout { grid-template-columns: minmax(0, 1fr) 330px; align-items: start; }
.class-record-table--official {
  min-width: 2860px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
.class-record-table--official th,
.class-record-table--official td {
  padding: 8px 7px;
  border-right: 1px solid #dbe5f1;
  border-bottom: 1px solid #dbe5f1;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.class-record-table--official thead tr:nth-child(1) th { top: 0; height: 46px; z-index: 7; }
.class-record-table--official thead tr:nth-child(2) th { top: 46px; height: 56px; z-index: 6; }
.class-record-table--official thead tr:nth-child(3) th { top: 102px; height: 45px; z-index: 5; }
.class-record-table--official thead th {
  color: #18355e;
  background: #f5f8fc;
  box-shadow: inset 0 -1px 0 #dbe5f1;
}
.class-record-table--official thead th > span {
  display: block;
  margin-top: 3px;
  color: inherit;
  font-size: 7px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
  opacity: .82;
}
.class-record-table--official .class-record-group {
  color: #fff;
  font-size: 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.class-record-group--ww { background: linear-gradient(120deg, #0f56cc, #168ff0) !important; }
.class-record-group--pt { background: linear-gradient(120deg, #087d64, #22ad83) !important; }
.class-record-group--ex { background: linear-gradient(120deg, #643ab5, #8b5be0) !important; }
.class-record-table--official th:first-child,
.class-record-table--official td:first-child {
  width: 230px;
  min-width: 230px;
  max-width: 230px;
  position: sticky;
  left: 0;
  z-index: 4;
  text-align: left;
  background: #fff;
  box-shadow: 8px 0 16px rgba(22, 48, 84, .08);
}
.class-record-table--official thead th:first-child {
  z-index: 10;
  color: #fff;
  background: linear-gradient(145deg, #092a67, #0c4da6);
}
.class-record-table--official tbody tr:nth-child(even) td { background: #fbfdff; }
.class-record-table--official tbody tr:hover td { background: #edf6ff; }
.class-record-table--official tbody tr:hover td:first-child { background: #e8f3ff; }
.class-record-table--official .score-input {
  width: 54px !important;
  min-width: 54px;
  height: 31px !important;
  padding: 0 5px !important;
  border-color: #c8d7e8 !important;
  background: #fff;
}
.class-record-table--official .class-record-ws {
  color: #084fbb;
  background: #eef6ff !important;
  font-weight: 800;
}
.class-record-table--official .class-record-final {
  color: #092a67;
  background: #fff8df !important;
  font-size: 10px;
}
.class-record-max-row th { color: #51627d; background: #eef3f8 !important; }
.max-score-input {
  width: 54px;
  height: 28px;
  padding: 0 4px;
  border: 1px solid #bacbe0;
  border-radius: 7px;
  color: #123567;
  background: #fff;
  text-align: center;
  font-size: 8px;
  font-weight: 750;
}
.max-score-input:focus { outline: 0; border-color: #148ef4; box-shadow: 0 0 0 3px rgba(20,142,244,.12); }
.optional-slot {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  min-height: 26px;
  border-radius: 7px;
  color: #8695aa;
  background: #f1f4f8;
}
.policy-weight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}
.policy-weight-grid > div {
  padding: 12px 8px;
  border: 1px solid #dbe7f4;
  border-radius: 12px;
  background: linear-gradient(145deg, #f8fbff, #edf5ff);
  text-align: center;
}
.policy-weight-grid strong { display: block; color: #0a4fb8; font-size: 19px; }
.policy-weight-grid span { display: block; margin-top: 4px; color: #667995; font-size: 7px; line-height: 1.35; }
.descriptive-record-table { min-width: 920px; }
.descriptive-record-table td:nth-child(2) { width: 220px; }
.descriptive-record-table td:nth-child(3) { min-width: 360px; }
.descriptive-rating { min-width: 190px; }
.descriptive-comment { min-width: 330px; resize: vertical; }
.descriptive-grade-view {
  margin: 14px 0;
  padding: 18px;
  border: 1px solid #d8e5f5;
  border-radius: 15px;
  background: linear-gradient(145deg, #f7fbff, #eef5ff);
}
.descriptive-grade-view span { color: #657792; font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.descriptive-grade-view strong { display: block; margin-top: 7px; color: #0a3479; font-size: 22px; }
.descriptive-grade-view p { margin: 12px 0 0; color: #50627d; font-size: 9px; line-height: 1.65; }
.exam-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 4px;
}
.exam-breakdown > div {
  padding: 10px;
  border: 1px solid #dce6f2;
  border-radius: 11px;
  background: #f7faff;
}
.exam-breakdown span, .exam-breakdown small { display: block; color: #6a7a92; font-size: 7px; }
.exam-breakdown strong { display: block; margin: 4px 0; color: #163d7a; font-size: 12px; }

.bulletin-card__image-button { display: block; width: 100%; margin: 0; padding: 0; border: 0; border-radius: 15px; overflow: hidden; background: #eaf2fc; cursor: pointer; }
.bulletin-card__image,
.bulletin-card__video { width: 100%; max-height: 420px; display: block; margin: 12px 0 14px; border-radius: 15px; object-fit: contain; background: #0a1e46; }
.bulletin-card__image-button .bulletin-card__image { margin: 0; border-radius: 0; }
.bulletin-card__actions { margin-top: 12px; }
.bulletin-upload-preview { width: min(100%, 540px); max-height: 300px; display: block; margin-top: 10px; border: 1px solid #d7e4f2; border-radius: 14px; object-fit: contain; background: #f3f7fb; }
.calendar-event[data-id^="deped-"] { font-weight: 760; }
.calendar-agenda .list-item { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }

@media (max-width: 1260px) {
  .class-record-layout { grid-template-columns: 1fr; }
  .class-record-layout > aside { grid-template-columns: repeat(2, minmax(0, 1fr)); display: grid; }
}
@media (max-width: 760px) {
  .class-record-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .class-record-layout > aside { grid-template-columns: 1fr; }
  .policy-weight-grid, .exam-breakdown { grid-template-columns: 1fr; }
}

@media print {
  .class-record-table--official { min-width: 100%; font-size: 6px; }
  .class-record-table--official th,
  .class-record-table--official td { position: static !important; padding: 4px 3px; box-shadow: none !important; }
  .class-record-table--official .score-input,
  .class-record-table--official .max-score-input { width: 38px !important; height: 22px !important; border: 0; }
  .class-record-layout { display: block; }
  .class-record-layout > aside, .class-record-summary { display: none !important; }
}
