/*
 * Unified LMS presentation layer.
 *
 * The public college site is used only as a composition reference.  This
 * stylesheet keeps the LMS routes, roles, content and supplied logo intact.
 * It is loaded after module styles so every workspace shares one predictable
 * visual language without duplicating templates.
 */

:root {
  --ink: #17324d;
  --ink-soft: #405a73;
  --muted: #5b7187;
  --brand: #2b6fba;
  --brand-dark: #1b4f87;
  --brand-soft: #edf6ff;
  --accent: #3f7fc4;
  --accent-cyan: #79cfd1;
  --accent-warm: #f0a35a;
  --surface: #fff;
  --surface-soft: #f5f9fd;
  --canvas: #f5f9fd;
  --border: #cbdbea;
  --border-soft: #dce8f2;
  --focus-outer: #1b4f87;
  --outline-strong: #294f75;
  --success: #177451;
  --warning-ink: #92520a;
  --danger: #b42318;
  --sidebar-width: 18rem;
  --sidebar-collapsed-width: 5.125rem;
  --radius-sm: .1875rem;
  --radius-md: .375rem;
  --radius-lg: .5rem;
  --shadow-sm: .1875rem .1875rem 0 rgb(41 79 117 / 9%);
  --shadow-md: .45rem .45rem 0 rgb(41 79 117 / 13%);
  --college-grid:
    linear-gradient(rgb(43 111 186 / 5.5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(43 111 186 / 5.5%) 1px, transparent 1px);
}

html { color: var(--ink); background: #fff; }

body {
  color: var(--ink);
  background: #fff;
  font-family: Inter, "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.58;
}

::selection { color: #fff; background: var(--brand-dark); }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--accent-cyan);
  outline-offset: 2px;
  box-shadow: none;
}

h1,
h2,
h3,
h4 { color: var(--ink); letter-spacing: -.03em; }

.muted,
.form-note,
small { color: var(--muted); }

/* Application shell */
.app-shell {
  --sidebar-current-width: var(--sidebar-width);
  min-height: 100dvh;
  padding-inline-start: var(--sidebar-current-width);
  background: #fff;
}

.app-workspace {
  min-height: 100dvh;
  background: #fff;
}

.app-sidebar {
  width: var(--sidebar-current-width);
  padding: 1.45rem 1.1rem 1rem;
  color: var(--ink);
  background: #fff;
  border-inline-end: 2px solid var(--outline-strong);
  box-shadow: none;
  scrollbar-gutter: stable;
}

.app-sidebar__brand {
  padding: 0 0 1.1rem;
  border-bottom: 1px solid var(--border);
}

.app-sidebar__brand .brand {
  min-height: 3.5rem;
  padding: .3rem;
  border-radius: var(--radius-sm);
}

.app-sidebar__brand .brand:hover { background: var(--surface-soft); }
.app-sidebar__brand .brand__text strong { color: var(--ink); font-size: .9rem; letter-spacing: 0; }
.app-sidebar__brand .brand__text small { color: var(--muted); font-size: .64rem; line-height: 1.25; }
.app-sidebar__brand .sidebar-collapse-button { --icon-button-size: 2rem; }
.college-logo--sidebar { width: 2.35rem; height: 2.35rem; }

.workspace-badge {
  color: var(--brand-dark);
  background: var(--brand-soft);
  border: 1px solid #9ab9d8;
  border-radius: var(--radius-sm);
}

.sidebar-collapse-button,
.sidebar-menu-button,
.topbar-back-button {
  border-width: 1.5px;
  border-color: var(--outline-strong);
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.sidebar-nav {
  gap: .22rem;
  padding-block: .9rem;
  scrollbar-color: #91acc5 transparent;
}

.sidebar-nav__group {
  padding: .15rem 0 .35rem;
  border-bottom: 1px solid var(--border-soft);
}

.sidebar-nav__label,
.sidebar-group > .sidebar-nav__label:first-child {
  min-height: 2.25rem;
  margin: 0;
  padding: .5rem .55rem;
  color: #72869a;
  border-radius: var(--radius-sm);
  font-size: .78rem;
  font-weight: 620;
  letter-spacing: .02em;
  text-transform: none;
}

.sidebar-nav__label:hover { color: var(--brand-dark); background: var(--brand-soft); }
.sidebar-nav__group-icon { color: #607f9c; }
.sidebar-nav__list { gap: .2rem; padding: .12rem 0 .1rem; }

.sidebar-link,
.sidebar-nav__item {
  min-height: 2.72rem;
  gap: .65rem;
  padding: .58rem .65rem;
  color: #475f76;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: .89rem;
  font-weight: 580;
  transition: color 150ms ease, background-color 150ms ease,
    border-color 150ms ease, box-shadow 150ms ease;
}

.sidebar-link:hover,
.sidebar-link[aria-current="page"] {
  color: var(--brand-dark);
  background: #eef5fb;
  border-color: #9ab9d8;
  box-shadow: .2rem .2rem 0 rgb(41 79 117 / 10%);
  transform: none;
}

.sidebar-link[aria-current="page"] {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand-dark);
  box-shadow: .25rem .25rem 0 rgb(23 50 77 / 16%);
}

.sidebar-link[aria-current="page"] .sidebar-nav__icon { color: #fff; }
.sidebar-nav__icon { width: 1.28rem; height: 1.28rem; color: #607f9c; }

.app-sidebar__account {
  min-height: 3.25rem;
  padding: .55rem;
  color: var(--ink);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.app-sidebar__account:hover {
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-color: var(--brand);
}

.user-avatar {
  color: #fff;
  background: var(--brand);
  border: 1px solid var(--brand-dark);
  border-radius: var(--radius-sm);
}

.app-topbar {
  min-height: var(--app-topbar-height);
  color: var(--ink);
  background: rgb(255 255 255 / 97%);
  border-bottom: 2px solid var(--outline-strong);
  box-shadow: none;
  backdrop-filter: blur(.75rem);
}

.app-topbar__titles .eyebrow {
  color: var(--brand);
  font-size: .67rem;
  font-weight: 850;
  letter-spacing: .13em;
}

.app-topbar__context strong { color: var(--ink); font-weight: 680; }
.app-topbar__actions .button { min-height: 2.45rem; }

.app-main {
  max-width: 92rem;
  background-color: #fff;
  background-image: var(--college-grid);
  background-size: 2.375rem 2.375rem;
}

.app-main::before {
  position: fixed;
  z-index: -1;
  inset: var(--app-topbar-height) 0 var(--app-statusbar-height) var(--sidebar-current-width);
  background: rgb(255 255 255 / 78%);
  content: "";
  pointer-events: none;
}

.app-statusbar {
  color: #536a80;
  background: #f6fafe;
  border-top: 1px solid var(--outline-strong);
  box-shadow: none;
}

.is-sidebar-collapsed .app-sidebar { padding-inline: .55rem; }
.is-sidebar-collapsed .app-sidebar__brand { gap: .55rem; }
.is-sidebar-collapsed .sidebar-nav__label { min-height: 2.65rem; }
.is-sidebar-collapsed .sidebar-nav__group-icon,
.is-sidebar-collapsed .sidebar-nav__icon { width: 1.25rem; height: 1.25rem; }

/* Reusable work surfaces */
.panel,
.card,
.management-panel,
.settings-panel,
.registry-card,
.empty-state,
.education-groups,
.methodical-review__editor {
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--outline-strong);
  border-radius: var(--radius-md);
  box-shadow: none;
}

.panel:hover,
.card:hover,
.registry-card:hover {
  border-color: var(--brand-dark);
  box-shadow: var(--shadow-sm);
  transform: none;
}

.panel__header,
.management-panel__header,
.section-heading,
.registry-commandbar {
  border-bottom-color: var(--border);
}

.eyebrow {
  color: var(--brand);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .12em;
}

.message {
  color: var(--ink);
  background: var(--brand-soft);
  border: 1px solid #9ab9d8;
  border-inline-start: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.message-error {
  background: #fff3f1;
  border-color: #e2aaa4;
  border-inline-start-color: var(--danger);
}

.empty-state {
  padding: 2rem;
  border-style: dashed;
  background: rgb(255 255 255 / 88%);
}

/* Buttons and compact icon actions */
:where(
  button:not(.mini-sheet-button):not(.icon-button),
  .button:not(.mini-sheet-button):not(.icon-button),
  input[type="submit"]
) {
  min-height: 2.55rem;
  padding: .55rem .85rem;
  color: #fff;
  background: var(--brand);
  border: 1.5px solid var(--brand-dark);
  border-radius: var(--radius-sm);
  box-shadow: none;
  font-weight: 700;
  transition: color 150ms ease, background-color 150ms ease,
    border-color 150ms ease, box-shadow 150ms ease;
}

:where(
  button:not(.mini-sheet-button):not(.icon-button),
  .button:not(.mini-sheet-button):not(.icon-button),
  input[type="submit"]
):hover {
  color: #fff;
  background: var(--brand-dark);
  border-color: var(--outline-strong);
  box-shadow: .2rem .2rem 0 rgb(41 79 117 / 15%);
  transform: none;
}

:where(.button-secondary, .button.secondary, button.secondary, .button-quiet) {
  color: var(--ink);
  background: #fff;
  border-color: var(--outline-strong);
}

:where(.button-secondary, .button.secondary, button.secondary, .button-quiet):hover {
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-color: var(--brand);
}

.button-danger {
  color: #fff;
  background: var(--danger);
  border-color: #7f1f18;
}

.button-danger:hover {
  color: #fff;
  background: #8e241c;
  border-color: #641812;
}

.icon-button {
  border: 1px solid #9ab9d8;
  border-radius: var(--radius-sm);
  color: var(--brand-dark);
  background: #f5faff;
  box-shadow: none;
}

.icon-button:hover {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand-dark);
  box-shadow: .15rem .15rem 0 rgb(41 79 117 / 14%);
  transform: none;
}

.icon-button--danger { color: var(--danger); background: #fff6f5; border-color: #e8b7b1; }
.icon-button--danger:hover { color: #fff; background: var(--danger); border-color: #7f1f18; }

/* Forms and filtering */
label { color: var(--ink-soft); font-weight: 650; }

:where(input, select, textarea) {
  color: var(--ink);
  background: #fff;
  border: 1px solid #9eb7cf;
  border-radius: var(--radius-sm);
  box-shadow: none;
}

:where(input, select, textarea):hover { border-color: var(--brand); }

:where(input, select, textarea):focus,
:where(input, select, textarea):focus-visible {
  outline: 0;
  color: var(--ink);
  background: #fafdff;
  border-color: var(--brand-dark);
  box-shadow: inset 0 0 0 2px rgb(121 207 209 / 70%);
}

:where(input, select, textarea):disabled {
  color: #6f8293;
  background: #eff4f8;
}

.registry-toolbar,
.student-filters,
.academic-registry__filters,
.workspace-registry__filters,
.filter-bar,
.filters {
  background: #f6fafe;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: none;
}

/* Tables and registries */
.table-scroll {
  border: 1px solid var(--outline-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  scrollbar-color: #91acc5 #eef5fb;
}

table { color: var(--ink); background: #fff; }

th,
td {
  border-color: var(--border);
  padding: .58rem .68rem;
}

thead th {
  color: var(--ink);
  background: #eaf4ff;
  border-bottom: 2px solid var(--outline-strong);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .035em;
}

tbody tr:nth-child(even) { background: #f9fbfd; }
tbody tr:hover { background: #edf6ff; }
tbody tr:focus-within { box-shadow: inset .2rem 0 0 var(--accent-cyan); }

.table-actions { gap: .25rem; }

.status-chip,
.status-pill,
.badge {
  color: var(--brand-dark);
  background: var(--brand-soft);
  border: 1px solid #9ab9d8;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.status-chip--success { color: #0f6547; background: #ecf8f3; border-color: #84c3ac; }
.status-chip--warning { color: #7b4708; background: #fff6e8; border-color: #e7b777; }
.status-chip--danger { color: #8c251e; background: #fff1ef; border-color: #dfa8a2; }

.pagination a,
.pagination button,
.pagination span {
  border-radius: var(--radius-sm);
}

.pagination [aria-current="page"] {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand-dark);
}

/* Settings ribbon */
.settings-workspace .settings-tabs,
.settings-workspace .settings-subtabs {
  gap: .1rem;
  padding: .25rem .3rem 0;
  background: #edf4fa;
  border: 1.5px solid var(--outline-strong);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.settings-workspace .settings-tab,
.settings-workspace .settings-subtab {
  color: #49647d;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.settings-workspace :is(.settings-tab, .settings-subtab):hover {
  color: var(--brand-dark);
  background: #dcecff;
}

.settings-workspace :is(.settings-tab, .settings-subtab).is-active {
  color: var(--brand-dark);
  background: #fff;
  border-bottom-color: var(--brand);
}

.settings-workspace .settings-panel {
  border: 1.5px solid var(--outline-strong);
  border-top: 0;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: none;
}

/* Native SDO, methodical and journal workspaces */
.workspace-card {
  min-width: 0;
  padding: .85rem;
  background: #fff;
  border: 1.5px solid var(--outline-strong);
  border-radius: var(--radius-md);
}

.tab-strip,
.content-tabs {
  position: sticky;
  top: var(--app-topbar-height);
  z-index: 6;
  display: flex;
  align-items: end;
  gap: .12rem;
  min-width: 0;
  margin: 0 0 .65rem;
  padding: .3rem .35rem 0;
  overflow-x: auto;
  overflow-y: hidden;
  color: var(--ink-soft);
  background: #edf4fa;
  border: 1.5px solid var(--outline-strong);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  scrollbar-width: thin;
}

.tab-strip .tab,
.content-tabs a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: .38rem;
  min-height: 2.35rem;
  padding: .46rem .67rem;
  color: #49647d;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-size: .8rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.tab-strip .tab .ui-icon,
.content-tabs a .ui-icon { width: 1rem; height: 1rem; flex: 0 0 1rem; }

.tab-strip .tab:hover,
.content-tabs a:hover {
  color: var(--brand-dark);
  background: #dcecff;
  border-color: transparent;
  transform: none;
}

.tab-strip .tab.active,
.tab-strip .tab[aria-current="page"],
.content-tabs a.active,
.content-tabs a[aria-current="page"] {
  color: var(--brand-dark);
  background: #fff;
  border-color: var(--border) var(--border) var(--brand);
}

.filter-row {
  display: grid;
  grid-template-columns:
    minmax(11rem, 1.5fr)
    repeat(3, minmax(6.5rem, .75fr))
    minmax(6.25rem, auto);
  gap: .55rem;
  align-items: end;
  margin: 0 0 .7rem;
  padding: .65rem;
  background: #f6fafe;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.filter-row label { display: grid; gap: .22rem; min-width: 0; font-size: .76rem; }
.filter-row :is(input, select) { width: 100%; min-width: 0; min-height: 2.25rem; margin: 0; }
.filter-row .search-field { position: relative; }
.filter-row .search-field > span {
  position: absolute;
  z-index: 1;
  left: .65rem;
  bottom: .52rem;
  color: var(--muted);
  pointer-events: none;
}
.filter-row .search-field input { padding-inline-start: 1.85rem; }
.filter-row :is(button, .button, .icon-button) { width: auto; margin: 0; justify-self: end; }
.filter-row > :is(button, .button):not(.icon-button) {
  min-width: 6.25rem;
  white-space: nowrap;
  overflow-wrap: normal;
}

.pagination-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  margin-top: .65rem;
  color: var(--muted);
  font-size: .76rem;
}

.pagination-row > div { display: inline-flex; align-items: center; gap: .3rem; }
.page-number { min-width: 4rem; text-align: center; font-variant-numeric: tabular-nums; }
.actions-column { width: 1%; text-align: center; white-space: nowrap; }
.actions-column :is(form, .icon-button) { display: inline-flex; margin: 0; }

.completion-value { color: var(--brand-dark); font-weight: 750; }
.completion-track,
.completion-mini {
  display: block;
  width: 5.4rem;
  height: .35rem;
  margin: .28rem 0;
  overflow: hidden;
  background: #dfeaf3;
  border-radius: 999px;
}
.completion-track i,
.completion-mini span { display: block; height: 100%; background: var(--brand); }
.status-safe-text { color: var(--success); }

:is(.ribbon-tab, .fos-ribbon-tab, .umk-ribbon-tab) {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-width: max-content;
  font: inherit;
  font-size: .78rem;
}

:is(.ribbon-tab, .fos-ribbon-tab, .umk-ribbon-tab) .ui-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
}

:is(.ribbon-tabs, .fos-ribbon-tabs, .umk-ribbon-tabs) {
  top: var(--app-topbar-height);
  color: var(--ink-soft);
  background: #edf4fa;
  border-color: var(--outline-strong);
}

:is(.ribbon-tab, .fos-ribbon-tab, .umk-ribbon-tab).active {
  color: var(--brand-dark);
  background: #fff;
  border-color: var(--brand);
}

:is(.ribbon-panel, .fos-ribbon, .umk-ribbon) {
  top: calc(var(--app-topbar-height) + 2.45rem);
  background: #fff;
  border-color: var(--outline-strong);
  box-shadow: none;
}

:is(.editor-titlebar, .fos-titlebar, .umk-titlebar) {
  color: var(--ink);
  background-color: #edf6ff;
  background-image: var(--college-grid);
  background-size: 1.5rem 1.5rem;
  border-color: var(--outline-strong);
  border-radius: var(--radius-md);
  box-shadow: none;
}

:is(.editor-statusbar, .fos-statusbar, .umk-statusbar) {
  left: var(--sidebar-current-width, var(--sidebar-width));
  color: #eef6ff;
  background: var(--ink);
  border-color: var(--outline-strong);
}

/* Modal surfaces */
.app-modal::backdrop { background: rgb(23 50 77 / 60%); backdrop-filter: blur(2px); }

.app-modal__surface,
.mini-sheet-dialog {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--outline-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 1.25rem 3.5rem rgb(23 50 77 / 24%);
}

.app-modal__header,
.mini-sheet-dialog header {
  background: linear-gradient(90deg, #edf6ff, #f8fbff);
  border-bottom: 1px solid var(--outline-strong);
}

.app-modal__footer,
.mini-sheet-dialog footer {
  background: #f6fafe;
  border-top: 1px solid var(--outline-strong);
}

/* Excel-like and other specialized editors retain their interaction model. */
.mini-sheet {
  --sheet-accent: #2b6fba;
  --sheet-tint: #edf6ff;
  --sheet-grid: #cbdbea;
  border: 1.5px solid var(--outline-strong);
  border-radius: var(--radius-md);
  box-shadow: none;
}

.mini-sheet-titlebar,
.mini-sheet-ribbon-shell,
.mini-sheet-bottom,
.mini-sheet-statusbar { background: #f4f9fd; border-color: var(--border); }

.mini-sheet-table thead th { color: var(--ink-soft); background: #eaf4ff; }
.mini-sheet-table [data-sheet-cell].is-selected { background: #e6f4f5; }
.mini-sheet-table [data-sheet-cell].is-active-cell { box-shadow: inset 0 0 0 2px var(--brand); }
.mini-sheet .mini-sheet-button--save { color: #fff; background: var(--brand); }
.mini-sheet .mini-sheet-button--save:hover { color: #fff; background: var(--brand-dark); }

/* Six-card application launchpad */
.dashboard-page .app-main {
  background-color: #f5f9fd;
  background-image: var(--college-grid);
  background-size: 2.375rem 2.375rem;
}

.portal-grid { gap: 1rem; }

.portal-card {
  --portal-from: #fff;
  --portal-to: #edf6ff;
  --portal-glow: #79cfd1;
  min-height: 11.5rem;
  color: var(--ink);
  background:
    linear-gradient(rgb(43 111 186 / 6%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(43 111 186 / 6%) 1px, transparent 1px),
    linear-gradient(145deg, var(--portal-from), var(--portal-to));
  background-size: 2rem 2rem, 2rem 2rem, auto;
  border: 2px solid var(--outline-strong);
  border-radius: var(--radius-md);
  box-shadow: none;
}

.portal-card::before { display: none; }
.portal-card:hover {
  color: var(--ink);
  border-color: var(--brand);
  box-shadow: .45rem .45rem 0 rgb(43 111 186 / 17%);
  transform: translate(-2px, -2px);
}

.portal-card--academics,
.portal-card--library { --portal-to: #e5f2ff; --portal-glow: #79cfd1; }
.portal-card--sdo,
.portal-card--methodical { --portal-to: #e8f7f5; --portal-glow: #63c7bd; }
.portal-card--journal,
.portal-card--communications { --portal-to: #fff3e7; --portal-glow: #f0a35a; }

.portal-card__art { color: var(--brand-dark); }
.portal-card__orb { border-radius: var(--radius-sm); border-color: #9ab9d8; background: rgb(255 255 255 / 65%); }
.portal-card__orb--one { transform: rotate(8deg); }
.portal-card__orb--two { transform: rotate(-8deg); }
.portal-card__illustration { filter: none; }
.portal-card__status { color: var(--brand-dark); background: #fff; border-color: #9ab9d8; border-radius: var(--radius-sm); }
.portal-card__content strong { color: var(--ink); font-weight: 780; }
.portal-card__description { color: var(--muted); }
.portal-card__open { color: #fff; background: var(--brand); border-color: var(--brand-dark); border-radius: var(--radius-sm); }

/* Login */
.login-page {
  background-color: #f5f9fd;
  background-image: var(--college-grid);
  background-size: 2.375rem 2.375rem;
}

.login-page .login-shell {
  width: min(60rem, 100%);
  min-height: min(34rem, calc(100vh - 2rem));
  grid-template-columns: minmax(0, 1fr) minmax(20rem, .82fr);
  overflow: visible;
  background: #fff;
  border: 2px solid var(--outline-strong);
  border-radius: var(--radius-md);
  box-shadow: .65rem .65rem 0 rgb(41 79 117 / 14%);
}

.login-visual {
  min-height: 0;
  justify-content: center;
  padding: clamp(1.75rem, 4vw, 3.25rem);
  color: var(--ink);
  background-color: #eaf4ff;
  background-image:
    linear-gradient(rgb(43 111 186 / 8%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(43 111 186 / 8%) 1px, transparent 1px);
  background-size: 2.375rem 2.375rem;
  border-right: 2px solid var(--outline-strong);
}

.login-visual::before {
  width: 9rem;
  height: 9rem;
  right: 2.5rem;
  bottom: 2.5rem;
  background: var(--accent-cyan);
  border: 0;
  border-radius: 0;
  transform: rotate(-9deg);
}

.login-visual::after {
  width: 6.5rem;
  height: 6.5rem;
  top: 2rem;
  left: auto;
  right: 2rem;
  background: var(--accent-warm);
  border: 0;
  border-radius: 0;
  transform: rotate(11deg);
}

.login-visual :is(h1, h2, a) { color: var(--ink); }
.login-visual p { color: var(--muted); }
.login-brand { margin-bottom: 1.75rem; }
.login-visual h1 { max-width: 31rem; font-size: clamp(1.75rem, 3.2vw, 2.55rem); line-height: 1.08; }
.login-intro { max-width: 31rem; margin-bottom: 0; font-size: 1rem; }
.login-panel { padding: clamp(1.5rem, 4vw, 2.75rem); background: #fff; }
.login-panel__header > :last-child { margin-bottom: .85rem; }
.login-note { margin-top: 1rem; }
.login-page .password-control__toggle {
  top: 50%;
  right: .38rem;
  width: 2.15rem;
  min-width: 2.15rem;
  height: 2.15rem;
  min-height: 2.15rem;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: translateY(-50%);
}
.login-page .password-control__toggle:hover { color: var(--brand-dark); background: #e7f2fc; box-shadow: none; }

/* Standalone workbook frames deliberately keep their compact editor geometry. */
.workbook-preview,
.workbook-editor-page {
  color: var(--ink);
  background: #fff;
  font-size: 13px;
}

.workbook-preview .workbook-ribbon,
.workbook-editor-page .mini-sheet-ribbon-shell {
  border-bottom-color: var(--outline-strong);
}

/* Motion, narrow layouts and print */
@media (max-width: 56rem) {
  .app-shell { --sidebar-current-width: 0rem; padding-inline-start: 0; }
  .app-sidebar { width: min(18rem, calc(100vw - 2.5rem)); }
  .app-main::before { inset-inline-start: 0; }
  :is(.editor-statusbar, .fos-statusbar, .umk-statusbar) { left: 0; }
  .filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-row .search-field { grid-column: 1 / -1; }
  .login-page .login-shell { grid-template-columns: minmax(0, 1fr); }
  .login-visual { min-height: 13rem; border-right: 0; border-bottom: 2px solid var(--outline-strong); }
}

@media (max-width: 40rem) {
  .app-topbar { padding-inline: .65rem; }
  .app-main { background-size: 1.75rem 1.75rem; }
  .filter-row { grid-template-columns: minmax(0, 1fr); }
  .filter-row .search-field { grid-column: auto; }
  .pagination-row { align-items: flex-start; flex-direction: column; }
  .portal-card { min-height: 10.5rem; }
  .login-page .public-main { padding: .65rem; }
  .login-page .login-shell { box-shadow: .3rem .3rem 0 rgb(41 79 117 / 14%); }
  .login-visual { padding: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  .portal-card,
  .sidebar-link,
  .icon-button,
  :where(button, .button) { transition: none; }
}

@media (forced-colors: active) {
  :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid CanvasText;
    outline-offset: -2px;
  }
}

@media print {
  body,
  .app-main { color: #000; background: #fff !important; }
  .panel,
  .card,
  .table-scroll,
  table { border-color: #555; box-shadow: none; }
  .app-main::before { display: none; }
}
