:root {
  --brand: #08a5a3;
  --brand-dark: #087d7d;
  --brand-deep: #07575c;
  --brand-soft: #dff5f3;
  --brand-mist: #f1fbfa;
  --ink: #153a3d;
  --muted: #698184;
  --line: #d9e9e7;
  --paper: #ffffff;
  --canvas: #f5faf9;
  --sun: #f5b84b;
  --coral: #ec785f;
  --success: #2c9472;
  --shadow: 0 22px 60px rgba(7, 87, 92, 0.11);
  --shadow-small: 0 10px 28px rgba(7, 87, 92, 0.08);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 5%, rgba(8, 165, 163, 0.11), transparent 26rem),
    radial-gradient(circle at 94% 45%, rgba(245, 184, 75, 0.1), transparent 22rem),
    var(--canvas);
  font-family: "Aptos", "Trebuchet MS", sans-serif;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
.app-brand strong {
  font-family: "Arial Rounded MT Bold", "Aptos Display", "Trebuchet MS", sans-serif;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(2.25rem, 6vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(1px);
  pointer-events: none;
}

.ambient-one {
  top: -9rem;
  right: -8rem;
  width: 25rem;
  height: 25rem;
  border: 1px solid rgba(8, 165, 163, 0.14);
  box-shadow: inset 0 0 0 4rem rgba(8, 165, 163, 0.025);
}

.ambient-two {
  bottom: 6rem;
  left: -8rem;
  width: 18rem;
  height: 18rem;
  background: rgba(8, 165, 163, 0.035);
}

.hidden {
  display: none !important;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--brand-dark);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lead {
  max-width: 40rem;
  color: #49676a;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.card {
  border: 1px solid rgba(8, 125, 125, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-small);
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink);
  background: var(--paper);
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #13bbb4);
  box-shadow: 0 12px 28px rgba(8, 165, 163, 0.24);
}

.button-soft {
  color: var(--brand-deep);
  background: var(--brand-soft);
}

.button-light {
  color: var(--brand-deep);
  background: #fff;
  box-shadow: 0 10px 25px rgba(4, 83, 87, 0.14);
}

.button-large {
  width: 100%;
  min-height: 54px;
}

.button-small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.86rem;
}

.public-main {
  width: min(1240px, calc(100% - 32px));
  min-height: calc(100vh - 120px);
  margin: 0 auto;
  padding: 32px 0;
}

.login-shell {
  min-height: calc(100vh - 160px);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.62fr);
  gap: clamp(32px, 7vw, 100px);
  align-items: center;
}

.login-story {
  position: relative;
  padding: clamp(10px, 4vw, 42px);
}

.hero-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 22px;
}

.login-story h1 {
  max-width: 760px;
}

.feature-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0;
}

.feature-ribbon span {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--brand-deep);
  font-size: 0.83rem;
  font-weight: 800;
}

.story-card {
  max-width: 620px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  overflow: hidden;
  border: 8px solid #fff;
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--shadow);
  transform: rotate(-1deg);
}

.story-photo {
  min-height: 185px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  background:
    linear-gradient(135deg, transparent 45%, rgba(255, 255, 255, 0.28) 45% 51%, transparent 51%),
    radial-gradient(circle at 35% 35%, var(--sun) 0 15%, transparent 16%),
    radial-gradient(circle at 67% 67%, var(--coral) 0 21%, transparent 22%),
    linear-gradient(145deg, #0eb8b0, #067b80);
}

.story-photo::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -65px;
  width: 190px;
  height: 190px;
  border: 22px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
}

.story-photo span {
  z-index: 1;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
}

.story-note {
  align-self: center;
  padding: 24px;
}

.story-note strong {
  font-size: 1.05rem;
}

.story-note p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.login-card {
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(8, 165, 163, 0.12);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-card-heading {
  display: flex;
  gap: 15px;
  align-items: center;
}

.login-card h2 {
  margin: 0;
}

.login-card > p {
  color: var(--muted);
}

.mini-logo {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: var(--brand-mist);
}

.mini-logo img {
  width: 62px;
  height: 62px;
}

.stack-form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: #34575a;
  font-size: 0.9rem;
  font-weight: 800;
}

label small {
  color: var(--muted);
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  min-height: 47px;
  padding: 12px 14px;
  border: 1px solid #cfe2df;
  border-radius: 13px;
  outline: none;
  color: var(--ink);
  background: #fbfefd;
  transition: border 160ms ease, box-shadow 160ms ease;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(8, 165, 163, 0.12);
}

.input-wrap {
  position: relative;
  display: block;
}

.input-wrap svg {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 20px;
  height: 20px;
  color: var(--brand-dark);
}

.input-wrap input {
  padding-left: 46px;
}

.privacy-note {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.78rem;
}

.app-header {
  width: min(1240px, calc(100% - 32px));
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 16px auto 0;
  padding: 10px 16px 10px 12px;
  border: 1px solid rgba(8, 125, 125, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-small);
  backdrop-filter: blur(16px);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.app-brand img {
  width: 62px;
  height: 62px;
}

.app-brand span {
  display: grid;
}

.app-brand strong {
  font-size: 1.1rem;
}

.app-brand small,
.user-name {
  color: var(--muted);
  font-size: 0.79rem;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.role-chip,
.activity-tag,
.status,
.privacy-badge,
.section-count {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--brand-deep);
  background: var(--brand-soft);
  font-size: 0.73rem;
  font-weight: 800;
}

.icon-button {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 13px;
  color: var(--brand-deep);
  background: var(--brand-mist);
  cursor: pointer;
  text-decoration: none;
}

.icon-button svg {
  width: 21px;
}

.app-main {
  width: min(1240px, calc(100% - 32px));
  margin: 22px auto 0;
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(28px, 5vw, 58px);
  border-radius: var(--radius-xl);
  color: #fff;
  background:
    radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.18), transparent 11rem),
    radial-gradient(circle at 93% 80%, rgba(245, 184, 75, 0.38), transparent 13rem),
    linear-gradient(125deg, var(--brand-deep), var(--brand));
  box-shadow: var(--shadow);
}

.dashboard-hero::after {
  content: "A";
  position: absolute;
  right: 8%;
  top: -42%;
  color: rgba(255, 255, 255, 0.08);
  font-family: "Arial Rounded MT Bold", sans-serif;
  font-size: 25rem;
  line-height: 1;
  transform: rotate(6deg);
}

.dashboard-hero > * {
  z-index: 1;
}

.dashboard-hero h1 {
  max-width: 800px;
  margin-bottom: 10px;
  font-size: clamp(2rem, 5vw, 4rem);
}

.dashboard-hero p {
  max-width: 650px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.84);
}

.dashboard-hero .eyebrow {
  color: #aef4ec;
}

.child-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.child-chips span {
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.81rem;
}

.section-nav {
  position: sticky;
  z-index: 10;
  top: 12px;
  display: flex;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin: 16px auto 26px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-small);
  backdrop-filter: blur(12px);
}

.section-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.section-nav a:hover {
  color: #fff;
  background: var(--brand);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 54px;
}

.metric-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-small);
}

.metric-card:nth-child(2n) {
  transform: translateY(8px);
}

.metric-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--brand-deep);
  background: var(--brand-soft);
  font-size: 1.3rem;
  font-weight: 900;
}

.metric-card strong {
  display: block;
  font-size: 1.6rem;
  line-height: 1;
}

.metric-card small {
  color: var(--muted);
}

.content-section {
  margin: 0 0 62px;
  scroll-margin-top: 92px;
}

.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-title h2,
.section-title p {
  margin-bottom: 0;
}

.updates-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.update-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-small);
}

.update-card p {
  color: #506b6e;
}

.update-card small {
  color: var(--muted);
}

.update-featured {
  grid-column: span 2;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(7, 87, 92, 0.94), rgba(8, 165, 163, 0.91)),
    var(--brand);
}

.update-featured p,
.update-featured small {
  color: rgba(255, 255, 255, 0.8);
}

.update-featured .activity-tag {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.update-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 20px;
}

.update-meta time {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.update-featured .update-meta time {
  color: rgba(255, 255, 255, 0.75);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.photo-card {
  position: relative;
  min-height: 275px;
  margin: 0;
  overflow: hidden;
  border-radius: 22px;
  background: var(--brand-soft);
  box-shadow: var(--shadow-small);
}

.photo-card:nth-child(5n + 1) {
  grid-column: span 2;
}

.photo-card img {
  width: 100%;
  height: 100%;
  min-height: 275px;
  position: absolute;
  inset: 0;
  object-fit: cover;
  transition: transform 400ms ease;
}

.photo-card:hover img {
  transform: scale(1.035);
}

.photo-card::after {
  content: "";
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(transparent, rgba(4, 42, 45, 0.88));
}

.photo-card figcaption {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  gap: 5px;
  padding: 20px;
  color: #fff;
}

.photo-card figcaption p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.85rem;
}

.photo-card .activity-tag {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.two-column-sections {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 18px;
}

.two-column-sections > .content-section {
  padding: 26px;
}

.event-list,
.document-list {
  display: grid;
  gap: 11px;
}

.calendar-downloads {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
}

.calendar-download {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid rgba(8, 165, 163, 0.22);
  border-radius: 17px;
  background: var(--brand-mist);
  text-decoration: none;
}

.calendar-download > span:last-child {
  display: grid;
}

.calendar-download small {
  color: var(--muted);
}

.event-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
}

.event-item > time {
  display: grid;
  place-items: center;
  padding: 8px;
  border-radius: 13px;
  color: var(--brand-deep);
  background: var(--brand-soft);
  text-transform: uppercase;
}

.event-holiday > time {
  color: #8c5812;
  background: #fff0cc;
}

.event-activity > time {
  color: #8b4133;
  background: #ffe6df;
}

.event-item time strong {
  font-size: 1.3rem;
  line-height: 1;
}

.event-item time span,
.event-item div > span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.event-item h3,
.event-item p {
  margin-bottom: 0;
}

.event-item p {
  color: var(--muted);
  font-size: 0.85rem;
}

.document-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  text-decoration: none;
  transition: border 160ms ease, transform 160ms ease;
}

.document-row:hover {
  transform: translateX(3px);
  border-color: var(--brand);
}

.document-row > span:nth-child(2) {
  display: grid;
}

.document-row small {
  color: var(--muted);
}

.file-icon {
  width: 42px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--coral);
  font-size: 0.67rem;
  font-weight: 900;
}

.status-signed {
  color: #1c7257;
  background: #dff5ea;
}

.status-pending {
  color: #895b12;
  background: #fff0cc;
}

.absence-panel {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(26px, 6vw, 80px);
  align-items: center;
  margin-bottom: 58px;
  padding: clamp(26px, 5vw, 56px);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 10% 20%, rgba(8, 165, 163, 0.15), transparent 14rem),
    #eaf8f6;
}

.absence-panel > form {
  padding: 24px;
}

.sent-notices {
  margin-top: 22px;
}

.sent-notices summary {
  cursor: pointer;
  color: var(--brand-dark);
  font-weight: 800;
}

.sent-notices p {
  margin: 8px 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.empty-state {
  padding: 35px;
  border: 1px dashed #bedbd8;
  border-radius: 20px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
  text-align: center;
}

.empty-state.compact {
  padding: 18px;
  margin-top: 12px;
}

.empty-welcome {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 24px 0 54px;
  padding: 28px;
}

.empty-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  flex: 0 0 74px;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  font-size: 2rem;
  font-weight: 900;
}

.notice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.notice-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.notice-new {
  border-color: rgba(8, 165, 163, 0.45);
  box-shadow: inset 4px 0 var(--brand), var(--shadow-small);
}

.notice-date {
  height: 62px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 16px;
  color: var(--brand-deep);
  background: var(--brand-soft);
  line-height: 1;
  text-transform: uppercase;
}

.notice-date strong {
  font-size: 1.4rem;
}

.notice-date span {
  margin-top: 4px;
  font-size: 0.68rem;
  font-weight: 900;
}

.notice-card h3 {
  margin-top: 7px;
}

.notice-card p {
  margin-bottom: 7px;
  color: var(--muted);
}

.notice-card small {
  color: var(--muted);
}

.new-dot {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--coral);
}

.class-list-grid {
  display: grid;
  gap: 12px;
}

.class-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-small);
}

.class-card > summary,
.management-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  cursor: pointer;
  list-style: none;
}

.class-card > summary::-webkit-details-marker,
.management-card > summary::-webkit-details-marker {
  display: none;
}

.class-card > summary > span:first-child,
.management-card > summary > span:nth-child(2) {
  display: grid;
}

.class-card summary small,
.management-card summary small {
  color: var(--muted);
}

.student-count {
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 800;
}

.attendance-form {
  padding: 4px 20px 22px;
  border-top: 1px solid var(--line);
}

.date-field {
  max-width: 280px;
  margin-top: 18px;
}

.form-hint {
  color: var(--muted);
  font-size: 0.85rem;
}

.student-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 18px;
}

.student-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 11px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.student-row > span:nth-child(2) {
  display: grid;
}

.student-row small {
  color: var(--muted);
}

.avatar {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--brand);
  font-weight: 900;
}

.attendance-check {
  width: 25px;
  min-height: 25px;
  accent-color: var(--brand);
}

.form-columns,
.admin-overview-grid,
.directory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-columns > form {
  padding: 24px;
}

.file-field {
  padding: 14px;
  border: 1px dashed #b4d8d4;
  border-radius: 15px;
  background: var(--brand-mist);
}

.file-field input {
  min-height: auto;
  padding: 8px 0 0;
  border: 0;
  background: transparent;
}

.simple-table {
  display: grid;
  gap: 0;
}

.simple-table > div {
  display: grid;
  grid-template-columns: minmax(130px, 1.3fr) minmax(100px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 5px;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

.simple-table > div:last-child {
  border-bottom: 0;
}

.simple-table span {
  color: var(--muted);
}

.admin-overview-grid {
  margin: 0 0 54px;
}

.overview-card {
  padding: 24px;
}

.big-numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.big-numbers div {
  display: grid;
  padding: 15px;
  border-radius: 16px;
  background: var(--brand-mist);
}

.big-numbers strong {
  color: var(--brand-deep);
  font-size: 2rem;
}

.big-numbers span,
.progress-list span {
  color: var(--muted);
  font-size: 0.82rem;
}

.progress-list p {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.management-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.management-card {
  height: fit-content;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-small);
}

.management-card[open] {
  border-color: rgba(8, 165, 163, 0.45);
}

.management-card > summary {
  justify-content: flex-start;
}

.management-card > summary::after {
  content: "+";
  margin-left: auto;
  color: var(--brand);
  font-size: 1.5rem;
}

.management-card[open] > summary::after {
  content: "−";
}

.management-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  flex: 0 0 43px;
  border-radius: 14px;
  color: var(--brand-deep);
  background: var(--brand-soft);
  font-weight: 900;
}

.management-card > form,
.management-card > .nested-forms {
  padding: 2px 20px 22px;
  border-top: 1px solid var(--line);
}

.nested-forms {
  display: grid;
  gap: 22px;
}

.nested-forms > form {
  padding-top: 18px;
}

.subform {
  padding-top: 20px !important;
  border-top: 1px dashed var(--line);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.directory-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.directory-grid > article {
  min-width: 0;
  padding: 22px;
}

.directory-grid .simple-table > div {
  grid-template-columns: 1fr;
  gap: 2px;
}

.app-footer {
  width: min(1240px, calc(100% - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 36px auto 22px;
  padding: 24px;
  border-top: 1px solid var(--line);
}

.app-footer > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-footer img {
  width: 54px;
  height: 54px;
}

.app-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.instagram-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--brand-deep);
  font-weight: 800;
  text-decoration: none;
}

.instagram-link svg {
  width: 25px;
}

.toast {
  position: fixed;
  z-index: 100;
  top: 24px;
  left: 50%;
  max-width: min(520px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border: 1px solid rgba(8, 165, 163, 0.25);
  border-radius: 999px;
  color: var(--brand-deep);
  background: #fff;
  box-shadow: var(--shadow);
  font-weight: 800;
  transform: translateX(-50%);
  transition: opacity 300ms ease, transform 300ms ease;
}

.toast > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--success);
}

.alert-error {
  color: #913e31;
  border-color: rgba(236, 120, 95, 0.35);
}

.alert-error > span {
  background: var(--coral);
}

.toast-hide {
  opacity: 0;
  transform: translate(-50%, -12px);
  pointer-events: none;
}

.password-shell {
  min-height: calc(100vh - 190px);
  display: grid;
  place-items: center;
  padding: 48px 0 72px;
}

.password-card {
  width: min(620px, 100%);
  padding: clamp(26px, 5vw, 48px);
}

.password-card h1 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 6vw, 3.4rem);
}

.password-copy {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.password-card .stack-form {
  margin-top: 26px;
}

.password-tips {
  padding: 16px 18px;
  border: 1px solid rgba(8, 165, 163, 0.2);
  border-radius: 16px;
  color: var(--muted);
  background: var(--brand-mist);
}

.password-tips strong {
  display: block;
  margin-bottom: 8px;
  color: var(--brand-deep);
}

.password-tips ul {
  margin: 0;
  padding-left: 20px;
}

.password-tips li + li {
  margin-top: 5px;
}

.password-tips li::marker {
  color: var(--brand);
}

.password-cancel {
  width: 100%;
  margin-top: 12px;
  justify-content: center;
  text-decoration: none;
}

.setup-page {
  padding: 40px 16px;
}

.setup-shell {
  width: min(820px, 100%);
  margin: 0 auto;
}

.setup-intro {
  text-align: center;
}

.setup-logo {
  width: 115px;
  margin: 0 auto 15px;
}

.setup-intro h1 {
  font-size: clamp(2.2rem, 7vw, 4.2rem);
}

.setup-intro > p:last-child {
  max-width: 580px;
  margin: 0 auto 25px;
  color: var(--muted);
}

.setup-form {
  display: grid;
  gap: 30px;
  padding: clamp(22px, 5vw, 42px);
}

.setup-form section {
  position: relative;
}

.setup-form h2 {
  padding-left: 42px;
  font-size: 1.35rem;
}

.step-number {
  position: absolute;
  top: -3px;
  left: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--brand);
  font-weight: 900;
}

.span-2 {
  grid-column: span 2;
}

.setup-page .alert {
  margin: 0 0 18px;
  padding: 13px 18px;
  border: 1px solid rgba(236, 120, 95, 0.4);
  border-radius: 14px;
  color: #913e31;
  background: #fff5f2;
}

@media (max-width: 900px) {
  .login-shell,
  .two-column-sections,
  .absence-panel {
    grid-template-columns: 1fr;
  }

  .login-story {
    padding: 12px 0;
  }

  .login-story h1 {
    font-size: clamp(2.7rem, 11vw, 4.5rem);
  }

  .story-card {
    max-width: 100%;
  }

  .login-card {
    max-width: 620px;
    width: 100%;
    margin: 0 auto;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .updates-grid,
  .photo-grid,
  .management-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .update-featured {
    grid-column: span 2;
  }

  .photo-card:nth-child(5n + 1) {
    grid-column: auto;
  }

  .directory-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .public-main,
  .app-main,
  .app-header,
  .app-footer {
    width: min(100% - 20px, 1240px);
  }

  .public-main {
    padding-top: 12px;
  }

  .hero-logo {
    width: 92px;
    height: 92px;
  }

  .story-card {
    grid-template-columns: 1fr;
  }

  .story-note {
    display: none;
  }

  .app-header {
    height: 72px;
    margin-top: 8px;
    border-radius: 18px;
  }

  .app-brand img {
    width: 52px;
    height: 52px;
  }

  .app-brand small,
  .user-name,
  .header-user .role-chip {
    display: none;
  }

  .dashboard-hero {
    min-height: 290px;
    display: grid;
    align-content: end;
    padding: 26px 22px;
    border-radius: 26px;
  }

  .dashboard-hero h1 {
    font-size: 2.35rem;
  }

  .section-nav {
    width: 100%;
    justify-content: flex-start;
    margin-bottom: 20px;
  }

  .metric-grid,
  .metric-grid-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 42px;
  }

  .metric-card {
    gap: 9px;
    padding: 13px;
  }

  .metric-card:nth-child(2n) {
    transform: none;
  }

  .metric-icon {
    width: 39px;
    height: 39px;
    flex-basis: 39px;
  }

  .metric-card strong {
    font-size: 1.25rem;
  }

  .metric-card small {
    display: block;
    font-size: 0.7rem;
  }

  .content-section {
    margin-bottom: 46px;
  }

  .section-title {
    align-items: flex-start;
  }

  .section-count,
  .privacy-badge {
    display: none;
  }

  .updates-grid,
  .photo-grid,
  .notice-grid,
  .form-columns,
  .admin-overview-grid,
  .management-grid {
    grid-template-columns: 1fr;
  }

  .update-featured {
    grid-column: auto;
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .photo-card,
  .photo-card img {
    min-height: 220px;
  }

  .photo-card figcaption {
    padding: 13px;
  }

  .photo-card figcaption p {
    display: none;
  }

  .two-column-sections > .content-section {
    padding: 18px;
  }

  .document-row {
    grid-template-columns: auto 1fr;
  }

  .document-row .status {
    display: none;
  }

  .absence-panel {
    padding: 24px 16px;
    border-radius: 25px;
  }

  .student-list {
    grid-template-columns: 1fr;
  }

  .simple-table > div {
    grid-template-columns: 1fr auto;
  }

  .simple-table > div > span:nth-child(n + 3) {
    display: none;
  }

  .big-numbers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .big-numbers div {
    padding: 10px;
  }

  .big-numbers strong {
    font-size: 1.5rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .app-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
