﻿:root {
  --bg: #f7f2ea;
  --surface: #ffffff;
  --surface-2: #fbf7ef;
  --ink: #191816;
  --muted: #7b7467;
  --line: #dfd7c9;
  --brand: #256b42;
  --brand-dark: #1e5535;
  --brand-soft: rgba(37, 107, 66, 0.1);
  --accent: #181816;
  --shadow: 0 18px 45px rgba(31, 27, 20, 0.08);
  --shadow-soft: 0 12px 28px rgba(31, 27, 20, 0.06);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  background: linear-gradient(180deg, #fcf8f1 0%, #f5eee2 100%);
  color: var(--ink);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.shell { min-height: 100vh; }
.page { display: none; }
.page.active { display: block; }

/* App loader overlay */
.app-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #fcf8f1 0%, #f5eee2 100%);
  transition: opacity 0.3s ease;
}
.app-loader.fade-out {
  opacity: 0;
  pointer-events: none;
}
.app-loader.hidden { display: none !important; }
.loader-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.loader-text {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.95rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Login button loading state */
.auth-submit.loading {
  pointer-events: none;
  opacity: 0.7;
}
.auth-submit .btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}
.auth-submit.loading .btn-spinner {
  display: inline-block;
}
.hidden { display: none !important; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 60px 16px;
  background: rgba(250, 246, 238, 0.96);
  border-bottom: 1px solid rgba(34, 29, 24, 0.08);
  backdrop-filter: blur(10px);
}

.brand-btn {
  border: 0;
  background: none;
  text-align: left;
  padding: 0;
}

.brand-btn strong,
.hero h1,
.section-head h2,
.auth-card h2,
.hero-strip h2,
.cta-section h2,
.feature-card h3,
.mini-card h3,
.panel-head h3,
.sidebar h2,
.modal-card h3 {
  font-family: "Fraunces", serif;
}

.brand-btn strong {
  color: var(--brand);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: 0;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.ghost-btn,
.text-btn,
.auth-link {
  border: 0;
  background: none;
  color: #574f43;
  padding: 0;
  font-size: 0.98rem;
  transition: color 0.18s ease, opacity 0.18s ease;
}

.primary-btn,
.secondary-btn,
.sidebar-link,
.auth-submit {
  border-radius: 14px;
  border: 1px solid transparent;
  padding: 12px 22px;
  min-height: 48px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.primary-btn {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 12px 24px rgba(37, 107, 66, 0.16);
}

.primary-btn:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(30, 85, 53, 0.2);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(223, 215, 201, 0.95);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.secondary-btn:hover,
.sidebar-link:hover {
  transform: translateY(-1px);
  border-color: #cfc3af;
}

.ghost-btn:hover,
.text-btn:hover,
.auth-link:hover {
  color: var(--brand);
}

.primary-btn:focus-visible,
.secondary-btn:focus-visible,
.sidebar-link:focus-visible,
.ghost-btn:focus-visible,
.text-btn:focus-visible,
.auth-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 107, 66, 0.12);
}

.nav-login {
  padding: 10px 22px;
  border-radius: 12px;
}

.notification-shell {
  position: relative;
  display: inline-flex;
}

.notification-bell {
  position: relative;
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(37, 107, 66, 0.18);
  border-radius: 999px;
  background: #fffdfa;
  color: var(--brand-dark);
  box-shadow: 0 12px 28px rgba(31, 27, 20, 0.08);
}

.notification-bell svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 999px;
  background: #b42318;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  border: 2px solid #fffdfa;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 90;
  width: min(360px, calc(100vw - 32px));
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 253, 250, 0.98);
  border: 1px solid rgba(223, 215, 201, 0.95);
  box-shadow: 0 24px 64px rgba(31, 27, 20, 0.16);
}

.notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(223, 215, 201, 0.75);
}

.notification-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding-top: 12px;
}

.notification-item,
.notification-empty {
  padding: 12px;
  border-radius: 14px;
  background: #f8f3ea;
  border: 1px solid rgba(223, 215, 201, 0.9);
}

.notification-item.unread {
  background: #edf6ef;
  border-color: rgba(37, 107, 66, 0.22);
}

.notification-item strong {
  display: block;
  margin-bottom: 5px;
}

.notification-item p,
.notification-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.92rem;
}

.notification-item time {
  display: inline-flex;
  margin-top: 8px;
  color: #6d6457;
  font-size: 0.78rem;
  font-weight: 700;
}

.nav-user-profile {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 12px 6px 6px;
  border: 1px solid rgba(37, 107, 66, 0.18);
  border-radius: 999px;
  background: #fffdfa;
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(31, 27, 20, 0.08);
  cursor: pointer;
}

.nav-user-profile span {
  display: grid;
  gap: 1px;
  text-align: left;
}

.nav-user-profile strong,
.nav-user-profile small {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-user-profile small {
  color: var(--muted);
  font-size: 0.72rem;
}

.nav-user-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #dff0e5;
  color: var(--brand-dark);
  font-weight: 800;
  object-fit: cover;
}

.hero,
.feature-section,
.workflow-section,
.auth-page,
.dashboard-page,
.cta-section {
  padding: 56px 60px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 430px);
  gap: 84px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  min-height: calc(100vh - 120px);
  padding-top: 72px;
  padding-bottom: 58px;
}

.hero-copy,
.hero-panel,
.auth-card,
.panel,
.sidebar,
.modal-card {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.eyebrow,
.sidebar-label,
.mini-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #edf5ef;
  color: var(--brand);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  font-size: 5.8rem;
  line-height: 0.96;
  letter-spacing: 0;
}

.hero h1 em {
  color: var(--brand);
  font-style: italic;
}

.rotating-heading {
  position: relative;
  display: grid;
  width: max-content;
  max-width: 100%;
  min-height: 1.08em;
  margin-top: 0.04em;
  overflow: hidden;
}

.rotating-heading span {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(0.9em) scale(0.98);
  animation: rotateHeroHeading 7.5s ease-in-out infinite;
  will-change: opacity, transform;
}

.rotating-heading span:nth-child(2) {
  animation-delay: 2.5s;
}

.rotating-heading span:nth-child(3) {
  animation-delay: 5s;
}

@keyframes rotateHeroHeading {
  0% {
    opacity: 0;
    transform: translateY(0.9em) scale(0.98);
  }
  8%,
  28% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  36%,
  100% {
    opacity: 0;
    transform: translateY(-0.65em) scale(0.98);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rotating-heading {
    display: inline;
  }

  .rotating-heading span {
    position: static;
    animation: none;
    opacity: 1;
    transform: none;
  }

  .rotating-heading span:not(:first-child) {
    display: none;
  }
}

.hero-text,
.auth-sub,
.section-copy,
.mini-card p,
.feature-card p,
.timeline p,
.info-list span,
.mentor-card p,
.announcement-item p,
.auth-foot {
  color: var(--muted);
  line-height: 1.65;
}

.hero-text {
  max-width: 620px;
  font-size: 1.1rem;
  margin: 22px 0 0;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.hero-panel {
  display: grid;
  gap: 16px;
}

.mini-card {
  padding: 22px 24px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #d8ded3;
  box-shadow: var(--shadow);
}

.mini-card.accent {
  border-left: 3px solid var(--brand);
  transform: translateX(18px);
}

.mini-card h3 {
  margin: 0 0 10px;
  font-size: 1.5rem;
}

.mini-card p {
  font-size: 1rem;
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 22px;
  align-items: center;
  background: var(--brand);
  color: #fff;
  padding: 26px 60px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.stats-band article {
  text-align: center;
  position: relative;
}

.stats-band strong {
  display: block;
  font-family: "Fraunces", serif;
  font-size: 2.45rem;
  line-height: 1;
}

.stats-band span {
  display: block;
  margin-top: 10px;
  text-transform: uppercase;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.78);
}

.feature-section,
.cta-section {
  max-width: 1280px;
  margin: 0 auto;
}

.section-head {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-head h2,
.cta-section h2 {
  margin: 0;
  font-size: 4.4rem;
  line-height: 1.02;
  letter-spacing: 0;
}

.section-copy {
  max-width: 620px;
  margin-top: 14px;
  font-size: 1.08rem;
}

.feature-grid {
  display: grid;
  gap: 22px;
}

.feature-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card {
  padding: 32px 32px 30px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-height: 240px;
}

.feature-card.highlight {
  background: #edf7ef;
  border-color: #b7d4c1;
}

.feature-card h3 {
  margin: 0 0 16px;
  font-size: 1.85rem;
}

.workflow-section {
  background: #1d1d1a;
  color: #fff;
  margin-top: 26px;
}

.workflow-section .section-head {
  max-width: 1280px;
  margin: 0 auto 48px;
}

.workflow-section .section-head h2 {
  color: #fff;
}

.workflow-eyebrow {
  background: transparent;
  padding-left: 0;
  color: #d0bea3;
}

.dark-copy {
  color: rgba(255, 255, 255, 0.68);
}

.timeline {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 36px;
  right: 36px;
  top: 26px;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
}

.timeline article {
  position: relative;
  text-align: center;
  z-index: 1;
  padding-inline: 6px;
}

.timeline span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-family: "Fraunces", serif;
  font-size: 1.65rem;
  font-weight: 700;
}

.timeline p {
  color: rgba(255, 255, 255, 0.7);
  max-width: 180px;
  margin: 0 auto;
  font-size: 1rem;
}

.cta-section {
  padding-top: 84px;
  padding-bottom: 96px;
}

.cta-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 440px);
  gap: 34px;
  align-items: stretch;
  padding: 36px;
  border-radius: 32px;
  background:
    radial-gradient(circle at top left, rgba(37, 107, 66, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 241, 231, 0.94) 100%);
  border: 1px solid rgba(223, 215, 201, 0.92);
  box-shadow: var(--shadow);
}

.cta-copy {
  display: grid;
  align-content: center;
}

.cta-copy .section-copy {
  max-width: 560px;
}

.cta-actions {
  justify-content: flex-start;
}

.cta-panel,
.cta-meta-grid {
  display: grid;
  gap: 16px;
}

.cta-card {
  padding: 22px 22px 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fffdf9 0%, #f8f2e8 100%);
  border: 1px solid rgba(223, 215, 201, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.cta-card.emphasis {
  background:
    radial-gradient(circle at top right, rgba(37, 107, 66, 0.12), transparent 38%),
    linear-gradient(180deg, #f4f8f3 0%, #eef4ef 100%);
  border-color: rgba(183, 212, 193, 0.95);
}

.cta-card h3 {
  margin: 0 0 10px;
  font-family: "Fraunces", serif;
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.cta-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.02rem;
}

.cta-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.auth-page {
  min-height: 100vh;
  display: none;
  place-items: center;
}

.auth-page.active {
  display: grid;
}

.auth-wrap {
  width: 100%;
  max-width: 520px;
}

.auth-back {
  border: 0;
  background: none;
  color: #7a6d5b;
  margin-bottom: 20px;
  padding: 0;
  font-size: 0.98rem;
}

.compact-auth {
  width: 100%;
  padding: 40px 34px 30px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(252, 247, 239, 0.96) 100%);
  border: 1px solid rgba(223, 215, 201, 0.9);
  box-shadow: 0 24px 55px rgba(31, 27, 20, 0.08);
  position: relative;
  overflow: hidden;
}

.compact-auth::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--brand) 0%, rgba(37, 107, 66, 0.18) 88%);
}

.auth-brand {
  margin: 0 0 10px;
  color: var(--brand);
  font-family: "Fraunces", serif;
  font-size: 1.9rem;
  font-weight: 700;
}

.auth-kicker {
  margin: 0 0 14px;
  color: #7b715e;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-card h2 {
  margin: 0 0 6px;
  font-size: 2.65rem;
  line-height: 1.01;
}

.auth-sub {
  margin: 0;
  font-size: 1rem;
}

.auth-divider {
  width: 100%;
  height: 1px;
  margin: 18px 0 20px;
  background: linear-gradient(90deg, rgba(37, 107, 66, 0.14) 0%, rgba(223, 215, 201, 0.7) 55%, rgba(223, 215, 201, 0) 100%);
}

.google-auth-btn {
  width: 100%;
  min-height: 54px;
  border: 1px solid rgba(188, 178, 161, 0.9);
  border-radius: 14px;
  background: #fffdf9;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(61, 47, 31, 0.08);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.google-auth-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 107, 66, 0.42);
  box-shadow: 0 14px 28px rgba(61, 47, 31, 0.12);
}

.google-auth-btn:focus-visible {
  outline: 3px solid rgba(37, 107, 66, 0.22);
  outline-offset: 3px;
}

.google-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: conic-gradient(from -35deg, #4285f4, #34a853 28%, #fbbc05 55%, #ea4335 76%, #4285f4);
  color: #fff;
  font-weight: 900;
  font-family: Arial, sans-serif;
  line-height: 1;
}

.auth-provider-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-provider-divider::before,
.auth-provider-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(223, 215, 201, 0.9);
}

.auth-form-grid {
  grid-template-columns: 1fr;
  gap: 16px;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field.full,
.announcement-message {
  grid-column: 1 / -1;
}

label {
  color: var(--ink);
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(223, 215, 201, 0.95);
  background: linear-gradient(180deg, #fbf7ef 0%, #f7f1e7 100%);
  padding: 15px 16px;
  color: var(--ink);
  outline: none;
  min-height: 54px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #b8c8b8;
  box-shadow: 0 0 0 3px rgba(37, 107, 66, 0.08);
  transform: translateY(-1px);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 86px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(37, 107, 66, 0.18);
  background: rgba(255, 255, 255, 0.82);
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
}

.password-toggle:hover {
  border-color: rgba(37, 107, 66, 0.38);
  background: #fff;
}

.password-toggle:focus-visible {
  outline: 3px solid rgba(37, 107, 66, 0.18);
  outline-offset: 2px;
}

.auth-submit {
  margin-top: 22px;
  min-height: 56px;
  box-shadow: 0 14px 26px rgba(37, 107, 66, 0.18);
}

.auth-foot {
  margin: 18px 0 0;
  text-align: center;
}

.form-feedback {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f5efe4;
  border: 1px solid rgba(223, 215, 201, 0.9);
  color: #6d6457;
  line-height: 1.55;
}

.form-feedback.error {
  background: #fff1ee;
  border-color: #f0c4b9;
  color: #a54f3f;
}

.form-feedback.success {
  background: #eef7f0;
  border-color: #bfd9c4;
  color: #2d6b43;
}

.auth-link {
  color: var(--brand);
  font-weight: 700;
}

.auth-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 13px 14px;
  border-radius: 16px;
  background: #f5efe4;
  border: 1px solid rgba(223, 215, 201, 0.9);
}

.auth-note-dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--brand);
  flex: 0 0 auto;
}

.auth-note p {
  margin: 0;
  color: #6d6457;
  line-height: 1.55;
  font-size: 0.94rem;
}

.dashboard {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
}

.app-sidebar {
  min-height: calc(100vh - 140px);
}

.mobile-sidebar-toggle,
.mobile-sidebar-close,
.mobile-sidebar-backdrop {
  display: none;
}

.sidebar {
  position: sticky;
  top: 110px;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(34, 29, 24, 0.08);
}

.sidebar h2 {
  margin: 0 0 6px;
}

.sidebar-meta {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.sidebar-label {
  margin-bottom: 10px;
}

.sidebar-nav {
  gap: 10px;
}

.sidebar-profile-card {
  display: grid;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(223, 215, 201, 0.7);
}

.sidebar-avatar {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--brand) 0%, #3b8258 100%);
  color: #fff;
  font-family: "Fraunces", serif;
  font-size: 1.7rem;
  box-shadow: 0 16px 28px rgba(37, 107, 66, 0.2);
}

.sidebar-submeta {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.92rem;
}

.sidebar-link {
  text-align: left;
  background: #f7f1e7;
  padding-block: 12px;
  color: #3a332a;
}

.sidebar-link.active {
  background: var(--brand);
  color: white;
  box-shadow: 0 14px 24px rgba(37, 107, 66, 0.18);
}

.sidebar-stack,
.content,
.content-grid,
.upload-grid,
.announce-builder,
.admin-grid,
.metric-row,
.info-list,
.student-list,
.announcement-list {
  display: grid;
  gap: 16px;
}

.dashboard-section {
  display: none;
}

.dashboard-section.active {
  display: grid;
  gap: 16px;
}

.panel {
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(250, 245, 236, 0.9) 100%);
  border: 1px solid rgba(223, 215, 201, 0.95);
  box-shadow: var(--shadow);
}

.dashboard-hero {
  overflow: hidden;
  gap: 22px;
}

.teacher-hero {
  background:
    radial-gradient(circle at top right, rgba(37, 107, 66, 0.14), transparent 34%),
    radial-gradient(circle at bottom left, rgba(34, 29, 24, 0.04), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 240, 230, 0.94) 100%);
}

.student-hero {
  background:
    radial-gradient(circle at top right, rgba(37, 107, 66, 0.08), transparent 36%),
    rgba(255, 255, 255, 0.92);
}

.compact-copy {
  max-width: 560px;
}

.teacher-hero-copy {
  display: grid;
  gap: 12px;
}

.teacher-hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.hero-strip,
.teacher-strip,
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(223, 215, 201, 0.7);
}

.panel-head h3,
.metric-row strong,
.info-list strong,
.mentor-card strong,
.announcement-item strong {
  margin: 0;
}

.panel-kicker {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f5efe4;
  color: #6b5b44;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-subsection h4,
.modal-section h4 {
  font-family: "Fraunces", serif;
  letter-spacing: 0;
}

.content-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.wide { grid-column: 1 / -1; }

.metric-row { grid-template-columns: repeat(3, 1fr); }
.metric-row article {
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8f3ea 0%, #f4ecdf 100%);
  border: 1px solid rgba(223, 215, 201, 0.9);
}
.metric-row strong { display: block; font-family: "Fraunces", serif; font-size: 2rem; }

.metric-row-hero article {
  min-width: 150px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.metric-row-hero span {
  color: var(--muted);
  display: block;
  margin-top: 6px;
  font-size: 0.92rem;
}

.info-list div,
.student-card,
.announcement-item,
.mentor-card,
.upload-card,
.panel-subsection {
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffdf9 0%, #f8f2e8 100%);
  border: 1px solid rgba(223, 215, 201, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.info-list div { display: flex; justify-content: space-between; gap: 12px; padding-block: 12px; }
.upload-grid { grid-template-columns: repeat(3, 1fr); }
.upload-card {
  display: grid;
  gap: 12px;
  border-style: dashed;
}

.upload-card input[type="file"] {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
}

.upload-title-input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(223, 215, 201, 0.95);
  border-radius: 12px;
  background: #fffdfa;
  color: var(--ink);
  font-weight: 700;
}

.upload-title-input::placeholder {
  color: #9b8f7e;
  font-weight: 600;
}

.upload-card input[type="file"]::file-selector-button {
  min-height: 38px;
  margin-right: 10px;
  padding: 8px 14px;
  border: 1px solid rgba(37, 107, 66, 0.22);
  border-radius: 10px;
  background: #edf5ef;
  color: var(--brand-dark);
  font-weight: 800;
  cursor: pointer;
}

.upload-card input[type="file"]::file-selector-button:hover {
  background: #dfeee4;
}
.announce-builder { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.builder-intro {
  margin: 0 0 18px;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.62;
}

.announcement-builder-panel .panel-head {
  margin-bottom: 0;
}

.announcement-builder-panel .field {
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdfa 0%, #f6f0e6 100%);
  border: 1px solid rgba(223, 215, 201, 0.92);
}

.announcement-builder-panel .field input,
.announcement-builder-panel .field select,
.announcement-builder-panel .field textarea {
  background: rgba(255, 255, 255, 0.82);
}

.builder-submit {
  display: flex;
  align-items: stretch;
}

.builder-submit .primary-btn {
  width: 100%;
  justify-content: center;
}

.admin-grid { grid-template-columns: 1.1fr 0.9fr; align-items: start; }
.teacher-roster { margin-top: 16px; }
.student-card { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start; }
.student-card-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.student-card p,
.mentor-card p,
.announcement-item p {
  margin: 0;
}

.student-card {
  align-content: start;
  background: linear-gradient(180deg, #fffdf9 0%, #f9f4ea 100%);
}

.management-row,
.request-row,
.roster-row {
  display: grid;
  grid-template-columns: auto minmax(220px, 1.2fr) minmax(180px, 0.8fr) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.compact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.request-row,
.roster-row {
  grid-template-columns: auto minmax(220px, 1.2fr) minmax(220px, 0.9fr) auto;
}

.list-head {
  display: grid;
  gap: 14px;
  padding: 0 6px 2px;
  color: #7a6b56;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.management-head {
  grid-template-columns: auto minmax(220px, 1.2fr) minmax(180px, 0.8fr) minmax(220px, 1fr) auto;
}

.request-head {
  grid-template-columns: auto minmax(220px, 1.2fr) minmax(220px, 0.9fr) auto;
}

.student-main strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.02rem;
}

.student-main p,
.student-extra p {
  color: var(--muted);
  line-height: 1.48;
  font-size: 0.96rem;
}

.student-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.student-extra {
  min-width: 0;
}

.student-extra strong,
.student-card-actions strong {
  font-size: 0.96rem;
}

.student-card-actions {
  justify-content: flex-end;
}

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

.student-management-controls .secondary-btn {
  grid-column: 1 / -1;
  justify-content: center;
}

.inline-control {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.inline-control.full {
  grid-column: 1 / -1;
}

.inline-control span {
  color: #6d6457;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inline-control input,
.inline-control select,
.inline-control textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(37, 107, 66, 0.16);
  background: rgba(255, 255, 255, 0.86);
  font: inherit;
  color: var(--ink);
}

.inline-control textarea {
  resize: vertical;
}

.mentor-assign-control {
  margin-top: 12px;
  max-width: 320px;
}

.tag.neutral {
  background: #efe7d7;
  color: #6d5b3e;
}

.empty-row {
  text-align: center;
}

.students-panel .student-list,
.admin-panel .student-list,
.teacher-feed-panel .announcement-list,
.announcement-panel .announcement-list {
  gap: 12px;
}

.profile-panel .info-list div {
  background: #fffdfa;
}

.profile-showcase,
.profile-sections,
.profile-grid,
.profile-facts,
.skill-cloud,
.teacher-profile-layout,
.profile-stat-grid,
.profile-dual-grid,
.checklist-grid,
.upload-review-grid {
  display: grid;
  gap: 16px;
}

.overview-shell,
.overview-card,
.overview-identity,
.overview-grid {
  display: grid;
  gap: 16px;
}

.overview-identity {
  grid-template-columns: 92px 1fr;
  align-items: center;
}

.overview-card h3 {
  margin: 0 0 6px;
  font-family: "Fraunces", serif;
  font-size: 2rem;
}

.overview-card p {
  margin: 0;
  color: var(--muted);
}

.overview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.overview-fact {
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf9 0%, #f8f2e8 100%);
  border: 1px solid rgba(223, 215, 201, 0.95);
}

.overview-fact strong,
.overview-fact span {
  display: block;
}

.overview-fact span {
  margin-top: 8px;
  color: var(--muted);
}

.profile-header-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 20px;
  align-items: center;
  padding: 22px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(37, 107, 66, 0.14), transparent 34%),
    linear-gradient(180deg, #fffdf9 0%, #f4efe5 100%);
  border: 1px solid rgba(223, 215, 201, 0.95);
}

.profile-avatar {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--brand) 0%, #3b8258 100%);
  color: #fff;
  font-family: "Fraunces", serif;
  font-size: 2rem;
  box-shadow: 0 16px 32px rgba(37, 107, 66, 0.2);
}

.avatar-photo {
  object-fit: cover;
}

.embedded-avatar-photo {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.mini-avatar,
.chat-avatar {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brand) 0%, #3b8258 100%);
  color: #fff;
  font-family: "Fraunces", serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.chat-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 0.95rem;
}

.chat-contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.whatsapp-shell {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  padding: 0;
  overflow: hidden;
  min-height: 72vh;
  border-radius: 18px;
}

.whatsapp-sidebar {
  display: grid;
  grid-template-rows: auto 1fr;
  border-right: 1px solid rgba(223, 215, 201, 0.95);
  background: linear-gradient(180deg, #f8f1e6 0%, #fffdfa 100%);
}

.whatsapp-search {
  padding: 22px;
  border-bottom: 1px solid rgba(223, 215, 201, 0.95);
}

.chat-search-input {
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
  border-radius: 999px;
  border: 1px solid rgba(37, 107, 66, 0.16);
  background: #fffdfa;
  padding: 0 16px;
}

.chat-thread-list {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  padding: 12px;
}

.chat-category {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 253, 249, 0.72);
  border: 1px solid rgba(223, 215, 201, 0.74);
}

.chat-category + .chat-category {
  border-top: 1px solid rgba(223, 215, 201, 0.74);
}

.chat-category-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 4px 8px;
}

.chat-category-head strong {
  display: block;
  color: var(--brand-dark);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.chat-category-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.chat-category-head small {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: #e8f3eb;
  color: var(--brand-dark);
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.chat-category-empty {
  display: grid;
  gap: 3px;
  padding: 13px 14px;
  border-radius: 12px;
  background: #f7f1e8;
  border: 1px dashed rgba(37, 107, 66, 0.2);
  color: var(--muted);
  font-size: 0.82rem;
}

.chat-category-empty strong {
  color: #4e493f;
  font-size: 0.9rem;
}

.chat-category-empty span {
  line-height: 1.4;
}

.private-group-builder {
  margin-bottom: 18px;
}

.private-group-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 140px;
  gap: 14px;
  margin-bottom: 14px;
}

.private-group-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7f1e8;
  color: var(--muted);
  font-weight: 700;
}

.private-group-students {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  max-height: 280px;
  overflow: auto;
  padding: 4px;
}

.private-group-student {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(223, 215, 201, 0.95);
  border-radius: 12px;
  background: #fffdfa;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.private-group-student:hover {
  border-color: rgba(37, 107, 66, 0.32);
  background: #f6fbf7;
  transform: translateY(-1px);
}

.private-group-student input {
  width: 18px;
  height: 18px;
}

.private-group-student-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.private-group-student strong,
.private-group-student small,
.private-group-year-pill {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.private-group-student small {
  color: var(--muted);
}

.private-group-year-pill {
  max-width: 82px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #e8f3eb;
  color: var(--brand-dark);
  font-size: 0.75rem;
  font-weight: 800;
}

.private-group-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.private-group-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8f2e8;
  border: 1px solid rgba(223, 215, 201, 0.95);
}

.private-group-row p {
  margin: 4px 0 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.danger-text {
  color: #a43d32;
}

.announcement-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.invite-link-result {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: #f6fbf7;
  border: 1px solid rgba(37, 107, 66, 0.18);
}

.invite-link-result strong {
  color: var(--brand-dark);
}

.invite-link-result p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fffdfa;
  border: 1px solid rgba(223, 215, 201, 0.95);
  color: #4e493f;
  font-size: 0.88rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.invite-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.chat-thread-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  transition: background 160ms ease, transform 160ms ease;
  cursor: pointer;
}

.chat-thread-item:hover {
  background: rgba(37, 107, 66, 0.06);
}

.chat-thread-item.active {
  background: rgba(37, 107, 66, 0.11);
  box-shadow: inset 3px 0 0 var(--brand);
}

.chat-thread-copy {
  min-width: 0;
}

.chat-thread-copy strong,
.chat-thread-copy span {
  display: block;
}

.chat-thread-copy span {
  margin-top: 4px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-unread-badge {
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
}

.group-thread-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #dfeadf;
  color: var(--brand-dark);
  font-weight: 800;
}

.group-thread-avatar.large {
  width: 56px;
  height: 56px;
  border-radius: 18px;
}

.whatsapp-chat {
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    linear-gradient(rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.42)),
    repeating-linear-gradient(135deg, rgba(37, 107, 66, 0.055) 0 2px, transparent 2px 18px),
    linear-gradient(180deg, #f6efe3 0%, #efe7da 100%);
}

.whatsapp-chat-header {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(223, 215, 201, 0.95);
  background: rgba(255, 253, 249, 0.92);
}

.chat-header-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.whatsapp-chat-header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.whatsapp-chat-header p.typing-indicator {
  color: var(--brand);
  font-weight: 700;
}

.whatsapp-messages {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 22px;
  overflow-y: auto;
  min-height: 420px;
}

.message-item {
  width: fit-content;
  max-width: min(560px, 82%);
  padding: 10px 12px 8px;
  border-radius: 14px 14px 14px 4px;
  background: #fff;
  border: 1px solid rgba(223, 215, 201, 0.95);
  box-shadow: 0 10px 24px rgba(31, 27, 20, 0.05);
  word-break: break-word;
}

.message-item.own {
  margin-left: auto;
  border-radius: 14px 14px 4px 14px;
  background: #dff5d0;
  border-color: rgba(37, 107, 66, 0.16);
}

.message-head {
  margin-bottom: 6px;
}

.message-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.message-author strong,
.message-author span {
  display: block;
}

.message-author span {
  margin-top: 2px;
  color: #7d786e;
  font-size: 0.82rem;
}

.message-item.own .message-author {
  justify-content: flex-end;
}

.message-item.own .message-author div {
  text-align: right;
}

.message-item p {
  margin: 0;
  color: #2d2a25;
  line-height: 1.5;
  text-align: left;
  white-space: pre-wrap;
}

.message-status {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  color: #6c665b;
  font-size: 0.76rem;
  font-weight: 700;
}

.message-status.seen {
  color: #1f6aaf;
}

.message-image {
  width: min(280px, 100%);
  margin-top: 10px;
  border-radius: 14px;
  display: block;
}

.message-media-link {
  color: var(--brand-dark);
  font-weight: 700;
  text-decoration: none;
}

.message-empty {
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px dashed rgba(223, 215, 201, 0.95);
  color: var(--muted);
}

.group-members-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.group-member-pill {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 14px;
  background: #f3ede2;
  color: #514a3f;
  font-size: 0.85rem;
}

.group-member-pill.online {
  background: #e4f5ea;
  color: #1f6a3b;
}

.group-member-pill small {
  font-size: 0.72rem;
  opacity: 0.85;
}

.whatsapp-composer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 16px 18px;
  border-top: 1px solid rgba(223, 215, 201, 0.95);
  background: rgba(255, 253, 249, 0.92);
}

.whatsapp-composer input[type="file"] {
  display: none;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  background: #f1eadf;
  border: 1px solid rgba(223, 215, 201, 0.95);
  color: #4e493f;
  font-weight: 700;
  cursor: pointer;
}

.whatsapp-composer textarea {
  min-height: 48px;
  max-height: 140px;
  resize: none;
  background: #fff;
  border-radius: 999px;
  padding: 13px 18px;
  line-height: 1.35;
}

.profile-header-copy h4 {
  margin: 0 0 6px;
  font-family: "Fraunces", serif;
  font-size: 2rem;
  line-height: 1.02;
}

.profile-headline {
  margin: 0;
  color: #4b5d51;
  font-size: 1.02rem;
  line-height: 1.55;
}

.profile-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.profile-block {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fffdf9 0%, #f8f2e8 100%);
  border: 1px solid rgba(223, 215, 201, 0.95);
}

.profile-block h5 {
  margin: 0 0 12px;
  font-family: "Fraunces", serif;
  font-size: 1.18rem;
  letter-spacing: 0;
}

.profile-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.profile-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-facts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(223, 215, 201, 0.7);
}

.profile-facts div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.profile-facts strong {
  max-width: 46%;
}

.profile-facts span {
  color: var(--muted);
  text-align: right;
}

.skill-cloud {
  grid-template-columns: repeat(auto-fit, minmax(140px, max-content));
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: #edf5ef;
  border: 1px solid rgba(37, 107, 66, 0.12);
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 0.92rem;
}

.teacher-profile-layout {
  gap: 20px;
}

.profile-stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-stat-card {
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf9 0%, #f6efe3 100%);
  border: 1px solid rgba(223, 215, 201, 0.95);
}

.profile-stat-card strong {
  display: block;
  font-family: "Fraunces", serif;
  font-size: 2rem;
  margin-bottom: 6px;
}

.profile-stat-card span {
  color: var(--muted);
  font-size: 0.94rem;
}

.profile-dual-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-rich-text {
  white-space: pre-wrap;
}

.checklist-grid,
.upload-review-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.check-item,
.upload-review-card {
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf9 0%, #f8f2e8 100%);
  border: 1px solid rgba(223, 215, 201, 0.95);
}

.check-item strong,
.upload-review-card strong {
  display: block;
  margin-bottom: 8px;
}

.check-item p,
.upload-review-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.completion-ring {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--brand) var(--completion, 0%), rgba(37, 107, 66, 0.08) 0%);
  padding: 8px;
}

.completion-ring span {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fffaf2;
  color: var(--ink);
  font-weight: 800;
}

.teacher-profile-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(37, 107, 66, 0.16), transparent 32%),
    linear-gradient(180deg, #fffdf9 0%, #f3ecdf 100%);
  border: 1px solid rgba(223, 215, 201, 0.95);
}

.teacher-profile-summary h4 {
  margin: 0 0 6px;
  font-family: "Fraunces", serif;
  font-size: 2rem;
}

.teacher-profile-summary p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.teacher-student-modal-card {
  width: min(1080px, 100%);
}

.mentor-panel .mentor-card {
  background: linear-gradient(135deg, #edf5ef 0%, #ffffff 100%);
}

.announcement-builder-panel textarea {
  min-height: 112px;
  resize: vertical;
}

.announcement-builder-panel .primary-btn {
  align-self: end;
}

.announcement-item {
  background: linear-gradient(180deg, #fffdf9 0%, #f7f1e6 100%);
}

.announcement-item strong {
  font-size: 1rem;
}

.teacher-feed-panel .announcement-list {
  gap: 10px;
}

.upload-panel .upload-card {
  background: linear-gradient(180deg, #fffdfa 0%, #f8f3ea 100%);
}

.upload-card strong {
  font-size: 0.96rem;
}

.upload-preview {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(223, 215, 201, 0.82);
}

.upload-preview.hidden {
  display: none;
}

.upload-preview-entry {
  display: grid;
  gap: 10px;
}

.upload-preview-entry + .upload-preview-entry {
  padding-top: 12px;
  border-top: 1px solid rgba(223, 215, 201, 0.78);
}

.upload-preview-media {
  width: 100%;
  min-height: 160px;
  border: 1px solid rgba(223, 215, 201, 0.8);
  border-radius: 12px;
  background: #fffdfa;
  overflow: hidden;
}

.upload-preview-media img,
.upload-preview-media iframe {
  width: 100%;
  height: 180px;
  display: block;
  border: 0;
  object-fit: cover;
}

.upload-file-fallback {
  min-height: 150px;
  display: grid;
  place-items: center;
  padding: 16px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.upload-preview-meta {
  display: grid;
  gap: 3px;
}

.upload-preview-meta strong {
  font-size: 0.98rem;
}

.upload-preview-meta span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.upload-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(37, 107, 66, 0.1);
  overflow: hidden;
}

.upload-progress-bar {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2b7b4a 0%, #48b56b 100%);
  transition: width 0.2s ease;
}

.upload-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(37, 107, 66, 0.16);
}

.upload-link:hover {
  background: var(--brand-dark);
  text-decoration: none;
}

.admin-panel .panel-subsection {
  background: linear-gradient(180deg, #fffdf9 0%, #f8f3ea 100%);
}

.teacher-feed-panel,
.mentee-panel,
.mentor-panel,
.profile-panel {
  min-height: 100%;
}

.teacher-feed-panel .panel-head,
.mentee-panel .panel-head,
.students-panel .panel-head {
  margin-bottom: 4px;
}

.helper-text {
  font-size: 0.94rem;
  line-height: 1.55;
  color: #6d6457;
}

.tag, .status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  border: 1px solid rgba(37, 107, 66, 0.08);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.tag.mentor {
  background: #ecf6ee;
  color: #21583a;
}

.status-pill {
  padding: 9px 14px;
  background: linear-gradient(180deg, #edf6ef 0%, #e1efe5 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.compact .student-card { grid-template-columns: 1fr; }
.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: start center;
  background: rgba(24, 17, 12, 0.56);
  z-index: 80;
  overflow-y: auto;
  padding: 96px 24px 24px;
}
.modal.hidden { display: none; }
.modal-card {
  width: min(860px, 100%);
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding: 30px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-back {
  min-height: 44px;
  padding-inline: 16px;
}

.modal-eyebrow {
  margin-bottom: 12px;
}

.modal-header h3 {
  margin: 0 0 8px;
  font-size: 2.2rem;
  line-height: 1.02;
}

.modal-subcopy {
  margin: 0;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.6;
}

.modal-close {
  margin-top: 4px;
}

.modal-body {
  display: grid;
  gap: 18px;
}

.profile-editor-banner {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(37, 107, 66, 0.14), transparent 36%),
    linear-gradient(180deg, #fffdf9 0%, #f4ede1 100%);
  border: 1px solid rgba(223, 215, 201, 0.92);
}

.profile-editor-avatar {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  background: linear-gradient(135deg, var(--brand) 0%, #3b8258 100%);
  color: #fff;
  font-family: "Fraunces", serif;
  font-size: 1.95rem;
  box-shadow: 0 16px 30px rgba(37, 107, 66, 0.2);
}

.profile-editor-copy strong {
  display: block;
  margin-bottom: 6px;
  font-family: "Fraunces", serif;
  font-size: 1.7rem;
  line-height: 1.04;
}

.profile-editor-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.profile-editor-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.modal-section {
  padding: 20px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fffdfa 0%, #f8f2e8 100%);
  border: 1px solid var(--line);
}

.modal-section h4 {
  margin: 0 0 16px;
  font-size: 1.2rem;
  color: var(--ink);
}

.modal-section-copy {
  margin: -4px 0 16px;
  color: var(--muted);
  line-height: 1.6;
}

.modal-form-grid {
  gap: 16px;
}

.modal-form-grid input::placeholder,
.modal-form-grid textarea::placeholder {
  color: #9b8f7e;
}

.modal-section textarea {
  min-height: 120px;
  resize: vertical;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

@media (max-width: 1100px) {
  .hero,
  .dashboard,
  .feature-grid-three,
  .timeline,
  .content-grid,
  .upload-grid,
  .whatsapp-shell,
  .overview-grid,
  .stats-band,
  .metric-row,
  .admin-grid,
  .form-grid,
  .announce-builder,
  .student-card,
  .cta-shell,
  .cta-meta-grid {
    grid-template-columns: 1fr;
  }

  .hero-strip,
  .teacher-strip,
  .topbar,
  .panel-head,
  .modal-header,
  .modal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .management-row,
  .request-row,
  .roster-row,
  .compact-row {
    grid-template-columns: 1fr;
    display: grid;
  }

  .management-head,
  .request-head {
    display: none;
  }

  .student-card-actions {
    justify-content: flex-start;
  }

  .mini-card.accent {
    transform: none;
  }

  .sidebar {
    position: static;
  }

  .timeline::before {
    display: none;
  }
}

@media (max-width: 700px) {
  .topbar,
  .hero,
  .feature-section,
  .workflow-section,
  .auth-page,
  .dashboard-page,
  .cta-section {
    padding: 20px;
  }

  .topbar {
    padding-inline: 20px;
  }

  .hero h1,
  .section-head h2,
  .cta-section h2 {
    font-size: 2.8rem;
  }

  .brand-btn strong {
    font-size: 1.6rem;
  }

  .topbar {
    gap: 14px;
  }

  .topnav {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 16px;
  }

  .nav-login {
    margin-left: 0;
  }

  .hero {
    gap: 28px;
    min-height: auto;
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .hero-copy p,
  .section-head p,
  .cta-section p {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-actions {
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .mini-card,
  .problem-card,
  .panel,
  .auth-card,
  .modal-card,
  .cta-shell {
    border-radius: 22px;
  }

  .mini-card,
  .problem-card,
  .panel,
  .request-card,
  .cta-shell {
    padding: 20px;
  }

  .stats-band {
    gap: 16px;
    padding: 18px 20px;
  }

  .stats-band article {
    padding: 14px 0;
  }

  .stats-band strong {
    font-size: 2.3rem;
  }

  .workflow-section {
    padding-top: 52px;
    padding-bottom: 52px;
  }

  .timeline {
    gap: 18px;
  }

  .timeline li {
    padding-top: 0;
  }

  .timeline span:last-child {
    max-width: none;
    font-size: 0.98rem;
  }

  .auth-page {
    min-height: auto;
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .auth-wrap {
    width: 100%;
  }

  .compact-auth {
    padding: 28px 22px;
  }

  .compact-auth h2 {
    font-size: 2.3rem;
  }

  .auth-divider {
    margin: 16px 0 18px;
  }

  .auth-note {
    padding: 12px;
  }

  .auth-note p {
    font-size: 0.9rem;
  }

  .dashboard-page {
    gap: 22px;
  }

  .dashboard {
    gap: 18px;
  }

  .mobile-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 44px;
    padding: 10px 18px;
    border: 0;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(37, 107, 66, 0.18);
  }

  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 90;
    width: min(84vw, 320px);
    min-height: 100vh;
    max-height: 100vh;
    gap: 18px;
    padding: 22px 18px;
    overflow-y: auto;
    border-radius: 0 24px 24px 0;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 24px 0 60px rgba(31, 27, 20, 0.18);
    transform: translateX(-110%);
    transition: transform 0.24s ease;
  }

  .dashboard.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .mobile-sidebar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    margin-bottom: 4px;
    border: 1px solid rgba(37, 107, 66, 0.18);
    border-radius: 999px;
    background: #f7f1e7;
    color: var(--brand-dark);
    font-weight: 800;
  }

  .dashboard.sidebar-open .mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: block;
    border: 0;
    background: rgba(24, 17, 12, 0.38);
  }

  body.mobile-sidebar-open {
    overflow: hidden;
  }

  .app-sidebar .sidebar-nav {
    gap: 10px;
  }

  .app-sidebar .sidebar-nav button,
  .app-sidebar .sidebar-actions button {
    width: 100%;
    justify-content: center;
  }

  .dashboard-hero,
  .student-card,
  .announcement-item,
  .teacher-feed-item {
    padding: 18px;
  }

  .profile-header-card,
  .profile-grid,
  .private-group-grid,
  .profile-stat-grid,
  .profile-dual-grid,
  .checklist-grid,
  .upload-review-grid,
  .teacher-profile-header,
  .overview-identity {
    grid-template-columns: 1fr;
  }

  .whatsapp-composer {
    grid-template-columns: 1fr;
  }

  .profile-avatar {
    width: 78px;
    height: 78px;
    font-size: 1.7rem;
  }

  .teacher-hero-highlights {
    gap: 8px;
  }

  .student-card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .student-card-actions .btn,
  .student-card-actions .secondary-btn,
  .student-card-actions .ghost-btn {
    width: 100%;
    justify-content: center;
  }

  .metric-row-hero article {
    padding: 18px;
  }

  .announce-actions,
  .upload-actions,
  .panel-head {
    gap: 12px;
  }

  .announcement-builder-panel .field {
    padding: 12px;
  }

  .modal {
    padding: 84px 14px 14px;
    align-items: end;
  }

  .modal-card {
    width: 100%;
    max-height: 92vh;
    overflow: auto;
    padding: 22px 18px;
    border-radius: 24px 24px 18px 18px;
  }

  .modal-header h3 {
    font-size: 1.9rem;
  }

  .modal-header-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-editor-banner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-editor-avatar {
    margin-inline: auto;
  }

  .profile-editor-badges {
    justify-content: center;
  }

  .modal-section {
    padding: 16px;
  }

  .modal-footer .btn,
  .modal-footer .secondary-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .topbar,
  .hero,
  .feature-section,
  .workflow-section,
  .auth-page,
  .dashboard-page,
  .cta-section {
    padding: 16px;
  }

  .brand-btn strong {
    font-size: 1.4rem;
  }

  .topnav {
    gap: 8px 12px;
    font-size: 0.92rem;
  }

  .nav-login {
    width: 100%;
  }

  .nav-login .btn {
    width: 100%;
    justify-content: center;
  }

  .hero h1,
  .section-head h2,
  .cta-section h2 {
    font-size: 2.2rem;
  }

  .hero-copy p,
  .section-head p,
  .cta-section p,
  .problem-card p,
  .mini-card p {
    font-size: 0.96rem;
  }

  .mini-card,
  .problem-card,
  .panel,
  .student-card,
  .dashboard-hero {
    padding: 16px;
  }

  .stats-band {
    padding: 14px 16px;
  }

  .stats-band strong {
    font-size: 2rem;
  }

  .stats-band span {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
  }

  .compact-auth {
    padding: 24px 18px;
  }

  .compact-auth h2 {
    font-size: 2rem;
  }

  .cta-card {
    padding: 18px 18px 16px;
  }

  .cta-card h3 {
    font-size: 1.6rem;
  }

  .teacher-hero-highlights .status-pill {
    width: 100%;
    justify-content: center;
  }

  .profile-header-copy h4 {
    font-size: 1.65rem;
  }

  .profile-block {
    padding: 16px;
  }

  .builder-intro {
    font-size: 0.95rem;
  }

  .auth-kicker {
    font-size: 0.7rem;
    letter-spacing: 0.14em;
  }

  .auth-note {
    gap: 8px;
    padding: 11px;
  }

  .auth-note p {
    font-size: 0.88rem;
  }

  input,
  select,
  textarea,
  button {
    min-height: 50px;
  }

  .modal {
    padding: 76px 8px 8px;
  }

  .modal-card {
    padding: 18px 14px;
  }

  .modal-header h3 {
    font-size: 1.65rem;
  }

  .modal-section h4 {
    font-size: 1.05rem;
  }
}
