:root {
  color-scheme: light;
  --green-950: #103526;
  --green-900: #12472f;
  --green-800: #175c3b;
  --green-700: #207248;
  --green-600: #2f8958;
  --green-200: #bde7cd;
  --green-100: #ddf3e5;
  --green-50: #edf8f1;
  --orange-700: #a85b00;
  --orange-500: #f0a329;
  --orange-100: #ffedc9;
  --red-700: #ad3434;
  --red-100: #ffe2df;
  --ink: #17231d;
  --muted: #65736b;
  --line: #dce4de;
  --line-strong: #cad6ce;
  --canvas: #f5f7f4;
  --surface: #ffffff;
  --surface-soft: #eef2ef;
  --shadow-sm: 0 1px 2px rgba(16, 53, 38, 0.04), 0 4px 12px rgba(16, 53, 38, 0.04);
  --shadow-lg: 0 24px 60px rgba(22, 52, 39, 0.16);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 100% 0, rgba(189, 231, 205, 0.26), transparent 26rem),
    var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-header {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  height: 72px;
  border-bottom: 1px solid rgba(202, 214, 206, 0.86);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.app-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(100% - 64px, 1320px);
  height: 100%;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: max-content;
}

.brand__mark {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 12px;
  background: var(--green-800);
  box-shadow: 0 7px 18px rgba(23, 92, 59, 0.2);
  color: white;
}

.brand__mark .icon {
  width: 23px;
  height: 23px;
}

.brand__mark--logo {
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

.brand__mark--logo img {
  width: 100%;
  height: 100%;
  transform: scale(1.52);
  filter: drop-shadow(0 5px 8px rgba(16, 53, 38, .14));
  object-fit: cover;
}

.brand__copy {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--green-900);
  font-family: Inter, sans-serif;
}

.brand__copy strong {
  font-size: 19px;
  letter-spacing: -0.04em;
}

.brand__copy small {
  color: var(--orange-700);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.main-nav {
  display: flex;
  width: 448px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8faf8;
  transition:
    width 440ms cubic-bezier(.22, 1, .36, 1),
    gap 360ms cubic-bezier(.22, 1, .36, 1),
    box-shadow 280ms ease;
  will-change: width;
}

.main-nav.is-compact {
  width: 236px;
  gap: 3px;
}

.main-nav__item {
  display: flex;
  min-width: 0;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 10px;
  color: #65756b;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition:
    padding 440ms cubic-bezier(.22, 1, .36, 1),
    gap 360ms cubic-bezier(.22, 1, .36, 1),
    color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.main-nav.is-compact .main-nav__item {
  flex: 0 0 38px;
  gap: 0;
  padding-inline: 10px;
}

.main-nav__item > span {
  max-width: 80px;
  overflow: hidden;
  opacity: 1;
  transform: translateX(0);
  transition:
    max-width 420ms cubic-bezier(.22, 1, .36, 1),
    opacity 220ms ease 90ms,
    transform 360ms cubic-bezier(.22, 1, .36, 1);
}

.main-nav.is-compact .main-nav__item > span {
  max-width: 0;
  opacity: 0;
  transform: translateX(-5px);
  transition:
    max-width 360ms cubic-bezier(.22, 1, .36, 1),
    opacity 140ms ease,
    transform 260ms ease;
}

.main-nav__item .icon {
  width: 17px;
  height: 17px;
}

.main-nav__item:hover {
  color: var(--green-800);
}

.main-nav__item.is-active {
  background: var(--surface);
  box-shadow: 0 2px 7px rgba(16, 53, 38, 0.08);
  color: var(--green-800);
}

.menu-toggle {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  padding: 0;
  place-items: center;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: #78867d;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.menu-toggle:hover {
  border-radius: 8px;
  background: var(--green-50);
  color: var(--green-800);
}

.menu-toggle .icon {
  width: 16px;
  height: 16px;
  transform: rotate(180deg);
  transition: transform 440ms cubic-bezier(.22, 1, .36, 1);
}

.main-nav.is-compact .menu-toggle .icon {
  transform: rotate(0deg);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.icon-button {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  cursor: pointer;
  transition: 150ms ease;
}

.icon-button:hover {
  border-color: var(--green-200);
  background: var(--green-50);
  color: var(--green-800);
}

.icon-button.small {
  width: 34px;
  height: 34px;
  border: 0;
  background: var(--surface-soft);
}

.icon-button.small .icon {
  width: 17px;
  height: 17px;
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border: 2px solid white;
  border-radius: 50%;
  background: #ef7c42;
}

.teacher-profile {
  display: flex;
  align-items: center;
  gap: 9px;
}

.teacher-profile > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.teacher-profile strong {
  font-size: 13px;
}

.teacher-profile small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.app-shell {
  min-height: 100vh;
}

.side-menu {
  position: fixed;
  z-index: 50;
  inset: 0 auto 0 0;
  display: flex;
  width: 260px;
  padding: 18px 14px;
  overflow: visible;
  flex-direction: column;
  border-right: 1px solid rgba(202, 214, 206, .9);
  background: rgba(255, 255, 255, .94);
  box-shadow: 8px 0 30px rgba(16, 53, 38, .04);
  backdrop-filter: blur(18px);
  transition: width 440ms cubic-bezier(.22, 1, .36, 1);
  will-change: width;
}

.side-menu.is-compact {
  width: 78px;
}

.side-brand {
  width: 100%;
  min-height: 50px;
  padding: 2px 5px;
  overflow: hidden;
  flex: 0 0 auto;
}

.side-brand .brand__mark {
  width: 45px;
  height: 45px;
  flex: 0 0 45px;
  border-radius: 13px;
}

.side-brand .brand__copy {
  max-width: 160px;
  align-items: flex-start;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  opacity: 1;
  white-space: nowrap;
  transition:
    max-width 400ms cubic-bezier(.22, 1, .36, 1),
    opacity 220ms ease 100ms,
    transform 360ms cubic-bezier(.22, 1, .36, 1);
}

.side-brand .brand__copy small {
  margin-top: 2px;
}

.side-menu.is-compact .side-brand {
  gap: 0;
  padding-inline: 2px;
}

.side-menu.is-compact .side-brand .brand__copy {
  max-width: 0;
  opacity: 0;
  transform: translateX(-7px);
  transition:
    max-width 300ms cubic-bezier(.22, 1, .36, 1),
    opacity 120ms ease,
    transform 240ms ease;
}

.side-menu__toggle {
  position: absolute;
  top: 80px;
  right: -14px;
  display: grid;
  width: 29px;
  height: 29px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: white;
  box-shadow: 0 5px 14px rgba(16, 53, 38, .12);
  color: var(--green-800);
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.side-menu__toggle:hover {
  transform: scale(1.06);
  background: var(--green-50);
}

.side-menu__toggle .icon {
  width: 14px;
  height: 14px;
  transform: rotate(180deg);
  transition: transform 440ms cubic-bezier(.22, 1, .36, 1);
}

.side-menu.is-compact .side-menu__toggle .icon {
  transform: rotate(0deg);
}

.side-nav {
  display: flex;
  margin-top: 34px;
  flex-direction: column;
  gap: 6px;
}

.side-nav__item {
  position: relative;
  display: flex;
  width: 100%;
  height: 46px;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #627168;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
  transition:
    padding 400ms cubic-bezier(.22, 1, .36, 1),
    gap 360ms cubic-bezier(.22, 1, .36, 1),
    color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.side-nav__item .icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
}

.side-nav__item > span:not(.bottom-brand-icon) {
  max-width: 150px;
  overflow: hidden;
  opacity: 1;
  transform: translateX(0);
  transition:
    max-width 400ms cubic-bezier(.22, 1, .36, 1),
    opacity 220ms ease 90ms,
    transform 340ms cubic-bezier(.22, 1, .36, 1);
}

.side-nav__item:hover {
  background: var(--green-50);
  color: var(--green-800);
}

.side-nav__item.is-active {
  background: var(--green-100);
  box-shadow: inset 3px 0 0 var(--green-700);
  color: var(--green-900);
}

.side-menu.is-compact .side-nav__item {
  justify-content: center;
  gap: 0;
  padding-inline: 0;
}

.side-menu.is-compact .side-nav__item > span:not(.bottom-brand-icon) {
  max-width: 0;
  opacity: 0;
  transform: translateX(-7px);
  transition:
    max-width 300ms cubic-bezier(.22, 1, .36, 1),
    opacity 120ms ease,
    transform 230ms ease;
}

.side-menu__footer {
  display: flex;
  margin-top: auto;
  padding-top: 12px;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--line);
}

.side-notification__dot {
  position: absolute;
  top: 12px;
  left: 27px;
  width: 7px;
  height: 7px;
  border: 2px solid white;
  border-radius: 50%;
  background: #ef7c42;
}

.side-profile {
  display: flex;
  height: 58px;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 8px;
  overflow: hidden;
  border-radius: 13px;
  background: #f5f7f5;
}

.side-profile__copy {
  display: flex;
  max-width: 120px;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  opacity: 1;
  white-space: nowrap;
  transition: max-width 400ms cubic-bezier(.22, 1, .36, 1), opacity 180ms ease 80ms;
}

.side-profile__copy strong { font-size: 11px; }
.side-profile__copy small { color: var(--muted); font-size: 9px; }
.side-profile > .icon { width: 17px; color: var(--muted); }
.side-menu.is-compact .side-profile { justify-content: center; gap: 0; padding-inline: 0; background: transparent; }
.side-menu.is-compact .side-profile__copy,
.side-menu.is-compact .side-profile > .icon { max-width: 0; opacity: 0; }

.top-menu {
  position: fixed;
  z-index: 70;
  top: 14px;
  left: 50%;
  display: flex;
  width: min(1060px, calc(100% - 48px));
  height: 68px;
  align-items: center;
  gap: 8px;
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 19px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .72), rgba(236, 248, 241, .32) 52%, rgba(255, 255, 255, .48)),
    rgba(255, 255, 255, .34);
  box-shadow:
    0 18px 46px rgba(16, 53, 38, .13),
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 0 rgba(157, 190, 171, .18);
  -webkit-backdrop-filter: blur(26px) saturate(175%);
  backdrop-filter: blur(26px) saturate(175%);
  transform: translateX(-50%);
  transition:
    width 460ms cubic-bezier(.22, 1, .36, 1),
    height 460ms cubic-bezier(.22, 1, .36, 1),
    padding 420ms cubic-bezier(.22, 1, .36, 1),
    gap 420ms cubic-bezier(.22, 1, .36, 1),
    border-radius 360ms ease,
    box-shadow 260ms ease;
  will-change: width, height;
}

.top-menu::before,
.top-menu::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.top-menu::before {
  z-index: 0;
  inset: 1px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 12% 0, rgba(255, 255, 255, .92), transparent 30%),
    linear-gradient(110deg, rgba(255, 255, 255, .3), transparent 38% 68%, rgba(255, 255, 255, .22));
  opacity: .82;
}

.top-menu::after {
  z-index: 0;
  top: -55%;
  left: 8%;
  width: 32%;
  height: 190%;
  border-radius: 50%;
  background: rgba(255, 255, 255, .25);
  filter: blur(18px);
  opacity: .7;
  transform: rotate(-12deg);
}

.top-menu > * { position: relative; z-index: 1; }

.top-menu.is-expanded {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 190px;
  column-gap: 8px;
  border-color: rgba(255, 255, 255, .64);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .46), rgba(222, 242, 231, .17) 52%, rgba(255, 255, 255, .28)),
    rgba(255, 255, 255, .16);
  box-shadow:
    0 18px 48px rgba(16, 53, 38, .12),
    inset 0 1px 0 rgba(255, 255, 255, .82),
    inset 0 -1px 0 rgba(123, 164, 141, .13);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  backdrop-filter: blur(22px) saturate(165%);
}

.top-menu.is-expanded::before { opacity: .52; }
.top-menu.is-expanded::after { opacity: .46; }

.top-menu.is-compact {
  width: 70px;
  justify-content: center;
  gap: 0;
  border-radius: 18px;
  box-shadow:
    0 13px 34px rgba(16, 53, 38, .13),
    inset 0 1px 0 rgba(255, 255, 255, .96),
    inset 0 -1px 0 rgba(157, 190, 171, .16);
}

.top-menu__brand {
  display: flex;
  min-width: 52px;
  max-width: 52px;
  flex: 0 0 52px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  transition:
    max-width 430ms cubic-bezier(.22, 1, .36, 1),
    flex-basis 430ms cubic-bezier(.22, 1, .36, 1);
}

.top-menu__brand:hover { background: rgba(255, 255, 255, .24); }
.top-menu__brand:focus-visible { outline: 2px solid rgba(32, 114, 72, .5); outline-offset: 2px; }

.top-menu__brand .brand__mark {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 13px;
}

.top-menu__brand .brand__copy {
  display: flex;
  max-width: 120px;
  min-width: 0;
  align-items: flex-start;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  opacity: 1;
  white-space: nowrap;
  transform: translateX(0);
  transition:
    max-width 400ms cubic-bezier(.22, 1, .36, 1),
    opacity 220ms ease 100ms,
    transform 360ms cubic-bezier(.22, 1, .36, 1);
}

.top-menu__brand .brand__copy small { margin-top: 1px; }

.top-menu.is-compact .top-menu__brand {
  min-width: 44px;
  max-width: 44px;
  flex-basis: 44px;
  gap: 0;
}

.top-menu.is-compact .top-menu__brand .brand__copy {
  max-width: 0;
  opacity: 0;
  transform: translateX(-7px);
  transition:
    max-width 300ms cubic-bezier(.22, 1, .36, 1),
    opacity 120ms ease,
    transform 240ms ease;
}

.top-menu__nav {
  display: flex;
  max-width: 640px;
  min-width: 0;
  flex: 1 1 410px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  transition:
    max-width 440ms cubic-bezier(.22, 1, .36, 1),
    flex-basis 440ms cubic-bezier(.22, 1, .36, 1),
    opacity 220ms ease 100ms,
    transform 380ms cubic-bezier(.22, 1, .36, 1);
}

.top-menu.is-expanded .top-menu__nav {
  position: static;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  flex: 0 0 auto;
  justify-content: center;
  justify-self: center;
  transform: none;
}

.top-menu__actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  overflow: hidden;
  opacity: 1;
  transition: opacity 180ms ease 90ms, gap 360ms cubic-bezier(.22, 1, .36, 1);
}

.top-menu.is-expanded .top-menu__notification { margin-left: 0; }

.top-menu.is-compact .top-menu__actions {
  width: 0;
  gap: 0;
  opacity: 0;
  pointer-events: none;
}

.top-menu.is-compact .top-menu__nav {
  max-width: 0;
  flex-basis: 0;
  gap: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition:
    max-width 330ms cubic-bezier(.22, 1, .36, 1),
    flex-basis 330ms cubic-bezier(.22, 1, .36, 1),
    opacity 110ms ease,
    transform 220ms ease;
}

.top-menu__item {
  display: flex;
  height: 42px;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
  border-radius: 11px;
  color: #65756b;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.top-menu__item .icon { width: 17px; height: 17px; }
.top-menu__item:hover { background: var(--green-50); color: var(--green-800); transform: translateY(-1px); }
.top-menu__item.is-active { background: rgba(255, 255, 255, .58); box-shadow: 0 5px 13px rgba(16, 53, 38, .08), inset 0 0 0 1px rgba(255, 255, 255, .72); color: var(--green-900); }
.top-menu.is-expanded .top-menu__item.is-active { background: rgba(255, 255, 255, .34); box-shadow: 0 5px 13px rgba(16, 53, 38, .06), inset 0 0 0 1px rgba(255, 255, 255, .48); }
.top-menu__item--project {
  border: 1px solid rgba(24, 105, 65, .24);
  background: rgba(229, 246, 237, .5);
  color: var(--green-800);
}
.top-menu__item--project:hover {
  border-color: rgba(24, 105, 65, .36);
  background: rgba(218, 241, 229, .78);
}

.top-menu__notification,
.top-menu__toggle {
  position: relative;
  display: flex;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #617168;
  cursor: pointer;
}

.top-menu__notification {
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  gap: 8px;
  overflow: hidden;
  opacity: 1;
  transition:
    width 390ms cubic-bezier(.22, 1, .36, 1),
    min-width 390ms cubic-bezier(.22, 1, .36, 1),
    max-width 390ms cubic-bezier(.22, 1, .36, 1),
    opacity 170ms ease 90ms,
    background 160ms ease,
    color 160ms ease;
}

.top-menu__notification:hover,
.top-menu__toggle:hover { background: var(--green-50); color: var(--green-800); }
.top-menu__notification .icon,
.top-menu__toggle .icon { width: 17px; height: 17px; }

.top-menu__notification i {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border: 2px solid white;
  border-radius: 50%;
  background: #ef7c42;
}

.top-menu__notification-label {
  max-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 750;
  opacity: 0;
  white-space: nowrap;
}

.top-menu__profile {
  display: flex;
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  padding: 5px;
  overflow: hidden;
  border: 0;
  border-radius: 13px;
  background: rgba(255, 255, 255, .44);
  cursor: pointer;
  opacity: 1;
  white-space: nowrap;
  transition:
    width 410ms cubic-bezier(.22, 1, .36, 1),
    min-width 410ms cubic-bezier(.22, 1, .36, 1),
    max-width 410ms cubic-bezier(.22, 1, .36, 1),
    opacity 180ms ease 90ms,
    transform 360ms cubic-bezier(.22, 1, .36, 1);
}

.top-menu__profile:hover { background: rgba(255, 255, 255, .72); }
.top-menu__profile.is-open { background: rgba(255, 255, 255, .82); }

.startup-state {
  display: grid;
  min-height: 100vh;
  padding: 32px;
  place-content: center;
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.startup-state img { width: 92px; height: 92px; object-fit: contain; }
.startup-state h1 { margin: 0; font-size: clamp(24px, 5vw, 36px); }
.startup-state p { max-width: 520px; margin: 0; color: var(--muted); }

.top-menu.is-expanded .top-menu__profile { background: rgba(255, 255, 255, .25); }

.top-menu.is-compact .top-menu__notification,
.top-menu.is-compact .top-menu__profile {
  width: 0;
  min-width: 0;
  max-width: 0;
  padding-inline: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-5px);
  transition:
    width 300ms cubic-bezier(.22, 1, .36, 1),
    min-width 300ms cubic-bezier(.22, 1, .36, 1),
    max-width 300ms cubic-bezier(.22, 1, .36, 1),
    opacity 100ms ease,
    transform 210ms ease;
}

.top-menu__toggle {
  width: 38px;
  min-width: 38px;
  margin-left: auto;
  border-left: 1px solid var(--line);
  border-radius: 0 11px 11px 0;
}

.top-menu__toggle .icon {
  transform: rotate(180deg);
  transition: transform 460ms cubic-bezier(.22, 1, .36, 1);
}

.top-menu.is-compact .top-menu__toggle .icon { transform: rotate(0deg); }

.notifications-panel {
  position: fixed;
  z-index: 80;
  top: 94px;
  right: max(24px, calc(50vw - 530px));
  width: min(390px, calc(100vw - 32px));
  max-height: calc(100dvh - 112px);
  padding: 20px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .58), rgba(226, 243, 233, .26) 55%, rgba(255, 255, 255, .38)),
    rgba(255, 255, 255, .22);
  box-shadow:
    0 22px 52px rgba(16, 53, 38, .16),
    inset 0 1px 0 rgba(255, 255, 255, .9),
    inset 0 -1px 0 rgba(123, 164, 141, .12);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  animation: panel-in 220ms cubic-bezier(.22, 1, .36, 1) both;
}

.notifications-panel::before {
  position: absolute;
  z-index: 0;
  inset: 1px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 10% 0, rgba(255, 255, 255, .88), transparent 36%),
    linear-gradient(115deg, rgba(255, 255, 255, .22), transparent 48% 75%, rgba(255, 255, 255, .16));
  pointer-events: none;
  content: "";
}

.notifications-panel > * { position: relative; z-index: 1; }

.profile-menu {
  position: fixed;
  z-index: 85;
  top: 94px;
  right: max(24px, calc(50vw - 530px));
  width: min(260px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .76);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .84), rgba(229, 244, 236, .72)),
    rgba(255, 255, 255, .68);
  box-shadow: 0 22px 52px rgba(16, 53, 38, .18), inset 0 1px 0 rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  animation: panel-in 180ms cubic-bezier(.22, 1, .36, 1) both;
}

.profile-menu__identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 8px 9px 13px;
  border-bottom: 1px solid rgba(33, 87, 59, .1);
}

.profile-menu__identity > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.2;
}

.profile-menu__identity strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-menu__identity small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.profile-menu__options { display: grid; gap: 3px; padding-top: 7px; }

.profile-menu__item {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.profile-menu__item:hover,
.profile-menu__item:focus-visible { background: rgba(35, 123, 76, .1); outline: none; }
.profile-menu__item .icon { width: 18px; height: 18px; color: var(--green); }
.profile-menu__item--logout { color: #a83f35; }
.profile-menu__item--logout .icon { color: #c45043; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.panel-heading,
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.panel-heading {
  margin-bottom: 14px;
}

.panel-heading h2,
.section-title-row h2 {
  margin: 2px 0 0;
  font-family: Inter, sans-serif;
  font-size: 20px;
  letter-spacing: -0.035em;
}

.notification-item {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 15px 0;
  border-top: 1px solid rgba(202, 214, 206, .66);
}

.notification-item.unread::after {
  position: absolute;
  top: 18px;
  right: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange-500);
  content: "";
}

.notification-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
}

.notification-icon .icon { width: 18px; }
.notification-icon.warning { background: var(--orange-100); color: var(--orange-700); }
.notification-icon.success { background: var(--green-100); color: var(--green-800); }
.notification-item strong { display: block; font-size: 14px; }
.notification-item p { margin: 3px 0; color: var(--muted); font-size: 13px; }
.notification-item small { color: #8a978f; font-size: 11px; }

.page-shell {
  width: min(calc(100% - 64px), 1240px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 118px 0 72px;
}

.page-heading {
  margin-bottom: 18px;
}

.dashboard-heading,
.split-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.split-heading {
  align-items: center;
}

.split-heading.compact {
  margin: 8px 0 18px;
}

.eyebrow {
  display: block;
  color: var(--green-700);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.eyebrow--orange {
  color: var(--orange-700);
}

.date-chip,
.period-select {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-sm);
  color: var(--green-900);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.date-chip .icon,
.period-select .icon {
  width: 18px;
  color: var(--green-700);
}

.period-select input {
  min-width: 132px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0) scale(0.98);
}

.button--primary {
  background: var(--green-800);
  box-shadow: 0 8px 18px rgba(23, 92, 59, 0.16);
  color: white;
}

.button--primary:hover {
  background: var(--green-900);
  box-shadow: 0 10px 22px rgba(23, 92, 59, 0.22);
}

.button--secondary {
  border-color: var(--line-strong);
  background: white;
  color: var(--green-900);
}

.button--secondary:hover {
  border-color: var(--green-200);
  background: var(--green-50);
}

.button--light {
  background: white;
  color: var(--green-900);
}

.button--light:hover {
  background: var(--green-50);
}

.button--wide {
  width: 100%;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--green-700);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.text-button:hover {
  color: var(--green-900);
}

.text-button .icon {
  width: 14px;
  height: 14px;
}

.text-button.full {
  width: 100%;
  justify-content: center;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.metric-card {
  display: flex;
  grid-column: span 4;
  align-items: center;
  gap: 17px;
  min-height: 132px;
  padding: 23px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.metric-card > div:last-child {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 9px;
}

.metric-card span,
.metric-card small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.metric-card span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric-card strong {
  margin: 2px 0 0;
  font-family: Inter, sans-serif;
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.06em;
}

.metric-card small {
  margin-top: 7px;
  font-size: 12px;
}

.metric-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
}

.metric-icon .icon { width: 23px; height: 23px; }
.metric-card--green .metric-icon { background: var(--green-100); color: var(--green-800); }
.metric-card--green strong { color: var(--green-800); }
.metric-card--orange .metric-icon { background: var(--orange-100); color: var(--orange-700); }
.metric-card--orange strong { color: var(--orange-700); }
.metric-card--soft .metric-icon { background: #e6e7f9; color: #57549a; }

.next-class-card,
.schedule-card,
.attention-card,
.filter-bar,
.attendance-summary,
.student-list,
.form-card,
.report-card,
.report-kpi {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.next-class-card {
  position: relative;
  display: flex;
  grid-column: span 5;
  flex-direction: column;
  min-height: 350px;
  padding: 26px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--green-900), #1e7049);
  color: white;
}

.next-class-card__decoration {
  position: absolute;
  top: -65px;
  right: -55px;
  width: 230px;
  height: 230px;
  border: 38px solid rgba(255, 255, 255, 0.055);
  border-radius: 50%;
}

.next-class-card::after {
  position: absolute;
  right: 32px;
  bottom: 78px;
  width: 120px;
  height: 2px;
  transform: rotate(-35deg);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 20px 0 rgba(255, 255, 255, 0.045), 0 40px 0 rgba(255, 255, 255, 0.025);
  content: "";
}

.card-topline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  padding: 5px 9px;
  border-radius: 99px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.status-pill--live {
  background: rgba(255, 255, 255, 0.13);
  color: #f4fff7;
}

.status-pill--live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffbf59;
  box-shadow: 0 0 0 4px rgba(255, 191, 89, 0.14);
}

.status-pill--active { background: rgba(255, 255, 255, 0.9); color: var(--green-800); }
.status-pill--upcoming { background: rgba(255, 255, 255, 0.9); color: #65509e; }
.next-time { color: rgba(255, 255, 255, 0.68); font-size: 11px; font-weight: 700; }

.next-class-card__content {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 34px 0 20px;
}

.subject-icon {
  display: grid;
  width: 47px;
  height: 47px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
}

.next-class-card h2 {
  margin: 0;
  font-family: Inter, sans-serif;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.next-class-card__content > p {
  margin: 3px 0 17px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
}

.class-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.class-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 600;
}

.class-meta .icon { width: 15px; height: 15px; }

.next-class-card .button {
  position: relative;
  z-index: 2;
}

.next-class-card .button .icon:last-child {
  margin-left: auto;
}

.schedule-card {
  grid-column: span 7;
  min-height: 350px;
  padding: 26px;
}

.timeline {
  margin-top: 24px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 54px 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 75px;
  border-top: 1px solid var(--line);
}

.timeline-item time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.timeline-item > i {
  width: 8px;
  height: 8px;
  border: 2px solid white;
  border-radius: 50%;
  background: #b3c0b8;
  box-shadow: 0 0 0 1px #b3c0b8;
}

.timeline-item.is-next > i {
  background: var(--green-600);
  box-shadow: 0 0 0 1px var(--green-600), 0 0 0 5px var(--green-100);
}

.timeline-item div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow-wrap: anywhere;
}

.timeline-item strong { font-size: 14px; }
.timeline-item div span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.timeline-item .duration { padding: 4px 8px; border-radius: 7px; background: var(--surface-soft); color: var(--muted); font-size: 10px; font-weight: 700; }

.attention-card {
  grid-column: span 12;
  padding: 26px;
}

.attention-card .section-title-row,
.schedule-card .section-title-row {
  flex-wrap: wrap;
  gap: 12px;
}

.attention-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 21px;
}

.attention-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "avatar student action"
    "message message message";
  align-content: start;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcfb;
  cursor: pointer;
  text-align: left;
  transition: 150ms ease;
}

.attention-row:hover {
  border-color: var(--green-200);
  background: var(--green-50);
  transform: translateY(-1px);
}

.attention-row > .avatar { grid-area: avatar; }
.attention-row > .student-copy { grid-area: student; }
.attention-row > .icon { grid-area: action; width: 15px; color: #98a59d; }

.attention-row .student-copy strong,
.attention-row .student-copy small {
  white-space: normal;
  overflow-wrap: anywhere;
}

.attention-row > .alert-badge {
  grid-area: message;
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  font-size: 10px;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}

.student-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.student-copy strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-copy small { color: var(--muted); font-size: 11px; }

.avatar {
  display: inline-grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }

.avatar--green, .avatar--mint { background: #d8f1e2; color: #176341; }
.avatar--coral { background: #fee1d8; color: #a6482d; }
.avatar--violet { background: #e8e3fa; color: #6550a0; }
.avatar--blue { background: #deecf8; color: #376b96; }
.avatar--pink { background: #f8dfeb; color: #9b4f75; }
.avatar--amber { background: #ffedca; color: #946012; }
.avatar--teal { background: #d9f0ef; color: #267774; }
.avatar--lime { background: #e9f1d0; color: #60772b; }

.alert-badge {
  display: inline-flex;
  width: max-content;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.alert-badge--danger { background: var(--red-100); color: var(--red-700); }
.alert-badge--warning { background: var(--orange-100); color: var(--orange-700); }
.alert-badge--neutral { background: var(--surface-soft); color: var(--muted); }

/* Classes */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
  padding: 16px;
}

.search-field {
  position: relative;
  display: flex;
  min-width: 270px;
  flex: 1;
  align-items: center;
}

.search-field .icon {
  position: absolute;
  left: 13px;
  width: 18px;
  color: #8b9890;
}

.search-field input,
.form-field input,
.form-field select,
.period-select select {
  width: 100%;
  height: 43px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  background: white;
  color: var(--ink);
  transition: border 130ms ease, box-shadow 130ms ease;
}

.search-field input {
  padding: 0 14px 0 41px;
  background: #fafcfb;
}

.search-field input:focus,
.form-field input:focus,
.form-field select:focus {
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(47, 137, 88, 0.12);
}

.search-field input::placeholder,
.form-field input::placeholder {
  color: #97a49c;
}

.day-filters {
  display: flex;
  align-items: center;
  gap: 6px;
}

.day-filters > span {
  margin-right: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.filter-chip {
  min-width: 43px;
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.filter-chip:hover,
.filter-chip.is-active {
  border-color: var(--green-200);
  background: var(--green-50);
  color: var(--green-800);
}

.results-line {
  margin: 0 0 12px 3px;
  color: var(--muted);
  font-size: 12px;
}

.results-line strong { color: var(--ink); }

.class-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.class-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.class-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(16, 53, 38, 0.09);
}

.class-cover {
  position: relative;
  display: block;
  width: 100%;
  height: 145px;
  overflow: hidden;
  border: 0;
  cursor: pointer;
}

.class-cover::before,
.class-cover::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  content: "";
}

.class-cover::before { top: -70px; right: -35px; width: 190px; height: 190px; }
.class-cover::after { bottom: -90px; left: 10%; width: 230px; height: 170px; }
.class-cover--coral { background: linear-gradient(135deg, #d86845, #f2a05c); }
.class-cover--violet { background: linear-gradient(135deg, #66559d, #a394cc); }
.class-cover--blue { background: linear-gradient(135deg, #376f98, #67a9bd); }
.class-cover--lime { background: linear-gradient(135deg, #688342, #abc16c); }
.class-cover--amber { background: linear-gradient(135deg, #be741f, #efbd5c); }
.class-cover--teal { background: linear-gradient(135deg, #267872, #6eb6a9); }

.cover-orbit {
  position: absolute;
  top: 17px;
  left: 24px;
  width: 100px;
  height: 100px;
  transform: rotate(18deg);
  border: 1px dashed rgba(255, 255, 255, 0.32);
  border-radius: 35% 65% 56% 44%;
}

.cover-icon {
  position: absolute;
  top: 43px;
  left: 51px;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  color: white;
  backdrop-filter: blur(5px);
}

.cover-icon .icon { width: 28px; height: 28px; }
.class-cover .status-pill { position: absolute; z-index: 1; top: 14px; right: 14px; }

.class-card__body {
  padding: 21px 21px 17px;
}

.category {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--green-700);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.category .icon { width: 14px; height: 14px; }

.class-card h2 {
  margin: 8px 0 16px;
  font-family: Inter, sans-serif;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.class-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.class-details span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.class-details .icon { width: 15px; height: 15px; color: #8c9a91; }

.occupancy {
  margin-top: 20px;
}

.occupancy > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.occupancy strong { color: var(--green-800); }
.text-danger { color: var(--red-700) !important; }

.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #e8eeea;
}

.progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-700), #48a269);
  transition: width 240ms ease;
}

.progress-track i.is-full { background: linear-gradient(90deg, #c75246, #eb7569); }

.card-link {
  display: flex;
  width: calc(100% - 42px);
  align-items: center;
  justify-content: space-between;
  margin: 0 21px;
  padding: 13px 0 16px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--green-700);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.card-link .icon { width: 15px; height: 15px; }

.class-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px 16px;
}

.class-card__actions .card-link {
  flex: 1;
  padding: 0;
}

.empty-state {
  display: flex;
  grid-column: 1 / -1;
  min-height: 300px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.56);
  text-align: center;
}

.empty-state > .icon { width: 32px; height: 32px; color: #91a096; }
.empty-state h2 { margin: 15px 0 5px; font-family: Inter, sans-serif; font-size: 19px; }
.empty-state p { margin: 0 0 14px; color: var(--muted); }

/* Student directory */
.student-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.student-overview article {
  display: flex;
  min-height: 94px;
  align-items: center;
  gap: 14px;
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  box-shadow: var(--shadow-sm);
}

.student-overview__icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
}

.student-overview__icon .icon { width: 20px; height: 20px; }
.student-overview__icon.green { background: var(--green-100); color: var(--green-800); }
.student-overview__icon.orange { background: var(--orange-100); color: var(--orange-700); }
.student-overview__icon.violet { background: #e6e7f9; color: #57549a; }
.student-overview article > div { display: flex; flex-direction: column; }
.student-overview strong { font-family: Inter, sans-serif; font-size: 24px; line-height: 1; letter-spacing: -.04em; }
.student-overview article > div span { margin-top: 5px; color: var(--muted); font-size: 11px; }

.student-directory-filters {
  margin-bottom: 15px;
}

.directory-select {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.directory-select select {
  width: 190px;
  height: 43px;
  padding: 0 33px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: 0;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.directory-select select:focus {
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(47, 137, 88, 0.12);
}

.directory-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-sm);
}

.directory-table__header,
.directory-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.45fr) minmax(105px, .7fr) minmax(170px, 1fr) 115px 110px 34px;
  align-items: center;
  gap: 14px;
}

.directory-table__header {
  min-height: 42px;
  padding: 0 18px;
  background: #f0f4f1;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
}

.directory-row {
  width: 100%;
  min-height: 76px;
  padding: 11px 18px;
  border: 0;
  border-top: 1px solid var(--line);
  background: white;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 130ms ease;
}

.directory-row:hover { background: var(--green-50); }
.directory-row:focus-visible { position: relative; z-index: 1; outline: 3px solid rgba(47, 137, 88, .25); outline-offset: -3px; }

.directory-student,
.guardian-cell {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.directory-student > span:last-child,
.guardian-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.directory-student strong,
.guardian-cell strong {
  overflow: hidden;
  max-width: 100%;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-student small,
.guardian-cell small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.directory-age {
  color: #4f5e55;
  font-size: 11px;
  font-weight: 700;
}

.frequency-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.frequency-cell strong { font-size: 11px; }
.frequency-cell.success strong { color: var(--green-700); }
.frequency-cell.warning strong { color: var(--orange-700); }
.frequency-cell.danger strong { color: var(--red-700); }
.frequency-cell i { display: block; width: 72px; height: 5px; overflow: hidden; border-radius: 99px; background: #e7ece9; }
.frequency-cell b { display: block; height: 100%; border-radius: inherit; background: var(--green-600); }
.frequency-cell.warning b { background: var(--orange-500); }
.frequency-cell.danger b { background: #da6257; }

.directory-status {
  display: inline-flex;
  width: max-content;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 9px;
  font-weight: 800;
}

.directory-status.success { background: var(--green-100); color: var(--green-800); }
.directory-status.warning { background: var(--orange-100); color: var(--orange-700); }
.directory-status.neutral { background: var(--surface-soft); color: var(--muted); }
.directory-more { color: var(--green-700); }
.directory-more .icon { width: 15px; height: 15px; }
.student-back-link { margin-bottom: 14px; }

/* Attendance */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green-700);
  font-size: 12px;
  font-weight: 800;
}

.back-link .icon { width: 16px; }

.attendance-summary {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 32px;
  margin-bottom: 18px;
  padding: 22px 24px;
}

.roll-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 12px;
}

.roll-progress span { color: var(--muted); }
.roll-progress strong { color: var(--green-900); }
.progress-track.large { height: 8px; }

.attendance-counts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.count {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.count i { width: 7px; height: 7px; border-radius: 50%; }
.count.present i { background: var(--green-600); }
.count.absent i { background: #da6257; }
.count.pending i { background: #bdc6c0; }
.count strong { color: var(--ink); }

.student-list {
  overflow: hidden;
}

.student-list__header {
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 11px 22px;
  background: #f2f5f3;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.11em;
}

.student-list__header span:last-child {
  width: 354px;
  text-align: center;
}

.student-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  min-height: 78px;
  padding: 12px 21px;
  border-top: 1px solid var(--line);
}

.student-row:first-of-type { border-top: 0; }

.student-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.student-identity > span:last-child { display: flex; flex-direction: column; }
.student-identity strong { font-size: 13px; }
.student-identity small { margin-top: 3px; color: var(--muted); font-size: 10px; }

.attendance-options {
  display: grid;
  grid-template-columns: repeat(2, 112px);
  gap: 7px;
}

.attendance-option {
  display: flex;
  height: 36px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: white;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  transition: 120ms ease;
}

.attendance-option .icon { width: 15px; height: 15px; }
.attendance-option:hover { background: var(--surface-soft); }
.attendance-option.present.is-selected { border-color: var(--green-200); background: var(--green-100); color: var(--green-800); }
.attendance-option.absent.is-selected { border-color: #f1bab4; background: var(--red-100); color: var(--red-700); }

.attendance-actions,
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

/* Forms */
.student-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-card {
  overflow: hidden;
}

.form-card__heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: #f5f8f6;
}

.form-section-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: var(--green-100);
  color: var(--green-800);
}

.form-section-icon--orange { background: var(--orange-100); color: var(--orange-700); }
.form-section-icon .icon { width: 20px; }
.form-card__heading div { display: flex; flex-direction: column; }
.form-card__heading div span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: 0.1em; }
.form-card__heading h2 { margin: 1px 0 0; font-family: Inter, sans-serif; font-size: 18px; letter-spacing: -0.025em; }

.form-card__content {
  padding: 25px;
}

.student-data-grid {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 30px;
}

.photo-field {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
}

.photo-upload {
  display: flex;
  width: 140px;
  height: 140px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  border: 2px dashed var(--line-strong);
  border-radius: 50%;
  background-color: #f6f8f6;
  background-position: center;
  background-size: cover;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: 140ms ease;
}

.photo-upload:hover {
  border-color: var(--green-600);
  background-color: var(--green-50);
  color: var(--green-800);
}

.photo-upload.has-photo { border-style: solid; border-color: var(--green-200); }
.photo-upload .icon { width: 27px; height: 27px; }
.photo-upload--static { cursor: default; }
.photo-upload--static:hover { border-color: var(--line-strong); background: var(--surface-soft); }
.photo-field small { color: var(--muted); font-size: 10px; }

.fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-field > span {
  color: #4f5e55;
  font-size: 11px;
  font-weight: 800;
}

.form-field input,
.form-field select {
  padding: 0 12px;
  font-size: 13px;
}

.form-field select:invalid { color: #97a49c; }
.span-2 { grid-column: span 2; }
.responsible-grid { max-width: none; }

/* Reports */
.report-actions {
  display: flex;
  gap: 9px;
}

.period-select {
  background: white;
}

.period-select select {
  width: auto;
  height: auto;
  padding: 0 24px 0 0;
  border: 0;
  background: transparent;
  color: var(--green-900);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.report-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}

.report-kpi {
  display: flex;
  align-items: center;
  gap: 17px;
  min-height: 132px;
  padding: 22px;
}

.report-kpi__icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
}

.report-kpi__icon .icon { width: 22px; }
.report-kpi__icon.success { background: var(--green-100); color: var(--green-800); }
.report-kpi__icon.neutral { background: #e5e8f7; color: #555e9c; }
.report-kpi__icon.warning { background: var(--orange-100); color: var(--orange-700); }

.report-kpi > div { display: flex; flex-direction: column; }
.report-kpi > div > span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.report-kpi strong { margin: 2px 0 3px; font-family: Inter, sans-serif; font-size: 31px; line-height: 1; letter-spacing: -.05em; }
.report-kpi small { font-size: 10px; }
.report-kpi small.success { color: var(--green-700); }
.report-kpi small.neutral { color: var(--muted); }
.report-kpi small.warning { color: var(--orange-700); }

.reports-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 20px;
}

.report-card {
  padding: 24px;
}

.muted-label,
.positive-change {
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.positive-change {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--green-50);
  color: var(--green-700);
}

.positive-change .icon { width: 13px; height: 13px; }

.donut-card {
  display: flex;
  min-height: 370px;
  align-items: center;
  flex-direction: column;
}

.donut-card .section-title-row { width: 100%; }

.donut {
  display: grid;
  width: 190px;
  height: 190px;
  margin: 27px auto 22px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--green-700) 0 var(--value), #e7ede9 var(--value) 360deg);
  box-shadow: inset 0 0 0 1px rgba(23, 92, 59, .04);
}

.donut::before {
  grid-area: 1 / 1;
  width: 135px;
  height: 135px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 0 1px var(--line);
  content: "";
}

.donut > div {
  z-index: 1;
  display: flex;
  grid-area: 1 / 1;
  align-items: center;
  flex-direction: column;
}

.donut strong { font-family: Inter, sans-serif; color: var(--green-800); font-size: 35px; letter-spacing: -.06em; }
.donut span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }

.legend {
  display: flex;
  width: 100%;
  justify-content: center;
  gap: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.legend span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.legend i { width: 8px; height: 8px; border-radius: 3px; }
.legend-present { background: var(--green-700); }
.legend-absent { background: #dfe6e1; }

.weekly-card {
  min-height: 370px;
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 265px;
  align-items: end;
  gap: 22px;
  margin-top: 17px;
  padding: 24px 16px 0;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 59px, #edf1ee 60px);
}

.bar-column {
  display: grid;
  grid-template-rows: 18px 1fr 28px;
  height: 100%;
  text-align: center;
}

.bar-column > span { color: var(--muted); font-size: 9px; font-weight: 800; }
.bar-column > div { display: flex; align-items: flex-end; justify-content: center; }
.bar-column i { display: block; width: min(46px, 70%); border-radius: 8px 8px 0 0; background: #bad6c4; }
.bar-column i.is-current { background: linear-gradient(180deg, #399064, var(--green-800)); box-shadow: 0 8px 18px rgba(23, 92, 59, .16); }
.bar-column small { padding-top: 8px; color: var(--muted); font-size: 10px; }

.risk-list-card {
  grid-column: 1 / -1;
}

.risk-table {
  margin-top: 20px;
}

.risk-table__header,
.risk-row {
  display: grid;
  grid-template-columns: 1fr 160px 110px;
  align-items: center;
}

.risk-table__header {
  padding: 9px 12px;
  border-radius: 8px;
  background: #f2f5f3;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.risk-table__header span:last-child,
.risk-row > span:last-child { text-align: right; }

.risk-row {
  width: 100%;
  min-height: 62px;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  text-align: left;
}

.risk-row:last-child { border-bottom: 0; }
.risk-row:hover { background: var(--green-50); }
.risk-student { display: flex; align-items: center; gap: 11px; }
.risk-student strong { color: var(--ink); font-size: 12px; }
.risk-student .avatar { width: 35px; height: 35px; border-radius: 10px; font-size: 9px; }

/* Administration */
.admin-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.admin-stat,
.admin-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.admin-stat {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 18px;
  border-radius: var(--radius-lg);
}

.admin-stat__icon,
.admin-module__icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
}

.admin-stat__icon { width: 44px; height: 44px; }
.admin-stat__icon .icon { width: 21px; height: 21px; }
.admin-stat__icon.green, .admin-module__icon.green { background: var(--green-100); color: var(--green-800); }
.admin-stat__icon.blue, .admin-module__icon.blue { background: #e2edf8; color: #366b9a; }
.admin-stat__icon.violet, .admin-module__icon.violet { background: #e9e7fb; color: #6256a1; }
.admin-stat__icon.orange, .admin-module__icon.orange { background: var(--orange-100); color: var(--orange-700); }
.admin-stat > div { display: flex; min-width: 0; flex-direction: column; }
.admin-stat small { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.admin-stat strong { margin: 2px 0; font-family: Inter, sans-serif; font-size: 28px; line-height: 1; letter-spacing: -.045em; }
.admin-stat > div > span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.admin-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.admin-card {
  padding: 22px;
  border-radius: var(--radius-lg);
}

.admin-card--modules,
.admin-card--activity { grid-column: span 7; }
.admin-card--pending,
.admin-card--access { grid-column: span 5; }
.admin-status { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 8px; background: var(--green-50); color: var(--green-700); font-size: 9px; font-weight: 800; }
.admin-status .icon { width: 13px; height: 13px; }

.admin-modules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.admin-module {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfb;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: 150ms ease;
}

.admin-module:hover { border-color: var(--green-200); background: var(--green-50); transform: translateY(-1px); }
.admin-module__icon { width: 38px; height: 38px; }
.admin-module__icon .icon { width: 18px; height: 18px; }
.admin-module > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.admin-module strong { font-size: 11px; }
.admin-module small { overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.admin-module > .icon { width: 15px; height: 15px; color: var(--green-700); }

.admin-count { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 9px; background: var(--orange-100); color: var(--orange-700); font-size: 11px; }
.admin-list { display: grid; gap: 9px; margin-top: 18px; }
.admin-list > button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfcfb;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.admin-list > button:hover { background: var(--green-50); }
.admin-list__status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfcfb;
}
.admin-list__status > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.admin-list__status > .icon { width: 16px; color: var(--green-700); }
.admin-list__dot { width: 9px; height: 9px; border-radius: 50%; }
.admin-list__dot.warning { background: var(--orange-500); box-shadow: 0 0 0 4px var(--orange-100); }
.admin-list__dot.neutral { background: #8d91b8; box-shadow: 0 0 0 4px #ececf7; }
.admin-list__dot.success { background: var(--green-600); box-shadow: 0 0 0 4px var(--green-100); }
.admin-list button > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.admin-list strong { font-size: 10px; }
.admin-list small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.admin-list button > b { font-size: 11px; }
.admin-list button > .icon { width: 16px; color: var(--green-700); }

.admin-activity { display: grid; gap: 4px; margin-top: 14px; }
.admin-activity > div { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 11px; padding: 11px 0; border-top: 1px solid var(--line); }
.admin-activity .avatar { width: 36px; height: 36px; border-radius: 11px; font-size: 9px; }
.admin-activity p { margin: 0; color: var(--muted); font-size: 10px; }
.admin-activity p strong { color: var(--ink); }
.admin-activity p small { display: block; margin-top: 4px; color: #89968e; font-size: 9px; }
.admin-shield { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; background: var(--green-100); color: var(--green-800); }
.admin-shield .icon { width: 18px; }
.admin-roles { display: grid; gap: 8px; margin: 18px 0; }
.admin-roles > div { display: flex; min-height: 45px; align-items: center; justify-content: space-between; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfb; color: var(--ink); }
.admin-roles span { font-size: 10px; font-weight: 700; }
.admin-roles strong { color: var(--muted); font-size: 9px; }

.admin-back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 2px 0 16px;
  color: var(--green-700);
  font-size: 11px;
  font-weight: 800;
}

.admin-back-link:hover { color: var(--green-900); }
.admin-back-link .icon { width: 15px; height: 15px; }
.admin-inner-heading { margin-bottom: 24px; }

.admin-access-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(330px, .85fr);
  gap: 20px;
  align-items: start;
}

.admin-access-grid--users-only { grid-template-columns: minmax(0, 1fr); }
.admin-heading-actions { display: flex; align-items: center; gap: 9px; }

.admin-team-title { gap: 18px; }
.admin-team-filters { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.admin-team-filters > select { min-height: 38px; padding: 0 28px 0 10px; border: 1px solid var(--line); border-radius: 11px; background-color: #fbfcfb; color: var(--ink); font: inherit; font-size: 10px; }

.admin-search {
  display: flex;
  width: min(100%, 230px);
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfcfb;
  color: var(--muted);
}

.admin-search:focus-within { border-color: var(--green-300); box-shadow: 0 0 0 3px rgba(52, 129, 82, .08); }
.admin-search .icon { width: 16px; height: 16px; flex: 0 0 auto; }
.admin-search input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 10px; }
.admin-search input::placeholder { color: #8a978f; }

.admin-team-list { margin-top: 18px; }
.admin-team-header,
.admin-team-row {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) 112px 112px 18px;
  align-items: center;
  gap: 12px;
}

.admin-team-header {
  padding: 0 12px 9px;
  color: #89968e;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.admin-team-row {
  width: 100%;
  min-height: 66px;
  padding: 9px 12px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: background 140ms ease;
}

.admin-team-row:hover { background: var(--green-50); }
.admin-team-row > .icon { width: 15px; height: 15px; color: var(--green-700); }
.admin-team-person { display: flex; min-width: 0; align-items: center; gap: 11px; }
.admin-team-person .avatar { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 11px; font-size: 9px; }
.admin-team-person > span { display: flex; min-width: 0; flex-direction: column; }
.admin-team-person strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-team-person small { overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.admin-role-badge {
  width: max-content;
  max-width: 100%;
  padding: 5px 7px;
  border-radius: 7px;
  background: #eeeff7;
  color: #5d628f;
  font-size: 8px;
  font-weight: 800;
}

.admin-member-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; font-weight: 700; }
.admin-member-status i { width: 7px; height: 7px; border-radius: 50%; }
.admin-member-status.success i { background: var(--green-600); box-shadow: 0 0 0 3px var(--green-100); }
.admin-member-status.warning i { background: var(--orange-500); box-shadow: 0 0 0 3px var(--orange-100); }
.admin-load-more { margin: 15px auto 0; }

.admin-card-description { margin: 14px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.admin-permission-roles { display: grid; gap: 10px; margin: 17px 0; }
.admin-permission-role { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfb; }
.admin-permission-role__heading { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.admin-role-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; }
.admin-role-icon .icon { width: 16px; height: 16px; }
.admin-role-icon.violet { background: #e9e7fb; color: #6256a1; }
.admin-role-icon.blue { background: #e2edf8; color: #366b9a; }
.admin-role-icon.green { background: var(--green-100); color: var(--green-800); }
.admin-permission-role__heading > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.admin-permission-role__heading strong { font-size: 10px; }
.admin-permission-role__heading small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.admin-permission-role__heading b { color: var(--muted); font-size: 8px; white-space: nowrap; }
.admin-permission-role ul { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 9px; margin: 12px 0; padding: 10px 0; border-block: 1px solid var(--line); list-style: none; }
.admin-permission-role li { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8px; }
.admin-permission-role li .icon { width: 12px; height: 12px; color: var(--green-700); }
.admin-permissions-note { display: flex; align-items: center; gap: 7px; margin: 2px 0 0; color: var(--green-800); font-size: 9px; font-weight: 700; }
.admin-permissions-note .icon { width: 15px; height: 15px; }

.admin-activity-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-history-card { padding: 0; overflow: hidden; }
.admin-history-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) 180px 160px; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); background: #fbfcfb; }
.admin-history-toolbar .admin-search { width: 100%; background: white; }
.admin-history-filter { display: flex; min-height: 38px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.admin-history-filter span { color: #89968e; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.admin-history-filter select { min-width: 0; flex: 1; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 9px; font-weight: 700; }
.admin-history { padding: 5px 22px 2px; }
.admin-history-day { padding: 17px 0 2px; }
.admin-history-day + .admin-history-day { border-top: 1px solid var(--line); }
.admin-history-day > h2 { margin: 0 0 8px; color: var(--green-800); font-family: Inter, sans-serif; font-size: 12px; }
.admin-history-list { display: grid; }
.admin-history-item { display: grid; grid-template-columns: auto minmax(0, 1fr) 54px auto; align-items: center; gap: 12px; min-height: 64px; padding: 9px 8px; border-top: 1px solid #edf0ee; }
.admin-history-item:first-child { border-top: 0; }
.admin-history-event { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 10px; }
.admin-history-event .icon { width: 16px; height: 16px; }
.admin-history-event.green { background: var(--green-100); color: var(--green-800); }
.admin-history-event.blue { background: #e2edf8; color: #366b9a; }
.admin-history-event.violet { background: #e9e7fb; color: #6256a1; }
.admin-history-event.orange { background: var(--orange-100); color: var(--orange-700); }
.admin-history-copy { display: flex; min-width: 0; flex-direction: column; }
.admin-history-copy > strong { color: var(--ink); font-size: 10px; font-weight: 700; }
.admin-history-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.admin-history-copy small b { color: var(--green-800); }
.admin-history-item time { color: var(--muted); font-size: 9px; font-weight: 700; text-align: right; }
.admin-history-item > .avatar { width: 34px; height: 34px; border-radius: 10px; font-size: 8px; }
.admin-history-more { display: flex; margin: 12px auto 22px; }

/* Modal and feedback */
.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(12, 32, 23, 0.5);
  backdrop-filter: blur(5px);
}

.modal {
  width: min(100%, 510px);
  max-height: calc(100dvh - 40px);
  padding: 25px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: var(--radius-xl);
  background: white;
  box-shadow: var(--shadow-lg);
  animation: modal-in 180ms ease-out both;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.profile-settings-modal { width: min(100%, 620px); }
.access-profiles-modal { width: min(100%, 780px); }
.user-access-modal { width: min(100%, 680px); }
.class-editor-modal { width: min(100%, 760px); padding: 0; }

.class-editor-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 23px 26px 20px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 88% 0, rgba(255, 255, 255, .86), transparent 13rem),
    linear-gradient(135deg, #e6f4eb, #f7fbf8);
}

.class-editor-header__icon,
.class-editor-section__title > span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  background: var(--green-100);
  color: var(--green-800);
}

.class-editor-header__icon { width: 46px; height: 46px; border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(31, 111, 68, .08); }
.class-editor-header__icon .icon { width: 22px; height: 22px; }
.class-editor-header h2 { margin: 2px 0 0; font-family: Inter, sans-serif; font-size: 22px; letter-spacing: -.035em; }
.class-editor-header p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.class-editor-header > .icon-button { align-self: start; }

.class-editor-form { gap: 13px; padding: 18px 26px 0; border-top: 0; }

.class-editor-section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fbfcfb;
}

.class-editor-section__title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.class-editor-section__title > span { width: 32px; height: 32px; border-radius: 10px; }
.class-editor-section__title .icon { width: 15px; height: 15px; }
.class-editor-section__title h3 { margin: 0; color: var(--ink); font-family: Inter, sans-serif; font-size: 12px; letter-spacing: -.015em; }
.class-editor-section__title p { margin: 2px 0 0; color: var(--muted); font-size: 9px; }

.class-editor-grid { display: grid; gap: 13px; }
.class-editor-grid--basic,
.class-editor-grid--responsible { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.class-editor-grid--schedule { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.class-editor-day { grid-column: span 2; }
.class-editor-location { grid-column: span 3; }

.class-editor-status-note {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 9px;
  align-self: end;
  padding: 8px 11px;
  border: 1px solid var(--green-200);
  border-radius: 10px;
  background: var(--green-50);
  color: var(--green-800);
}

.class-editor-status-note > .icon { width: 17px; height: 17px; }
.class-editor-status-note > span { display: flex; flex-direction: column; }
.class-editor-status-note strong { font-size: 10px; }
.class-editor-status-note small { margin-top: 2px; color: var(--muted); font-size: 8px; }

.class-editor-actions {
  position: sticky;
  z-index: 2;
  bottom: 0;
  margin: 2px -26px 0;
  padding: 15px 26px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 -10px 24px rgba(16, 53, 38, .05);
  backdrop-filter: blur(12px);
}
.access-profiles-intro { margin: -3px 0 18px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.access-profiles-form { display: grid; gap: 14px; }

.access-profile-editor {
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fbfcfb;
}

.access-profile-editor legend {
  display: flex;
  max-width: calc(100% - 12px);
  align-items: center;
  gap: 10px;
  padding: 0 7px;
}

.access-profile-editor legend > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.access-profile-editor legend strong { color: var(--ink); font-size: 12px; }
.access-profile-editor legend small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.access-profile-editor > .form-field { margin-top: 12px; }

.access-profile-permissions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

.access-profile-permissions label {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}

.access-profile-permissions label:has(input:checked) { border-color: var(--green-200); background: var(--green-50); }
.access-profile-permissions input { accent-color: var(--green-700); }

.password-generator { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.password-generator .button { min-height: 43px; padding-inline: 13px; white-space: nowrap; }
.generated-password { display: flex; align-items: center; gap: 8px; margin-top: 2px; padding: 9px 10px; border-radius: 10px; background: var(--green-50); }
.generated-password span { color: var(--green-800); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.generated-password code { min-width: 0; flex: 1; overflow: hidden; color: var(--ink); font-size: 11px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.generated-password button { padding: 4px 7px; border: 0; border-radius: 7px; background: white; color: var(--green-800); cursor: pointer; font: inherit; font-size: 9px; font-weight: 800; }

.profile-photo-editor {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--green-50), #fbfdfc);
}

.profile-photo-editor__avatar {
  width: 82px;
  height: 82px;
  border: 4px solid rgba(255, 255, 255, .9);
  border-radius: 22px;
  box-shadow: 0 8px 20px rgba(16, 53, 38, .12);
  font-size: 18px;
}

.profile-photo-editor > div { display: flex; min-width: 0; flex-direction: column; }
.profile-photo-editor > div > strong { color: var(--ink); font-size: 14px; }
.profile-photo-editor > div > small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.profile-photo-editor__actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.profile-photo-button { min-height: 36px; padding: 8px 12px; font-size: 10px; cursor: pointer; }
.profile-photo-button .icon { width: 15px; height: 15px; }
.profile-photo-remove { color: #ad453a; }
.profile-settings-modal .form-field > small { color: var(--muted); font-size: 9px; }

.student-profile-modal {
  position: relative;
  width: min(100%, 760px);
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow-y: auto;
}

.profile-close {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  border-color: rgba(255, 255, 255, .4);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(8px);
}

.student-profile-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 17px;
  min-height: 145px;
  padding: 28px 72px 28px 30px;
  background:
    radial-gradient(circle at 88% 0, rgba(255, 255, 255, .55), transparent 12rem),
    linear-gradient(135deg, #e8f5ed, #f6faf7);
  border-bottom: 1px solid var(--line);
}

.profile-avatar {
  width: 70px;
  height: 70px;
  border: 4px solid rgba(255, 255, 255, .75);
  border-radius: 20px;
  box-shadow: 0 9px 20px rgba(16, 53, 38, .1);
  font-size: 18px;
}

.student-profile-hero h2 {
  margin: 3px 0 2px;
  font-family: Inter, sans-serif;
  font-size: 27px;
  letter-spacing: -.045em;
}

.student-profile-hero p { margin: 0; color: var(--muted); font-size: 11px; }
.student-profile-content { padding: 24px 28px; }

.profile-snapshot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.profile-snapshot article {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfb;
}

.profile-snapshot article > span {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 10px;
  background: var(--green-100);
  color: var(--green-800);
}

.profile-snapshot .icon { width: 17px; height: 17px; }
.profile-snapshot article > div { display: flex; min-width: 0; flex-direction: column; }
.profile-snapshot small { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.profile-snapshot strong { overflow: hidden; margin-top: 2px; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.profile-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.profile-section,
.profile-attendance {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.profile-section__heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--green-800);
}

.profile-section__heading .icon { width: 17px; height: 17px; }
.profile-section__heading h3 { margin: 0; color: var(--ink); font-family: Inter, sans-serif; font-size: 14px; letter-spacing: -.02em; }

.profile-data-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.profile-data-list div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.profile-data-list dt { color: var(--muted); font-size: 9px; }
.profile-data-list dd { overflow: hidden; margin: 0; font-size: 10px; font-weight: 700; text-align: right; text-overflow: ellipsis; white-space: nowrap; }

.profile-attendance { margin-top: 14px; }
.profile-attendance .profile-section__heading { margin-bottom: 12px; }
.profile-attendance .profile-section__heading strong { margin-left: auto; font-family: Inter, sans-serif; font-size: 17px; }
.profile-attendance__legend { display: flex; gap: 17px; margin-top: 11px; }
.profile-attendance__legend span { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; }
.profile-attendance__legend i { width: 7px; height: 7px; border-radius: 50%; }
.profile-attendance__legend .present { background: var(--green-600); }
.profile-attendance__legend .absent { background: #da6257; }
.profile-attendance__legend .justified { background: var(--orange-500); }

.student-profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 16px 28px 20px;
  border-top: 1px solid var(--line);
  background: #f7f9f7;
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(.97) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 17px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.modal-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 5px;
}

.toast-region {
  position: fixed;
  z-index: 150;
  right: 24px;
  bottom: 24px;
  display: flex;
  width: min(390px, calc(100vw - 32px));
  flex-direction: column;
  gap: 9px;
}

.toast {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  box-shadow: 0 15px 40px rgba(16, 53, 38, .16);
  animation: toast-in 180ms ease-out both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(15px); }
  to { opacity: 1; transform: translateX(0); }
}

.toast > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: var(--green-100); color: var(--green-800); }
.toast--info > span { background: #e7e8f7; color: #575f9c; }
.toast > span .icon { width: 16px; height: 16px; }
.toast p { margin: 0; font-size: 12px; font-weight: 700; }
.toast button { display: grid; padding: 4px; place-items: center; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.toast button .icon { width: 15px; height: 15px; }

.bottom-nav {
  display: none;
}

@media (min-width: 1100px) {
  .page-shell {
    width: min(calc(100% - 48px), 1480px);
    padding: 98px 0 48px;
  }

  .page-heading { margin-bottom: 16px; }
  .dashboard-heading,
  .split-heading { gap: 20px; }
  .split-heading.compact { margin: 6px 0 16px; }

  .dashboard-grid { gap: 16px; }
  .metric-card { min-height: 112px; padding: 18px 20px; }
  .metric-card strong { font-size: 33px; }
  .next-class-card,
  .schedule-card { min-height: 318px; padding: 22px; }
  .next-class-card__content { padding: 24px 0 16px; }
  .subject-icon { margin-bottom: 13px; }
  .timeline { margin-top: 16px; }
  .timeline-item { min-height: 66px; }
  .attention-card { padding: 21px 22px; }
  .attention-list { margin-top: 15px; }

  .filter-bar { gap: 14px; margin-bottom: 16px; padding: 13px; }
  .class-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .class-cover { height: 128px; }

  .student-overview { gap: 14px; margin-bottom: 14px; }
  .student-overview article { min-height: 80px; padding: 13px 17px; }
  .student-directory-filters { margin-bottom: 12px; }
  .directory-row { min-height: 68px; padding-block: 9px; }

  .attendance-summary { gap: 24px; margin-bottom: 14px; padding: 17px 21px; }
  .student-row { min-height: 68px; padding: 9px 20px; }
  .attendance-actions,
  .form-actions { margin-top: 16px; }

  .student-form { gap: 15px; }
  .form-card__heading { padding: 13px 20px; }
  .form-card__content { padding: 20px 22px; }
  .student-data-grid { gap: 24px; }
  .photo-upload { width: 126px; height: 126px; }
  .fields-grid { gap: 14px 16px; }

  .report-kpis { gap: 15px; margin-bottom: 16px; }
  .report-kpi { min-height: 108px; padding: 18px 20px; }
  .reports-grid { gap: 16px; }
  .report-card { padding: 20px; }
  .donut-card { min-height: 330px; }
  .donut { width: 172px; height: 172px; margin: 20px auto 16px; }
  .donut::before { width: 122px; height: 122px; }
}

@media (max-width: 1100px) {
  .top-menu.is-expanded { grid-template-columns: 96px minmax(0, 1fr) 96px; }
  .top-menu.is-expanded .top-menu__profile {
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    justify-content: center;
    padding-inline: 5px;
  }
}

@media (max-width: 1000px) {
  .metric-card { grid-column: span 6; }
  .metric-card:nth-child(3) { grid-column: span 12; }
  .next-class-card, .schedule-card { grid-column: span 6; }
  .attention-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .class-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .day-filters { overflow-x: auto; }
  .directory-table__header,
  .directory-row { grid-template-columns: minmax(190px, 1.25fr) 105px minmax(150px, 1fr) 90px 98px 32px; gap: 10px; }
  .student-data-grid { grid-template-columns: 150px 1fr; gap: 22px; }
  .photo-upload { width: 120px; height: 120px; }
}

@media (max-width: 760px) {
  body { padding-bottom: 0; }
  body[data-route="attendance"] .page-shell {
    padding-bottom: calc(112px + env(safe-area-inset-bottom));
  }
  .side-menu { display: none; }
  .top-menu {
    top: auto;
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: calc(100% - 24px);
    max-width: 430px;
    height: 64px;
    align-items: center;
    flex-direction: row;
    gap: 4px;
    padding: 6px;
    border-radius: 18px;
    transform-origin: center bottom;
  }
  .top-menu.is-expanded {
    display: grid;
    height: 64px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 1fr;
    align-items: center;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, .72), rgba(232, 246, 238, .53) 58%, rgba(255, 255, 255, .62)),
      rgba(255, 255, 255, .42);
    -webkit-backdrop-filter: blur(28px) saturate(155%);
    backdrop-filter: blur(28px) saturate(155%);
  }
  .top-menu.is-expanded .top-menu__brand {
    display: none;
  }
  .top-menu.is-expanded .top-menu__nav {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    max-width: none;
    margin: 0;
    justify-self: stretch;
    gap: 1px;
    overflow: hidden;
    transform: none;
  }
  .top-menu__item {
    width: auto;
    min-width: 34px;
    height: 50px;
    flex: 1 1 0;
    justify-content: center;
    padding: 0;
  }
  .top-menu__item span { display: none; }
  .top-menu.is-expanded .top-menu__notification {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    height: 50px;
    justify-content: center;
    margin-left: 0;
    padding: 0;
  }
  .top-menu.is-expanded .top-menu__notification-label { display: none; }
  .top-menu.is-expanded .top-menu__notification i { top: 8px; right: 8px; left: auto; }
  .top-menu.is-expanded .top-menu__profile {
    width: 42px;
    min-width: 42px;
    max-width: 42px;
    height: 50px;
    flex: 0 0 42px;
    justify-content: center;
    padding: 0;
  }
  .top-menu.is-expanded .top-menu__profile .avatar { width: 32px; height: 32px; }
  .top-menu.is-expanded .top-menu__actions {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    width: auto;
    gap: 1px;
    overflow: hidden;
  }
  .page-shell { width: calc(100% - 32px); margin: 0 auto; padding: 30px 0 calc(94px + env(safe-area-inset-bottom)); }
  .brand__mark { width: 36px; height: 36px; border-radius: 11px; }
  .dashboard-heading, .split-heading { align-items: flex-start; flex-direction: column; }
  .split-heading { gap: 12px; }
  .split-heading .button { width: 100%; }
  .page-heading { margin-bottom: 16px; }
  .date-chip { align-self: stretch; justify-content: center; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 14px; }
  .metric-card, .metric-card:nth-child(3), .next-class-card, .schedule-card, .attention-card { grid-column: 1; }
  .metric-card { min-height: 112px; padding: 18px; }
  .metric-card strong { font-size: 30px; }
  .next-class-card { min-height: 335px; padding: 22px; }
  .schedule-card, .attention-card { min-height: auto; padding: 21px; }
  .attention-list { grid-template-columns: minmax(0, 1fr); margin-top: 17px; }
  .section-title-row { align-items: flex-start; }
  .section-title-row h2 { font-size: 18px; }
  .notifications-panel {
    z-index: 80;
    top: auto;
    right: 16px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    left: 16px;
    width: auto;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, .76), rgba(232, 246, 238, .57) 58%, rgba(255, 255, 255, .66)),
      rgba(255, 255, 255, .48);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    backdrop-filter: blur(30px) saturate(150%);
  }

  .profile-menu {
    top: auto;
    right: 16px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    left: auto;
    width: min(260px, calc(100vw - 32px));
  }

  .filter-bar { padding: 13px; }
  .search-field { min-width: 0; }
  .day-filters { padding-bottom: 2px; }
  .day-filters > span { display: none; }
  .class-grid { grid-template-columns: 1fr; }
  .class-cover { height: 135px; }

  .student-overview { grid-template-columns: 1fr; gap: 10px; }
  .student-overview article { min-height: 78px; padding: 14px 16px; }
  .student-overview strong { font-size: 21px; }
  .student-directory-filters { gap: 12px; }
  .directory-select { width: 100%; justify-content: space-between; }
  .directory-select select { flex: 1; width: auto; }
  .directory-table { overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .directory-table__header { display: none; }
  .directory-row {
    position: relative;
    grid-template-columns: 1fr auto;
    gap: 13px 16px;
    min-height: 0;
    margin-bottom: 11px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
    box-shadow: var(--shadow-sm);
  }
  .directory-student { grid-column: 1 / -1; padding-right: 35px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  .directory-age { grid-column: 1; }
  .directory-age::before { display: block; margin-bottom: 2px; color: var(--muted); content: "Faixa etária"; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
  .guardian-cell { grid-column: 1 / -1; grid-row: 3; }
  .guardian-cell::before { color: var(--muted); content: "Responsável"; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
  .frequency-cell { grid-column: 1; grid-row: 4; }
  .frequency-cell::before { color: var(--muted); content: "Frequência"; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
  .directory-row > span:nth-child(5) { grid-column: 2; grid-row: 4; align-self: end; }
  .directory-more { position: absolute; top: 17px; right: 15px; }
  .student-profile-backdrop { padding: 0; place-items: end center; }
  .profile-settings-backdrop { padding: 0; place-items: end center; }
  .access-profiles-backdrop { padding: 0; place-items: end center; }
  .class-editor-backdrop { padding: 0; place-items: end center; }
  .profile-settings-modal { width: 100%; max-height: 92dvh; padding: 22px 18px calc(20px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; }
  .access-profiles-modal { width: 100%; max-height: 92dvh; padding: 22px 16px calc(20px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; }
  .user-access-modal { width: 100%; max-height: 92dvh; padding: 22px 16px calc(20px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; }
  .class-editor-modal { width: 100%; max-height: 94dvh; border-radius: 22px 22px 0 0; }
  .class-editor-header { gap: 11px; padding: 19px 16px 17px; }
  .class-editor-header__icon { width: 40px; height: 40px; border-radius: 12px; }
  .class-editor-header h2 { font-size: 19px; }
  .class-editor-header p { display: none; }
  .class-editor-form { padding: 14px 14px 0; }
  .class-editor-section { padding: 14px; }
  .class-editor-grid--basic,
  .class-editor-grid--schedule,
  .class-editor-grid--responsible { grid-template-columns: 1fr; }
  .class-editor-grid .span-2,
  .class-editor-day,
  .class-editor-location { grid-column: auto; }
  .class-editor-actions { margin-inline: -14px; padding: 13px 14px calc(13px + env(safe-area-inset-bottom)); }
  .access-profile-permissions { grid-template-columns: 1fr; }
  .admin-heading-actions { width: 100%; }
  .admin-heading-actions .button { flex: 1; padding-inline: 10px; }
  .password-generator { grid-template-columns: 1fr; }
  .profile-settings-modal .modal-form__row { grid-template-columns: 1fr; }
  .profile-photo-editor { grid-template-columns: auto minmax(0, 1fr); gap: 13px; padding: 14px; }
  .profile-photo-editor__avatar { width: 66px; height: 66px; border-radius: 18px; font-size: 15px; }
  .profile-photo-editor__actions { align-items: flex-start; flex-direction: column; gap: 6px; }
  .student-profile-modal { width: 100%; max-height: 90vh; border-radius: 22px 22px 0 0; }
  .profile-close { top: 14px; right: 14px; }
  .student-profile-hero { grid-template-columns: auto 1fr; gap: 13px; min-height: 130px; padding: 22px 58px 20px 20px; }
  .profile-avatar { width: 58px; height: 58px; border-radius: 17px; font-size: 15px; }
  .student-profile-hero h2 { font-size: 21px; }
  .student-profile-hero > .directory-status { grid-column: 2; width: max-content; }
  .student-profile-content { padding: 18px 16px; }
  .profile-snapshot { grid-template-columns: 1fr 1fr; }
  .profile-snapshot article:last-child { grid-column: 1 / -1; }
  .profile-details-grid { grid-template-columns: 1fr; }
  .profile-data-list dd { max-width: 58%; }
  .profile-attendance__legend { flex-wrap: wrap; gap: 8px 14px; }
  .student-profile-actions { position: sticky; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .student-profile-actions .button { flex: 1; padding-inline: 10px; }

  .attendance-summary { grid-template-columns: 1fr; gap: 18px; padding: 18px; }
  .attendance-counts { justify-content: flex-start; }
  .student-list { overflow: visible; border: 0; box-shadow: none; background: transparent; }
  .student-list__header { display: none; }
  .student-row { grid-template-columns: 1fr; gap: 14px; margin-bottom: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow-sm); }
  .student-row:first-of-type { border-top: 1px solid var(--line); }
  .attendance-options { grid-template-columns: repeat(2, 1fr); }
  .attendance-option { width: auto; }
  .attendance-option span { display: inline; font-size: 9px; }
  .attendance-actions {
    position: static;
    z-index: auto;
    margin-top: 18px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }
  .attendance-actions .button { flex: 1; white-space: nowrap; }

  .student-data-grid { grid-template-columns: 1fr; }
  .form-card__content { padding: 20px; }
  .fields-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: 1; }
  .form-actions .button { flex: 1; }

  .report-actions { width: 100%; }
  .period-select, .report-actions .button { flex: 1; }
  .report-kpis { grid-template-columns: 1fr; gap: 12px; }
  .report-kpi { min-height: 108px; padding: 18px; }
  .reports-grid { grid-template-columns: 1fr; }
  .risk-list-card { grid-column: 1; overflow: visible; }
  .risk-list-card .section-title-row { align-items: center; flex-direction: row; }
  .risk-table {
    display: grid;
    min-width: 0;
    gap: 10px;
    margin-top: 16px;
  }
  .risk-table__header { display: none; }
  .risk-table .risk-row {
    grid-template-areas:
      "student absences"
      "age absences";
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    min-height: 76px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfcfb;
    box-shadow: 0 5px 14px rgba(16, 53, 38, .04);
  }
  .risk-table .risk-row:hover { border-color: var(--green-200); background: var(--green-50); }
  .risk-table .risk-student { grid-area: student; min-width: 0; }
  .risk-table .risk-student strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .risk-table .risk-row > span:nth-child(2) {
    grid-area: age;
    padding-left: 46px;
    font-size: 10px;
  }
  .risk-table .risk-row > span:nth-child(2)::before { content: "Faixa etária: "; }
  .risk-table .risk-row > span:last-child {
    display: flex;
    grid-area: absences;
    align-items: flex-end;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
  }
  .risk-table .risk-row > span:last-child::before {
    color: var(--muted);
    content: "Ausências";
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
  }
  .admin-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .admin-stat { min-height: 96px; padding: 14px; }
  .admin-stat__icon { width: 40px; height: 40px; }
  .admin-stat strong { font-size: 24px; }
  .admin-grid { grid-template-columns: 1fr; gap: 14px; }
  .admin-card--modules,
  .admin-card--activity,
  .admin-card--pending,
  .admin-card--access { grid-column: 1; }
  .admin-card { padding: 18px; }
  .admin-modules { grid-template-columns: 1fr; }
  .admin-inner-heading { gap: 16px; }
  .admin-access-grid { grid-template-columns: 1fr; gap: 14px; }
  .admin-team-card,
  .admin-permissions-card { min-width: 0; }
  .admin-team-title { align-items: stretch; flex-direction: column; }
  .admin-team-title .admin-search { width: 100%; }
  .admin-team-header { display: none; }
  .admin-team-list { display: grid; gap: 9px; }
  .admin-team-row {
    grid-template-areas:
      "person arrow"
      "role status";
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px 12px;
    min-height: 96px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfcfb;
  }
  .admin-team-person { grid-area: person; }
  .admin-team-row > .icon { grid-area: arrow; }
  .admin-team-row > .admin-role-badge { grid-area: role; margin-left: 49px; }
  .admin-team-row > .admin-member-status { grid-area: status; justify-self: end; }
  .admin-permission-role ul { grid-template-columns: 1fr; }
  .admin-activity-kpis { grid-template-columns: 1fr; }
  .admin-history-card { padding: 0; }
  .admin-history-toolbar { grid-template-columns: 1fr 1fr; padding: 16px; }
  .admin-history-toolbar .admin-search { grid-column: 1 / -1; }
  .admin-history { padding-inline: 16px; }
  .admin-history-item { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding-inline: 2px; }
  .admin-history-copy > strong { line-height: 1.45; }
  .admin-history-item time { align-self: start; padding-top: 4px; }
  .admin-history-item > .avatar { display: none; }
  .bar-chart { gap: 9px; padding-inline: 5px; }
  .legend { gap: 12px; }

  .bottom-nav {
    position: fixed;
    z-index: 45;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: calc(68px + env(safe-area-inset-bottom));
    padding: 7px 10px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(18px);
  }

  .bottom-nav__item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    border-radius: 11px;
    color: #7a887f;
    font-size: 9px;
    font-weight: 700;
  }

  .bottom-nav__item .icon { width: 20px; height: 20px; }
  .bottom-nav__item.is-active { background: var(--green-50); color: var(--green-800); }
  .bottom-brand-icon { display: grid; width: 24px; height: 24px; overflow: hidden; place-items: center; border-radius: 7px; background: #47714d; }
  .bottom-brand-icon img { width: 100%; height: 100%; transform: scale(1.58); object-fit: cover; }
  .toast-region { right: 16px; bottom: calc(82px + env(safe-area-inset-bottom)); }
}

@media (max-width: 420px) {
  .class-meta { gap: 9px; }
  .next-class-card h2 { font-size: 27px; }
  .timeline-item { grid-template-columns: 45px 8px minmax(0, 1fr); gap: 9px; }
  .timeline-item .duration { display: none; }
  .attention-row { padding: 11px; }
  .report-actions { flex-direction: column; }
  .modal-form__row { grid-template-columns: 1fr; }
  .modal { padding: 20px; }
  .class-editor-modal { padding: 0; }
  .admin-kpis { grid-template-columns: 1fr; }
  .admin-history-toolbar { grid-template-columns: 1fr; }
  .admin-history-toolbar .admin-search { grid-column: 1; }
  .admin-history-filter { min-width: 0; }
  .admin-history-filter select { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.setup-card { margin-bottom: 24px; padding: clamp(20px, 4vw, 30px); border: 1px solid var(--green-200); border-radius: var(--radius-lg); background: var(--green-50); }
.setup-card h1 { margin: 6px 0 8px; font-size: clamp(22px, 4vw, 29px); line-height: 1.25; }
.setup-card p { margin: 0; color: var(--muted); }
.setup-card__steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 0; margin: 22px 0; list-style: none; }
.setup-card__steps li { display: flex; align-items: flex-start; gap: 12px; padding: 20px; border-radius: var(--radius-md); background: var(--surface); }
.setup-card__steps h2 { margin: 0 0 6px; font-size: 17px; }
.setup-card__steps p { margin-bottom: 14px; font-size: 14px; }
.setup-card__number { display: grid; flex-shrink: 0; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--green-800); background: var(--green-100); }
.setup-card__hint { display: block; color: var(--muted); font-size: 13px; }
.setup-card__footer { font-size: 13px; }
@media (max-width: 640px) {
  .setup-card__steps { grid-template-columns: 1fr; }
  .setup-card__steps li { padding: 16px; }
}
