:root {
  --page: #f4f8fb;
  --paper: #ffffff;
  --ink: #0c2440;
  --muted: #53687d;
  --line: #d8e3ed;
  --line-strong: #c8d7e3;
  --green-950: #003d2c;
  --green-900: #064f39;
  --green-800: #08724f;
  --green-700: #0f8a60;
  --blue-900: #07386f;
  --blue-800: #075bb8;
  --blue-700: #0878d8;
  --blue-050: #eef7ff;
  --gold: #d6a32b;
  --gold-050: #fff6dc;
  --red: #d12f2f;
  --red-050: #fff0ef;
  --shadow: 0 12px 30px rgba(12, 36, 64, 0.12);
  --shadow-soft: 0 8px 20px rgba(12, 36, 64, 0.08);
  --radius: 8px;
  --sidebar-width: 218px;
  --header-height: 92px;
  --tab-height: 56px;
}

.public-correction-stage {
  min-height: 100svh;
  padding: clamp(18px, 4vw, 48px);
  background: linear-gradient(135deg, #edf7f8 0%, #f8fbfd 48%, #eef8f2 100%);
}

.public-correction-shell {
  width: min(980px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.public-correction-header,
.public-correction-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.public-correction-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
}

.public-correction-header img {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.public-correction-header h1,
.public-correction-card h2,
.public-correction-card h3 {
  margin: 0;
  color: var(--ink);
}

.public-correction-header p,
.public-correction-card p,
.public-correction-docs span,
.public-correction-upload small {
  color: var(--muted);
}

.public-correction-card {
  padding: clamp(18px, 3vw, 28px);
}

.public-correction-profile,
.public-correction-title,
.public-correction-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.public-correction-alert {
  margin: 0;
}

.public-correction-comment {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.public-correction-missing,
.public-correction-docs,
.correction-meta-grid {
  display: grid;
  gap: 10px;
}

.public-correction-missing {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.public-correction-missing span,
.correction-meta-grid span {
  border: 1px solid #f3c178;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff7e8;
  color: #7a4d00;
  font-weight: 800;
}

.public-correction-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.public-correction-upload {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fcfd;
}

.public-correction-upload label {
  display: grid;
  gap: 10px;
}

.public-correction-upload.is-required {
  border-color: #f3c178;
  background: #fffaf0;
}

.public-correction-selected,
.public-correction-complete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #a9d9c7;
  border-radius: 8px;
  background: #f0fbf6;
}

.public-correction-selected[hidden] {
  display: none;
}

.public-correction-selected.is-invalid {
  border-color: #ef9f9a;
  background: #fff3f2;
}

.public-correction-selected span,
.public-correction-complete {
  min-width: 0;
}

.public-correction-selected strong,
.public-correction-selected small,
.public-correction-docs small,
.public-correction-complete span {
  display: block;
}

.public-correction-selected strong,
.public-correction-docs strong {
  overflow-wrap: anywhere;
}

.public-correction-selected-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.public-correction-replace summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--green-900);
}

.public-correction-replace form {
  margin-top: 16px;
}

.public-correction-docs div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.public-correction-loading,
.public-correction-error {
  text-align: center;
}

.enrollment-correction-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  margin: 14px 0;
  border: 1px solid #f3c178;
  border-radius: 8px;
  background: #fffaf0;
}

.enrollment-correction-card input {
  width: 100%;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
}

.correction-meta-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 720px) {
  .public-correction-stage {
    padding: 14px;
  }

  .public-correction-header,
  .public-correction-profile,
  .public-correction-title,
  .public-correction-actions,
  .public-correction-selected,
  .public-correction-docs div {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-correction-header img {
    width: 54px;
    height: 54px;
  }

  .public-correction-upload-grid,
  .public-correction-missing,
  .correction-meta-grid {
    grid-template-columns: 1fr;
  }
}

.connected-load-list .load-assignment-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "main actions"
    "controls controls";
  gap: 16px 20px;
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(8, 34, 57, 0.05);
}

.connected-load-list .load-assignment-card[hidden] {
  display: none;
}

.connected-load-list .load-assignment-card.is-selected {
  border-color: rgba(7, 109, 74, 0.42);
  background: #f3fbf7;
  box-shadow: inset 4px 0 0 var(--green-800), 0 10px 24px rgba(8, 34, 57, 0.05);
}

.load-assignment-main {
  grid-area: main;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.load-assignment-main strong {
  color: var(--green-950);
  font-size: 1.15rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.load-assignment-main span,
.load-assignment-main small {
  color: var(--muted);
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.load-assignment-main span {
  font-size: 0.94rem;
  font-weight: 780;
}

.load-assignment-main small {
  max-width: 92ch;
  font-size: 0.84rem;
}

.load-assignment-actions {
  grid-area: actions;
  display: flex;
  align-items: start;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.load-assignment-controls {
  grid-area: controls;
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
  min-width: 0;
}

.load-assignment-controls .assignment-frequency-control {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 54px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fcfa;
}

.load-assignment-controls .assignment-frequency-control > span {
  font-size: 0.78rem;
}

.load-assignment-controls .frequency-chip-row {
  justify-self: start;
  gap: 4px;
  padding: 3px;
}

.load-assignment-controls .frequency-chip-row button {
  min-width: 32px;
  min-height: 30px;
  font-size: 0.84rem;
}

@media (max-width: 1180px) {
  .connected-load-list .load-assignment-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "controls"
      "actions";
  }

  .load-assignment-controls {
    grid-template-columns: 1fr;
  }

  .load-assignment-actions {
    justify-content: flex-start;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, #f7fbfd 0%, #eef5f9 100%),
    var(--page);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

body.nav-open {
  overflow: hidden;
}

img,
svg {
  display: block;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  height: 100svh;
  min-height: 100vh;
  overflow: hidden;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100svh;
  max-height: 100svh;
  padding: 20px 12px;
  color: #ffffff;
  background:
    radial-gradient(circle at 40% -12%, rgba(35, 177, 113, 0.28), transparent 28%),
    linear-gradient(180deg, #025b3c 0%, #003d2c 74%, #002b22 100%);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  overflow: hidden;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 42%);
  pointer-events: none;
}

.sidebar-crest {
  position: relative;
  z-index: 1;
  width: 108px;
  margin: 0 auto 6px;
}

.sidebar-crest img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 22px;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.28));
}

.side-nav {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-color: rgba(255, 255, 255, 0.34) transparent;
  scrollbar-width: thin;
}

.side-nav::-webkit-scrollbar {
  width: 7px;
}

.side-nav::-webkit-scrollbar-track {
  background: transparent;
}

.side-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 999px;
}

.side-nav a {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 12px;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.86);
  font-weight: 760;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.side-nav a:hover,
.side-nav a:focus-visible,
.side-nav a.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.11);
  transform: translateX(2px);
}

.side-nav svg,
.top-tabs svg,
.panel-band svg,
.title-with-icon svg,
.date-widget svg,
.icon-button svg,
.primary-button svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  flex: 0 0 auto;
}

.sidebar-footer {
  position: relative;
  z-index: 1;
  padding: 0 16px 8px;
  display: grid;
  gap: 10px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.88rem;
  align-self: end;
}

.sidebar-footer span {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.78);
}

.main-shell {
  min-width: 0;
  height: 100svh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.institution-header {
  min-height: var(--header-height);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(12, 36, 64, 0.05);
}

.institution-title {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.institution-title img {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  object-fit: cover;
}

.institution-title h1 {
  margin: 0;
  color: var(--green-950);
  font-size: clamp(1.45rem, 2.1vw, 2rem);
  line-height: 1.05;
}

.institution-title p {
  margin: 5px 0 0;
  color: #354d70;
  font-size: 1rem;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mobile-logout-button {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(8, 114, 79, 0.28);
  border-radius: 999px;
  background: #f6fbf8;
  color: var(--green-950);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
}

.mobile-logout-button:hover,
.mobile-logout-button:focus-visible {
  border-color: rgba(8, 114, 79, 0.52);
  background: #e9f7ef;
  outline: none;
  box-shadow: 0 0 0 4px rgba(8, 114, 79, 0.12);
}

.student-mobile-home-summary {
  display: none;
}

.student-report-collapse > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.student-report-collapse > summary::-webkit-details-marker {
  display: none;
}

.student-report-collapse > summary::after {
  content: "Abrir";
  color: var(--green-900);
  font-size: 0.78rem;
  font-weight: 950;
}

.student-report-collapse[open] > summary {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.student-report-collapse[open] > summary::after {
  content: "Cerrar";
}

.student-report-collapse > summary strong,
.student-report-collapse > summary small {
  display: block;
}

.student-report-collapse > summary strong {
  color: var(--green-950);
}

.student-report-collapse > summary small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.date-widget,
.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.date-widget strong,
.date-widget small,
.user-menu strong,
.user-menu small {
  display: block;
}

.date-widget small,
.user-menu small {
  color: var(--muted);
  margin-top: 2px;
}

.date-widget svg {
  color: #1a3048;
}

.icon-button,
.user-menu {
  border: 0;
  background: transparent;
}

.icon-button {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #1a3048;
}

.icon-button span {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  color: #ffffff;
  background: #e52d36;
  border: 2px solid #ffffff;
  font-size: 0.76rem;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(229, 45, 54, 0.28);
}

.icon-button span[hidden] {
  display: none;
}

.icon-button.has-unread::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 0 0 rgba(229, 45, 54, 0.45);
  animation: pulseDot 1.8s ease-out infinite;
}

.nav-dot {
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 99px;
  color: #ffffff;
  background: #e52d36;
  font-size: 0.68rem;
  font-weight: 950;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(229, 45, 54, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(229, 45, 54, 0); }
  100% { box-shadow: 0 0 0 0 rgba(229, 45, 54, 0); }
}

.avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.user-menu:hover .avatar,
.user-menu:focus-visible .avatar {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(8, 34, 57, 0.14);
}

.avatar img,
.teacher-avatar img,
.student-photo img,
.student-mini-photo img,
.staff-account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-tabs {
  min-height: var(--tab-height);
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 0 20px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(12, 36, 64, 0.06);
  position: relative;
  z-index: 4;
}

.top-tabs a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: #394c67;
  font-weight: 760;
  white-space: nowrap;
}

.top-tabs a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: transparent;
}

.top-tabs a:hover,
.top-tabs a:focus-visible,
.top-tabs a.is-active {
  color: var(--green-900);
}

.top-tabs a.is-active::after {
  background: var(--green-900);
}

main {
  padding: 22px 16px 26px;
}

.workspace {
  min-height: 0;
  overflow: auto;
  padding: 18px 16px 22px;
}

body.schedule-focus-mode .workspace {
  padding: 6px 8px 8px;
}

body.schedule-focus-mode {
  --header-height: 50px;
  --tab-height: 34px;
}

body.schedule-focus-mode .app-shell {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

body.schedule-focus-mode .sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  padding: 20px 12px;
}

body.schedule-focus-mode .sidebar-crest {
  width: 108px;
}

body.schedule-focus-mode .side-nav a {
  grid-template-columns: 24px minmax(0, 1fr);
  min-height: 48px;
  padding: 0 12px;
}

body.schedule-focus-mode .sidebar-footer {
  display: grid;
}

body.schedule-focus-mode .page-heading {
  display: none;
}

body.schedule-focus-mode .content-stack {
  gap: 0;
}

body.schedule-focus-mode .institution-header {
  min-height: 50px;
  padding-block: 3px;
}

body.schedule-focus-mode .institution-title img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

body.schedule-focus-mode .institution-title h1 {
  font-size: clamp(0.98rem, 1.2vw, 1.25rem);
}

body.schedule-focus-mode .institution-title p {
  font-size: 0.7rem;
}

body.schedule-focus-mode .top-tabs a {
  min-height: 34px;
  font-size: 0.78rem;
}

body.schedule-focus-mode .schedule-focus-workspace {
  min-height: 0;
}

body.schedule-focus-mode .focus-side-panel,
body.schedule-focus-mode .focus-map-panel {
  min-height: min(430px, calc(100svh - 360px));
}

body.schedule-focus-mode .focus-side-panel {
  max-height: calc(100svh - 360px);
}

body.schedule-focus-mode .focus-map-panel .schedule-wrap {
  max-height: calc(100svh - 440px);
}

@media (min-width: 981px) {
  body.schedule-focus-mode .workspace {
    overflow: hidden;
  }
}

.view[hidden] {
  display: none;
}

.view {
  animation: viewIn 180ms ease both;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(480px, 1fr);
  gap: 16px;
  align-items: start;
}

.span-2 {
  grid-column: span 2;
}

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

.panel {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.panel:not(.enrollment-card) {
  padding: 20px;
}

.panel-band {
  min-height: 76px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #0754bd 0%, #047ede 100%);
}

.panel-band svg {
  width: 40px;
  height: 40px;
}

.panel-band h2 {
  margin: 0;
  font-size: 1.38rem;
  line-height: 1.1;
}

.panel-band p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.9);
}

.enrollment-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.enrollment-body {
  display: grid;
  grid-template-columns: 40% 60%;
  min-height: 318px;
}

.mini-enrollment {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 18px 18px;
  border-right: 1px solid var(--line);
}

.mini-enrollment .primary-button {
  white-space: normal;
  line-height: 1.12;
}

.mini-enrollment label span {
  display: block;
  margin-bottom: 8px;
  color: #334966;
  font-size: 0.92rem;
}

.capacity-summary {
  padding: 18px 18px 14px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-title.tight {
  margin-bottom: 0;
}

.panel-title h2,
.panel-title h3,
.title-with-icon h2,
.announcement-item h3,
.control-cards h3,
.student-result h2 {
  margin: 0;
}

.panel-title h2,
.title-with-icon h2 {
  font-size: 1.32rem;
  color: var(--ink);
}

.panel-title h2 span {
  font-size: 1rem;
  font-weight: 500;
}

.panel-title h3 {
  color: var(--blue-900);
  font-size: 1.02rem;
}

.panel-title p,
.helper-text,
.student-result p,
.control-cards p,
.form-status {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.panel.is-collapsible {
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.panel.is-collapsible > .panel-title {
  align-items: center;
}

.panel.is-collapsed > .panel-title {
  margin-bottom: 0;
}

.panel-collapse-body {
  display: grid;
  gap: 14px;
  max-height: 4800px;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  transition:
    max-height 260ms ease,
    opacity 180ms ease,
    transform 220ms ease,
    margin 220ms ease;
}

.panel.is-collapsed .panel-collapse-body {
  max-height: 0;
  margin-top: -4px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
}

.panel-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(7, 109, 74, 0.22);
  border-radius: 7px;
  color: var(--green-900);
  background: #f7fcfa;
  font-size: 0.78rem;
  font-weight: 900;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.panel-toggle-button:hover,
.panel-toggle-button:focus-visible {
  border-color: rgba(7, 109, 74, 0.42);
  background: #eef9f4;
  transform: translateY(-1px);
}

.panel-toggle-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  transition: transform 180ms ease;
}

.panel.is-collapsed .panel-toggle-button svg {
  transform: rotate(-90deg);
}

.function-menu-head,
.function-focus-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 96px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  animation: focusPanelIn 220ms ease both;
}

.function-menu-head div,
.function-focus-head div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.function-menu-head span,
.function-focus-head span {
  color: var(--green-800);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.function-menu-head h2,
.function-focus-head h2 {
  margin: 0;
  color: var(--green-950);
  font-size: clamp(1.35rem, 2vw, 1.95rem);
  line-height: 1.08;
}

.function-menu-head p,
.function-focus-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.function-menu-head > strong {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 7px;
  color: var(--green-900);
  background: #eef9f4;
  font-size: 0.86rem;
}

.function-open-button,
.function-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid rgba(7, 109, 74, 0.24);
  border-radius: 7px;
  color: var(--green-900);
  background: #f7fcfa;
  font-weight: 930;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.function-open-button:hover,
.function-open-button:focus-visible,
.function-back-button:hover,
.function-back-button:focus-visible {
  border-color: rgba(7, 109, 74, 0.46);
  background: #eef9f4;
  box-shadow: 0 8px 18px rgba(7, 109, 74, 0.1);
  transform: translateY(-1px);
}

.function-open-button svg,
.function-back-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.content-stack.function-menu-mode > .metric-grid {
  display: none;
}

.content-stack.function-menu-mode .panel:not(.function-launch-card) {
  display: none !important;
}

.content-stack.function-menu-mode .settings-menu,
.content-stack.function-focus-mode .settings-menu {
  display: none !important;
}

.content-stack.function-menu-mode .dashboard-grid,
.content-stack.function-menu-mode .admin-grades-layout,
.content-stack.function-menu-mode .student-workbench,
.content-stack.function-menu-mode .subject-workbench,
.content-stack.function-menu-mode .section-workbench,
.content-stack.function-menu-mode .split-layout,
.content-stack.function-menu-mode .enrollment-review-layout,
.content-stack.function-menu-mode .attendance-admin-layout,
.content-stack.function-menu-mode .announcement-layout,
.content-stack.function-menu-mode .portal-layout {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: stretch;
}

.function-launch-card {
  display: grid;
  min-height: 126px;
  padding: 20px 22px !important;
  border-color: rgba(7, 109, 74, 0.16);
  background:
    linear-gradient(135deg, rgba(7, 109, 74, 0.045), rgba(7, 120, 216, 0.035)),
    #ffffff;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.function-launch-card:hover,
.function-launch-card:focus-within {
  border-color: rgba(7, 109, 74, 0.32);
  box-shadow: 0 16px 34px rgba(12, 36, 64, 0.12);
  transform: translateY(-2px);
}

.function-launch-card > .panel-title {
  align-items: center;
  min-height: 84px;
  margin: 0;
}

.function-launch-card > .panel-title > :first-child {
  min-width: 0;
}

.function-launch-card > .panel-title > :not(:first-child):not(.function-open-button) {
  display: none !important;
}

.function-launch-card .panel-title h2,
.function-launch-card .panel-title h3 {
  color: var(--green-950);
  font-size: 1.18rem;
  line-height: 1.12;
}

.function-launch-card .panel-title p {
  display: -webkit-box;
  max-width: 68ch;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.content-stack.function-focus-mode > .metric-grid,
.content-stack.function-focus-mode > .toolbar-row,
.content-stack.function-focus-mode > .gradebook-guide:not(.is-function-focused) {
  display: none !important;
}

.content-stack.function-focus-mode .dashboard-grid,
.content-stack.function-focus-mode .admin-grades-layout,
.content-stack.function-focus-mode .student-workbench,
.content-stack.function-focus-mode .subject-workbench,
.content-stack.function-focus-mode .section-workbench,
.content-stack.function-focus-mode .split-layout,
.content-stack.function-focus-mode .enrollment-review-layout,
.content-stack.function-focus-mode .attendance-admin-layout,
.content-stack.function-focus-mode .settings-workbench,
.content-stack.function-focus-mode .announcement-layout,
.content-stack.function-focus-mode .portal-layout {
  display: block;
}

.content-stack.function-focus-mode .panel.is-function-focused {
  width: 100%;
  min-height: min(620px, calc(100svh - 238px));
  padding: 24px !important;
  border-color: rgba(7, 109, 74, 0.22);
  box-shadow: 0 18px 40px rgba(12, 36, 64, 0.12);
  animation: focusPanelIn 220ms ease both;
}

.content-stack.function-focus-mode .panel.is-function-focused .panel-function-body {
  display: grid;
  gap: 14px;
}

@keyframes focusPanelIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.title-with-icon {
  display: flex;
  align-items: center;
  gap: 12px;
}

.title-with-icon svg {
  color: var(--blue-900);
}

.capacity-table {
  display: grid;
  gap: 0;
}

.capacity-row {
  display: grid;
  grid-template-columns: 52px minmax(82px, 1fr) 52px 74px;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  padding: 5px 0;
  border-bottom: 1px solid #ecf1f5;
  font-size: 0.92rem;
}

.capacity-row.header {
  min-height: 36px;
  color: var(--blue-900);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mini-bar {
  width: 100%;
  height: 6px;
  margin-top: 4px;
  border-radius: 99px;
  background: #dfe6ec;
  overflow: hidden;
}

.mini-bar i {
  display: block;
  width: var(--fill);
  height: 100%;
  border-radius: inherit;
  background: var(--green-800);
}

.seat-pill,
.status-pill,
.announcement-meta span,
.panel-title > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 6px;
  color: var(--green-800);
  background: #e5f7ee;
  font-size: 0.82rem;
  font-weight: 850;
}

.seat-pill.low,
.status-pill.low {
  color: #a76100;
  background: var(--gold-050);
}

.seat-pill.full,
.status-pill.full,
.announcement-meta span.is-urgent {
  color: var(--red);
  background: var(--red-050);
}

.table-link {
  justify-self: start;
  margin-top: 4px;
  white-space: normal;
  text-align: left;
}

.schedule-preview-card {
  min-height: 0;
}

.schedule-ai-panel {
  display: grid;
  gap: 12px;
  background:
    linear-gradient(135deg, rgba(7, 120, 216, 0.08), rgba(8, 114, 79, 0.1)),
    #ffffff;
}

.ai-assistant-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.ai-assistant-head h2,
.ai-assistant-head p {
  margin: 0;
}

.ai-assistant-head h2 {
  color: var(--green-950);
}

.ai-assistant-head p {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.4;
}

.ai-assistant-head > span {
  justify-self: end;
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--green-950);
  background: #effaf5;
  font-size: 0.82rem;
  font-weight: 900;
}

.ai-orb {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #063f7a, var(--green-800));
  box-shadow: 0 14px 26px rgba(7, 91, 184, 0.22);
  font-weight: 950;
}

.ai-command-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.ai-command-form input[name="prompt"] {
  min-height: 50px;
  border-color: rgba(7, 120, 216, 0.34);
  background: #ffffff;
}

.ai-quick-prompts,
.ai-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-quick-prompts button,
.ai-suggestions button {
  min-height: 34px;
  border: 1px solid rgba(7, 109, 74, 0.2);
  border-radius: 999px;
  color: var(--green-900);
  background: #ffffff;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 850;
}

.ai-thread {
  display: grid;
  gap: 10px;
  max-height: 320px;
  overflow: auto;
  padding-right: 2px;
}

.ai-empty,
.ai-message {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  padding: 12px;
}

.ai-empty {
  display: grid;
  gap: 4px;
  color: var(--muted);
}

.ai-message {
  display: grid;
  gap: 8px;
}

.ai-message.is-user {
  margin-left: auto;
  width: min(720px, 92%);
  border-color: rgba(7, 120, 216, 0.26);
  background: #f2f8ff;
}

.ai-message.is-assistant {
  width: min(860px, 100%);
  border-color: rgba(7, 109, 74, 0.22);
}

.ai-message.is-error {
  border-color: rgba(209, 47, 47, 0.28);
  background: var(--red-050);
}

.ai-message strong {
  color: var(--green-950);
}

.ai-message p {
  margin: 0;
  color: #2d405a;
  line-height: 1.48;
  white-space: pre-line;
}

.ai-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 8px;
}

.ai-card {
  display: grid;
  gap: 2px;
  min-height: 60px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: #f8fbfd;
  font-size: 0.78rem;
  font-weight: 800;
}

.ai-card b {
  color: var(--ink);
  font-size: 1.2rem;
}

.ai-card.ok {
  background: #effaf5;
  border-color: rgba(7, 109, 74, 0.18);
}

.ai-card.warn {
  background: #fff8e8;
  border-color: rgba(214, 163, 43, 0.3);
}

.ai-card.danger {
  background: var(--red-050);
  border-color: rgba(209, 47, 47, 0.24);
}

.schedule-wrap {
  overflow-x: auto;
}

.schedule-map-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.schedule-map-hint span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fbfd;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  padding: 7px 10px;
}

.schedule-command-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f5faf7);
}

.schedule-command-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.schedule-command-group.main {
  flex: 1 1 440px;
}

.schedule-command-group.actions {
  justify-content: flex-end;
  flex: 1 1 420px;
}

.schedule-command-bar label {
  min-width: min(320px, 100%);
}

.schedule-command-bar span,
.selected-slot-chip {
  color: var(--green-950);
  font-size: 0.86rem;
  font-weight: 900;
}

.selected-slot-chip {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(7, 109, 74, 0.18);
  border-radius: 999px;
  background: #f0faf5;
}

.schedule-options-drawer {
  position: relative;
}

.schedule-options-drawer summary {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--green-900);
  border-radius: 7px;
  color: var(--green-900);
  background: #ffffff;
  font-weight: 850;
  list-style: none;
  cursor: pointer;
}

.schedule-options-drawer summary::-webkit-details-marker {
  display: none;
}

.schedule-options-drawer > div {
  position: absolute;
  z-index: 18;
  right: 0;
  top: calc(100% + 8px);
  min-width: 230px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.working-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(7, 109, 74, 0.24);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f0fbf6, #eef7ff);
  box-shadow: 0 16px 32px rgba(7, 109, 74, 0.09);
  animation: scheduleWorkIn 220ms ease both;
}

.working-banner strong {
  display: block;
  color: var(--green-950);
  font-size: 0.95rem;
}

.working-banner span:not(.working-spinner) {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.working-spinner {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 4px solid rgba(7, 109, 74, 0.14);
  border-top-color: var(--green-800);
  border-radius: 999px;
  animation: spin 780ms linear infinite;
}

.schedule-outcome-bubble {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  gap: 12px;
  align-items: center;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid #f1c58a;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff9ea, #f7fbff);
  box-shadow: 0 12px 26px rgba(126, 83, 0, 0.07);
}

.schedule-outcome-bubble strong,
.schedule-outcome-bubble span,
.schedule-outcome-bubble small {
  display: block;
}

.schedule-outcome-bubble strong {
  color: #7a4c00;
  font-weight: 950;
}

.manual-pending-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -2px 0 8px;
  padding: 7px 10px;
  border: 1px solid #f1c58a;
  border-radius: 8px;
  background: #fffaf0;
}

.manual-pending-summary strong {
  flex: 0 0 auto;
  color: #7a4c00;
  font-size: 0.86rem;
  font-weight: 950;
}

.manual-pending-summary span {
  min-width: 0;
  color: #52677f;
  font-size: 0.8rem;
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-focus-workspace .manual-pending-summary,
.manual-focus-workspace .action-notice {
  gap: 8px;
  margin: 0;
  padding: 5px 8px;
  font-size: 0.74rem;
  line-height: 1.1;
  box-shadow: none;
}

.manual-focus-workspace .manual-pending-summary strong,
.manual-focus-workspace .action-notice strong {
  font-size: 0.78rem;
}

.manual-focus-workspace .manual-pending-summary span,
.manual-focus-workspace .action-notice span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-outcome-bubble span {
  color: #52677f;
  font-weight: 760;
}

.outcome-section-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.outcome-section-list > span {
  max-width: 260px;
  padding: 7px 9px;
  border: 1px solid rgba(179, 122, 0, 0.22);
  border-radius: 999px;
  background: #ffffff;
  color: #18324d;
  font-size: 0.76rem;
}

.outcome-section-list small {
  margin-top: 2px;
  color: #65748a;
  font-size: 0.68rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-planner-launch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(7, 109, 74, 0.18);
  border-radius: var(--radius);
  background: #f4fbf7;
}

.schedule-planner-launch div {
  display: grid;
  gap: 2px;
}

.schedule-planner-launch strong {
  color: var(--green-950);
}

.schedule-planner-launch span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.schedule-planner-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.schedule-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  overflow: hidden;
}

.schedule-wrap.compact .schedule-table {
  min-width: 100%;
  table-layout: fixed;
  font-size: 0.76rem;
}

.schedule-table th,
.schedule-table td {
  padding: 12px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.schedule-table th {
  color: #122747;
  background: linear-gradient(180deg, #f8fbfd, #eff5f9);
  font-size: 0.83rem;
  font-weight: 900;
}

.schedule-table td:first-child {
  color: #18324d;
  font-weight: 780;
  white-space: nowrap;
}

.schedule-table td.schedule-slot {
  min-width: 154px;
  height: 138px;
  padding: 8px;
  background: #ffffff;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.schedule-break-row td {
  height: 46px;
  padding: 8px 10px;
  background: linear-gradient(90deg, #f7fbfd, #fff8e8);
}

.schedule-break-row td:first-child {
  color: #8a5d00;
}

.schedule-break-row td[colspan] span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: #fff1cb;
  color: #8a5d00;
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 900;
}

.schedule-slot.is-drop-target {
  background: #eaf7ff;
  box-shadow: inset 0 0 0 2px #147bd1;
}

.schedule-slot.is-selected {
  background: #f0fbf6;
  box-shadow: inset 0 0 0 2px rgba(7, 109, 74, 0.58);
}

.empty-slot {
  display: grid;
  place-items: center;
  min-height: 72px;
  border: 1px dashed #d6e1ea;
  border-radius: 7px;
  color: #93a1b1;
  font-size: 0.82rem;
  font-weight: 850;
}

.empty-slot small {
  max-width: 160px;
  margin-top: 5px;
  color: #7b8796;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.28;
  text-align: center;
}

.empty-slot.is-moved-away {
  border-color: rgba(179, 122, 0, 0.32);
  background: #fffaf0;
  color: #8a5d00;
}

.schedule-block {
  width: 100%;
  min-height: 116px;
  display: grid;
  gap: 4px;
  align-content: center;
  border: 1px solid var(--schedule-border, rgba(7, 109, 74, 0.26));
  border-radius: 8px;
  background: var(--schedule-bg, linear-gradient(180deg, #ffffff, #f3fbf7));
  color: var(--schedule-fg, var(--ink));
  padding: 10px;
  text-align: center;
  cursor: context-menu;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.schedule-block:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(6, 79, 57, 0.14);
  border-color: rgba(7, 109, 74, 0.46);
}

.schedule-block[draggable="true"] {
  cursor: grab;
}

.schedule-block.status-cancelled {
  border-color: rgba(194, 51, 59, 0.26);
  background: #fff5f5;
  color: #7f1d1d;
}

.schedule-block.status-moved,
.schedule-block.status-special_activity,
.schedule-block.status-virtual {
  border-color: rgba(179, 122, 0, 0.3);
  background: #fffaf0;
  color: #6f4b00;
}

.schedule-action-menu {
  position: fixed;
  z-index: 100;
  width: 320px;
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.schedule-action-menu strong {
  color: var(--green-950);
}

.schedule-action-menu span {
  color: var(--muted);
  font-size: 0.82rem;
}

.schedule-action-menu button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fbfd;
  color: var(--green-900);
  font-weight: 900;
  text-align: left;
  padding: 8px 10px;
}

.menu-section-title {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.schedule-color-row {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
}

.schedule-action-menu .color-swatch {
  min-height: 28px;
  padding: 0;
  border: 1px solid rgba(6, 29, 54, 0.18);
  border-radius: 999px;
  background: var(--swatch);
}

.schedule-action-menu .color-swatch:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(6, 29, 54, 0.16);
}

.schedule-table td strong,
.schedule-table td span,
.schedule-table td small {
  display: block;
}

.schedule-block strong,
.schedule-block span,
.schedule-block small {
  color: inherit;
}

.schedule-block .status-pill {
  width: max-content;
  justify-self: center;
  background: rgba(255, 255, 255, 0.72);
  color: #063f2d;
}

.schedule-table td span {
  margin-top: 4px;
  font-size: 0.82rem;
}

.schedule-table td small {
  margin-top: 5px;
  font-size: 0.76rem;
  line-height: 1.25;
}

.schedule-wrap.compact .schedule-table th,
.schedule-wrap.compact .schedule-table td {
  padding: 8px 5px;
}

.schedule-wrap.compact .schedule-table th:first-child,
.schedule-wrap.compact .schedule-table td:first-child {
  width: 84px;
}

.schedule-wrap.compact .schedule-table td.schedule-slot {
  min-width: 112px;
  height: 88px;
  padding: 5px;
}

.schedule-wrap.compact .schedule-block {
  min-height: 76px;
  gap: 2px;
  padding: 6px;
  border-radius: 7px;
}

.schedule-wrap.compact .schedule-block strong {
  font-size: 0.82rem;
}

.schedule-wrap.compact .schedule-block span,
.schedule-wrap.compact .schedule-block small {
  margin-top: 2px;
  font-size: 0.68rem;
}

.schedule-wrap.compact .schedule-block small:nth-of-type(n+2) {
  display: none;
}

.schedule-wrap.compact .empty-slot {
  min-height: 58px;
  font-size: 0.76rem;
}

.manual-focus-workspace .schedule-wrap.compact .schedule-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.manual-focus-workspace .schedule-wrap.compact .schedule-table th,
.manual-focus-workspace .schedule-wrap.compact .schedule-table td {
  padding: 2px;
}

.manual-focus-workspace .schedule-wrap.compact .schedule-table th:first-child,
.manual-focus-workspace .schedule-wrap.compact .schedule-table td:first-child {
  width: 42px;
  font-size: 0.5rem;
  line-height: 1;
}

.manual-focus-workspace .schedule-wrap.compact .schedule-table th:not(:first-child),
.manual-focus-workspace .schedule-wrap.compact .schedule-table td:not(:first-child) {
  width: calc((100% - 42px) / 5);
}

.manual-focus-workspace .schedule-wrap.compact .schedule-table td.schedule-slot {
  min-width: 0;
  height: 27px;
  padding: 1px;
}

.manual-focus-workspace .schedule-wrap.compact .schedule-block {
  min-height: 24px;
  gap: 1px;
  padding: 2px 3px;
  border-radius: 5px;
}

.manual-focus-workspace .schedule-wrap.compact .schedule-block strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.52rem;
  line-height: 1;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.manual-focus-workspace .schedule-wrap.compact .schedule-block span {
  overflow: hidden;
  font-size: 0.41rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-focus-workspace .schedule-wrap.compact .schedule-block small {
  display: none;
}

.manual-focus-workspace .schedule-wrap.compact .schedule-block .status-pill {
  display: inline-flex;
  padding: 1px 2px;
  font-size: 0.38rem;
  line-height: 1;
}

.manual-focus-workspace .schedule-wrap.compact .empty-slot {
  min-height: 24px;
  font-size: 0.5rem;
}

.schedule-table select {
  min-width: 126px;
  padding: 8px;
  font-size: 0.86rem;
}

.schedule-coverage-panel {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfd;
}

.schedule-coverage-panel.is-complete {
  border-color: rgba(7, 109, 74, 0.22);
  background: #f2fbf6;
}

.schedule-coverage-panel.has-pending {
  border-color: rgba(214, 163, 43, 0.3);
  background: #fffaf0;
}

.focus-side-panel .schedule-coverage-panel {
  grid-template-columns: 1fr;
  margin-top: 0;
}

.focus-side-panel .coverage-chip-list {
  justify-content: flex-start;
}

.schedule-coverage-panel strong {
  color: var(--green-950);
  font-weight: 900;
}

.schedule-coverage-panel span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.coverage-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.coverage-chip-list span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  white-space: nowrap;
}

.coverage-chip-list .is-ok {
  border-color: rgba(7, 109, 74, 0.2);
  background: #edf9f2;
}

.coverage-chip-list .is-pending {
  border-color: rgba(214, 163, 43, 0.36);
  background: #fff4d6;
}

.daily-print-card {
  page-break-inside: avoid;
}

.daily-print-screen-heading {
  margin-bottom: 14px;
}

.daily-print-actions {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.daily-print-actions label {
  min-width: 160px;
}

.daily-print-sheet {
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
}

.daily-print-head {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--green-800);
}

.daily-print-head img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.daily-print-head span {
  color: var(--green-800);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.daily-print-head h2 {
  margin: 2px 0;
  color: var(--green-950);
  font-size: 1.55rem;
  letter-spacing: 0;
}

.daily-print-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.daily-print-head > strong {
  min-width: 150px;
  padding: 9px 14px;
  border-radius: 7px;
  color: #063f2d;
  background: #93c84b;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 950;
}

.daily-print-wrap {
  overflow-x: auto;
}

.daily-schedule-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  font-size: 0.82rem;
}

.daily-schedule-table .daily-day-row th {
  padding: 7px;
  color: #063f2d;
  background: #93c84b;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.daily-schedule-table th,
.daily-schedule-table td {
  border: 1px solid var(--line);
  padding: 7px 8px;
  text-align: center;
  vertical-align: middle;
}

.daily-schedule-table th {
  background: #dff0e8;
  color: var(--green-950);
  font-weight: 900;
}

.daily-schedule-table td:first-child,
.daily-schedule-table td:last-child {
  width: 92px;
  color: #15304d;
  font-weight: 900;
  white-space: nowrap;
}

.daily-schedule-table td.has-class {
  background: var(--daily-bg, #f7fbfd);
  color: var(--daily-fg, #0b2443);
  font-weight: 900;
}

.daily-schedule-table td.is-free {
  color: #7c8998;
  font-weight: 800;
}

.daily-schedule-table td strong {
  display: block;
}

.daily-class-cell {
  display: grid;
  justify-items: center;
  align-items: center;
  min-height: 38px;
}

.daily-class-cell strong {
  max-width: 100%;
  color: inherit;
  font-size: 0.78rem;
  line-height: 1.08;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.daily-break-row td {
  background: #fff4d8;
  color: #8a5d00;
  font-weight: 900;
}

.schedule-admin-panel {
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
}

.attendance-admin-layout {
  display: grid;
  gap: 16px;
}

.staff-attendance-panel {
  border-color: rgba(7, 109, 74, 0.2);
}

.staff-attendance-table-wrap {
  margin: 12px 0;
}

.staff-attendance-table td:first-child span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.staff-attendance-table select,
.staff-attendance-table input {
  min-width: 190px;
}

.staff-attendance-history {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.staff-attendance-history h3 {
  margin: 0 0 10px;
  color: var(--green-950);
  font-size: 1rem;
}

.attendance-grade-panel {
  border-color: rgba(7, 109, 74, 0.18);
  background: linear-gradient(180deg, #ffffff, #f7fcf9);
}

.attendance-grade-table td:nth-child(2),
.attendance-grade-table td:nth-child(4) {
  white-space: nowrap;
}

.attendance-grade-table td:nth-child(3) {
  color: var(--muted);
  font-size: 0.9rem;
}

.schedule-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 14px;
  align-items: stretch;
}

.schedule-quick-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(12, 36, 64, 0.05);
}

.schedule-quick-card h3 {
  margin: 3px 0;
  color: var(--green-950);
  font-size: 1.12rem;
}

.schedule-quick-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.auto-schedule-card {
  border-color: rgba(8, 120, 216, 0.2);
  background: linear-gradient(180deg, #ffffff, var(--blue-050));
}

.schedule-action-center {
  background: linear-gradient(180deg, #ffffff, #f6fbf8);
}

.collapsible-panel {
  padding: 0;
  overflow: hidden;
}

.collapsible-panel summary {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  color: var(--green-950);
  font-weight: 900;
  cursor: pointer;
}

.collapsible-panel summary::-webkit-details-marker {
  display: none;
}

.collapsible-panel > :not(summary) {
  margin: 0 18px 18px;
}

.schedule-focus-workspace {
  display: grid;
  gap: 12px;
  min-height: calc(100svh - 210px);
}

.focus-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f5faf7);
  box-shadow: 0 8px 22px rgba(12, 36, 64, 0.05);
}

.focus-toolbar h2 {
  margin: 2px 0 0;
  color: var(--green-950);
  font-size: clamp(1.35rem, 2vw, 1.9rem);
}

.focus-toolbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.focus-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.focus-toolbar-actions label {
  min-width: 190px;
}

.manual-focus-workspace .manual-compact-toolbar {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto;
  align-items: center;
  padding: 4px 6px;
  gap: 6px;
}

body.schedule-focus-mode .manual-focus-workspace {
  height: calc(100svh - 58px);
  min-height: 0;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 6px;
}

.manual-toolbar-title {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}

.manual-toolbar-title .panel-kicker {
  flex: 0 0 auto;
  font-size: 0.64rem;
  white-space: nowrap;
}

.manual-toolbar-title h2 {
  margin: 0;
  font-size: clamp(1rem, 1.2vw, 1.28rem);
  line-height: 1;
}

.manual-focus-workspace .manual-compact-toolbar .focus-toolbar-actions {
  flex-wrap: nowrap;
}

.manual-focus-workspace .manual-section-picker {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.manual-focus-workspace .manual-section-picker select {
  width: min(200px, 16vw);
  min-height: 30px;
  padding: 4px 7px;
}

.manual-focus-workspace .manual-compact-toolbar .ghost-button,
.manual-focus-workspace .manual-compact-toolbar .secondary-button {
  min-height: 30px;
  padding-inline: 9px;
  font-size: 0.76rem;
}

.schedule-focus-grid {
  display: grid;
  grid-template-columns: minmax(340px, 380px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 0;
}

.schedule-focus-grid.tool-mode {
  grid-template-columns: minmax(340px, 0.34fr) minmax(0, 1fr);
}

.manual-focus-workspace .schedule-focus-grid {
  grid-template-columns: clamp(330px, 21vw, 410px) minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  min-height: 0;
}

.focus-side-panel,
.focus-map-panel {
  min-height: calc(100svh - 300px);
}

.focus-side-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: calc(100svh - 300px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(12, 36, 64, 0.04);
}

.tool-side-panel {
  gap: 12px;
}

.focus-map-panel {
  overflow: hidden;
}

.focus-map-panel .panel-title {
  margin-bottom: 8px;
}

.compact-title h2 {
  font-size: 1.2rem;
}

.focus-map-panel .schedule-map-hint {
  margin-bottom: 8px;
}

.focus-map-panel .schedule-map-hint span {
  padding: 5px 8px;
  font-size: 0.76rem;
}

.focus-map-panel .schedule-wrap {
  max-height: calc(100svh - 380px);
  overflow: auto;
}

.manual-focus-workspace .focus-side-panel,
.manual-focus-workspace .focus-map-panel {
  min-height: 0;
  height: 100%;
}

.manual-focus-workspace .focus-side-panel {
  display: flex;
  flex-direction: column;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 7px;
}

.manual-focus-workspace .focus-map-panel .schedule-wrap {
  max-height: none;
}

.manual-focus-workspace .focus-map-panel {
  display: flex;
  flex-direction: column;
  padding: 7px;
}

.manual-focus-workspace .focus-map-panel .panel-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  margin-bottom: 4px;
}

.manual-focus-workspace .focus-map-panel .panel-title h2 {
  font-size: 0.95rem;
}

.manual-focus-workspace .focus-map-panel .panel-title p {
  display: none;
}

.manual-focus-workspace .focus-map-panel .panel-title .status-pill {
  font-size: 0.62rem;
  padding: 4px 7px;
  white-space: nowrap;
}

.manual-focus-workspace .focus-map-panel .schedule-map-hint {
  display: none;
}

.manual-focus-workspace .focus-map-panel .schedule-map-hint span {
  max-width: 50%;
  padding: 4px 7px;
  overflow: hidden;
  font-size: 0.68rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-focus-workspace .schedule-coverage-panel,
.manual-focus-workspace .schedule-diagnostics {
  gap: 8px;
  padding: 9px;
  min-width: 0;
  overflow: hidden;
}

.manual-focus-workspace .schedule-coverage-panel > *,
.manual-focus-workspace .schedule-diagnostics > *,
.manual-focus-workspace .manual-advanced-panel > * {
  min-width: 0;
}

.manual-focus-workspace .schedule-coverage-panel strong,
.manual-focus-workspace .schedule-coverage-panel span,
.manual-focus-workspace .schedule-diagnostics strong,
.manual-focus-workspace .schedule-diagnostics span,
.manual-focus-workspace .schedule-diagnostics small,
.manual-focus-workspace .schedule-diagnostics p {
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

.manual-focus-workspace .schedule-coverage-panel > div:first-child span {
  display: block;
  font-size: 0.78rem;
  line-height: 1.25;
}

.manual-focus-workspace .coverage-chip-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  width: 100%;
}

.manual-focus-workspace .coverage-chip-list span {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  min-height: 0;
  border-radius: 10px;
  white-space: normal;
  line-height: 1.15;
}

.manual-focus-workspace .working-banner {
  margin: 0;
  padding: 8px 10px;
}

.manual-focus-workspace .focus-clear-panel {
  margin-top: 6px;
}

.manual-focus-workspace .focus-clear-panel summary {
  min-height: 34px;
  padding: 0 9px;
  font-size: 0.8rem;
}

.manual-focus-workspace .diagnostic-list article {
  padding: 8px;
}

body.schedule-focus-mode .manual-focus-workspace .schedule-focus-grid {
  min-height: 0;
  height: 100%;
}

body.schedule-focus-mode .manual-focus-workspace .focus-side-panel,
body.schedule-focus-mode .manual-focus-workspace .focus-map-panel {
  min-height: 0;
  height: 100%;
}

body.schedule-focus-mode .manual-focus-workspace .focus-side-panel {
  max-height: none;
}

body.schedule-focus-mode .manual-focus-workspace .focus-map-panel {
  max-height: none;
}

body.schedule-focus-mode .manual-focus-workspace .focus-map-panel .schedule-wrap {
  flex: 1 1 auto;
  height: 100%;
  max-height: none;
  min-height: 0;
}

.manual-builder-guide.compact {
  display: none;
  padding: 9px 10px;
}

.manual-builder-guide.compact span {
  font-size: 0.78rem;
}

.assignment-drag-tray.focus {
  min-height: 0;
}

.manual-focus-workspace .assignment-drag-tray.focus {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 130px;
  overflow: hidden;
}

.class-bucket-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 6px 7px;
  border: 1px solid rgba(7, 109, 74, 0.18);
  border-radius: var(--radius);
  background: #f3fbf7;
  color: var(--green-950);
  font-weight: 900;
}

.class-bucket-title span {
  color: var(--muted);
  font-size: 0.72rem;
}

.class-bucket-title div {
  display: grid;
  gap: 2px;
}

.class-bucket-title small {
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.15;
}

.assignment-drag-list.focus {
  grid-template-columns: 1fr;
  max-height: calc(100svh - 470px);
  min-height: 220px;
}

.manual-focus-workspace .assignment-drag-list.focus {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  max-height: none;
  min-height: 210px;
  gap: 7px;
  overflow-y: auto;
  overflow-x: hidden;
}

.assignment-drag-list.focus .assignment-drag-card {
  padding: 8px;
}

.manual-focus-workspace .assignment-drag-card {
  flex: 0 0 auto;
  align-content: start;
  gap: 4px;
  min-height: 74px;
  padding: 7px 8px;
}

.manual-pending-card {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 14px;
  background: #ffffff;
}

.manual-pending-card .assignment-drag-card {
  width: 100%;
  box-shadow: none;
  text-align: left;
}

.manual-card-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(7, 109, 74, 0.16);
  border-radius: 10px;
  background: #f4fbf8;
}

.manual-card-controls > div:first-child {
  display: grid;
  gap: 2px;
}

.manual-card-controls strong {
  color: var(--green-950);
  font-size: 0.76rem;
}

.manual-card-controls span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 760;
  line-height: 1.2;
}

.manual-card-controls .assignment-frequency-control {
  width: 100%;
}

.manual-card-controls .frequency-chip-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.manual-card-controls .frequency-chip-row button {
  min-width: 0;
}

.assignment-planner-details {
  border: 1px solid #cfe7dc;
  border-radius: 10px;
  background: #f9fdfb;
  overflow: hidden;
}

.assignment-planner-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.assignment-planner-details summary::-webkit-details-marker {
  display: none;
}

.assignment-planner-details summary::after {
  content: "+";
}

.assignment-planner-details[open] summary::after {
  content: "-";
}

.assignment-planner-details[open] {
  background: #ffffff;
}

.planner-insight {
  display: grid;
  gap: 7px;
  padding: 0 8px 8px;
}

.planner-insight-section {
  padding: 7px 8px;
  border: 1px solid #d8e7ef;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: inset 3px 0 0 rgba(7, 109, 74, 0.14);
}

.planner-insight-section.is-recommendation {
  border-color: #b9ddd4;
  background: #eefaf5;
  box-shadow: inset 3px 0 0 var(--green-800);
}

.planner-insight-section.is-recommendation strong {
  color: var(--green-950);
}

.planner-insight-section strong {
  display: block;
  color: var(--ink);
  font-size: 0.78rem;
}

.planner-insight-section p {
  margin: 2px 0 6px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.25;
}

.planner-option-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.planner-option {
  padding: 3px 6px;
  border: 1px solid #b9ddd4;
  border-radius: 999px;
  background: #eefaf5;
  color: var(--green);
  font-size: 0.64rem;
  font-weight: 800;
}

.planner-option.is-warning {
  border-color: #f0d08a;
  background: #fff4d9;
  color: #7a4a00;
}

.teacher-mini-schedule {
  display: grid;
  gap: 4px;
}

.teacher-mini-day {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 6px;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.25;
}

.teacher-mini-day span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.duration-edit-callout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid #c9e7dc;
  border-radius: 10px;
  background: #effaf6;
  font-size: 0.68rem;
  font-weight: 800;
}

.duration-edit-callout .ghost-button {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 0.68rem;
}

.assignment-inline-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  align-items: center;
}

.manual-focus-workspace .assignment-drag-card strong {
  font-size: 0.78rem;
  line-height: 1.02;
}

.manual-focus-workspace .assignment-drag-card span {
  font-size: 0.62rem;
  line-height: 1.05;
}

.placement-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.assignment-drag-card .placement-chip-row .placement-status {
  margin: 0;
  padding: 3px 6px;
  font-size: 0.6rem;
  line-height: 1;
}

.assignment-drag-card .placement-status.is-ok {
  background: #e6f7ef;
  color: var(--green-950);
}

.assignment-drag-card .placement-status.is-pending {
  background: #fff0c9;
  color: #7a4c00;
}

.assignment-availability {
  display: grid;
  gap: 4px;
  margin-top: 3px;
  padding: 5px 6px;
  border: 1px solid rgba(7, 109, 74, 0.16);
  border-radius: 8px;
  background: #eefaf5;
}

.assignment-availability span {
  color: var(--green-950);
  font-size: 0.58rem;
  font-weight: 900;
}

.assignment-availability div {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.assignment-drag-card .assignment-availability small {
  display: inline-flex;
  width: fit-content;
  padding: 2px 5px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.52rem;
  line-height: 1;
}

.assignment-availability.is-blocked {
  border-color: #fecaca;
  background: #fff5f5;
}

.completed-assignments-disclosure {
  flex: 0 0 auto;
  border-color: rgba(7, 109, 74, 0.18);
  background: #f8fcfa;
}

.completed-assignments-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.completed-assignments-disclosure summary small {
  color: var(--muted);
  font-size: 0.76rem;
}

.completed-assignment-list {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  padding-top: 8px;
}

.completed-assignment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 9px;
  border: 1px solid rgba(7, 109, 74, 0.12);
  border-radius: 7px;
  background: #ffffff;
}

.manual-advanced-disclosure {
  flex: 0 0 auto;
}

.manual-advanced-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.manual-advanced-disclosure summary small {
  color: var(--muted);
  font-size: 0.72rem;
}

.manual-advanced-panel {
  display: grid;
  gap: 8px;
  padding-top: 8px;
}

.manual-advanced-panel .schedule-coverage-panel,
.manual-advanced-panel .schedule-diagnostics,
.manual-advanced-panel .schedule-quick-card {
  margin: 0;
}

.completed-assignment-row div {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.completed-assignment-row strong,
.completed-assignment-row span,
.completed-assignment-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.completed-assignment-row strong {
  color: var(--green-950);
  font-size: 0.82rem;
}

.completed-assignment-row span,
.completed-assignment-row small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.focus-clear-panel {
  border: 1px solid #f0c4c4;
  border-radius: var(--radius);
  background: #fffafa;
  overflow: hidden;
}

.focus-clear-panel summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: #9f1d1d;
  font-weight: 900;
  cursor: pointer;
}

.focus-clear-panel .schedule-quick-card {
  border: 0;
  border-top: 1px solid #f0c4c4;
  border-radius: 0;
}

.coverage-disclosure,
.diagnostics-disclosure {
  border-color: var(--line);
  background: #fbfdff;
}

.coverage-disclosure summary,
.diagnostics-disclosure summary {
  color: var(--green-950);
}

.coverage-disclosure .schedule-coverage-panel,
.diagnostics-disclosure .schedule-diagnostics {
  margin: 0;
  border-radius: 0;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
}

.schedule-tool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.schedule-tool-tabs button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #334966;
  padding: 8px 14px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.schedule-tool-tabs button:hover,
.schedule-tool-tabs button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(7, 109, 74, 0.32);
  color: var(--green-950);
}

.schedule-tool-tabs button.is-active {
  border-color: rgba(7, 109, 74, 0.36);
  background: var(--green-900);
  color: #ffffff;
}

.schedule-tool-tabs.compact {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: -2px 0 0;
  padding-bottom: 8px;
  background: linear-gradient(180deg, #ffffff 78%, rgba(255, 255, 255, 0));
}

.schedule-tool-tabs.compact button {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 0.82rem;
}

.schedule-tool-body {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 14px;
}

.tool-side-panel .schedule-tool-surface {
  gap: 10px;
}

.tool-side-panel .tool-heading {
  gap: 8px;
}

.tool-side-panel .tool-heading h3 {
  font-size: 1.05rem;
}

.tool-side-panel .tool-heading p {
  font-size: 0.82rem;
}

.tool-side-panel .schedule-quick-card,
.tool-side-panel .form-grid {
  gap: 9px;
}

.tool-side-panel .schedule-quick-card {
  padding: 12px;
}

.tool-side-panel textarea {
  min-height: 62px;
}

.schedule-diagnostics {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #f1c58a;
  border-radius: var(--radius);
  background: #fff8eb;
}

.diagnostics-disclosure {
  border-color: var(--line);
  background: #fbfdff;
}

.diagnostics-disclosure summary {
  color: var(--green-950);
}

.diagnostics-disclosure .schedule-diagnostics {
  margin-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
}

.schedule-diagnostics.is-ok {
  border-color: rgba(7, 109, 74, 0.22);
  background: #f0fbf5;
}

.schedule-diagnostics > div:first-child {
  display: grid;
  gap: 3px;
}

.schedule-diagnostics strong {
  color: var(--green-950);
}

.schedule-diagnostics span,
.schedule-diagnostics small {
  color: var(--muted);
}

.diagnostic-list {
  display: grid;
  gap: 8px;
}

.diagnostic-action-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 9px;
  border: 1px solid rgba(7, 109, 74, 0.18);
  border-radius: 8px;
  background: #f0fbf5;
}

.diagnostic-action-strip span {
  min-width: 0;
  color: var(--green-950);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.manual-focus-workspace .diagnostic-action-strip {
  grid-template-columns: 1fr;
}

.manual-focus-workspace .diagnostic-action-strip .tiny-button {
  width: 100%;
}

.schedule-alternatives {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.schedule-alternatives span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(177, 103, 0, 0.18);
  border-radius: 999px;
  background: #fffdf8;
  font-size: 0.78rem;
  font-weight: 850;
}

.schedule-alternatives span.is-complete {
  border-color: rgba(7, 109, 74, 0.2);
  background: #effaf5;
}

.schedule-alternative-panel {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(7, 109, 74, 0.16);
  border-radius: var(--radius);
  background: #f8fbfd;
}

.schedule-alternative-panel > strong {
  color: var(--green-950);
}

.schedule-alternative-panel > span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.diagnostic-list article {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(177, 103, 0, 0.18);
  border-radius: 8px;
  background: #fffdf8;
}

.diagnostic-card {
  border: 1px solid rgba(177, 103, 0, 0.18);
  border-radius: 8px;
  background: #fffdf8;
  overflow: hidden;
}

.diagnostic-card summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  cursor: pointer;
  list-style: none;
}

.diagnostic-card summary::-webkit-details-marker {
  display: none;
}

.diagnostic-card summary b {
  min-width: 0;
  color: var(--green-950);
  overflow-wrap: anywhere;
}

.diagnostic-card summary span {
  color: #7a4c00;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.diagnostic-card-body {
  display: grid;
  gap: 4px;
  padding: 0 10px 10px;
}

.diagnostic-card-body strong {
  margin-top: 3px;
  color: #7a4c00;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.diagnostic-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 740;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.manual-focus-workspace .diagnostic-card summary {
  grid-template-columns: 1fr;
  gap: 3px;
  padding: 8px;
}

.manual-focus-workspace .diagnostic-card summary span {
  white-space: normal;
}

.manual-focus-workspace .diagnostic-card-body {
  padding: 0 8px 8px;
}

.schedule-tool-surface {
  display: grid;
  gap: 12px;
}

.manual-builder {
  align-items: start;
}

.clear-schedule-card {
  border-color: #f0c4c4;
  background: linear-gradient(180deg, #fffafa, #ffffff);
}

.manual-builder-guide {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(7, 109, 74, 0.18);
  border-radius: var(--radius);
  background: #f5fbf8;
}

.manual-builder-guide strong {
  color: var(--green-950);
}

.manual-builder-guide span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.assignment-drag-tray {
  display: grid;
  gap: 10px;
}

.assignment-drag-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.assignment-drag-card {
  width: 100%;
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 12px;
  border: 1px solid rgba(7, 109, 74, 0.2);
  border-radius: var(--radius);
  color: var(--ink);
  background: #ffffff;
  cursor: grab;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.assignment-drag-card:not(.is-complete) {
  border-left: 5px solid var(--green-800);
}

.assignment-drag-card:hover,
.assignment-drag-card:focus-visible,
.assignment-drag-card.is-dragging {
  transform: translateY(-1px);
  border-color: rgba(7, 109, 74, 0.42);
  box-shadow: 0 10px 22px rgba(7, 109, 74, 0.12);
}

.assignment-drag-card strong {
  color: var(--green-950);
  font-size: 0.96rem;
}

.assignment-drag-card span,
.assignment-drag-card small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.assignment-drag-card small:not(.placement-status) {
  display: none;
}

.assignment-drag-card .assignment-availability small {
  display: inline-flex;
}

.assignment-drag-card .placement-status {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: #fff4d6;
  color: var(--green-900);
}

.assignment-drag-card.is-complete .placement-status {
  background: #e8f7ef;
}

.assignment-drag-card.is-complete {
  cursor: default;
  border-style: dashed;
  background: #f5f8fa;
  opacity: 0.72;
}

.assignment-drag-card.is-complete:hover,
.assignment-drag-card.is-complete:focus-visible {
  transform: none;
  box-shadow: none;
  border-color: rgba(7, 109, 74, 0.2);
}

.tool-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.tool-heading h3 {
  margin: 3px 0 0;
  color: var(--green-950);
  font-size: 1.12rem;
}

.tool-heading p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.schedule-quick-card.is-flat {
  box-shadow: none;
}

.schedule-tool-empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.62fr);
  gap: 14px;
  align-items: stretch;
}

.schedule-tool-empty h3 {
  margin: 3px 0 6px;
  color: var(--green-950);
  font-size: 1.16rem;
}

.schedule-tool-empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.schedule-tool-stats {
  display: grid;
  gap: 8px;
}

.schedule-tool-stats span {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  color: #344a64;
  padding: 8px 10px;
  font-weight: 850;
}

.schedule-tool-stats strong {
  color: var(--green-950);
}

.announcements-card,
.controls-card {
  min-height: 348px;
}

.announcement-feed {
  display: grid;
  gap: 0;
}

.announcement-item {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid #ecf1f5;
}

.announcement-item::before {
  content: "";
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: linear-gradient(135deg, #eef8ff, #e9f6ee);
  border: 1px solid var(--line);
}

.announcement-meta {
  display: contents;
}

.announcement-meta span {
  grid-column: 3;
}

.announcement-meta span:nth-child(1),
.announcement-meta span:nth-child(2) {
  display: none;
}

.announcement-item h3,
.announcement-item p {
  grid-column: 2;
}

.announcement-item h3 {
  font-size: 0.94rem;
  color: #102747;
}

.announcement-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.compact-feed .announcement-item:nth-child(n + 5) {
  display: none;
}

.control-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.control-cards > div {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 258px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfdfe);
}

.control-cards ul,
.algorithm-list {
  margin: 0;
  padding-left: 18px;
  color: #30445f;
  line-height: 1.72;
  font-size: 0.92rem;
}

.page-heading {
  max-width: 100%;
  margin: 0 0 14px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
}

.page-heading h1 {
  margin: 0;
  color: var(--green-950);
  font-size: clamp(1.55rem, 2.2vw, 2.15rem);
  line-height: 1.02;
}

.page-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.35;
}

.page-heading > p {
  max-width: 520px;
  text-align: right;
}

.split-layout,
.admin-layout,
.announcement-layout,
.portal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  gap: 20px;
  align-items: start;
}

.portal-layout {
  grid-template-columns: minmax(330px, 0.7fr) minmax(0, 1.3fr);
}

.registration-form,
.capacity-panel,
.student-result,
.schedule-panel {
  padding: 22px;
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(7, 120, 216, 0.65);
  box-shadow: 0 0 0 4px rgba(7, 120, 216, 0.12);
}

.wide-label {
  margin: 14px 0;
}

.level-checks {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

.connected-form {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.primary-button,
.secondary-button,
.danger-button,
.ghost-button,
.link-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 7px;
  border: 1px solid transparent;
  padding: 0 16px;
  font-weight: 850;
  white-space: nowrap;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, #0766ca, #057de1);
  box-shadow: 0 12px 24px rgba(7, 95, 196, 0.22);
}

.secondary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--green-800), #0a6b1b);
  box-shadow: 0 12px 22px rgba(8, 114, 79, 0.2);
}

.danger-button {
  color: #ffffff;
  background: linear-gradient(135deg, #9f1d1d, #c93232);
  box-shadow: 0 12px 22px rgba(159, 29, 29, 0.18);
}

.control-cards .primary-button,
.topbar-primary {
  background: linear-gradient(135deg, var(--green-800), #0b7a16);
  box-shadow: 0 12px 22px rgba(8, 114, 79, 0.2);
}

.ghost-button {
  color: var(--green-900);
  background: #ffffff;
  border-color: var(--green-900);
}

.tiny-button {
  min-height: 32px;
  margin-top: 8px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.link-button {
  min-height: auto;
  padding: 0;
  color: var(--blue-800);
  background: transparent;
  white-space: nowrap;
}

.full-button {
  width: 100%;
}

.primary-button:hover,
.primary-button:focus-visible,
.secondary-button:hover,
.secondary-button:focus-visible,
.danger-button:hover,
.danger-button:focus-visible,
.ghost-button:hover,
.ghost-button:focus-visible,
.link-button:hover,
.link-button:focus-visible {
  transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled,
.danger-button:disabled,
.ghost-button:disabled,
.link-button:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none;
  box-shadow: none;
}

.section-list {
  display: grid;
  gap: 10px;
}

.section-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfe;
}

.section-card.is-recommended {
  border-color: rgba(8, 114, 79, 0.35);
  background: #eef9f4;
}

.section-card.is-full {
  background: var(--red-050);
}

.section-card-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.capacity-bar {
  height: 9px;
  margin: 12px 0 8px;
  border-radius: 99px;
  background: #dfe6ec;
  overflow: hidden;
}

.capacity-bar i {
  display: block;
  width: var(--fill);
  height: 100%;
  background: var(--green-800);
}

.section-card.is-full .capacity-bar i {
  background: var(--red);
}

.section-card small,
.form-status {
  color: var(--muted);
  line-height: 1.45;
}

.form-status.success {
  color: var(--green-800);
}

.form-status.error {
  color: var(--red);
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.student-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.student-shortcuts button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--green-900);
  font-weight: 800;
  padding: 7px 10px;
}

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

.detail-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfd;
}

.detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.detail-grid strong {
  display: block;
  margin-top: 5px;
}

.action-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 13px 15px;
  border: 1px solid rgba(8, 114, 79, 0.24);
  border-radius: var(--radius);
  background: #effaf5;
  color: var(--green-950);
  box-shadow: var(--shadow-soft);
}

.action-notice strong {
  white-space: nowrap;
}

.action-notice span {
  color: var(--muted);
  font-weight: 700;
}

.action-notice.warning {
  border-color: #f1c58a;
  background: #fff8eb;
  color: #7a4c00;
}

.action-notice.warning span {
  color: #6d5a35;
}

.action-notice.error {
  border-color: rgba(194, 51, 59, 0.32);
  background: #fff5f5;
  color: #8f1d1d;
}

.action-notice.error span {
  color: #7f3434;
}

.student-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.student-identity h2 {
  margin: 3px 0;
  color: var(--green-950);
}

.student-identity p {
  margin: 0;
  color: var(--muted);
}

.student-photo {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(8, 114, 79, 0.22);
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #f4fbf8, #ffffff);
  color: var(--green-900);
  font-weight: 950;
  font-size: 1.25rem;
}

.student-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-upload {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--green-900);
  border-radius: 7px;
  padding: 0 12px;
  color: var(--green-900);
  background: #ffffff;
  cursor: pointer;
}

.photo-upload input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.my-profile-shell {
  width: min(940px, 100%);
  display: grid;
  gap: 18px;
}

.my-profile-hero,
.my-profile-editor {
  display: grid;
  gap: 16px;
}

.my-profile-hero-main,
.profile-photo-edit {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.my-profile-avatar,
.profile-photo-preview {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.my-profile-avatar {
  width: 96px;
  height: 96px;
  font-size: 1.8rem;
}

.profile-photo-preview {
  width: 72px;
  height: 72px;
  font-size: 1.35rem;
}

.my-profile-avatar img,
.profile-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.my-profile-hero-main h2 {
  margin: 3px 0;
  color: var(--green-950);
  overflow-wrap: anywhere;
}

.my-profile-hero-main p,
.my-profile-hero-main small,
.my-profile-bio,
.profile-bio-box,
.profile-bio-line {
  color: var(--muted);
}

.my-profile-bio,
.profile-bio-box {
  margin: 0;
  padding: 13px 14px;
  border: 1px solid rgba(8, 114, 79, 0.18);
  border-radius: 8px;
  background: #f4fbf8;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.profile-bio-line {
  display: block;
  margin-top: 5px !important;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.profile-photo-edit {
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.profile-photo-upload {
  min-width: 150px;
}

.my-profile-form {
  display: grid;
  gap: 16px;
}

.my-profile-form .wide-label {
  grid-column: 1 / -1;
  margin: 0;
}

.profile-form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.profile-form-actions .form-status {
  margin: 0;
  min-width: min(340px, 100%);
}

.student-record {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.student-workbench {
  display: grid;
  grid-template-columns: minmax(360px, 0.58fr) minmax(0, 1.42fr);
  gap: 20px;
  align-items: start;
}

.student-console {
  grid-template-columns: minmax(380px, 0.55fr) minmax(0, 1.45fr);
}

.student-search-panel {
  position: sticky;
  top: 16px;
  min-width: 0;
}

.student-search-panel .panel-title > strong {
  align-self: center;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 999px;
  background: #edf8f3;
  color: var(--green-950);
  font-size: 0.86rem;
}

.student-record-panel {
  min-width: 0;
}

.student-record-title {
  gap: 12px;
  align-items: center;
}

.student-record-title .ghost-button {
  white-space: nowrap;
}

.student-record-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7fbf9;
}

.student-record-tabs button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 14px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 950;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.student-record-tabs button:hover,
.student-record-tabs button:focus-visible,
.student-record-tabs button.is-active {
  border-color: rgba(7, 109, 74, 0.24);
  background: #ffffff;
  color: var(--green-950);
  box-shadow: 0 8px 18px rgba(8, 34, 57, 0.08);
}

.student-record-tab-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  animation: fadeUp 180ms ease both;
}

.student-focus-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.student-focus-summary div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfe;
}

.student-focus-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.student-focus-summary strong {
  color: var(--green-950);
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}

.student-attendance-by-class .data-row em {
  color: var(--green-950);
  font-weight: 950;
}

.student-list {
  display: grid;
  gap: 10px;
  max-height: min(660px, calc(100svh - 330px));
  overflow: auto;
  padding-right: 3px;
}

.student-list-card {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 11px;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.student-list-card:hover,
.student-list-card.is-active {
  border-color: rgba(7, 109, 74, 0.38);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.student-list-card.is-active {
  background: #effaf5;
}

.student-mini-photo {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: var(--green-800);
  color: #ffffff;
  font-weight: 950;
}

.student-mini-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.student-list-main,
.student-list-meta {
  display: grid;
  gap: 3px;
}

.student-list-main strong {
  color: var(--green-950);
}

.student-list-main small,
.student-list-main span,
.student-list-meta small {
  color: var(--muted);
  font-size: 0.8rem;
}

.student-list-meta {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  justify-items: start;
  align-items: center;
  gap: 6px 10px;
}

.student-open-label {
  grid-column: 2;
  color: var(--green-900);
  font-weight: 900;
  font-size: 0.82rem;
}

.record-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfd;
}

.record-nav span {
  color: var(--muted);
  font-weight: 850;
}

.access-panel {
  padding: 12px;
  border: 1px solid rgba(7, 109, 74, 0.2);
  border-radius: var(--radius);
  background: #f4fbf8;
}

.access-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.4;
  font-size: 0.86rem;
}

.student-profile-panel {
  display: grid;
  gap: 14px;
}

.student-profile-panel-head,
.student-profile-editor > summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.student-profile-panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.42;
}

.profile-edit-hint,
.summary-pencil {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(7, 109, 74, 0.18);
  border-radius: 999px;
  background: #eefaf5;
  color: var(--green-900);
  font-weight: 900;
}

.summary-pencil {
  min-width: 34px;
  width: 34px;
  padding: 0;
}

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

.student-profile-card {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f8fbfd;
  min-width: 0;
}

.student-profile-card span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.student-profile-card strong {
  color: var(--green-950);
  overflow-wrap: anywhere;
}

.student-profile-editor {
  border: 1px solid rgba(7, 109, 74, 0.18);
  border-radius: var(--radius);
  background: #fbfefd;
  overflow: hidden;
}

.student-profile-editor > summary {
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.student-profile-editor > summary::-webkit-details-marker {
  display: none;
}

.student-profile-editor > summary span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.student-profile-editor > summary small {
  color: var(--muted);
  line-height: 1.35;
}

.student-profile-editor[open] > summary {
  border-bottom: 1px solid var(--line);
}

.student-profile-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.student-profile-form .wide-label,
.student-profile-form .primary-btn {
  grid-column: 1 / -1;
}

.student-profile-form textarea {
  min-height: 82px;
  resize: vertical;
}

.student-access-panel {
  display: grid;
  gap: 12px;
}

.student-access-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.student-access-head > div {
  min-width: 0;
}

.student-access-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.student-access-summary > div,
.student-access-pass {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(7, 109, 74, 0.16);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.student-access-summary span,
.student-access-pass span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.student-access-summary strong,
.student-access-pass strong {
  color: var(--green-950);
  overflow-wrap: anywhere;
}

.student-access-pass {
  border-color: rgba(7, 109, 74, 0.3);
  background: #eefaf5;
}

.student-access-pass strong {
  width: fit-content;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(7, 109, 74, 0.16);
}

.student-access-pass small,
.student-access-warning {
  color: var(--muted);
}

.student-section-correction-panel details {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(7, 109, 74, 0.18);
  border-radius: var(--radius);
  background: #fbfefd;
}

.student-section-correction-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.student-section-correction-panel summary::-webkit-details-marker {
  display: none;
}

.student-section-correction-panel summary span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.student-section-correction-panel summary strong {
  color: var(--green-950);
}

.student-section-correction-panel summary small,
.form-note {
  color: var(--muted);
  line-height: 1.4;
}

.student-section-current {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.student-section-current > div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.student-section-current span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.student-section-current strong {
  color: var(--green-950);
}

.section-impact-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.section-impact-list span {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(7, 109, 74, 0.16);
  border-radius: var(--radius-sm);
  background: #f5fbf8;
}

.section-impact-list strong {
  color: var(--green-950);
  font-size: 0.9rem;
}

.section-impact-list small {
  color: var(--muted);
  font-weight: 750;
  line-height: 1.3;
}

.inline-access-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.inline-access-form .primary-button {
  grid-column: 1 / -1;
  width: fit-content;
  max-width: 100%;
  white-space: normal;
  line-height: 1.15;
}

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

.password-request-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.password-request-card div {
  display: grid;
  gap: 4px;
}

.password-request-card strong {
  color: var(--green-950);
}

.password-request-card span,
.password-request-card small {
  color: var(--muted);
  font-size: 0.84rem;
}

.teacher-form-card {
  padding: 0;
}

.teacher-quick-actions {
  grid-column: 1 / -1;
  order: -10;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: #ffffff;
  overflow: visible;
}

.teacher-quick-actions > div:first-child {
  display: grid;
  gap: 2px;
}

.teacher-quick-actions > div:first-child strong {
  color: var(--green-950);
  font-size: 1.02rem;
}

.compact-action-menu {
  position: relative;
}

.compact-action-menu summary {
  list-style: none;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid rgba(7, 109, 74, 0.32);
  border-radius: 999px;
  background: #ffffff;
  color: var(--green-950);
  font-weight: 900;
  cursor: pointer;
}

.compact-action-menu summary::-webkit-details-marker {
  display: none;
}

.compact-action-menu summary::after {
  content: "v";
  font-size: 0.78rem;
}

.compact-action-menu[open] summary::after {
  content: "^";
}

.compact-action-menu > div {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  width: min(260px, 80vw);
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.compact-action-menu > div .primary-button,
.compact-action-menu > div .ghost-button {
  width: 100%;
  justify-content: center;
}

body[data-teacher-tool=""] .teacher-editor-panel,
body[data-teacher-tool=""] .teacher-assignment-panel,
body[data-teacher-tool=""] .teacher-workbench > article.span-2,
body[data-teacher-tool="edit"] .teacher-assignment-panel,
body[data-teacher-tool="edit"] .teacher-workbench > article.span-2,
body[data-teacher-tool="assign"] .teacher-editor-panel,
body[data-teacher-tool="assign"] .teacher-workbench > article.span-2,
body[data-teacher-tool="load"] .teacher-editor-panel,
body[data-teacher-tool="load"] .teacher-assignment-panel {
  display: none;
}

body[data-teacher-tool="assign"] .action-notice {
  display: none;
}

.teacher-workbench {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(360px, 1fr);
  gap: 16px;
  align-items: start;
}

.teacher-console {
  grid-template-columns: minmax(340px, 0.72fr) minmax(0, 1.28fr);
}

.teacher-console .teacher-list-panel {
  position: sticky;
  top: 18px;
  max-height: calc(100svh - 150px);
}

.teacher-console-detail {
  grid-column: auto;
  min-height: min(680px, calc(100svh - 150px));
}

.teacher-console-detail:not(.is-active-tool) {
  display: none !important;
}

.teacher-console-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f6fbf8;
}

.teacher-console-tabs button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--green-900);
  background: transparent;
  font-size: 0.86rem;
  font-weight: 900;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.teacher-console-tabs button:hover,
.teacher-console-tabs button:focus-visible,
.teacher-console-tabs button.is-active {
  border-color: rgba(7, 109, 74, 0.24);
  background: #ffffff;
  transform: translateY(-1px);
}

.teacher-console-tabs button:disabled {
  color: #91a3b3;
  cursor: not-allowed;
  transform: none;
}

.teacher-assignment-panel,
.teacher-workbench .span-2 {
  grid-column: span 2;
}

.teacher-console .teacher-assignment-panel,
.teacher-console .teacher-load-panel,
.teacher-console .teacher-profile-panel,
.teacher-console .teacher-editor-panel {
  grid-column: auto;
}

.teacher-profile-panel {
  grid-column: auto;
}

.teacher-list {
  display: grid;
  gap: 10px;
  max-height: min(560px, calc(100svh - 330px));
  overflow: auto;
  padding-right: 3px;
}

.teacher-list-panel .panel-title p {
  display: none;
}

.teacher-card {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.teacher-card:hover,
.teacher-card.is-active {
  border-color: rgba(7, 109, 74, 0.38);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.teacher-card.is-active {
  background: #effaf5;
}

.teacher-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.teacher-avatar.has-image {
  background: #ffffff;
}

.teacher-profile-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.teacher-profile-heading > div {
  min-width: 0;
}

.teacher-profile-avatar {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
}

.teacher-main,
.teacher-status {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.teacher-main strong {
  color: var(--green-950);
}

.teacher-main small,
.teacher-main span,
.teacher-status small {
  color: var(--muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.teacher-status {
  justify-items: end;
}

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

.teacher-profile-grid div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfd;
}

.teacher-profile-grid span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.teacher-profile-grid strong {
  overflow-wrap: anywhere;
}

.teacher-access-box {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(7, 109, 74, 0.2);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f3fcf7, #f8fbfd);
}

.teacher-access-box div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.teacher-access-box span,
.teacher-access-log summary {
  color: var(--green-950);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.teacher-access-box strong,
.teacher-access-box small {
  overflow-wrap: anywhere;
}

.teacher-access-box small {
  color: var(--muted);
  font-weight: 700;
}

.teacher-access-log {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.teacher-access-log summary {
  cursor: pointer;
  list-style-position: inside;
}

.mini-log-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.mini-log-list div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.mini-log-list strong {
  color: var(--ink);
}

.teacher-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.teacher-action-menu {
  position: fixed;
  z-index: 110;
  width: 280px;
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.teacher-action-menu strong {
  color: var(--green-950);
}

.teacher-action-menu span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.teacher-action-menu button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fbfd;
  color: var(--green-900);
  font-weight: 900;
  text-align: left;
  padding: 8px 10px;
}

.assignment-batch-form {
  align-items: start;
}

.batch-section-picker,
.day-preference-picker {
  display: grid;
  gap: 10px;
}

.micro-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.micro-heading strong {
  color: var(--green-950);
}

.micro-heading span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.section-choice-grid,
.day-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  max-height: 188px;
  overflow: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfd;
}

.day-choice-grid {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  max-height: none;
}

.section-choice,
.day-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.section-choice:has(input:checked),
.section-choice.is-selected,
.day-choice:has(input:checked),
.day-choice.is-selected {
  border-color: rgba(7, 109, 74, 0.42);
  background: #effaf5;
  box-shadow: 0 6px 18px rgba(7, 109, 74, 0.08);
}

.section-choice input,
.day-choice input {
  width: 18px;
  height: 18px;
}

.section-choice span,
.day-choice span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.section-choice strong {
  color: var(--green-950);
}

.section-choice small {
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.compact-switch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfe;
}

.compact-data-list {
  max-height: min(420px, 52svh);
  overflow: auto;
  padding-right: 4px;
}

.connected-load-workbench {
  display: grid;
  gap: 10px;
}

.assignment-list-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(8, 34, 57, 0.06);
}

.assignment-list-toolbar label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--green-950);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.assignment-list-toolbar input,
.assignment-list-toolbar select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-transform: none;
}

.assignment-list-toolbar span {
  justify-self: end;
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--green-950);
  background: var(--green-050);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.connected-load-list {
  max-height: min(510px, calc(100svh - 330px));
  scroll-behavior: smooth;
}

.assignment-row.is-selected {
  border-color: rgba(7, 109, 74, 0.42);
  background: #f3fbf7;
  box-shadow: inset 4px 0 0 var(--green-800);
}

.assignment-row {
  align-items: center;
}

.assignment-row > div:first-child {
  gap: 2px;
}

.assignment-row[hidden] {
  display: none;
}

.assignment-row.is-inactive {
  background: #f7faf9;
  border-style: dashed;
  opacity: 0.82;
}

.assignment-row-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  min-width: min(560px, 50%);
}

.subject-row-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 210px;
}

.subject-data-list .data-row {
  align-items: center;
}

.subject-workbench {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(420px, 1fr);
  gap: 16px;
  align-items: start;
}

.subject-workbench .span-2,
.subject-load-panel {
  grid-column: span 2;
}

.compact-title {
  align-items: center;
}

.subject-picker-list,
.subject-load-list {
  display: grid;
  gap: 10px;
}

.subject-picker-list {
  max-height: min(430px, calc(100svh - 330px));
  overflow: auto;
  padding-right: 4px;
}

.subject-catalog-card {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.subject-catalog-card:hover,
.subject-catalog-card.is-active {
  border-color: rgba(7, 109, 74, 0.38);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.subject-catalog-card.is-active {
  background: #effaf5;
}

.subject-catalog-card > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.subject-catalog-card strong {
  color: var(--green-950);
}

.subject-catalog-card small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.subject-form {
  align-items: start;
}

.compact-level-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfe;
}

.compact-level-checks > strong {
  flex: 1 0 100%;
  color: var(--green-950);
}

.compact-level-checks .checkbox-line {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.subject-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.subject-editor-actions .primary-button,
.subject-editor-actions .ghost-button {
  width: auto;
  min-width: 180px;
}

.subject-load-list {
  max-height: min(470px, calc(100svh - 390px));
  overflow: auto;
  padding-right: 4px;
}

.subject-load-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 620px);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

.subject-load-row.is-inactive {
  border-style: dashed;
  opacity: 0.78;
}

.subject-load-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.subject-load-main strong {
  color: var(--green-950);
  overflow-wrap: anywhere;
}

.subject-load-main span {
  color: var(--muted);
  font-size: 0.9rem;
}

.subject-load-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.subject-load-controls .assignment-frequency-control,
.subject-load-controls .assignment-duration-control,
.subject-load-controls .status-pill,
.subject-load-controls .ghost-button {
  flex: 0 0 auto;
}

.assignment-duration-control {
  border-color: rgba(6, 86, 145, 0.18);
}

.subject-create-load {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.subject-create-load summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  color: var(--green-950);
  font-weight: 900;
  cursor: pointer;
}

.subject-create-load summary::-webkit-details-marker {
  display: none;
}

.subject-create-load summary::after {
  content: "+";
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.subject-create-load[open] summary::after {
  content: "-";
}

.subject-create-load form {
  padding: 0 14px 14px;
}

.assignment-frequency-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  max-width: 100%;
  margin-top: 0;
  padding: 4px 6px;
  border: 1px solid rgba(7, 109, 74, 0.16);
  border-radius: 8px;
  background: #ffffff;
}

.assignment-frequency-control > span {
  color: var(--green-950);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.assignment-frequency-control small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.assignment-frequency-control.is-disabled {
  opacity: 0.58;
}

.frequency-chip-row {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.frequency-chip-row button {
  min-width: 25px;
  min-height: 24px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}

.frequency-chip-row button:hover {
  background: var(--green-050);
}

.frequency-chip-row button.is-selected {
  color: #ffffff;
  background: var(--green-800);
}

.frequency-chip-row button:disabled {
  cursor: not-allowed;
}

.ghost-button.danger-lite,
.ghost-button.danger {
  border-color: #f1b8b8;
  color: #9a1f1f;
  background: #fff8f8;
}

.section-workbench {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(420px, 1.28fr);
  gap: 16px;
  align-items: start;
}

.section-workbench.has-editor .section-editor-panel {
  grid-column: 1 / -1;
}

.section-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.section-form-card {
  padding: 0;
}

.section-list-panel .section-list {
  max-height: min(580px, calc(100svh - 330px));
  overflow: auto;
  padding-right: 3px;
}

.section-card {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 94px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfe;
  color: var(--ink);
  text-align: left;
  cursor: context-menu;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background-color 160ms ease;
}

button.section-card {
  font: inherit;
  cursor: pointer;
}

.section-card:hover,
.section-card.is-active {
  border-color: rgba(7, 109, 74, 0.38);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.section-card.is-active {
  background: #effaf5;
}

.section-color-dot {
  width: 14px;
  height: 46px;
  border-radius: 99px;
  background: var(--section-color, var(--green-800));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.section-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.section-main > span:not(.section-card-header):not(.capacity-bar) {
  color: var(--muted);
  font-size: 0.82rem;
}

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

.section-profile-grid div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfd;
}

.section-profile-grid span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.section-notes {
  margin: 12px 0 0;
  padding: 11px 12px;
  border: 1px solid rgba(7, 109, 74, 0.18);
  border-radius: var(--radius);
  background: #f4fbf8;
  color: var(--muted);
  line-height: 1.45;
}

.section-readonly-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(7, 109, 74, 0.18);
  border-radius: var(--radius);
  background: #fbfefd;
  color: var(--muted);
  line-height: 1.35;
}

.section-readonly-note strong {
  flex: 0 0 auto;
  color: var(--green-950);
}

.section-readonly-note span {
  min-width: 0;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.section-setup-menu {
  margin-top: 14px;
  border: 1px solid rgba(7, 109, 74, 0.22);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f5fbf8, #ffffff);
  overflow: hidden;
}

.section-setup-menu > summary {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  cursor: pointer;
  color: var(--green-950);
  font-weight: 900;
  list-style: none;
}

.section-setup-menu > summary::-webkit-details-marker {
  display: none;
}

.section-setup-menu > summary::after {
  content: "+";
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(7, 109, 74, 0.25);
  border-radius: 999px;
  background: #ffffff;
  color: var(--green-800);
  font-size: 1.1rem;
}

.section-setup-menu[open] > summary::after {
  content: "-";
}

.section-setup-menu small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.section-setup-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(320px, 1fr);
  gap: 12px;
  padding: 0 14px 14px;
}

.section-setup-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 50, 71, 0.05);
}

.mini-panel-title {
  display: grid;
  gap: 3px;
}

.mini-panel-title strong {
  color: var(--green-950);
  font-size: 1rem;
}

.mini-panel-title span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.section-quick-assignment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.section-quick-assignment-grid label:nth-last-child(-n + 2) {
  grid-column: span 1;
}

.section-setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.section-connected-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.section-connected-list strong {
  color: var(--green-950);
}

.section-connected-list span {
  color: var(--muted);
  font-size: 0.88rem;
}

.section-connected-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfe;
}

.section-connected-row > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.section-connected-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 420px;
  min-width: min(100%, 280px);
}

.section-connected-actions .assignment-frequency-control,
.section-connected-actions .assignment-duration-control,
.section-connected-actions .ghost-button {
  flex: 0 0 auto;
}

.section-connected-row .status-pill {
  flex: 0 0 auto;
}

.section-action-menu {
  position: fixed;
  z-index: 110;
  width: 280px;
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.section-action-menu strong {
  color: var(--green-950);
}

.section-action-menu span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.section-action-menu button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fbfd;
  color: var(--green-900);
  font-weight: 900;
  text-align: left;
  padding: 8px 10px;
}

.database-panel {
  background: linear-gradient(135deg, #ffffff, #f4fbf8);
}

.database-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.database-grid div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.database-grid span,
.database-note span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.38;
}

.database-grid strong {
  color: var(--green-950);
  font-size: 1rem;
}

.database-note {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(7, 109, 74, 0.18);
  border-radius: var(--radius);
  background: #effaf5;
}

.database-note code {
  font-family: "Segoe UI Mono", Consolas, monospace;
  color: var(--green-950);
  font-weight: 850;
}

.grade-rules-panel {
  background: linear-gradient(135deg, #ffffff, #f6fbff);
}

.grade-rules-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.rule-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.rule-card span,
.rule-card small {
  color: var(--muted);
  line-height: 1.35;
}

.rule-card span {
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rule-card strong {
  color: var(--green-950);
  font-size: 1.05rem;
}

.settings-pill-group {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.settings-pill-group > strong {
  color: var(--green-950);
}

.settings-pill-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.database-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(8, 120, 216, 0.18);
  border-radius: var(--radius);
  background: var(--blue-050);
}

.database-actions span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.backup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.backup-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.backup-card strong,
.backup-card span {
  display: block;
}

.backup-card strong {
  color: var(--green-950);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.backup-card span {
  color: var(--muted);
  font-size: 0.78rem;
}

.student-record .student-identity {
  margin-bottom: 0;
  box-shadow: none;
}

.record-section {
  display: grid;
  gap: 10px;
}

.record-section h3 {
  margin: 0;
  color: var(--green-950);
  font-size: 1rem;
}

.record-assignment-list {
  gap: 8px;
}

.record-assignment-list .data-row.assignment-row,
.data-row.assignment-row.compact-assignment-row {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 0;
  padding: 10px 12px;
  gap: 10px;
}

.record-assignment-list .assignment-row-meta,
.compact-assignment-row .assignment-row-meta {
  justify-content: end;
  flex-wrap: wrap;
  gap: 6px;
}

.record-assignment-list .assignment-row-meta em,
.compact-assignment-row .assignment-row-meta em {
  font-size: 0.8rem;
  white-space: nowrap;
}

.student-class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.student-class-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.student-class-card:hover,
.student-class-card.is-selected {
  border-color: rgba(7, 109, 74, 0.36);
  background: #f2fbf6;
  box-shadow: 0 10px 22px rgba(8, 34, 57, 0.08);
}

.student-class-card.is-selected {
  box-shadow: inset 4px 0 0 var(--green-800), 0 10px 22px rgba(8, 34, 57, 0.08);
  transform: translateY(-1px);
}

.student-class-card > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.student-class-card strong {
  color: var(--green-950);
  overflow-wrap: anywhere;
}

.student-class-card span,
.student-class-card small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.25;
}

.class-card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e7f8ee;
  color: var(--green-950) !important;
  font-size: 0.76rem !important;
  font-weight: 950;
  white-space: nowrap;
}

.student-class-card:not(.is-selected) .class-card-action {
  background: #eef5fa;
  color: var(--muted) !important;
}

.teacher-class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.teacher-class-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.teacher-class-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "main action"
    "stats stats";
  gap: 10px 12px;
  align-items: start;
  width: 100%;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.teacher-class-card:hover,
.teacher-class-card.is-selected {
  border-color: rgba(7, 109, 74, 0.42);
  background: #f4fbf7;
  box-shadow: 0 12px 24px rgba(8, 34, 57, 0.08);
  transform: translateY(-1px);
}

.teacher-class-card.is-selected {
  box-shadow: inset 4px 0 0 var(--green-800), 0 12px 24px rgba(8, 34, 57, 0.08);
}

.teacher-class-main {
  grid-area: main;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.teacher-class-main strong {
  color: var(--green-950);
  font-size: 1.02rem;
  overflow-wrap: anywhere;
}

.teacher-class-main span,
.teacher-class-main small {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.28;
}

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

.teacher-class-stats span {
  display: grid;
  gap: 2px;
  min-height: 48px;
  padding: 8px;
  border: 1px solid rgba(207, 221, 232, 0.9);
  border-radius: 7px;
  background: #ffffff;
  text-align: center;
}

.teacher-class-stats strong {
  color: var(--green-950);
  font-size: 1.05rem;
  line-height: 1;
}

.teacher-class-stats small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.teacher-class-card em {
  grid-area: action;
  align-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e7f8ee;
  color: var(--green-950);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.teacher-class-card:not(.is-selected) em {
  background: #eef5fa;
  color: var(--muted);
}

.canvas-dashboard {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.canvas-dashboard-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff 0%, #f7fbf9 100%);
  box-shadow: var(--shadow-soft);
}

.canvas-dashboard-head h2 {
  margin: 0;
  color: var(--green-950);
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.1;
}

.canvas-dashboard-head p {
  max-width: 760px;
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.35;
}

.canvas-dashboard-head > strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 999px;
  background: #e7f8ee;
  color: var(--green-950);
  font-size: 0.85rem;
  white-space: nowrap;
}

.course-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  min-width: 0;
}

.course-tile {
  display: grid;
  grid-template-rows: 86px minmax(128px, auto);
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(8, 34, 57, 0.12);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(8, 34, 57, 0.08);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.course-tile:hover,
.course-tile.is-selected {
  border-color: rgba(7, 109, 74, 0.42);
  box-shadow: 0 16px 34px rgba(8, 34, 57, 0.12);
  transform: translateY(-2px);
}

.course-tile.is-selected {
  outline: 3px solid rgba(7, 109, 74, 0.16);
}

.course-tile-band {
  display: flex;
  align-items: start;
  justify-content: flex-start;
  padding: 14px;
  background: var(--course-bg, #e7f8ee);
  color: var(--course-fg, var(--green-950));
}

.course-tile-band em {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--green-950);
  font-style: normal;
  font-weight: 950;
  box-shadow: 0 6px 14px rgba(8, 34, 57, 0.12);
}

.course-tile-body {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 16px;
}

.course-tile-body strong {
  color: var(--green-950);
  font-size: 1.2rem;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.course-tile-body small,
.course-tile-body span {
  color: var(--muted);
  line-height: 1.3;
}

.course-tile-body small {
  font-size: 0.92rem;
  font-weight: 800;
}

.course-tile-body span {
  font-size: 0.84rem;
}

.course-dashboard-hint {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border: 1px dashed rgba(7, 109, 74, 0.28);
  border-radius: var(--radius);
  background: #f8fcfa;
  color: var(--muted);
}

.course-dashboard-hint strong {
  color: var(--green-950);
}

.course-workspace {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(7, 109, 74, 0.22);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.course-workspace-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.course-workspace-head h2 {
  margin: 0;
  color: var(--green-950);
  font-size: clamp(1.45rem, 2vw, 2.25rem);
  line-height: 1.08;
}

.course-workspace-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

.course-workspace-score {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.course-workspace-score strong {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #e7f8ee;
  color: var(--green-950);
}

.course-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.course-action-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.course-action-card:hover {
  border-color: rgba(7, 109, 74, 0.4);
  background: #f2fbf6;
  transform: translateY(-1px);
}

.course-action-card strong {
  color: var(--green-950);
  font-size: 1rem;
}

.course-action-card span {
  color: var(--muted);
  line-height: 1.3;
  font-size: 0.85rem;
}

.course-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 16px;
  min-width: 0;
}

.course-preview-grid > section {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.course-preview-grid h3 {
  margin: 0 0 12px;
  color: var(--green-950);
}

.course-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.course-mini-stats span {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-align: center;
}

.course-mini-stats strong {
  color: var(--green-950);
  font-size: 1.5rem;
}

.course-mini-stats small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.course-mini-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.course-mini-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.course-mini-list strong {
  color: var(--green-950);
  overflow-wrap: anywhere;
}

.course-mini-list span {
  color: var(--muted);
  font-size: 0.82rem;
}

.course-mini-list em {
  grid-row: span 2;
  align-self: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: #e7f8ee;
  color: var(--green-950);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.admin-function-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.admin-function-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid rgba(7, 109, 74, 0.16);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.admin-function-card:hover {
  border-color: rgba(7, 109, 74, 0.42);
  box-shadow: 0 16px 34px rgba(8, 34, 57, 0.1);
  transform: translateY(-2px);
}

.admin-function-card span {
  color: var(--green-800);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-function-card strong {
  color: var(--green-950);
  font-size: 1.25rem;
  line-height: 1.15;
}

.admin-function-card small {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.admin-dashboard-lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.85fr);
  gap: 16px;
  min-width: 0;
}

.teacher-schedule-panel {
  display: grid;
  gap: 14px;
}

.teacher-schedule-panel.embedded {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfd;
}

.teacher-schedule-map {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.teacher-schedule-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.teacher-schedule-hint span {
  padding: 5px 8px;
  border: 1px solid rgba(7, 109, 74, 0.14);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.teacher-schedule-wrap {
  max-height: min(620px, calc(100svh - 250px));
  overflow: auto;
}

.teacher-schedule-table {
  width: 100%;
  min-width: 820px;
  table-layout: fixed;
}

.teacher-schedule-table th:first-child,
.teacher-schedule-table td:first-child {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
  white-space: nowrap;
  font-size: 0.86rem;
  line-height: 1.1;
}

.teacher-schedule-slot {
  min-width: 142px;
  height: auto;
  vertical-align: top;
  padding: 6px;
}

.teacher-schedule-slot.has-conflict {
  box-shadow: inset 0 0 0 2px rgba(209, 47, 47, 0.28);
  background: #fff6f5;
}

.teacher-schedule-slot.has-conflict::before {
  content: "Choque docente";
  display: block;
  margin-bottom: 4px;
  color: var(--red);
  font-size: 0.62rem;
  font-weight: 950;
  text-transform: uppercase;
}

.teacher-schedule-slot .teacher-schedule-block + .teacher-schedule-block {
  margin-top: 5px;
}

.teacher-schedule-block {
  cursor: default;
  min-height: 92px;
  align-content: center;
  gap: 3px;
  padding: 7px 6px;
  overflow: hidden;
}

.teacher-schedule-block strong,
.teacher-schedule-block span {
  overflow-wrap: anywhere;
  line-height: 1.12;
}

.teacher-schedule-block strong {
  font-size: 0.84rem;
}

.teacher-schedule-block span {
  font-size: 0.74rem;
}

.teacher-schedule-block .status-pill {
  max-width: 100%;
  min-height: 28px;
  padding: 4px 8px;
  white-space: normal;
  line-height: 1.05;
}

.teacher-schedule-block:hover {
  transform: none;
  box-shadow: none;
}

.teacher-schedule-block small {
  display: none;
}

.role-schedule-grid .teacher-schedule-panel {
  grid-column: span 2;
}

.student-weekly-schedule-panel {
  min-width: 0;
}

.student-schedule-wrap {
  max-height: min(680px, calc(100svh - 280px));
  overflow: auto;
}

.student-schedule-table {
  width: 100%;
  min-width: 820px;
  table-layout: fixed;
}

.student-schedule-table th:first-child,
.student-schedule-table td:first-child {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
  white-space: nowrap;
  font-size: 0.86rem;
  line-height: 1.1;
}

.student-schedule-table .schedule-slot {
  height: 118px;
  vertical-align: top;
  padding: 6px;
}

.student-schedule-table .schedule-block {
  min-height: 94px;
  align-content: center;
  padding: 7px 6px;
  overflow: hidden;
}

.student-schedule-table .schedule-block strong {
  font-size: 0.84rem;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.student-schedule-table .schedule-block span {
  font-size: 0.74rem;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.student-schedule-table .schedule-block .status-pill {
  max-width: 100%;
  min-height: 28px;
  padding: 4px 8px;
  white-space: normal;
  line-height: 1.05;
}

.teacher-schedule-wrap.compact .teacher-schedule-table th,
.teacher-schedule-wrap.compact .teacher-schedule-table td {
  padding: 4px;
}

.teacher-schedule-wrap.compact .teacher-schedule-table th:first-child,
.teacher-schedule-wrap.compact .teacher-schedule-table td:first-child {
  width: 104px;
  min-width: 104px;
  max-width: 104px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.teacher-schedule-wrap.compact .teacher-schedule-slot {
  min-width: 118px;
}

.teacher-schedule-wrap.compact .teacher-schedule-block {
  min-height: 58px;
  padding: 6px;
}

.teacher-schedule-wrap.compact .teacher-schedule-block strong {
  font-size: 0.78rem;
}

.teacher-schedule-wrap.compact .teacher-schedule-block span,
.teacher-schedule-wrap.compact .teacher-schedule-block .status-pill {
  font-size: 0.62rem;
}

.teacher-schedule-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.teacher-day-column {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
}

.teacher-day-column h3 {
  margin: 0;
  color: var(--green-950);
  font-size: 0.95rem;
}

.teacher-shift-entry {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--schedule-border, var(--line));
  border-radius: 8px;
  background: var(--schedule-bg, #ffffff);
  color: var(--schedule-fg, var(--ink));
}

.teacher-shift-time {
  color: inherit;
  font-size: 0.82rem;
  line-height: 1.18;
}

.teacher-shift-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.teacher-shift-main strong {
  color: inherit;
  overflow-wrap: anywhere;
}

.teacher-shift-main span,
.teacher-shift-main small {
  color: inherit;
  opacity: 0.82;
  line-height: 1.22;
}

.teacher-shift-main small {
  font-size: 0.74rem;
}

.teacher-shift-empty {
  min-height: 56px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 850;
  background: #ffffff;
}

.class-context-panel {
  display: grid;
  gap: 14px;
}

.class-context-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.class-context-head h2 {
  margin: 0;
  color: var(--green-950);
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
}

.class-context-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.class-context-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.class-context-metrics div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.class-context-metrics span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.class-context-metrics strong {
  color: var(--green-950);
  font-size: 1.5rem;
  line-height: 1;
}

.class-picker-disclosure {
  border: 1px solid rgba(7, 109, 74, 0.16);
  border-radius: 8px;
  background: #f7fcf9;
}

.class-picker-disclosure summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--green-950);
  font-weight: 950;
}

.class-picker-disclosure[open] {
  padding-bottom: 12px;
}

.class-picker-disclosure[open] .teacher-class-grid {
  padding: 0 12px;
}

.student-class-detail-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.component-chart-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(7, 109, 74, 0.16);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, #f5fbf8);
}

.component-chart-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.component-chart-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.component-chart-head strong,
.component-chart-head em {
  color: var(--green-950);
  font-weight: 950;
}

.component-chart-head span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.component-chart-head em {
  font-style: normal;
  font-size: 1.4rem;
  white-space: nowrap;
}

.component-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.component-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.component-chart-legend i {
  width: 18px;
  height: 8px;
  border-radius: 999px;
}

.legend-grade {
  background: linear-gradient(90deg, var(--green-800), #147bd1);
}

.legend-pending {
  background: repeating-linear-gradient(45deg, #dfe7ee 0 5px, #f7fbfd 5px 10px);
  border: 1px solid #ccd8e3;
}

.component-chart-list {
  display: grid;
  gap: 9px;
}

.component-chart-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(160px, 1.1fr) minmax(72px, auto);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.component-chart-row.has-pending {
  border-color: rgba(176, 117, 0, 0.28);
  background: #fffdf7;
}

.component-chart-row.is-empty .component-chart-bar {
  background: repeating-linear-gradient(45deg, #dfe7ee 0 7px, #f8fbfd 7px 14px);
}

.component-chart-row.is-empty .component-chart-bar i {
  opacity: 0.55;
}

.component-chart-label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.component-chart-label strong {
  color: var(--green-950);
  overflow-wrap: anywhere;
}

.component-chart-label span,
.component-chart-value small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.28;
}

.component-chart-bar {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe7ee;
}

.component-chart-bar i {
  display: block;
  width: var(--fill);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-800), #147bd1);
}

.component-chart-value {
  display: grid;
  justify-items: end;
  gap: 2px;
  color: var(--green-950);
}

.component-chart-value strong {
  font-size: 1rem;
}

.component-chart-foot {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.class-evaluation-disclosure {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfe;
  overflow: hidden;
}

.class-evaluation-disclosure summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--green-950);
  font-weight: 950;
  cursor: pointer;
}

.class-evaluation-disclosure .grade-breakdown-list {
  padding: 10px;
}

.compact-detail {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.stat-tile {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfe;
}

.stat-tile span,
.stat-tile small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.stat-tile strong {
  color: var(--green-950);
  font-size: 1.05rem;
}

.stat-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe7ee;
}

.stat-bar i {
  display: block;
  width: var(--fill);
  height: 100%;
  background: linear-gradient(90deg, var(--green-800), #147bd1);
}

.progress-strip {
  height: 118px;
  display: flex;
  align-items: end;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f5f9fc);
}

.progress-point {
  flex: 1;
  height: 90px;
  display: grid;
  align-items: end;
  gap: 4px;
  text-align: center;
}

.progress-point span {
  display: block;
  min-height: 4px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #147bd1, var(--green-800));
}

.progress-point small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.component-breakdown-grid {
  display: grid;
  gap: 10px;
}

.student-grade-overview {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.student-rubric-menu {
  display: grid;
  gap: 12px;
}

.student-rubric-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, #f8fbff);
}

.student-rubric-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.student-rubric-head strong,
.student-rubric-head em {
  color: var(--green-950);
  font-weight: 950;
}

.student-rubric-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
}

.student-rubric-head em {
  font-style: normal;
  font-size: 1.18rem;
  white-space: nowrap;
}

.student-grade-group-card {
  padding: 0;
  overflow: hidden;
}

.student-grade-group-trigger {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.student-grade-group-trigger:hover,
.student-grade-group-trigger:focus-visible,
.student-grade-group-card.is-open .student-grade-group-trigger {
  background: #f2fbf6;
}

.student-grade-group-trigger > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.student-grade-group-trigger strong,
.student-grade-group-trigger em {
  color: var(--green-950);
  font-weight: 950;
}

.student-grade-group-trigger span,
.student-grade-group-trigger small {
  color: var(--muted);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.student-grade-group-trigger em {
  font-style: normal;
  font-size: 1.12rem;
  white-space: nowrap;
}

.student-grade-chevron {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid rgba(7, 109, 74, 0.18);
  border-radius: 999px;
  background: #ffffff;
  color: var(--green-900);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.student-grade-group-rubrics {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
  animation: softReveal 180ms ease both;
}

.student-grade-group-rubrics p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.student-rubric-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.student-rubric-button {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 92px;
  padding: 12px;
  border: 1px solid rgba(7, 109, 74, 0.16);
  border-radius: 8px;
  background: #fffbf3;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background-color 160ms ease;
}

.student-rubric-button:hover,
.student-rubric-button:focus-visible,
.student-rubric-button.is-selected {
  border-color: rgba(7, 109, 74, 0.42);
  background: #f2fbf6;
  box-shadow: 0 10px 22px rgba(8, 34, 57, 0.08);
  transform: translateY(-1px);
}

.student-rubric-button strong {
  color: var(--green-950);
  overflow-wrap: anywhere;
}

.student-rubric-button span {
  color: var(--green-950);
  font-size: 1.05rem;
  font-weight: 950;
}

.student-rubric-button small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.28;
  font-weight: 850;
}

.rubric-detail-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding-right: 48px;
}

.rubric-detail-title h3,
.rubric-detail-title p {
  margin: 0;
}

.rubric-detail-title p {
  color: var(--muted);
  font-size: 0.9rem;
}

.rubric-item-list,
.rubric-attendance-list {
  margin-top: 2px;
}

.rubric-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 24px;
  background: rgba(3, 25, 38, 0.34);
}

.rubric-modal {
  width: min(720px, calc(100vw - 48px));
  min-width: 0;
  max-height: min(720px, calc(100svh - 48px));
  position: relative;
  display: grid;
  gap: 14px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 18px;
  border: 1px solid rgba(7, 109, 74, 0.22);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 26px 70px rgba(8, 34, 57, 0.28);
  animation: modalRise 180ms ease both;
}

.rubric-modal-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.rubric-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #ffffff;
  font-size: 1.25rem;
  line-height: 1;
}

.rubric-modal-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.panel:has(.rubric-modal-backdrop),
.student-record-panel:has(.rubric-modal-backdrop),
.admin-grade-detail-panel:has(.rubric-modal-backdrop) {
  overflow: visible;
}

.rubric-modal .data-row,
.rubric-modal .grade-breakdown-row {
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.rubric-modal .grade-breakdown-row {
  grid-template-columns: minmax(0, 1fr) minmax(118px, 150px);
  align-items: start;
}

.rubric-modal .grade-breakdown-row > div {
  min-width: 0;
}

.rubric-modal .grade-breakdown-row strong,
.rubric-modal .grade-breakdown-row span,
.rubric-modal .grade-breakdown-row small {
  overflow-wrap: anywhere;
}

.rubric-modal .grade-breakdown-row em {
  min-width: 0;
  max-width: 150px;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: right;
}

@media (max-width: 720px) {
  .rubric-modal-backdrop {
    padding: 12px;
  }

  .rubric-modal {
    width: calc(100vw - 24px);
    max-height: calc(100svh - 24px);
  }

  .rubric-modal-head,
  .rubric-modal .grade-breakdown-row {
    grid-template-columns: 1fr;
  }

  .rubric-modal-close,
  .rubric-modal .grade-breakdown-row em {
    justify-self: start;
    text-align: left;
  }

  .rubric-modal-close {
    justify-self: end;
  }
}

@keyframes modalRise {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes softReveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.component-summary-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, #f8fbff);
}

.component-summary-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.component-summary-head strong,
.component-summary-head em {
  color: var(--green-950);
  font-weight: 950;
}

.component-summary-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.component-summary-head em {
  font-style: normal;
  font-size: 1.15rem;
  white-space: nowrap;
}

.component-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.component-pill-list > span {
  min-width: min(220px, 100%);
  flex: 1 1 190px;
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid rgba(7, 109, 74, 0.16);
  border-radius: 8px;
  background: #f5fbf8;
  color: var(--green-950);
  font-weight: 850;
}

.component-pill-list > span.has-pending {
  background: #fffaf0;
  border-color: rgba(214, 163, 43, 0.34);
}

.component-pill-list strong {
  color: var(--ink);
}

.component-pill-list small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.28;
}

.student-grade-insight {
  scroll-margin-top: 16px;
}

.student-grade-focus {
  display: grid;
  gap: 12px;
}

.stacked-row {
  align-items: start;
}

.stacked-row small,
.saved-hint {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.field-help {
  display: block;
  margin-top: 7px;
  color: #4f6680;
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.35;
}

.score-form {
  display: inline-grid;
  gap: 6px;
}

.gradebook-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.gradebook-score-panel,
.gradebook-evaluations-panel,
.student-grade-insight {
  min-width: 0;
  scroll-margin-top: 18px;
}

.gradebook-flow > .span-2 {
  grid-column: auto;
}

.gradebook-score-panel .table-wrap {
  border-radius: var(--radius);
}

.back-button {
  width: fit-content;
}

.student-inline-link {
  padding: 0;
  text-align: left;
  color: var(--green-900);
  font-weight: 900;
}

.quick-score-row {
  display: flex;
  gap: 5px;
  margin-top: 6px;
}

.quick-score-row button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7fafc;
  color: var(--green-900);
  font-size: 0.74rem;
  font-weight: 900;
  padding: 3px 8px;
}

.gradebook-guide,
.grade-create-disclosure {
  border-color: rgba(20, 123, 209, 0.22);
  background: linear-gradient(135deg, #ffffff, #f3f9ff);
}

.grade-create-disclosure {
  border-color: rgba(0, 100, 65, 0.18);
  background: linear-gradient(135deg, #f8fffb, #ffffff);
}

.gradebook-guide > summary,
.grade-create-disclosure > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 14px;
  align-items: center;
  list-style: none;
  cursor: pointer;
}

.gradebook-guide > summary::-webkit-details-marker,
.grade-create-disclosure > summary::-webkit-details-marker {
  display: none;
}

.gradebook-guide > summary::after,
.grade-create-disclosure > summary::after {
  content: "Abrir";
  grid-row: 1 / span 3;
  align-self: center;
  padding: 8px 14px;
  border: 1px solid rgba(0, 100, 65, 0.22);
  border-radius: 999px;
  background: #ffffff;
  color: var(--green-950);
  font-size: 0.82rem;
  font-weight: 900;
}

.gradebook-guide[open] > summary::after,
.grade-create-disclosure[open] > summary::after {
  content: "Cerrar";
}

.gradebook-guide > summary strong,
.grade-create-disclosure > summary strong {
  color: var(--green-950);
  font-size: clamp(1.18rem, 2vw, 1.5rem);
  line-height: 1.1;
}

.gradebook-guide > summary em,
.grade-create-disclosure > summary em {
  grid-column: 1;
  color: var(--muted);
  font-style: normal;
  font-size: 0.94rem;
  line-height: 1.35;
}

.gradebook-guide-body {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
  gap: 16px;
  align-items: start;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(20, 123, 209, 0.18);
}

.grade-create-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 100, 65, 0.14);
}

.gradebook-guide p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.guide-steps span {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: #2f4662;
  font-size: 0.82rem;
  line-height: 1.3;
}

.guide-steps strong {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-800);
  color: #ffffff;
}

.admin-grades-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.45fr);
  gap: 16px;
  align-items: start;
}

.admin-grade-list-panel .student-list {
  max-height: min(64vh, 720px);
  overflow: auto;
}

.admin-grade-detail-panel {
  min-width: 0;
}

.admin-grade-review {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.grade-review-controls {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1.1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfd;
}

.grade-review-controls label {
  min-width: 0;
}

.subject-grade-summary {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: 12px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid rgba(7, 109, 74, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f4fbf8, #ffffff);
}

.subject-grade-summary > div:first-child {
  display: grid;
  gap: 3px;
  align-content: center;
}

.subject-grade-summary span,
.subject-grade-summary small {
  color: var(--muted);
  font-weight: 800;
}

.subject-grade-summary strong {
  color: var(--green-950);
  font-size: 1.18rem;
}

.grade-summary-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.grade-summary-tile {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.grade-summary-tile strong {
  font-size: 1.25rem;
}

.report-disclosure {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  overflow: hidden;
}

.report-disclosure summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: var(--green-950);
  font-weight: 950;
  cursor: pointer;
}

.report-disclosure > .compact-student-report {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.grade-item-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.grade-item-card.is-selected {
  border-color: rgba(0, 100, 65, 0.34);
  background: #eefaf4;
  box-shadow: inset 4px 0 0 var(--green-800);
}

.grade-item-main-button {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.grade-item-main-button strong {
  color: var(--green-950);
  font-size: 1.02rem;
}

.grade-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: end;
}

.grade-item-detail {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.grade-item-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(0, 100, 65, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f7fffb, #ffffff);
}

.grade-item-summary > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.grade-item-summary span,
.grade-impact-grid span,
.score-impact span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.grade-item-summary strong,
.grade-impact-grid strong,
.score-impact strong {
  color: var(--green-950);
}

.grade-item-summary strong,
.grade-item-summary small {
  overflow-wrap: anywhere;
}

.grade-impact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.grade-impact-grid > div,
.score-impact {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbff;
}

.inline-details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  overflow: hidden;
}

.inline-details summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--green-950);
  font-weight: 900;
}

.grade-item-edit-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  list-style: none;
}

.grade-item-edit-disclosure > summary::-webkit-details-marker {
  display: none;
}

.grade-item-edit-disclosure > summary::after {
  content: "Abrir";
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid rgba(0, 100, 65, 0.22);
  border-radius: 999px;
  background: #e8f8ef;
  color: var(--green-950);
  font-size: 0.82rem;
  font-weight: 900;
}

.grade-item-edit-disclosure[open] > summary::after {
  content: "Cerrar";
  background: #ffffff;
}

.grade-item-edit-form {
  padding: 14px;
  border-top: 1px solid var(--line);
}

.score-impact {
  min-width: 150px;
}

.score-impact small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
}

.grade-breakdown-row {
  grid-template-columns: minmax(0, 1fr) minmax(130px, auto);
}

.student-report-panel {
  display: grid;
  gap: 14px;
}

.compact-student-report {
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.report-action-title {
  align-items: start;
}

.report-student-picker {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbff;
}

.student-report-sheet {
  display: none;
}

.student-report-print-stage {
  display: none;
}

body[data-print-mode="student-report"] .student-report-print-stage {
  display: block;
  position: fixed;
  top: 0;
  left: -10000px;
  width: 216mm;
  max-width: 216mm;
  pointer-events: none;
  opacity: 0;
}

.report-mobile-cards,
.mobile-schedule-list {
  display: none;
}

.official-report-table {
  width: 100%;
  border-collapse: collapse;
}

.official-report-table th,
.official-report-table td {
  border: 1px solid #1f2933;
  padding: 4px 5px;
  color: #111827;
  font-size: 9pt;
  text-align: left;
  vertical-align: middle;
}

.official-report-table th {
  background: #f1f5f9;
  font-weight: 900;
}

.rubric-mini {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.rubric-mini li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 8px;
  border-radius: 6px;
  background: #f3f7fb;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.control-stack {
  display: grid;
  gap: 12px;
}

.announcement-layout .announcement-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.announcement-layout .announcement-item::before {
  display: none;
}

.announcement-layout .announcement-item h3,
.announcement-layout .announcement-item p {
  grid-column: 1;
}

.announcement-layout .announcement-meta span {
  grid-column: auto;
}

.announcement-layout .announcement-meta {
  display: flex;
  grid-column: 1 / -1;
}

.announcement-layout .announcement-meta span:nth-child(1),
.announcement-layout .announcement-meta span:nth-child(2) {
  display: inline-flex;
}

@media (max-width: 1240px) {
  .dashboard-grid,
  .student-workbench,
  .teacher-workbench,
  .schedule-focus-grid,
  .section-workbench,
  .split-layout,
  .admin-layout,
  .admin-grades-layout,
  .announcement-layout,
  .portal-layout {
    grid-template-columns: 1fr;
  }

  .teacher-profile-panel,
  .teacher-assignment-panel,
  .teacher-workbench .span-2,
  .dashboard-grid > .span-2,
  .section-detail-panel {
    grid-column: auto;
  }

  .manual-focus-workspace .schedule-focus-grid {
    grid-template-columns: 1fr;
  }

  .manual-focus-workspace .focus-side-panel,
  .manual-focus-workspace .focus-map-panel {
    min-height: 0;
    max-height: none;
  }

  .manual-focus-workspace .assignment-drag-list.focus {
    max-height: 320px;
  }

  .manual-focus-workspace .manual-compact-toolbar {
    grid-template-columns: 1fr;
  }

  .manual-focus-workspace .manual-compact-toolbar .focus-toolbar-actions {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .manual-focus-workspace .manual-section-picker,
  .manual-focus-workspace .manual-section-picker select {
    width: 100%;
  }

  .schedule-outcome-bubble {
    grid-template-columns: 1fr;
  }

  .outcome-section-list {
    justify-content: flex-start;
  }

  .student-search-panel {
    position: static;
  }
}

@media (max-width: 1350px) {
  .dashboard-grid .capacity-row {
    grid-template-columns: 48px minmax(96px, 1fr) 44px;
    gap: 14px;
  }

  .dashboard-grid .capacity-row.header {
    font-size: 0.68rem;
  }

  .dashboard-grid .capacity-row.header span:nth-child(4),
  .dashboard-grid .capacity-row .status-pill,
  .dashboard-grid .panel-title.tight p {
    display: none;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, var(--sidebar-width));
    transform: translateX(-100%);
    transition: transform 220ms ease;
    z-index: 40;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .institution-header {
    display: grid;
  }

  .top-tabs {
    overflow-x: auto;
  }
}

@media (max-width: 760px) {
  .institution-header,
  main {
    padding-inline: 14px;
  }

  .student-focus-summary {
    grid-template-columns: 1fr;
  }

  .student-record-title {
    align-items: stretch;
  }

  .student-record-title .ghost-button {
    width: 100%;
  }

  .header-tools,
  .date-widget {
    display: none;
  }

  .institution-title img {
    width: 56px;
    height: 56px;
  }

  .enrollment-body,
  .form-grid,
  .control-cards,
  .detail-grid,
  .teacher-profile-grid,
  .student-stats,
  .gradebook-guide,
  .gradebook-guide-body,
  .guide-steps,
  .inline-access-form,
  .database-grid,
  .schedule-editor-grid,
  .password-request-grid,
  .backup-grid,
  .document-upload-grid,
  .document-checklist,
  .search-row {
    grid-template-columns: 1fr;
  }

  .gradebook-guide > summary,
  .grade-create-disclosure > summary {
    grid-template-columns: 1fr;
  }

  .gradebook-guide > summary::after,
  .grade-create-disclosure > summary::after {
    grid-row: auto;
    grid-column: 1;
    justify-self: start;
  }

  .gradebook-guide-body {
    gap: 12px;
  }

  .assignment-list-toolbar {
    position: static;
    grid-template-columns: 1fr;
  }

  .assignment-list-toolbar span {
    justify-self: start;
  }

  .assignment-row {
    align-items: start;
  }

  .data-row.assignment-row {
    grid-template-columns: 1fr;
  }

  .assignment-row-meta {
    min-width: 100%;
    justify-content: flex-start;
  }

  .component-chart-head,
  .component-chart-row,
  .student-class-card {
    grid-template-columns: 1fr;
  }

  .component-chart-head {
    display: grid;
  }

  .component-chart-value {
    justify-items: start;
  }

  .class-card-action {
    justify-self: start;
  }

  .data-row.assignment-row > .assignment-row-meta {
    flex-wrap: wrap;
    width: 100%;
  }

  .mini-enrollment {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .capacity-row {
    grid-template-columns: 60px minmax(90px, 1fr) 62px;
  }

  .student-identity {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .student-list-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .student-list-meta {
    grid-column: 1 / -1;
    justify-items: start;
  }

  .photo-upload {
    grid-column: 1 / -1;
  }

  .compact-detail {
    grid-template-columns: 1fr;
  }

  .schedule-command-bar,
  .schedule-command-group,
  .schedule-planner-launch,
  .schedule-planner-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-command-group.actions {
    justify-content: stretch;
  }

  .schedule-command-group.actions > button,
  .schedule-command-group.actions .schedule-options-drawer,
  .schedule-options-drawer summary,
  .schedule-options-drawer > div,
  .schedule-planner-actions > button {
    width: 100%;
  }

  .schedule-options-drawer > div {
    position: static;
    margin-top: 8px;
    box-shadow: none;
  }

  .working-banner {
    align-items: flex-start;
  }

  .capacity-row span:last-child {
    display: none;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes scheduleWorkIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.login-screen {
  min-height: 100svh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 12%, rgba(6, 79, 57, 0.13), transparent 26%),
    radial-gradient(circle at 86% 16%, rgba(8, 120, 216, 0.09), transparent 25%),
    linear-gradient(135deg, #f7fbfd 0%, #e9f4f3 58%, #f9fbfd 100%);
}

.login-hero-stage {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: clamp(14px, 2vw, 18px);
  padding: clamp(18px, 4vw, 46px);
  isolation: isolate;
}

.login-hero-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(247, 251, 253, 0.58), rgba(247, 251, 253, 0.84) 36%, rgba(247, 251, 253, 0.84) 64%, rgba(247, 251, 253, 0.6)),
    linear-gradient(180deg, transparent 0%, rgba(244, 248, 251, 0.9) 100%);
}

.login-hero-visuals {
  position: absolute;
  inset: clamp(16px, 3vw, 34px);
  z-index: -3;
  pointer-events: none;
}

.login-visual {
  position: absolute;
  object-fit: cover;
  border: 1px solid rgba(0, 71, 52, 0.16);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(8, 52, 47, 0.16);
  filter: saturate(1.03) contrast(1.02);
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  contain: paint;
  will-change: transform, opacity;
  animation-fill-mode: both;
}

.login-visual-main {
  left: -2%;
  top: 8%;
  width: min(35vw, 560px);
  height: min(58vh, 560px);
  opacity: 0.62;
  animation: loginGlideRight 30s cubic-bezier(0.45, 0, 0.22, 1) -7s infinite alternate;
}

.login-visual-small {
  width: min(22vw, 320px);
  aspect-ratio: 4 / 3;
  opacity: 0.58;
}

.login-visual-small.top {
  right: -1%;
  top: 11%;
  animation: loginGlideLeft 32s cubic-bezier(0.45, 0, 0.22, 1) -13s infinite alternate;
}

.login-visual-small.mid-left {
  left: 8%;
  bottom: 6%;
  width: min(19vw, 280px);
  opacity: 0.42;
  animation: loginGlideRight 34s cubic-bezier(0.45, 0, 0.22, 1) -19s infinite alternate;
}

.login-visual-small.mid-right {
  right: 14%;
  top: 52%;
  width: min(18vw, 260px);
  opacity: 0.36;
  animation: loginGlideLeft 38s cubic-bezier(0.45, 0, 0.22, 1) -9s infinite alternate;
}

.login-visual-small.bottom {
  right: 5%;
  bottom: 9%;
  width: min(24vw, 360px);
  animation: loginGlideLeft 36s cubic-bezier(0.45, 0, 0.22, 1) -23s infinite alternate;
}

@keyframes loginGlideRight {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(clamp(18px, 4vw, 72px), -12px, 0) scale(1.018);
  }

  100% {
    transform: translate3d(clamp(32px, 6vw, 104px), 4px, 0) scale(1.03);
  }
}

@keyframes loginGlideLeft {
  0% {
    transform: translate3d(0, 0, 0) scale(1.02);
  }

  50% {
    transform: translate3d(clamp(-72px, -4vw, -18px), -10px, 0) scale(1.01);
  }

  100% {
    transform: translate3d(clamp(-104px, -6vw, -32px), 2px, 0) scale(1.03);
  }
}

.login-hero-intro {
  width: min(540px, 100%);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  color: var(--green-950);
  text-align: left;
  animation: fadeUp 0.55s ease both;
}

.login-hero-intro img {
  width: 66px;
  height: 66px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 12px 26px rgba(0, 61, 44, 0.12);
}

.login-hero-intro h1 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.6rem);
  line-height: 1.02;
  text-wrap: balance;
}

.login-hero-intro p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.36;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-panel {
  display: grid;
  gap: 13px;
  padding: clamp(20px, 3vw, 28px);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(200, 215, 227, 0.94);
  border-radius: 18px;
  box-shadow: 0 22px 64px rgba(12, 36, 64, 0.16);
  backdrop-filter: blur(10px);
}

.login-access-stack {
  width: min(540px, 100%);
  display: grid;
  gap: 12px;
  align-self: center;
  overflow: visible;
  animation: fadeUp 0.6s ease 0.05s both;
}

.public-entry {
  display: grid;
  gap: 12px;
}

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

.public-buttons .ghost-button {
  min-height: 46px;
  justify-content: center;
  padding: 9px 12px;
  text-align: center;
  white-space: normal;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(12, 36, 64, 0.06);
}

.public-panel,
.help-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.login-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  color: var(--green-900);
  font-size: 0.9rem;
  font-weight: 900;
  opacity: 0.84;
}

.login-scroll-cue strong {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 71, 52, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
}

.login-institution-sections {
  display: grid;
  gap: clamp(18px, 3vw, 28px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) clamp(18px, 4vw, 32px) clamp(44px, 6vw, 80px);
}

.institution-story-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: clamp(18px, 4vw, 42px);
  align-items: center;
  padding: clamp(22px, 4vw, 44px);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(200, 215, 227, 0.92);
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(12, 36, 64, 0.1);
}

.institution-story-panel h2 {
  max-width: 640px;
  margin: 0;
  color: var(--green-950);
  font-size: clamp(1.7rem, 3vw, 3rem);
  line-height: 1.05;
  text-wrap: balance;
}

.institution-story-panel p {
  max-width: 680px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.55;
}

.institution-story-panel figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(0, 71, 52, 0.14);
  border-radius: 20px;
  background: #ffffff;
}

.institution-story-panel img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

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

.institution-gallery article {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(200, 215, 227, 0.92);
  border-radius: 20px;
  box-shadow: 0 14px 34px rgba(12, 36, 64, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.institution-gallery article:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 42px rgba(12, 36, 64, 0.12);
}

.institution-gallery img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.institution-gallery div {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.institution-gallery h3 {
  margin: 0;
  color: var(--green-950);
  font-size: 1.08rem;
}

.institution-gallery p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
  font-size: 0.92rem;
}

.public-panel[hidden] {
  display: none;
}

.public-panel h2 {
  margin: 0;
  font-size: 1.25rem;
}

.public-panel p,
.help-card span {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.activation-step-note {
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  color: var(--green-950);
  background: #f1fbf6;
  border: 1px solid rgba(7, 109, 74, 0.18);
  border-radius: 10px;
}

.activation-step-note strong {
  font-size: 0.86rem;
  text-transform: uppercase;
}

.activation-step-note span,
.field-hint {
  color: var(--muted);
  line-height: 1.38;
}

.field-hint {
  display: block;
  margin-top: 5px;
  font-size: 0.8rem;
  font-weight: 700;
}

.document-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #f8fbfd;
}

.document-upload-grid legend {
  padding: 0 6px;
  color: var(--green-950);
  font-weight: 900;
}

.document-upload-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.document-upload-grid input {
  min-height: 40px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.document-checklist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfd;
}

.document-checklist legend {
  padding: 0 6px;
  color: var(--green-950);
  font-weight: 900;
}

.panel-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--green-800);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.login-panel h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 1.75rem);
}

.login-panel p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.38;
  font-size: 0.95rem;
}

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

.demo-accounts button {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 10px;
  text-align: left;
  color: var(--ink);
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.demo-accounts button:hover {
  border-color: var(--green-800);
}

.demo-accounts span {
  color: var(--muted);
  font-size: 0.78rem;
}

.workspace {
  padding: 24px;
}

.content-stack {
  display: grid;
  gap: 16px;
}

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

.page-heading > div {
  display: grid;
  gap: 3px;
}

.page-heading p {
  margin: 0;
}

#viewEyebrow {
  color: var(--muted);
  font-weight: 680;
}

#viewSubtitle {
  max-width: 760px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric-card {
  display: grid;
  gap: 8px;
  min-height: 124px;
  padding: 18px;
  text-align: left;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.metric-card:hover {
  border-color: var(--green-800);
  transform: translateY(-1px);
}

.metric-card span {
  color: var(--muted);
  font-weight: 740;
}

.metric-card strong {
  color: var(--green-950);
  font-size: 2rem;
  line-height: 1;
}

.metric-card small {
  color: var(--muted);
}

.span-2 {
  grid-column: span 2;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.toolbar-row label {
  min-width: min(360px, 100%);
}

.data-list,
.task-list {
  display: grid;
  gap: 10px;
}

.data-row,
.task-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  min-width: 0;
  min-height: 58px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

.data-row > div,
.task-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.data-row span,
.task-row span {
  color: var(--muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.data-row small,
.task-row small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.data-row em,
.task-row em {
  color: var(--blue-900);
  font-style: normal;
  font-weight: 780;
  overflow-wrap: anywhere;
  text-align: right;
}

.data-row.assignment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(500px, 540px);
  align-items: center;
  gap: 14px 22px;
  min-height: 78px;
  padding: 12px 16px;
}

.data-row.assignment-row > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.data-row.assignment-row > .assignment-row-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 0;
  width: 100%;
}

.assignment-row-meta .status-pill {
  flex: 0 0 auto;
  min-width: 78px;
}

.assignment-row-meta .ghost-button.compact {
  flex: 0 0 auto;
  min-height: 34px;
  padding-inline: 12px;
}

.assignment-row-meta .assignment-frequency-control {
  flex: 0 0 auto;
}

.connected-load-list .data-row.assignment-row {
  grid-template-columns: 1fr;
  align-items: start;
  min-height: 0;
  gap: 12px;
  padding: 16px;
}

.connected-load-list .data-row.assignment-row > .assignment-row-meta {
  width: 100%;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
}

.connected-load-list .assignment-inline-controls {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.connected-load-list .assignment-row-meta .assignment-frequency-control {
  flex: 1 1 220px;
  width: auto;
}

.connected-load-list .assignment-row-meta .status-pill,
.connected-load-list .assignment-row-meta .ghost-button.compact {
  align-self: center;
}

.connected-load-list.compact-data-list {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 8px 6px 2px;
}

.connected-load-list .data-row.assignment-row {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible;
  align-items: stretch;
  border-radius: 8px;
}

.connected-load-list .data-row.assignment-row > div:first-child {
  overflow: visible;
}

.connected-load-list .data-row.assignment-row > div:first-child strong,
.connected-load-list .data-row.assignment-row > div:first-child span,
.connected-load-list .data-row.assignment-row > div:first-child small {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.3;
}

.connected-load-list .data-row.assignment-row > .assignment-row-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  width: 100%;
}

.connected-load-list .assignment-inline-controls {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: stretch;
}

.connected-load-list .assignment-row-meta .assignment-frequency-control {
  min-width: 0;
  width: 100%;
}

.connected-load-list .data-row.assignment-row,
.connected-load-list .data-row.assignment-row.compact-assignment-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: start !important;
  min-height: 154px !important;
  height: auto !important;
  padding: 14px 16px !important;
  overflow: visible !important;
}

.connected-load-list .data-row.assignment-row > .assignment-row-meta,
.connected-load-list .data-row.assignment-row.compact-assignment-row > .assignment-row-meta {
  display: grid !important;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  justify-content: start;
  min-width: 0 !important;
  width: 100%;
}

.connected-load-list .assignment-inline-controls {
  grid-column: 1 / -1;
  width: 100%;
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
}

.connected-load-list .assignment-inline-controls .assignment-frequency-control {
  flex: 0 1 auto;
  min-width: min(230px, 100%);
}

.connected-load-list .assignment-row-meta .status-pill {
  grid-column: 1;
  justify-self: start;
}

.connected-load-list .assignment-row-meta .ghost-button.compact {
  grid-column: 2;
  justify-self: start;
  min-width: 104px;
}

.connected-load-workbench {
  gap: 14px;
}

.connected-load-list {
  display: grid;
  gap: 14px;
  max-height: min(620px, calc(100svh - 300px));
  padding: 8px 10px 10px 2px;
}

.connected-load-list .data-row.assignment-row,
.connected-load-list .data-row.assignment-row.compact-assignment-row {
  min-height: 0 !important;
  gap: 14px !important;
  padding: 18px 20px !important;
  border-radius: 10px;
  background: #ffffff;
}

.connected-load-list .data-row.assignment-row > div:first-child {
  display: grid;
  gap: 5px;
}

.connected-load-list .data-row.assignment-row > div:first-child strong {
  font-size: 1.02rem;
  line-height: 1.16;
}

.connected-load-list .data-row.assignment-row > div:first-child small {
  max-width: 92ch;
}

.connected-load-list .data-row.assignment-row > .assignment-row-meta,
.connected-load-list .data-row.assignment-row.compact-assignment-row > .assignment-row-meta {
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: end;
}

.connected-load-list .assignment-inline-controls {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 10px;
  align-items: stretch;
}

.connected-load-list .assignment-inline-controls .assignment-frequency-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  width: 100%;
  min-height: 50px;
  padding: 8px 10px;
}

.connected-load-list .assignment-frequency-control > span {
  min-width: 80px;
}

.connected-load-list .frequency-chip-row {
  justify-content: start;
  min-width: 0;
}

.connected-load-list .assignment-row-meta .status-pill,
.connected-load-list .assignment-row-meta .ghost-button.compact {
  align-self: center;
}

.student-console {
  grid-template-columns: minmax(340px, 0.48fr) minmax(0, 1.52fr);
  gap: 28px;
}

.student-search-panel {
  max-width: 520px;
}

.student-list-card {
  gap: 12px 16px;
  padding: 14px;
}

.student-list-main strong {
  line-height: 1.15;
}

.student-list-main small,
.student-list-main span,
.student-list-meta small {
  line-height: 1.25;
}

.student-list-meta {
  grid-column: 1 / -1;
  justify-content: space-between;
  padding-left: 62px;
}

.rubric-modal {
  width: min(720px, calc(100vw - 48px));
}

.rubric-modal .grade-breakdown-row {
  grid-template-columns: minmax(0, 1fr) minmax(150px, 180px);
  gap: 14px;
}

@media (max-width: 1180px) {
  .data-row.assignment-row {
    grid-template-columns: 1fr;
  }

  .data-row.assignment-row > .assignment-row-meta {
    flex-wrap: wrap;
    width: 100%;
  }

  .connected-load-list .data-row.assignment-row > .assignment-row-meta,
  .connected-load-list .data-row.assignment-row.compact-assignment-row > .assignment-row-meta,
  .connected-load-list .assignment-inline-controls {
    grid-template-columns: 1fr;
  }

  .student-console,
  .student-workbench {
    grid-template-columns: 1fr;
  }

  .student-search-panel {
    position: static;
    max-width: none;
  }
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: var(--paper);
}

.data-table th,
.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--blue-900);
  background: #f6f9fc;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.data-table td span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.inline-form {
  display: contents;
}

.inline-form select,
.inline-form input {
  min-height: 38px;
}

.inline-review {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(140px, 1fr) minmax(160px, 1.2fr) auto;
  gap: 8px;
  align-items: center;
  min-width: min(720px, 100%);
}

.inline-review select,
.inline-review input,
.inline-review button {
  min-height: 38px;
}

.enrollment-request-row {
  align-items: start;
}

.enrollment-review-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(520px, 1.22fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.enrollment-admin-hub {
  display: grid;
  gap: 16px;
}

.enrollment-overview-panel {
  margin-bottom: 0;
}

.soft-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #eaf8f0;
  color: var(--green-950);
  font-size: 0.95rem;
  white-space: nowrap;
}

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

.enrollment-overview-grid > div,
.enrollment-empty-detail {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfd;
}

.enrollment-overview-grid span,
.enrollment-overview-grid small {
  display: block;
  color: var(--muted);
  font-weight: 760;
}

.enrollment-overview-grid strong {
  display: block;
  margin: 4px 0;
  color: var(--green-950);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1;
}

.enrollment-empty-detail {
  display: grid;
  gap: 8px;
}

.enrollment-empty-detail h3,
.enrollment-empty-detail p {
  margin: 0;
}

.enrollment-empty-detail h3 {
  color: var(--green-950);
  font-size: 1.4rem;
}

.enrollment-empty-detail p {
  color: var(--muted);
  line-height: 1.45;
}

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.enrollment-foldout-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.enrollment-foldout {
  padding: 0;
  overflow: hidden;
}

.enrollment-foldout summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  cursor: pointer;
  color: var(--green-950);
  list-style: none;
}

.enrollment-foldout summary::-webkit-details-marker {
  display: none;
}

.enrollment-foldout summary span:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.enrollment-foldout summary small {
  color: var(--muted);
  font-weight: 500;
}

.enrollment-foldout summary span:last-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid rgba(7, 109, 74, 0.35);
  border-radius: 999px;
  background: #ffffff;
  font-weight: 850;
}

.enrollment-foldout[open] summary {
  border-bottom: 1px solid var(--line);
}

.enrollment-foldout[open] summary span:last-child {
  background: #eaf8f0;
}

.enrollment-foldout > form,
.enrollment-foldout > .capacity-table {
  padding: 18px 22px 22px;
}

form.is-saving {
  opacity: 0.72;
  pointer-events: none;
}

form.is-saving button[type="submit"] {
  position: relative;
}

.enrollment-queue {
  display: grid;
  gap: 10px;
  max-height: min(620px, 62svh);
  overflow: auto;
  padding-right: 4px;
}

.enrollment-request-card {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.enrollment-request-card:hover,
.enrollment-request-card.is-active {
  border-color: rgba(7, 109, 74, 0.38);
  background: #effaf5;
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.request-status-dot,
.notification-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e52d36;
  box-shadow: 0 0 0 4px rgba(229, 45, 54, 0.1);
}

.enrollment-request-card span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.enrollment-request-card strong {
  color: var(--green-950);
}

.enrollment-request-card small,
.enrollment-request-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.82rem;
}

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

.applicant-summary div,
.applicant-section {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfd;
}

.applicant-summary span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.applicant-section {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.applicant-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.document-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.document-status-grid span,
.uploaded-doc-list a {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.document-status-grid .is-complete {
  color: var(--green-900);
  background: #eaf8f0;
}

.document-status-grid .is-missing {
  color: #9a5b00;
  background: #fff7e5;
}

.document-review-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.document-review-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.document-review-item div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.document-review-item strong {
  color: var(--green-950);
  overflow-wrap: anywhere;
}

.document-review-item span,
.document-review-item small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.25;
}

.document-review-item.is-complete {
  border-color: rgba(7, 109, 74, 0.24);
  background: #f0fbf5;
}

.document-review-item.is-missing {
  border-color: rgba(181, 98, 0, 0.28);
  background: #fff8eb;
}

.document-review-item.is-missing span {
  color: #8a5d00;
  font-weight: 850;
}

.document-review-item.is-optional {
  background: #f8fbfd;
}

.document-preview-modal {
  width: min(980px, calc(100vw - 48px));
  max-height: min(820px, calc(100svh - 48px));
  grid-template-rows: auto minmax(240px, 1fr) auto;
}

.document-preview-head h3 {
  margin: 4px 48px 4px 0;
  color: var(--green-950);
  font-size: 1.45rem;
}

.document-preview-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.document-preview-body {
  min-height: 360px;
  display: grid;
  place-items: center;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.document-preview-image {
  max-width: 100%;
  max-height: 68svh;
  display: block;
  object-fit: contain;
}

.document-preview-frame {
  width: 100%;
  min-height: 68svh;
  border: 0;
  background: #ffffff;
}

.document-preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.document-preview-empty {
  width: 100%;
  padding: 18px;
}

@media (max-width: 720px) {
  .document-preview-modal {
    width: calc(100vw - 20px);
    max-height: calc(100svh - 20px);
    padding: 14px;
  }

  .document-preview-head h3 {
    margin-right: 42px;
    font-size: 1.18rem;
  }

  .document-preview-body {
    min-height: 62svh;
  }

  .document-preview-frame {
    min-height: 62svh;
  }

  .document-preview-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.uploaded-doc-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-decision-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.missing-docs-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfe;
}

.missing-docs-box strong {
  grid-column: 1 / -1;
  color: var(--green-950);
}

.notification-center {
  margin-bottom: 16px;
}

.notification-center.has-unread {
  border-color: rgba(229, 45, 54, 0.22);
}

.notification-list {
  display: grid;
  gap: 10px;
}

.notification-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.notification-card.is-unread {
  border-color: rgba(229, 45, 54, 0.24);
  background: #fffafb;
}

.notification-card:not(.is-unread) .notification-dot {
  background: #b6c5d5;
  box-shadow: none;
}

.notification-card p {
  margin: 3px 0;
  color: var(--muted);
  line-height: 1.4;
}

.notification-card small {
  color: var(--muted);
}

.notification-read-button {
  white-space: nowrap;
}

.compact-form {
  align-items: end;
}

.checkbox-line {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-weight: 700;
}

.checkbox-line input {
  width: 18px;
  height: 18px;
}

.empty-state {
  display: grid;
  gap: 6px;
  min-height: 96px;
  align-content: center;
  padding: 18px;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #fbfdff;
}

.empty-state strong {
  color: var(--ink);
}

.status-pill.success {
  color: var(--green-800);
  background: #e5f7ee;
}

.status-pill.warning {
  color: #a76100;
  background: var(--gold-050);
}

.status-pill.danger {
  color: var(--red);
  background: var(--red-050);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 240;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  max-width: min(520px, calc(100vw - 36px));
  padding: 12px 14px;
  color: #ffffff;
  background: var(--green-900);
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-weight: 750;
  animation: toastIn 180ms ease both;
}

.toast[hidden] {
  display: none;
}

.toast span {
  line-height: 1.28;
}

.toast-close {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  font: inherit;
  cursor: pointer;
}

.toast-close:hover,
.toast-close:focus-visible {
  background: rgba(255, 255, 255, 0.3);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast.error {
  background: var(--red);
}

.toast.warning {
  background: #9a6700;
}

.ai-floating-widget {
  position: fixed;
  right: 10px;
  bottom: 10px;
  z-index: 120;
  display: grid;
  justify-items: end;
  gap: 8px;
  pointer-events: none;
}

.ai-floating-widget * {
  pointer-events: auto;
}

.ai-section-tip {
  width: min(310px, calc(100vw - 96px));
  margin-right: 66px;
  padding: 12px 14px;
  border: 1px solid rgba(7, 109, 74, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 36px rgba(8, 31, 56, 0.16);
  color: var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
  animation: aiTipIn 0.28s ease both;
}

.ai-section-tip strong {
  color: var(--green-950);
  font-size: 0.92rem;
  min-width: 0;
}

.ai-section-tip span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  grid-column: 1 / -1;
  padding-right: 12px;
}

.ai-tip-close {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(8, 31, 56, 0.12);
  border-radius: 999px;
  background: rgba(248, 251, 253, 0.92);
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.ai-tip-close:hover {
  color: var(--green-950);
  border-color: rgba(7, 109, 74, 0.32);
}

@keyframes aiTipIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-guide-bubble {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(7, 109, 74, 0.18);
  border-radius: 14px;
  background:
    radial-gradient(circle at 28px 22px, rgba(255, 255, 255, 0.9), transparent 36px),
    linear-gradient(135deg, #ffffff 0%, #f5fbf7 100%);
  box-shadow: 0 16px 36px rgba(8, 31, 56, 0.08);
  animation: guideBubbleIn 0.28s ease both;
}

.guide-puppet {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--green-800), #075bb8);
  box-shadow: 0 12px 24px rgba(7, 109, 74, 0.2);
}

.guide-puppet::before {
  content: "";
  position: absolute;
  inset: 11px 10px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
}

.guide-puppet::after {
  content: "";
  position: absolute;
  left: 17px;
  right: 17px;
  bottom: 15px;
  height: 4px;
  border-bottom: 3px solid var(--green-800);
  border-radius: 999px;
}

.guide-puppet span::before,
.guide-puppet span::after {
  content: "";
  position: absolute;
  top: 21px;
  z-index: 1;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green-950);
}

.guide-puppet span::before {
  left: 18px;
}

.guide-puppet span::after {
  right: 18px;
}

.section-guide-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.section-guide-copy > span {
  color: var(--green-800);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-guide-copy h2 {
  margin: 0;
  color: var(--green-950);
  font-size: 1.08rem;
  line-height: 1.14;
}

.section-guide-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.42;
}

.section-guide-copy ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.section-guide-copy li {
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid rgba(7, 109, 74, 0.12);
  border-radius: 10px;
  color: #294761;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.3;
}

.section-guide-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

@keyframes guideBubbleIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ai-fab {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #0066d6, var(--green-800));
  box-shadow: 0 18px 34px rgba(0, 57, 114, 0.28);
  font-weight: 950;
  font-size: 1.05rem;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ai-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 38px rgba(0, 57, 114, 0.34);
}

.ai-drawer {
  width: min(460px, calc(100vw - 24px));
  max-height: min(640px, calc(100vh - 96px));
  display: grid;
  grid-template-rows: auto minmax(150px, 1fr) auto auto;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(7, 109, 74, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 60px rgba(8, 31, 56, 0.24);
}

.ai-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.ai-drawer-head div {
  display: grid;
  gap: 2px;
}

.ai-drawer-head strong {
  color: var(--green-950);
  font-size: 1.05rem;
}

.ai-drawer-head span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.icon-mini {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--green-950);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.ai-floating-widget .ai-thread {
  max-height: min(360px, calc(100vh - 270px));
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7fbfd;
}

.ai-floating-widget .ai-message,
.ai-floating-widget .ai-empty {
  border-radius: 10px;
  padding: 10px;
}

.ai-message {
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
}

.ai-message-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--green-800);
  font-size: 0.72rem;
  font-weight: 950;
}

.ai-message.is-user .ai-message-avatar {
  background: #075bb8;
}

.ai-message-body {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.ai-floating-widget .ai-message.is-user,
.ai-floating-widget .ai-message.is-assistant {
  width: 100%;
  margin-left: 0;
}

.ai-floating-widget .ai-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ai-floating-widget .ai-card {
  min-height: 52px;
  padding: 8px;
}

.ai-quick-prompts.compact {
  max-height: 112px;
  overflow: auto;
  padding-right: 4px;
}

.ai-prompt-bank {
  display: grid;
  gap: 8px;
}

.ai-prompt-bank > strong {
  color: var(--green-950);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.ai-quick-prompts.compact button {
  white-space: normal;
  text-align: left;
  line-height: 1.24;
}

.ai-command-form.compact {
  grid-template-columns: minmax(0, 1fr) auto;
}

.ai-command-form.compact input[name="prompt"] {
  min-height: 42px;
}

.ai-command-form.compact .primary-button {
  min-height: 42px;
  padding-inline: 16px;
}

.ghost-button.compact {
  min-height: 42px;
  padding-inline: 14px;
}

.guide-tip-popover {
  position: relative;
  width: min(318px, calc(100vw - 104px));
  max-height: min(520px, calc(100vh - 150px));
  overflow: auto;
  margin-right: 68px;
  padding: 14px 14px 14px;
  grid-template-columns: 1fr;
  gap: 9px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(8, 31, 56, 0.16);
}

.guide-tip-popover::after {
  content: "";
  position: absolute;
  right: -9px;
  bottom: 22px;
  width: 18px;
  height: 18px;
  border-top: 1px solid rgba(7, 109, 74, 0.22);
  border-right: 1px solid rgba(7, 109, 74, 0.22);
  background: #ffffff;
  transform: rotate(45deg);
}

.guide-tip-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding-right: 32px;
}

.guide-tip-orb {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  grid-column: auto;
  padding: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #007c73, #075bb8);
  box-shadow: 0 12px 22px rgba(0, 78, 106, 0.22);
}

.guide-tip-orb span {
  position: relative;
  width: 21px;
  height: 16px;
  grid-column: auto;
  padding: 0;
  border-radius: 12px;
  background: #ffffff;
}

.guide-tip-orb span::before,
.guide-tip-orb span::after {
  content: "";
  position: absolute;
  top: 6px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #007c73;
}

.guide-tip-orb span::before {
  left: 6px;
}

.guide-tip-orb span::after {
  right: 6px;
}

.guide-tip-head small {
  color: var(--green-800);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.guide-tip-head strong {
  display: block;
  color: var(--green-950);
  font-size: 0.98rem;
  line-height: 1.1;
}

.guide-tip-popover p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.38;
}

.guide-tip-steps {
  display: grid;
  gap: 6px;
}

.guide-tip-steps span {
  display: block;
  grid-column: auto;
  padding: 7px 9px;
  border: 1px solid rgba(7, 109, 74, 0.13);
  border-radius: 10px;
  background: #f6fbf8;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.25;
}

.guide-tip-ai-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(7, 109, 74, 0.26);
  border-radius: 999px;
  background: #ffffff;
  color: var(--green-950);
  font-weight: 950;
  font-size: 0.86rem;
  cursor: pointer;
}

.guide-tip-popover .ai-tip-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border-color: rgba(8, 31, 56, 0.12);
  background: #f8fbfd;
  font-size: 0;
}

.guide-tip-popover .ai-tip-close::before,
.guide-tip-popover .ai-tip-close::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 14px;
  height: 2px;
  border-radius: 999px;
  background: #476178;
}

.guide-tip-popover .ai-tip-close::before {
  transform: rotate(45deg);
}

.guide-tip-popover .ai-tip-close::after {
  transform: rotate(-45deg);
}

.guide-tip-popover .ai-tip-close:hover {
  background: #eef6f2;
}

.guide-tip-popover .ai-tip-close:hover::before,
.guide-tip-popover .ai-tip-close:hover::after {
  background: var(--green-950);
}

.guide-tip-ai-button:hover {
  border-color: var(--green-700);
  background: #edf8f1;
}

.ai-drawer {
  width: min(540px, calc(100vw - 24px));
  height: min(760px, calc(100vh - 108px));
  max-height: min(760px, calc(100vh - 108px));
  grid-template-rows: auto minmax(300px, 1fr) auto auto;
  overflow: hidden;
}

.ai-floating-widget .ai-thread {
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px;
  background: #ffffff;
}

.ai-floating-widget .ai-message,
.ai-floating-widget .ai-empty {
  border-radius: 14px;
  padding: 14px;
}

.ai-message-body > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.ai-message-title {
  color: var(--green-950) !important;
  font-weight: 950;
}

.ai-step-list {
  display: grid;
  gap: 8px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: ai-step;
}

.ai-step-list li {
  counter-increment: ai-step;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 9px 10px;
  border: 1px solid rgba(7, 109, 74, 0.14);
  border-radius: 12px;
  background: #fbfdfc;
  color: var(--ink);
  line-height: 1.35;
}

.ai-step-list li::before {
  content: counter(ai-step);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e5f5ec;
  color: var(--green-950);
  font-size: 0.78rem;
  font-weight: 950;
}

.ai-note-line {
  padding: 10px 12px;
  border: 1px solid rgba(245, 184, 72, 0.34);
  border-radius: 12px;
  background: #fff8e8;
  color: #6f4a00 !important;
  font-weight: 800;
}

.ai-thinking {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(7, 109, 74, 0.18);
  border-radius: 14px;
  background: #f6fbf8;
  color: var(--green-950);
}

.ai-thinking span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green-700);
  box-shadow: 16px 0 0 rgba(7, 109, 74, 0.42), 32px 0 0 rgba(7, 109, 74, 0.18);
  animation: aiThinkingPulse 0.9s ease-in-out infinite alternate;
}

@keyframes aiThinkingPulse {
  from {
    opacity: 0.55;
    transform: translateY(0);
  }

  to {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.ai-prompt-bank {
  display: grid;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.ai-quick-prompts.compact {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  max-height: 44px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 2px 4px 0;
  scrollbar-width: thin;
}

.ai-quick-prompts.compact button {
  flex: 0 0 auto;
  max-width: 230px;
  min-height: 34px;
  padding: 6px 11px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.76rem;
}

.ai-quick-prompts.compact button:disabled,
.ai-command-form.compact .primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

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

.time-blocks-form {
  display: grid;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.time-blocks-head,
.time-block-row {
  display: grid;
  grid-template-columns: 112px 132px 132px minmax(150px, 1fr) 140px minmax(150px, 1fr) 96px;
  min-width: 1000px;
  gap: 10px;
  align-items: center;
}

.time-blocks-head {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.time-blocks-list {
  display: grid;
  gap: 8px;
}

.time-block-row {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.time-block-row input,
.time-block-row select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 760;
}

.time-block-row input[type="time"] {
  min-width: 122px;
  font-variant-numeric: tabular-nums;
}

.time-block-row input[readonly] {
  color: var(--muted);
  background: #f3f7fb;
}

.mini-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 86px;
  white-space: nowrap;
  color: var(--green-950);
  font-size: 0.86rem;
  font-weight: 900;
}

.mini-check input {
  min-height: auto;
  width: 17px;
  height: 17px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.inline-actions span {
  color: var(--muted);
  line-height: 1.4;
}

.report-table td:nth-child(n + 3) {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .grade-rules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar {
    position: relative;
    inset: auto;
    width: auto;
    height: auto;
    transform: none;
    z-index: 1;
  }

  .side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-footer {
    display: none;
  }

  .login-visual-main {
    width: min(44vw, 460px);
    opacity: 0.36;
  }

  .login-visual-small {
    opacity: 0.34;
  }

  .login-visual-small.mid-left,
  .login-visual-small.mid-right {
    opacity: 0.24;
  }

  .metric-grid,
  .section-grid {
    grid-template-columns: 1fr 1fr;
  }

  .enrollment-review-layout {
    grid-template-columns: 1fr;
  }

  .enrollment-detail-panel {
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .ai-section-tip {
    width: min(280px, calc(100vw - 24px));
    margin-right: 0;
    margin-bottom: 4px;
  }

  .grade-rules-grid {
    grid-template-columns: 1fr;
  }

  .teacher-schedule-days {
    grid-template-columns: 1fr;
  }

  .teacher-shift-entry {
    grid-template-columns: 1fr;
  }

  .enrollment-overview-grid,
  .review-decision-form,
  .missing-docs-box {
    grid-template-columns: 1fr;
  }

  .enrollment-foldout summary {
    align-items: stretch;
    flex-direction: column;
  }

  .enrollment-foldout summary span:last-child {
    width: 100%;
  }

  .panel-actions {
    justify-content: flex-start;
  }

  .time-blocks-head,
  .time-block-row {
    min-width: 0;
  }

  .login-hero-stage {
    min-height: 100svh;
    align-content: start;
    padding: 18px 14px 58px;
  }

  .login-hero-visuals {
    inset: 0;
  }

  .login-visual-main {
    left: -88px;
    top: 26px;
    width: 260px;
    height: 220px;
    opacity: 0.18;
  }

  .login-visual-small {
    display: none;
  }

  .login-hero-intro {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    margin-top: 4px;
  }

  .login-hero-intro img {
    width: 52px;
    height: 52px;
    border-radius: 14px;
  }

  .login-hero-intro h1 {
    font-size: clamp(1.9rem, 9.5vw, 2.55rem);
    line-height: 1;
  }

  .login-hero-intro p {
    font-size: 0.92rem;
  }

  .login-card-shell,
  .login-access-stack,
  .login-panel {
    width: 100%;
    max-width: 100%;
  }

  .login-panel {
    padding: 18px;
  }

  .demo-accounts,
  .metric-grid,
  .section-grid,
  .ai-assistant-head,
  .ai-command-form,
  .ai-cards,
  .schedule-editor-grid,
  .schedule-tool-empty,
  .schedule-focus-grid,
  .teacher-workbench,
  .admin-grades-layout,
  .grade-impact-grid,
  .grade-item-card,
  .subject-workbench,
  .section-workbench,
  .section-impact-list,
  .section-setup-grid,
  .section-quick-assignment-grid,
  .section-choice-grid,
  .day-choice-grid,
  .enrollment-review-layout,
  .applicant-summary,
  .review-decision-form,
  .missing-docs-box,
  .notification-card,
  .time-blocks-head,
  .time-block-row,
  .teacher-profile-grid,
  .teacher-access-box,
  .mini-log-list div,
  .password-request-grid,
  .backup-grid,
  .document-upload-grid,
  .document-checklist,
  .inline-review {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .subject-workbench .span-2,
  .subject-load-panel {
    grid-column: auto;
  }

  .subject-load-row {
    grid-template-columns: 1fr;
  }

  .subject-load-controls {
    justify-content: flex-start;
  }

  .section-readonly-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .ai-assistant-head > span,
  .ai-message.is-user {
    width: 100%;
    justify-self: start;
  }

  .workspace {
    padding: 16px;
    overflow-x: hidden;
  }

  .ai-floating-widget {
    right: 8px;
    bottom: 8px;
  }

  .ai-fab {
    width: 52px;
    height: 52px;
  }

  .ai-drawer {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 76px);
  }

  .ai-command-form.compact,
  .ai-floating-widget .ai-cards {
    grid-template-columns: 1fr;
  }

  .action-notice {
    align-items: flex-start;
    flex-direction: column;
  }

  .action-notice strong {
    white-space: normal;
  }

  .tool-heading {
    display: grid;
  }
}

@media (max-width: 900px) {
  .login-access-stack {
    max-height: none;
    overflow: visible;
  }

  .login-panel,
  .public-panel,
  .help-card {
    padding: 16px;
    border-radius: 16px;
  }

  .public-buttons,
  .demo-accounts {
    grid-template-columns: 1fr;
  }

  .login-scroll-cue {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    margin-top: 4px;
  }

  .institution-story-panel,
  .institution-gallery {
    grid-template-columns: 1fr;
  }

  .institution-story-panel {
    border-radius: 18px;
  }
}

@media (max-width: 820px) {
  .app-shell {
    height: 100svh;
    grid-template-columns: 1fr;
    overflow: hidden;
  }

  .main-shell {
    height: 100svh;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .institution-header {
    min-height: auto;
    display: flex;
    padding: 10px 14px;
    gap: 10px;
  }

  .institution-title {
    gap: 10px;
    width: 100%;
  }

  .institution-title img {
    width: 46px;
    height: 46px;
    border-radius: 12px;
  }

  .institution-title h1 {
    max-width: 280px;
    font-size: 1.16rem;
    line-height: 1.04;
  }

  .institution-title p {
    max-width: 300px;
    margin-top: 3px;
    font-size: 0.82rem;
    line-height: 1.25;
  }

  .header-tools {
    display: none;
  }

  .top-tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    min-height: 66px;
    align-items: center;
    gap: 4px;
    padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
    border-top: 1px solid var(--line);
    border-bottom: 0;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -10px 24px rgba(12, 36, 64, 0.12);
    backdrop-filter: blur(12px);
    -webkit-overflow-scrolling: touch;
  }

  .top-tabs a {
    min-width: 78px;
    min-height: 52px;
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 6px 8px;
    border-radius: 14px;
    font-size: 0.72rem;
    line-height: 1.08;
    text-align: center;
  }

  .top-tabs a::after {
    display: none;
  }

  .top-tabs a.is-active {
    color: var(--green-950);
    background: #e8f7ee;
  }

  .top-tabs svg {
    width: 21px;
    height: 21px;
  }

  .workspace {
    padding: 14px 14px calc(88px + env(safe-area-inset-bottom));
    overflow-x: hidden;
  }

  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }

  .page-heading {
    display: grid;
    gap: 4px;
    align-items: start;
    margin-bottom: 12px;
  }

  .page-heading h1 {
    font-size: 1.72rem;
  }

  .page-heading > p,
  #viewSubtitle {
    max-width: none;
    text-align: left;
    font-size: 0.9rem;
  }

  .panel,
  .student-record,
  .student-identity,
  .record-section,
  .stat-tile,
  .metric-card,
  .student-class-card,
  .teacher-class-card {
    border-radius: 14px;
  }

  .dashboard-grid,
  .student-stats,
  .metric-grid,
  .student-class-grid,
  .teacher-class-grid,
  .class-context-head,
  .class-context-metrics,
  .teacher-access-box,
  .mini-log-list div,
  .class-card-grid {
    grid-template-columns: 1fr;
  }

  .teacher-class-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "main"
      "stats"
      "action";
  }

  .teacher-class-card em {
    justify-self: start;
  }

  .student-identity {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
  }

  .student-identity img,
  .student-avatar-large {
    width: 78px;
    height: 78px;
  }

  .student-identity h2 {
    font-size: 1.5rem;
  }

  .student-record,
  .record-section {
    min-width: 0;
  }

  .schedule-wrap,
  .data-table-wrap,
  .daily-print-sheet,
  .report-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .ai-floating-widget {
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
  }
}

.top-tabs {
  display: none !important;
}

.settings-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.settings-workbench.settings-workbench-access {
  grid-template-columns: minmax(0, 1fr);
}

.settings-workbench-access .settings-menu {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.settings-workbench-access .settings-content {
  grid-column: 1 / -1;
}

.content-stack.function-menu-mode .settings-workbench {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.settings-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.settings-menu button {
  display: grid;
  gap: 4px;
  min-height: 82px;
  padding: 14px;
  text-align: left;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.settings-menu button.is-active {
  background: #eefaf5;
  border-color: rgba(7, 109, 74, 0.36);
  box-shadow: inset 0 4px 0 var(--green-800);
}

.settings-menu strong {
  color: var(--green-950);
  font-size: 0.98rem;
}

.settings-menu span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.settings-content {
  min-width: 0;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.settings-content > .span-2 {
  grid-column: 1 / -1;
}

.settings-access-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
}

.settings-workbench-access .settings-access-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.content-stack.function-menu-mode .settings-content,
.content-stack.function-menu-mode .settings-access-layout {
  grid-template-columns: minmax(0, 1fr) !important;
}

.content-stack.function-menu-mode .settings-access-layout > .panel,
.content-stack.function-menu-mode .settings-content > .panel {
  grid-column: 1 / -1 !important;
}

.settings-access-layout > .panel,
.settings-section-panel {
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.access-activity-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
}

.settings-workbench-access .access-activity-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.access-user-list {
  max-height: min(420px, calc(100svh - 320px));
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr));
  gap: 8px;
  padding-right: 4px;
}

.settings-workbench-access .access-user-list {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  max-height: 360px;
}

.settings-workbench-access .access-activity-panel,
.settings-workbench-access .audit-log-panel {
  max-width: 980px;
  width: 100%;
}

.settings-workbench-access .access-detail-panel {
  max-width: none;
}

.access-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px;
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  min-width: 0;
}

.access-user-card.is-active {
  background: #effaf5;
  border-color: rgba(7, 109, 74, 0.36);
}

.access-user-card > span:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.access-user-card strong {
  color: var(--green-950);
}

.access-user-card small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.access-detail-panel {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.settings-workbench-access .access-detail-panel,
.settings-workbench-access .audit-log-panel {
  overflow: visible;
}

.staff-account-panel {
  overflow: visible;
}

.staff-account-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.staff-account-stack > * {
  width: min(100%, 1040px);
}

.staff-account-manage {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.staff-account-form {
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.staff-account-existing {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.staff-account-editor {
  background: #ffffff;
  border: 1px solid rgba(7, 109, 74, 0.18);
  border-radius: var(--radius);
  padding: 14px;
}

.staff-account-editor.is-empty {
  min-height: 140px;
  align-content: center;
  background: #f8fbfd;
  border-style: dashed;
}

.staff-account-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f8fbfd;
}

.staff-account-editor-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.staff-account-editor-head strong {
  color: var(--green-950);
}

.staff-account-editor-head span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.staff-account-note {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #effaf5;
  color: var(--muted);
}

.staff-account-note strong {
  color: var(--green-950);
}

.staff-account-form .staff-account-note,
.staff-account-form .staff-account-status,
.staff-account-form .primary-button,
.staff-account-editor .staff-account-editor-head,
.staff-account-editor .wide-label,
.staff-account-editor .staff-account-status,
.staff-account-editor .primary-button {
  grid-column: 1 / -1;
}

.staff-account-form .primary-button,
.staff-account-editor .primary-button {
  width: min(360px, 100%);
  justify-self: start;
}

.staff-account-status {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  font-weight: 800;
}

.staff-account-status[hidden] {
  display: none;
}

.staff-account-status.saving {
  color: var(--muted);
  background: #eef5fa;
}

.staff-account-status.success {
  color: var(--green-950);
  border-color: rgba(7, 109, 74, 0.24);
  background: #effaf5;
}

.staff-account-status.error {
  color: #8f1d1d;
  border-color: rgba(194, 51, 59, 0.28);
  background: #fff5f5;
}

.staff-account-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  max-height: 390px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
}

.staff-account-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}

.staff-account-avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  color: #ffffff;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.staff-account-avatar.has-image {
  background: #ffffff;
}

.staff-account-card:hover,
.staff-account-card.is-active {
  border-color: rgba(7, 109, 74, 0.36);
  background: #effaf5;
  box-shadow: var(--shadow-soft);
}

.staff-account-card > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.staff-account-card strong,
.staff-account-card span,
.staff-account-card small {
  overflow-wrap: anywhere;
}

.staff-account-card span,
.staff-account-card small {
  color: var(--muted);
}

.access-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.access-detail-head div {
  display: grid;
  gap: 4px;
}

.access-detail-head span,
.access-stat-grid span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.access-detail-head strong {
  color: var(--green-950);
  font-size: 1.2rem;
}

.access-detail-head small,
.access-timeline small {
  color: var(--muted);
}

.access-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.access-stat-grid div {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.access-stat-grid strong,
.audit-row span {
  overflow-wrap: anywhere;
}

.audit-log-panel .data-list {
  display: grid;
  gap: 10px;
}

.access-timeline {
  display: grid;
  gap: 8px;
}

.access-timeline h3 {
  margin: 0;
  color: var(--green-950);
}

.access-timeline > div,
.audit-row {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.audit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 10px 14px;
}

.audit-row > div {
  min-width: 0;
}

.audit-row strong {
  overflow-wrap: anywhere;
}

.audit-row em {
  min-width: 0;
  max-width: none;
  white-space: normal;
  line-height: 1.18;
  text-align: left;
}

.access-timeline > div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

@media (max-width: 1280px) {
  .access-activity-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .settings-workbench,
  .settings-workbench.settings-workbench-access,
  .access-activity-grid,
  .access-stat-grid,
  .student-profile-grid,
  .student-profile-form,
  .student-section-current,
  .student-access-summary {
    grid-template-columns: 1fr;
  }

  .settings-menu {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .access-user-list {
    max-height: 260px;
  }
}

@media (max-width: 820px) {
  .workspace {
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .settings-menu {
    grid-template-columns: 1fr;
  }

  .audit-row {
    grid-template-columns: 1fr;
  }

  .audit-row em {
    max-width: none;
    text-align: left;
  }

  .access-detail-head,
  .access-user-card {
    align-items: flex-start;
  }

  .student-profile-panel-head,
  .student-profile-editor > summary {
    flex-direction: column;
  }

  .profile-edit-hint {
    align-self: flex-start;
  }

  .access-timeline > div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .app-shell {
    display: block;
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
  }

  .main-shell {
    height: 100svh;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 180;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 7px max(8px, env(safe-area-inset-left)) calc(7px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
    transform: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 -18px 34px rgba(0, 32, 22, 0.22);
  }

  .sidebar::before,
  .sidebar-crest,
  .sidebar-footer {
    display: none;
  }

  .side-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    scrollbar-width: none;
  }

  .side-nav::-webkit-scrollbar {
    display: none;
  }

  .side-nav a {
    flex: 0 0 auto;
    min-width: 76px;
    min-height: 58px;
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 4px;
    padding: 7px 8px;
    border-radius: 14px;
    font-size: 0.72rem;
    line-height: 1.08;
    text-align: center;
    transform: none !important;
  }

  .side-nav svg {
    width: 21px;
    height: 21px;
  }

  .institution-header {
    position: sticky;
    top: 0;
    z-index: 90;
    padding: 10px 12px;
  }

  .institution-title h1 {
    max-width: calc(100vw - 104px);
    font-size: clamp(1rem, 5vw, 1.28rem);
  }

  .institution-title p,
  .header-tools {
    display: none;
  }

  .workspace {
    padding: 14px 14px calc(96px + env(safe-area-inset-bottom));
    overflow-x: hidden;
  }

  .section-guide-bubble {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .section-guide-copy ul {
    grid-template-columns: 1fr;
  }

  .section-guide-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .ai-floating-widget {
    right: 10px;
    bottom: calc(82px + env(safe-area-inset-bottom));
  }

  .ai-floating-widget.is-open {
    left: 8px;
    right: 8px;
    bottom: calc(82px + env(safe-area-inset-bottom));
  }

  .ai-drawer {
    width: 100%;
    height: min(72svh, 620px);
    max-height: min(72svh, 620px);
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    border-radius: 18px;
  }

  .ai-floating-widget .ai-thread {
    max-height: none;
  }

  .ai-command-form.compact,
  .ai-floating-widget .ai-cards {
    grid-template-columns: 1fr;
  }

  .ai-command-form.compact .primary-button {
    width: 100%;
  }

  .data-table {
    min-width: 640px;
  }
}

@media (max-width: 520px) {
  .institution-title img {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }

  .page-heading h1 {
    font-size: 1.52rem;
  }

  .section-guide-bubble {
    border-radius: 12px;
  }

  .guide-puppet {
    width: 42px;
    height: 42px;
    border-radius: 15px;
  }

  .guide-puppet span::before,
  .guide-puppet span::after {
    top: 19px;
  }

  .guide-puppet span::before {
    left: 15px;
  }

  .guide-puppet span::after {
    right: 15px;
  }

  .section-guide-copy h2 {
    font-size: 1rem;
  }

  .section-guide-copy p,
  .section-guide-copy li {
    font-size: 0.86rem;
  }

  .ai-fab {
    width: 50px;
    height: 50px;
  }

  .ai-drawer {
    padding: 12px;
  }
}

@media (max-width: 760px) {
  .guide-tip-popover {
    width: min(304px, calc(100vw - 88px));
    margin-right: 60px;
  }

  .ai-drawer {
    grid-template-rows: auto minmax(0, 1fr) auto auto;
  }

  .ai-floating-widget .ai-thread {
    max-height: none;
  }
}

@media (max-width: 1100px) {
  .staff-account-stack {
    grid-template-columns: 1fr;
  }

  .staff-account-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

@media (max-width: 520px) {
  .guide-tip-popover {
    width: min(312px, calc(100vw - 28px));
    margin-right: 0;
    margin-bottom: 6px;
  }

  .guide-tip-popover::after {
    right: 20px;
  }

  .guide-tip-head {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .guide-tip-steps span {
    font-size: 0.8rem;
  }
}

@media (max-width: 820px) {
  .app-shell {
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
  }

  .main-shell {
    height: 100svh;
    min-height: 0;
  }

  .institution-header {
    min-height: 64px;
    padding: 9px 14px;
    box-shadow: 0 8px 18px rgba(12, 36, 64, 0.06);
  }

  .institution-title {
    min-width: 0;
    gap: 9px;
  }

  .institution-title img {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .institution-title h1 {
    max-width: calc(100vw - 92px);
    font-size: clamp(1.02rem, 4.8vw, 1.28rem);
    line-height: 1.08;
  }

  .workspace {
    padding: 18px 16px calc(136px + env(safe-area-inset-bottom));
    overflow-x: hidden;
    scroll-padding-bottom: calc(144px + env(safe-area-inset-bottom));
  }

  .content-stack {
    gap: 14px;
  }

  .page-heading {
    gap: 5px;
    margin-bottom: 14px;
  }

  .page-heading h1 {
    font-size: clamp(1.8rem, 8vw, 2.2rem);
    line-height: 1.02;
  }

  .page-heading > p,
  #viewSubtitle {
    font-size: 0.98rem;
    line-height: 1.35;
  }

  .panel,
  .record-section,
  .student-record,
  .student-identity,
  .metric-card,
  .function-card,
  .action-card {
    border-radius: 16px;
    box-shadow: 0 8px 18px rgba(12, 36, 64, 0.08);
  }

  .panel,
  .record-section,
  .student-record {
    padding: 16px;
  }

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

  .metric-card {
    min-height: 96px;
    padding: 14px;
    gap: 6px;
  }

  .metric-card span {
    font-size: 0.88rem;
    line-height: 1.18;
  }

  .metric-card strong {
    font-size: clamp(1.75rem, 8.5vw, 2.35rem);
    line-height: 0.96;
  }

  .metric-card small {
    font-size: 0.82rem;
    line-height: 1.25;
  }

  .student-identity {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 16px;
    margin-bottom: 14px;
  }

  .student-identity .student-photo {
    width: 64px;
    height: 64px;
  }

  .student-identity h2 {
    font-size: clamp(1.28rem, 6.2vw, 1.72rem);
    line-height: 1.08;
  }

  .student-identity p {
    font-size: 0.94rem;
    line-height: 1.3;
  }

  .student-identity > button,
  .student-identity .photo-upload,
  .student-identity .ghost-button {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 44px;
  }

  .document-review-list {
    grid-template-columns: 1fr;
  }

  .document-review-item {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .document-review-item .ghost-button {
    width: 100%;
  }

  .toolbar-row,
  .section-toolbar,
  .schedule-planner-actions,
  .quick-actions {
    gap: 9px;
  }

  .toolbar-row > *,
  .section-toolbar > *,
  .schedule-planner-actions > * {
    min-width: 0;
  }

  .primary-button,
  .secondary-button,
  .ghost-button,
  .danger-button {
    min-height: 44px;
    padding-inline: 14px;
  }

  .sidebar {
    z-index: 210;
    padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
  }

  .side-nav {
    gap: 5px;
    align-items: center;
  }

  .side-nav a {
    min-width: 70px;
    min-height: 52px;
    padding: 6px 7px;
    border-radius: 14px;
    font-size: 0.68rem;
  }

  .side-nav svg {
    width: 20px;
    height: 20px;
  }

  .ai-floating-widget {
    z-index: 240;
    right: 12px;
    bottom: calc(116px + env(safe-area-inset-bottom));
  }

  .ai-floating-widget.is-open {
    left: 10px;
    right: 10px;
    bottom: calc(104px + env(safe-area-inset-bottom));
  }

  .ai-fab {
    width: 56px;
    height: 56px;
  }

  .ai-drawer {
    height: min(72svh, 600px);
    max-height: min(72svh, 600px);
  }

  .guide-tip-popover {
    max-width: calc(100vw - 28px);
  }

  .schedule-wrap,
  .student-schedule-wrap,
  .teacher-schedule-wrap,
  .data-table-wrap,
  .report-table-wrap {
    border-radius: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .student-schedule-table,
  .teacher-schedule-table,
  .schedule-table {
    min-width: 720px;
  }

  .student-schedule-table th:first-child,
  .student-schedule-table td:first-child,
  .teacher-schedule-table th:first-child,
  .teacher-schedule-table td:first-child,
  .schedule-table th:first-child,
  .schedule-table td:first-child {
    width: 96px;
    min-width: 96px;
    max-width: 96px;
  }

  .student-schedule-table .schedule-slot,
  .teacher-schedule-slot,
  .schedule-table td.schedule-slot {
    height: 104px;
    padding: 5px;
  }

  .student-schedule-table .schedule-block,
  .teacher-schedule-block,
  .schedule-block {
    min-height: 82px;
    padding: 6px;
  }

  .student-schedule-table .schedule-block strong,
  .teacher-schedule-block strong,
  .schedule-block strong {
    font-size: 0.8rem;
    line-height: 1.12;
  }

  .student-schedule-table .schedule-block span,
  .teacher-schedule-block span,
  .schedule-block span {
    font-size: 0.72rem;
    line-height: 1.12;
  }
}

@media (max-width: 520px) {
  .workspace {
    padding: 16px 14px calc(138px + env(safe-area-inset-bottom));
  }

  .panel,
  .record-section,
  .student-record {
    padding: 15px;
  }

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

  .metric-card {
    min-height: 88px;
    padding: 12px;
  }

  .metric-card strong {
    font-size: 1.85rem;
  }

  .student-identity {
    padding: 15px;
  }

  .student-identity .student-photo {
    width: 60px;
    height: 60px;
  }

  .side-nav a {
    min-width: 66px;
    min-height: 50px;
    font-size: 0.66rem;
  }

  .ai-floating-widget {
    right: 12px;
    bottom: calc(112px + env(safe-area-inset-bottom));
  }

  .ai-floating-widget.is-open {
    left: 8px;
    right: 8px;
    bottom: calc(102px + env(safe-area-inset-bottom));
  }

  .ai-drawer {
    height: min(70svh, 560px);
    max-height: min(70svh, 560px);
  }

  .student-schedule-table,
  .teacher-schedule-table,
  .schedule-table {
    min-width: 700px;
  }
}

@media (max-width: 820px) {
  .workspace {
    padding-inline: 12px;
    padding-bottom: calc(154px + env(safe-area-inset-bottom));
  }

  .dashboard-grid,
  .role-schedule-grid,
  .student-record-grid,
  .student-detail-shell {
    gap: 12px;
  }

  .panel-title.report-action-title {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .panel-title.report-action-title .ghost-button,
  .student-report-panel .report-action-title button {
    width: 100%;
    justify-content: center;
  }

  .desktop-report-table,
  .desktop-schedule-wrap {
    display: none !important;
  }

  .report-mobile-cards,
  .mobile-schedule-list {
    display: grid;
    gap: 10px;
    width: 100%;
    min-width: 0;
  }

  .report-mobile-card,
  .mobile-schedule-day {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 24px rgba(5, 61, 44, 0.08);
    overflow: hidden;
  }

  .report-mobile-card {
    display: grid;
    gap: 12px;
    padding: 13px;
  }

  .report-mobile-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
  }

  .report-mobile-card h3,
  .report-mobile-card p {
    margin: 0;
  }

  .report-mobile-card h3 {
    color: var(--green-950);
    font-size: 1rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .report-mobile-card p {
    color: var(--muted);
    font-size: 0.88rem;
  }

  .report-mobile-card-head > strong {
    padding: 6px 10px;
    border-radius: 999px;
    background: #e7f8ee;
    color: var(--green-950);
    font-size: 0.9rem;
    line-height: 1;
    white-space: nowrap;
  }

  .report-mobile-grade-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .report-mobile-grade-grid span {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 9px;
    border: 1px solid rgba(7, 109, 74, 0.12);
    border-radius: 10px;
    background: #f7fbff;
  }

  .report-mobile-grade-grid small {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .report-mobile-grade-grid b {
    color: var(--ink);
    font-size: 0.96rem;
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  .mobile-schedule-day summary {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    min-height: 52px;
    padding: 12px 13px;
    list-style: none;
  }

  .mobile-schedule-day summary::-webkit-details-marker {
    display: none;
  }

  .mobile-schedule-day summary strong {
    color: var(--green-950);
    font-size: 1rem;
  }

  .mobile-schedule-day summary span {
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef8f3;
    color: var(--green-950);
    font-size: 0.75rem;
    font-weight: 950;
    white-space: nowrap;
  }

  .mobile-schedule-day[open] summary {
    border-bottom: 1px solid var(--line);
  }

  .mobile-schedule-items {
    display: grid;
    gap: 8px;
    padding: 10px;
  }

  .mobile-schedule-item {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--schedule-border, rgba(7, 109, 74, 0.12));
    border-radius: 12px;
    background: var(--schedule-bg, #ffffff);
    color: var(--schedule-fg, var(--ink));
  }

  .mobile-schedule-item.is-free {
    background: #fbfdff;
    border-style: dashed;
    color: var(--muted);
  }

  .mobile-schedule-item.is-break {
    background: #fff8e8;
    border-color: #f3ddb1;
    color: #8a5e00;
  }

  .mobile-schedule-time {
    color: inherit;
    font-size: 0.82rem;
    font-weight: 950;
    line-height: 1.18;
    white-space: nowrap;
  }

  .mobile-schedule-main {
    display: grid;
    gap: 3px;
    min-width: 0;
  }

  .mobile-schedule-main strong,
  .mobile-schedule-main span,
  .mobile-schedule-main small {
    color: inherit;
    line-height: 1.16;
    overflow-wrap: anywhere;
  }

  .mobile-schedule-main strong {
    font-size: 0.96rem;
  }

  .mobile-schedule-main span,
  .mobile-schedule-main small {
    font-size: 0.8rem;
    opacity: 0.82;
  }

  .mobile-schedule-main .status-pill {
    width: fit-content;
    max-width: 100%;
    min-height: 26px;
    margin-top: 2px;
    padding: 4px 8px;
    white-space: normal;
  }

  .side-nav {
    gap: 4px;
  }

  .side-nav a {
    min-width: clamp(58px, 18vw, 72px);
    min-height: 48px;
    padding: 5px 4px;
    font-size: 0.63rem;
  }

  .side-nav svg {
    width: 19px;
    height: 19px;
  }

  .ai-floating-widget {
    right: 10px;
    bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .ai-fab {
    width: 50px;
    height: 50px;
    font-size: 1rem;
  }
}

@media (max-width: 420px) {
  .workspace {
    padding-inline: 10px;
  }

  .report-mobile-grade-grid {
    grid-template-columns: 1fr;
  }

  .mobile-schedule-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .mobile-schedule-time {
    white-space: normal;
  }
}

@media (max-width: 980px) {
  .course-preview-grid,
  .admin-dashboard-lower {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .canvas-dashboard-head {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px;
    border-radius: 16px;
  }

  .canvas-dashboard-head h2 {
    font-size: 1.45rem;
  }

  .canvas-dashboard-head p {
    font-size: 0.94rem;
  }

  .canvas-dashboard-head > strong {
    justify-self: start;
  }

  .course-dashboard-grid,
  .admin-function-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .course-tile {
    grid-template-rows: 66px auto;
    min-height: 190px;
    border-radius: 16px;
  }

  .course-tile-band {
    padding: 12px;
  }

  .course-tile-band em {
    min-height: 30px;
    padding: 5px 10px;
    font-size: 0.82rem;
  }

  .course-tile-body {
    padding: 14px;
    gap: 7px;
  }

  .course-tile-body strong {
    font-size: 1.18rem;
  }

  .course-workspace {
    padding: 15px;
    border-radius: 16px;
    gap: 14px;
  }

  .course-workspace-head {
    grid-template-columns: 1fr;
  }

  .course-workspace-score {
    justify-content: stretch;
  }

  .course-workspace-score strong,
  .course-workspace-score .ghost-button {
    flex: 1 1 auto;
    justify-content: center;
  }

  .course-action-grid {
    grid-template-columns: 1fr;
  }

  .course-action-card {
    min-height: 78px;
    border-radius: 14px;
  }

  .course-preview-grid > section {
    padding: 12px;
    border-radius: 14px;
    min-width: 0;
  }

  .student-class-detail-card,
  .subject-grade-summary,
  .subject-grade-summary > div,
  .grade-summary-tiles,
  .grade-summary-tile {
    min-width: 0;
    max-width: 100%;
  }

  .subject-grade-summary {
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 10px;
    overflow: hidden;
  }

  .grade-summary-tiles {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .grade-summary-tile {
    width: 100%;
    box-sizing: border-box;
  }

  .grade-summary-tile span,
  .grade-summary-tile strong,
  .grade-summary-tile small {
    overflow-wrap: anywhere;
  }

  .course-mini-stats {
    grid-template-columns: 1fr;
  }

  .course-mini-list > div {
    grid-template-columns: 1fr;
  }

  .course-mini-list em {
    grid-row: auto;
    justify-self: start;
  }

  .admin-function-card {
    min-height: 132px;
    border-radius: 16px;
  }
}

@media (max-width: 520px) {
  .canvas-dashboard {
    gap: 13px;
  }

  .canvas-dashboard-head {
    padding: 15px;
  }

  .canvas-dashboard-head h2 {
    font-size: 1.28rem;
  }

  .course-tile {
    min-height: 176px;
  }

  .course-tile-body strong {
    font-size: 1.08rem;
  }

  .course-workspace-head h2 {
    font-size: 1.35rem;
  }
}

@media (max-width: 820px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  input,
  select,
  textarea {
    min-height: 46px;
    font-size: 16px;
  }

  textarea {
    line-height: 1.35;
  }

  input[type="file"] {
    min-height: 48px;
    width: 100%;
    max-width: 100%;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.88rem;
    white-space: normal;
  }

  .login-screen,
  .login-hero-stage,
  .login-access-stack,
  .login-panel,
  .public-entry,
  .public-panel,
  .public-correction-stage,
  .public-correction-shell,
  .public-correction-card,
  .workspace,
  .content-stack,
  .dashboard-grid,
  .student-workbench,
  .student-console,
  .teacher-workbench,
  .section-workbench,
  .settings-workbench,
  .settings-content,
  .panel,
  .canvas-dashboard,
  .course-dashboard-shell,
  .course-workspace {
    min-width: 0;
    max-width: 100%;
  }

  .login-hero-stage {
    min-height: auto;
    padding: 16px 12px calc(26px + env(safe-area-inset-bottom));
  }

  .login-hero-intro {
    width: 100%;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
  }

  .login-hero-intro img {
    width: 52px;
    height: 52px;
  }

  .login-hero-intro h1 {
    font-size: clamp(1.42rem, 8vw, 2.2rem);
    line-height: 1.04;
    overflow-wrap: anywhere;
  }

  .login-hero-intro p {
    font-size: 0.94rem;
    line-height: 1.3;
  }

  .login-access-stack {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .login-panel,
  .public-entry,
  .public-panel {
    width: 100%;
    padding: 16px;
    border-radius: 16px;
  }

  .public-buttons {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .public-buttons .ghost-button,
  .public-panel .primary-button,
  .login-panel .primary-button {
    width: 100%;
    justify-content: center;
  }

  .demo-accounts {
    grid-template-columns: 1fr;
  }

  .public-panel .form-grid,
  .public-panel .document-upload-grid,
  .public-correction-upload-grid,
  .public-correction-missing,
  .public-correction-actions,
  .public-correction-selected,
  .public-correction-docs div,
  .document-upload-grid {
    grid-template-columns: 1fr !important;
  }

  .document-upload-grid {
    gap: 10px;
    padding: 12px;
    overflow: hidden;
  }

  .document-upload-grid legend {
    max-width: 100%;
    padding-right: 0;
    font-size: 0.94rem;
    line-height: 1.25;
    white-space: normal;
  }

  .document-upload-grid label,
  .public-correction-upload,
  .public-correction-card {
    padding: 12px;
    overflow: hidden;
  }

  .public-correction-header,
  .public-correction-profile,
  .public-correction-title,
  .public-correction-actions,
  .public-correction-selected,
  .public-correction-docs div {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .public-correction-selected-actions,
  .public-correction-actions {
    width: 100%;
    justify-content: stretch;
  }

  .public-correction-selected-actions .ghost-button,
  .public-correction-actions .ghost-button,
  .public-correction-actions .primary-button {
    width: 100%;
    justify-content: center;
  }

  .institution-header {
    width: 100%;
  }

  .institution-title {
    min-width: 0;
  }

  .institution-title h1 {
    overflow-wrap: anywhere;
  }

  .page-heading {
    min-width: 0;
  }

  .page-heading h1,
  .page-heading p,
  #viewSubtitle {
    overflow-wrap: anywhere;
  }

  .panel-title,
  .mini-panel-title,
  .staff-account-editor-head,
  .access-detail-head,
  .student-profile-panel-head,
  .section-readonly-note,
  .course-workspace-head,
  .canvas-dashboard-head {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .panel-title > *,
  .mini-panel-title > *,
  .staff-account-editor-head > *,
  .course-workspace-head > * {
    min-width: 0;
  }

  .panel-title .ghost-button,
  .panel-title .primary-button,
  .panel-title .secondary-button,
  .staff-account-editor-head .status-pill,
  .access-detail-head .status-pill {
    width: 100%;
    justify-content: center;
  }

  .student-workbench,
  .student-console,
  .teacher-workbench,
  .section-workbench,
  .settings-workbench,
  .settings-workbench.settings-workbench-access,
  .enrollment-review-layout,
  .admin-layout,
  .admin-grades-layout,
  .portal-layout,
  .split-layout,
  .course-preview-grid,
  .section-setup-grid,
  .section-quick-assignment-grid,
  .staff-account-stack,
  .staff-account-form,
  .staff-account-manage,
  .access-activity-grid,
  .student-profile-form,
  .student-profile-grid,
  .student-section-current,
  .student-access-summary,
  .load-assignment-controls,
  .connected-load-list .load-assignment-card {
    grid-template-columns: 1fr !important;
  }

  .settings-menu {
    position: static;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .settings-menu button,
  .staff-account-card,
  .access-user-card {
    min-height: 52px;
  }

  .gradebook-flow {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .grade-item-summary,
  .grade-item-edit-disclosure > summary {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .grade-item-summary .status-pill,
  .grade-item-edit-disclosure > summary::after {
    justify-self: start;
  }

  .staff-account-list,
  .access-user-list,
  .student-result-list,
  .section-list {
    max-height: min(46svh, 420px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 2px;
  }

  .section-connected-row,
  .data-row,
  .assignment-row-meta,
  .section-connected-actions,
  .load-assignment-actions,
  .inline-actions,
  .subject-editor-actions,
  .section-setup-actions,
  .panel-actions,
  .toolbar-row,
  .section-toolbar,
  .schedule-planner-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    justify-items: stretch;
  }

  .section-connected-actions .ghost-button,
  .assignment-row-meta .ghost-button,
  .load-assignment-actions .ghost-button,
  .inline-actions .ghost-button,
  .inline-actions .primary-button,
  .subject-editor-actions .ghost-button,
  .subject-editor-actions .primary-button,
  .section-setup-actions .ghost-button,
  .section-setup-actions .primary-button,
  .panel-actions .ghost-button,
  .panel-actions .primary-button,
  .toolbar-row .ghost-button,
  .toolbar-row .primary-button,
  .section-toolbar .ghost-button,
  .schedule-planner-actions .ghost-button {
    width: 100%;
    justify-content: center;
  }

  .section-card,
  .staff-account-card,
  .access-user-card,
  .student-result,
  .course-tile,
  .course-action-card,
  .section-connected-row,
  .load-assignment-card {
    overflow: hidden;
  }

  .section-card *,
  .staff-account-card *,
  .student-result *,
  .course-tile *,
  .course-action-card *,
  .section-connected-row *,
  .load-assignment-card * {
    overflow-wrap: anywhere;
  }

  .table-wrap,
  .data-table-wrap,
  .report-table-wrap,
  .staff-attendance-table-wrap,
  .gradebook-table-wrap,
  .daily-print-wrap,
  .schedule-wrap,
  .student-schedule-wrap,
  .teacher-schedule-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .data-table,
  .staff-attendance-table,
  .attendance-grade-table,
  .report-table,
  .daily-schedule-table {
    min-width: 620px;
  }

  .schedule-table,
  .student-schedule-table,
  .teacher-schedule-table {
    min-width: 680px;
  }

  .rubric-modal,
  .modal-card {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    max-height: calc(100svh - 22px);
    overflow: auto;
  }

  .toast {
    left: 10px;
    right: 10px;
    bottom: calc(92px + env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
  }
}

@media (max-width: 520px) {
  .login-panel,
  .public-entry,
  .public-panel,
  .public-correction-card,
  .panel,
  .record-section,
  .student-record,
  .course-workspace {
    padding: 13px;
  }

  .public-entry,
  .login-panel,
  .public-panel {
    border-radius: 14px;
  }

  .login-hero-intro {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .login-hero-intro img {
    width: 44px;
    height: 44px;
  }

  .login-hero-intro h1 {
    font-size: clamp(1.25rem, 8vw, 1.72rem);
  }

  .login-hero-intro p {
    font-size: 0.86rem;
  }

  .form-grid,
  .detail-grid,
  .control-cards,
  .document-checklist,
  .password-request-grid,
  .backup-grid,
  .review-decision-form,
  .enrollment-overview-grid,
  .missing-docs-box,
  .grade-rules-grid,
  .course-action-grid,
  .admin-function-grid,
  .course-mini-stats,
  .grade-summary-tiles {
    grid-template-columns: 1fr !important;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .primary-button,
  .secondary-button,
  .ghost-button,
  .danger-button {
    width: 100%;
    justify-content: center;
    white-space: normal;
    line-height: 1.18;
  }

  .side-nav a {
    min-width: clamp(56px, 17vw, 66px);
  }

  .staff-account-list,
  .access-user-list,
  .student-result-list,
  .section-list {
    max-height: min(42svh, 360px);
  }

  .data-table,
  .staff-attendance-table,
  .attendance-grade-table,
  .report-table,
  .daily-schedule-table {
    min-width: 560px;
  }

  .schedule-table,
  .student-schedule-table,
  .teacher-schedule-table {
    min-width: 640px;
  }
}

@media (max-width: 420px) {
  .workspace {
    padding-inline: 9px;
  }

  .institution-header {
    padding-inline: 10px;
  }

  .institution-title h1 {
    max-width: calc(100vw - 68px);
    font-size: 1rem;
  }

  .page-heading h1 {
    font-size: 1.42rem;
  }

  .panel-title h2,
  .title-with-icon h2 {
    font-size: 1.08rem;
  }

  .document-upload-grid,
  .public-correction-upload-grid {
    padding: 9px;
  }

  .document-upload-grid label,
  .public-correction-upload {
    padding: 10px;
  }

  .side-nav {
    gap: 3px;
  }

  .side-nav a {
    min-width: 54px;
    padding-inline: 3px;
    font-size: 0.58rem;
  }

  .side-nav svg {
    width: 18px;
    height: 18px;
  }
}

/* Final mobile portal polish: keeps phone views dense, clear, and calm. */
@media (max-width: 820px) {
  .institution-header {
    min-height: 60px;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 6px 16px rgba(12, 36, 64, 0.08);
  }

  .institution-title {
    flex: 1 1 auto;
    max-width: calc(100% - 74px);
    gap: 10px;
  }

  .institution-title img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .institution-title h1 {
    max-width: 100%;
    font-size: clamp(0.98rem, 4.1vw, 1.16rem);
    line-height: 1.08;
  }

  .mobile-logout-button {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .workspace {
    padding: 16px 14px calc(98px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, #f4f8fb 0%, #edf5f8 100%);
  }

  .content-stack {
    gap: 12px;
  }

  .page-heading {
    display: grid;
    gap: 3px;
    margin: 0 0 8px;
    padding: 0 2px;
  }

  #viewEyebrow {
    display: none;
  }

  .page-heading h1 {
    font-size: clamp(1.42rem, 6.4vw, 1.72rem);
    line-height: 1.04;
  }

  .page-heading > p,
  #viewSubtitle {
    display: none;
  }

  .panel,
  .record-section,
  .student-record,
  .student-identity,
  .metric-card,
  .course-tile,
  .course-workspace,
  .canvas-dashboard-head,
  .student-class-detail-card {
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(12, 36, 64, 0.07);
  }

  .panel,
  .record-section,
  .student-record,
  .course-workspace {
    padding: 14px;
  }

  .panel-title {
    gap: 7px;
    margin-bottom: 10px;
  }

  .panel-title h2,
  .panel-title h3,
  .title-with-icon h2 {
    font-size: 1.05rem;
    line-height: 1.16;
  }

  .panel-title p,
  .helper-text,
  .student-result p,
  .control-cards p {
    font-size: 0.82rem;
    line-height: 1.34;
  }

  .panel-kicker {
    font-size: 0.68rem;
    letter-spacing: 0.045em;
    line-height: 1.15;
  }

  .student-identity {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 11px;
    align-items: center;
    margin-bottom: 0;
    padding: 13px;
  }

  .student-identity .student-photo,
  .student-photo {
    width: 58px;
    height: 58px;
    border-width: 1px;
    font-size: 1rem;
  }

  .student-identity h2 {
    margin: 2px 0;
    font-size: clamp(1.22rem, 5.8vw, 1.48rem);
    line-height: 1.08;
  }

  .student-identity p {
    font-size: 0.84rem;
    line-height: 1.28;
  }

  .student-identity > button,
  .student-identity .photo-upload,
  .student-identity .ghost-button {
    min-height: 39px;
    border-radius: 8px;
    font-size: 0.86rem;
  }

  .student-mobile-home-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 13px;
    margin-bottom: 0;
  }

  .student-mobile-home-summary strong,
  .student-mobile-home-summary span,
  .student-mobile-home-summary b {
    line-height: 1.12;
  }

  .student-mobile-home-summary strong {
    display: block;
    color: var(--green-950);
    font-size: 0.98rem;
  }

  .student-mobile-home-summary span {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
  }

  .student-mobile-home-chips {
    display: flex;
    gap: 5px;
    align-items: center;
  }

  .student-mobile-home-chips span {
    padding: 5px 7px;
    border-radius: 999px;
    color: var(--green-950);
    background: #eaf8ef;
    white-space: nowrap;
  }

  .student-dashboard-identity,
  .student-dashboard-metrics,
  .student-route-metrics {
    display: none !important;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  .metric-card {
    min-height: 88px;
    align-content: start;
    gap: 5px;
    padding: 12px;
    text-align: left;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  }

  .metric-card span {
    color: #52677c;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.12;
  }

  .metric-card strong {
    font-size: clamp(1.42rem, 8vw, 1.82rem);
    letter-spacing: 0;
    line-height: 0.98;
  }

  .metric-card small {
    font-size: 0.72rem;
    line-height: 1.22;
  }

  .canvas-dashboard,
  .course-dashboard-shell {
    gap: 12px;
  }

  .canvas-dashboard-head {
    gap: 8px;
    padding: 13px;
    background: linear-gradient(135deg, #ffffff 0%, #f6fbf8 100%);
  }

  .canvas-dashboard-head h2 {
    font-size: 1.18rem;
  }

  .canvas-dashboard-head p {
    margin-top: 4px;
    font-size: 0.84rem;
    line-height: 1.32;
  }

  .canvas-dashboard-head > strong {
    justify-self: start;
    min-height: 30px;
    padding: 6px 10px;
    font-size: 0.72rem;
  }

  .course-dashboard-grid {
    gap: 10px;
  }

  .student-home-courses .canvas-dashboard-head {
    display: none;
  }

  .student-home-courses .course-dashboard-grid {
    gap: 8px;
  }

  .student-home-courses .course-tile {
    position: relative;
    grid-template-rows: 6px auto;
    min-height: 88px;
  }

  .student-home-courses .course-tile-band {
    min-height: 6px;
    padding: 0;
  }

  .student-home-courses .course-tile-band em {
    position: absolute;
    top: 10px;
    right: 10px;
    min-height: 24px;
    padding: 4px 8px;
    font-size: 0.68rem;
  }

  .student-home-courses .course-tile-body {
    padding: 12px 78px 12px 12px;
  }

  .course-tile {
    grid-template-rows: 54px auto;
    min-height: 142px;
  }

  .course-tile-band {
    padding: 10px;
  }

  .course-tile-band em {
    min-height: 28px;
    padding: 5px 9px;
    font-size: 0.75rem;
  }

  .course-tile-body {
    gap: 5px;
    padding: 12px;
  }

  .course-tile-body strong {
    font-size: 1rem;
  }

  .course-tile-body small {
    font-size: 0.78rem;
  }

  .course-tile-body span {
    font-size: 0.74rem;
  }

  .course-workspace {
    gap: 12px;
  }

  .course-workspace-head h2 {
    font-size: 1.22rem;
  }

  .course-workspace-head p {
    font-size: 0.84rem;
    line-height: 1.32;
  }

  .student-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .stat-tile {
    gap: 5px;
    padding: 10px;
    border-radius: 12px;
  }

  .stat-tile span,
  .stat-tile small {
    font-size: 0.7rem;
    line-height: 1.2;
  }

  .stat-tile strong {
    font-size: 0.95rem;
    line-height: 1.12;
  }

  .student-schedule-route-grid {
    gap: 10px;
  }

  .student-schedule-route-grid > article:not(.student-weekly-schedule-panel) {
    display: none;
  }

  .student-weekly-schedule-panel .panel-title {
    margin-bottom: 8px;
  }

  .student-weekly-schedule-panel .panel-title p,
  .student-schedule-map-hint {
    display: none;
  }

  .student-weekly-schedule-panel .status-pill {
    min-height: 25px;
    padding: 4px 8px;
    font-size: 0.68rem;
  }

  .mobile-schedule-list {
    gap: 7px;
  }

  .mobile-schedule-day {
    border-radius: 12px;
    box-shadow: 0 6px 14px rgba(5, 61, 44, 0.06);
  }

  .mobile-schedule-day summary {
    min-height: 42px;
    padding: 9px 11px;
  }

  .mobile-schedule-items {
    gap: 6px;
    padding: 8px;
  }

  .mobile-schedule-item {
    grid-template-columns: 78px minmax(0, 1fr);
    min-height: 54px;
    padding: 8px;
  }

  .mobile-schedule-time {
    font-size: 0.72rem;
  }

  .mobile-schedule-main strong {
    font-size: 0.88rem;
  }

  .mobile-schedule-main span,
  .mobile-schedule-main small {
    font-size: 0.74rem;
  }

  .student-grades-focus-panel .panel-title {
    margin-bottom: 9px;
  }

  .student-grades-focus-panel .panel-title p {
    display: none;
  }

  .student-grade-overview,
  .student-rubric-menu {
    gap: 8px;
  }

  .student-rubric-card {
    border-radius: 12px;
  }

  .student-grade-group-trigger {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 58px;
    padding: 10px;
  }

  .student-grade-group-trigger strong {
    font-size: 0.92rem;
  }

  .student-grade-group-trigger span,
  .student-grade-group-trigger small {
    font-size: 0.72rem;
  }

  .student-grade-group-trigger em {
    font-size: 0.9rem;
  }

  .student-grade-chevron {
    grid-column: 1 / -1;
    justify-self: start;
    min-height: 24px;
    padding: 4px 8px;
    font-size: 0.68rem;
  }

  .student-grade-group-rubrics {
    padding: 9px;
  }

  .student-grade-group-rubrics p {
    display: none;
  }

  .student-rubric-buttons {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .student-rubric-button {
    min-height: 58px;
    padding: 10px;
  }

  .rubric-modal .grade-breakdown-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .rubric-modal .grade-breakdown-row em {
    justify-self: start;
    max-width: none;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(7, 109, 74, 0.08);
    text-align: left;
  }

  .student-report-collapse {
    padding: 12px;
  }

  .sidebar {
    display: block;
    height: auto;
    min-height: 0;
    gap: 0;
    padding: 5px max(8px, env(safe-area-inset-left)) calc(5px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
  }

  .side-nav {
    justify-content: space-between;
    gap: 4px;
  }

  .side-nav a {
    flex: 1 1 0;
    min-width: clamp(52px, 15vw, 64px);
    max-width: 76px;
    min-height: 46px;
    gap: 3px;
    padding: 5px 3px;
    border-radius: 13px;
    font-size: 0.58rem;
    font-weight: 850;
  }

  .side-nav svg {
    width: 18px;
    height: 18px;
  }

  .ai-floating-widget {
    right: 10px;
    bottom: calc(68px + env(safe-area-inset-bottom));
  }

  .ai-floating-widget.is-open {
    bottom: calc(68px + env(safe-area-inset-bottom));
  }

  .ai-fab {
    width: 48px;
    height: 48px;
    font-size: 0.95rem;
  }

  .toast {
    bottom: calc(68px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 520px) {
  .institution-header {
    min-height: 56px;
    padding: 8px 10px;
  }

  .institution-title {
    max-width: calc(100% - 66px);
    gap: 8px;
  }

  .institution-title img {
    width: 36px;
    height: 36px;
  }

  .institution-title h1 {
    font-size: clamp(0.92rem, 4.5vw, 1.02rem);
  }

  .mobile-logout-button {
    min-height: 34px;
    padding: 0 11px;
    font-size: 0.78rem;
  }

  .workspace {
    padding: 14px 12px calc(88px + env(safe-area-inset-bottom));
  }

  #viewEyebrow {
    font-size: 0.74rem;
  }

  .page-heading h1 {
    font-size: clamp(1.34rem, 6.8vw, 1.54rem);
  }

  .page-heading > p,
  #viewSubtitle {
    font-size: 0.86rem;
  }

  .panel,
  .record-section,
  .student-record,
  .course-workspace {
    padding: 12px;
  }

  .student-identity {
    gap: 10px;
    padding: 12px;
  }

  .student-identity .student-photo,
  .student-photo {
    width: 52px;
    height: 52px;
    font-size: 0.92rem;
  }

  .student-identity h2 {
    font-size: clamp(1.12rem, 5.8vw, 1.32rem);
  }

  .student-identity p {
    font-size: 0.8rem;
  }

  .metric-grid {
    gap: 8px;
  }

  .metric-card {
    min-height: 82px;
    padding: 10px;
  }

  .metric-card span,
  .metric-card small {
    font-size: 0.68rem;
  }

  .metric-card strong {
    font-size: clamp(1.3rem, 7.8vw, 1.58rem);
  }

  .canvas-dashboard-head {
    padding: 12px;
  }

  .canvas-dashboard-head h2,
  .course-workspace-head h2 {
    font-size: 1.12rem;
  }

  .side-nav a {
    min-width: clamp(50px, 14.5vw, 58px);
    min-height: 44px;
    font-size: 0.56rem;
  }

  .side-nav svg {
    width: 17px;
    height: 17px;
  }
}

@media (max-width: 420px) {
  .institution-title {
    max-width: calc(100% - 62px);
  }

  .institution-title h1 {
    max-width: 100%;
    font-size: 0.9rem;
  }

  .mobile-logout-button {
    padding: 0 9px;
  }

  .side-nav a {
    min-width: clamp(48px, 14vw, 54px);
    font-size: 0.54rem;
  }
}

@media print {
  @page {
    size: landscape;
    margin: 8mm;
  }

  @page student-report-page {
    size: Letter portrait;
    margin: 5mm;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body {
    background: #ffffff;
  }

  .sidebar,
  .institution-header,
  .top-tabs,
  .page-heading,
  .schedule-command-bar,
  .schedule-map-hint,
  .schedule-action-center,
  .schedule-coverage-panel,
  .section-guide-bubble,
  .ai-floating-widget,
  .toast,
  .daily-print-screen-heading {
    display: none !important;
  }

  .app-shell {
    display: block;
    height: auto;
  }

  .main-area,
  .workspace {
    display: block;
    padding: 0;
    overflow: visible;
  }

  .dashboard-grid,
  .panel,
  .daily-print-card {
    display: block;
    box-shadow: none;
    border: 0;
    padding: 0;
  }

  .daily-print-sheet {
    padding: 0;
    border: 0;
    border-radius: 0;
  }

  .daily-print-head {
    grid-template-columns: 38px minmax(0, 1fr) 120px;
    gap: 8px;
    margin-bottom: 6px;
    padding-bottom: 6px;
  }

  .daily-print-head img {
    width: 34px;
    height: 34px;
  }

  .daily-print-head span {
    font-size: 7.5pt;
  }

  .daily-print-head h2 {
    font-size: 14pt;
  }

  .daily-print-head p {
    font-size: 8pt;
  }

  .daily-print-head > strong {
    min-width: 0;
    padding: 5px 8px;
    font-size: 12pt;
  }

  .dashboard-grid > article:not(.daily-print-card) {
    display: none;
  }

  .daily-print-wrap {
    overflow: visible;
  }

  .daily-schedule-table {
    min-width: 0;
    font-size: 8.2pt;
    table-layout: fixed;
  }

  .daily-schedule-table th,
  .daily-schedule-table td {
    padding: 3.5px 4px;
  }

  .daily-schedule-table td:first-child {
    width: 34px;
  }

  .daily-schedule-table td:last-child {
    width: 72px;
  }

  .daily-class-cell strong {
    font-size: 6.9pt;
    line-height: 1.05;
  }

  body[data-print-mode="student-report"] {
    background: #ffffff;
    margin: 0;
    overflow: visible;
  }

  body[data-print-mode="student-report"][data-print-source="generated"] .app-shell {
    display: none !important;
  }

  body[data-print-mode="student-report"] .app-shell * {
    visibility: hidden !important;
  }

  body[data-print-mode="student-report"] .app-shell,
  body[data-print-mode="student-report"] .workspace,
  body[data-print-mode="student-report"] .main-content,
  body[data-print-mode="student-report"] .content-stack {
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }

  body[data-print-mode="student-report"] .content-stack > *,
  body[data-print-mode="student-report"] .dashboard-grid,
  body[data-print-mode="student-report"] .panel,
  body[data-print-mode="student-report"] .student-report-panel {
    display: block !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  body[data-print-mode="student-report"][data-print-source="generated"] .content-stack > :not([data-print-stage="student-report"]) {
    display: none !important;
  }

  body[data-print-mode="student-report"] .student-report-panel > :not(.student-report-sheet) {
    display: none !important;
  }

  body[data-print-mode="student-report"] .student-report-panel .student-report-sheet {
    display: none !important;
  }

  body[data-print-mode="student-report"] [data-print-stage="student-report"],
  body[data-print-mode="student-report"] [data-print-stage="student-report"] * {
    visibility: visible !important;
  }

  body[data-print-mode="student-report"] [data-print-stage="student-report"] {
    display: block !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    pointer-events: auto !important;
    opacity: 1 !important;
  }

  body[data-print-mode="student-report"] [data-print-stage="student-report"] .student-report-sheet {
    page: student-report-page;
    display: block !important;
    position: static;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: auto;
    padding: 6mm;
    color: #111111;
    background: #ffffff !important;
    font-family: Arial, sans-serif;
    break-after: avoid;
    page-break-after: avoid;
  }

  body[data-print-mode="student-report"] .student-report-head {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) 62px;
    gap: 10px;
    align-items: center;
    margin-bottom: 9px;
    text-align: center;
  }

  body[data-print-mode="student-report"] .student-report-head img {
    width: 56px;
    height: 56px;
    object-fit: contain;
  }

  body[data-print-mode="student-report"] .student-report-head div {
    display: grid;
    gap: 2px;
    justify-items: center;
  }

  body[data-print-mode="student-report"] .student-report-head strong,
  body[data-print-mode="student-report"] .student-report-head span,
  body[data-print-mode="student-report"] .student-report-head b,
  body[data-print-mode="student-report"] .student-report-head em {
    color: #111111;
    font-size: 9pt;
    font-style: normal;
    line-height: 1.12;
  }

  body[data-print-mode="student-report"] .student-report-head b {
    font-size: 10pt;
    text-transform: uppercase;
  }

  body[data-print-mode="student-report"] .student-report-meta {
    display: grid;
    grid-template-columns: 1.6fr 1fr 0.8fr;
    gap: 10px;
    margin: 7px 0 10px;
  }

  body[data-print-mode="student-report"] .student-report-meta div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 5px;
    align-items: baseline;
    color: #111111;
    font-size: 8.7pt;
  }

  body[data-print-mode="student-report"] .student-report-meta span,
  body[data-print-mode="student-report"] .student-report-meta strong {
    color: #111111;
  }

  body[data-print-mode="student-report"] .student-report-sheet h3 {
    margin: 7px 0 4px;
    color: #111111;
    font-size: 9.3pt;
  }

  body[data-print-mode="student-report"] .official-report-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
  }

  body[data-print-mode="student-report"] .official-report-table th,
  body[data-print-mode="student-report"] .official-report-table td {
    border: 1px solid #222222;
    padding: 2.3px 3.2px;
    color: #111111;
    font-size: 7.45pt;
    line-height: 1.08;
  }

  body[data-print-mode="student-report"] .official-report-table th {
    background: #e8edf3 !important;
    font-weight: 900;
  }

  body[data-print-mode="student-report"] .official-report-table td:nth-child(n + 3),
  body[data-print-mode="student-report"] .official-report-table th:nth-child(n + 3) {
    text-align: center;
  }

  body[data-print-mode="student-report"] .attendance-report-table th,
  body[data-print-mode="student-report"] .attendance-report-table td {
    font-size: 7.5pt;
  }

  body[data-print-mode="student-report"] .student-report-condition {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 98px 48px 76px;
    margin-top: 8px;
    border: 1px solid #222222;
  }

  body[data-print-mode="student-report"] .student-report-condition span,
  body[data-print-mode="student-report"] .student-report-condition strong {
    padding: 3px 4px;
    border-right: 1px solid #222222;
    color: #111111;
    font-size: 7.35pt;
  }

  body[data-print-mode="student-report"] .student-report-condition strong:last-child {
    border-right: 0;
  }

  body[data-print-mode="student-report"] .student-report-signatures {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 24px;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body[data-print-mode="student-report"] .student-report-signatures div {
    display: grid;
    justify-items: center;
    gap: 4px;
    color: #111111;
  }

  body[data-print-mode="student-report"] .student-report-signatures span {
    width: 170px;
    border-top: 1px solid #111111;
  }

  body[data-print-mode="student-report"] .student-report-signatures strong {
    color: #111111;
    font-size: 7.6pt;
  }
}

@media (max-width: 760px) {
  .my-profile-shell {
    width: 100%;
  }

  .my-profile-hero-main,
  .profile-photo-edit,
  .profile-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .my-profile-avatar {
    width: 84px;
    height: 84px;
  }

  .profile-photo-upload,
  .profile-form-actions .primary-button {
    width: 100%;
  }

  .my-profile-form .form-grid {
    grid-template-columns: 1fr;
  }
}
