:root {
  --bg: #0f172a;
  --bg-elevated: #111827;
  --bg-card: #1f2937;
  --accent: #22c55e;
  --accent-soft: rgba(34, 197, 94, 0.12);
  --text: #e5e7eb;
  --text-dim: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.4);
  --scrollbar-track: #1e293b;
  --scrollbar-thumb: rgba(148, 163, 184, 0.35);
  --scrollbar-thumb-hover: rgba(34, 197, 94, 0.5);
}

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

html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Inter", sans-serif;
  background: radial-gradient(circle at top, #1e293b 0, #020617 60%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
}

/* Stylish scrollbars (match site theme) – Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

/* Stylish scrollbars – WebKit (Chrome, Safari, Edge) */
html::-webkit-scrollbar,
.comment-list::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

html::-webkit-scrollbar-track,
.comment-list::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 4px;
}

html::-webkit-scrollbar-thumb,
.comment-list::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}

html::-webkit-scrollbar-thumb:hover,
.comment-list::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

html::-webkit-scrollbar-corner,
.comment-list::-webkit-scrollbar-corner {
  background: var(--scrollbar-track);
}

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

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  min-width: 0;
  max-width: 100%;
}

/* Mobile: sidebar becomes overlay drawer */
.sidebar-overlay {
  display: none;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .layout--nav-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .layout--nav-open .sidebar {
    transform: translateX(0);
  }
}

.sidebar {
  background: linear-gradient(180deg, #020617, #020617 50%, #020617);
  border-right: 1px solid var(--border-subtle);
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar__logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand__name {
  font-weight: 600;
  letter-spacing: 0.03em;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.75rem;
}

.nav__item {
  padding: 0.55rem 0.75rem;
  border-radius: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
    transform 0.12s ease;
}

.nav__item:hover {
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.4);
  transform: translateX(1px);
}

.nav__item--muted {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  opacity: 0.8;
}

.nav__item--logout {
  margin-top: 0.5rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 0.5rem;
  background: rgba(239, 68, 68, 0.08);
  position: relative;
  padding-left: 2rem;
}

.nav__item--logout::before {
  content: "→";
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  opacity: 0.9;
}

.nav__item--logout:hover {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(248, 113, 113, 0.5);
}

.sidebar__birthdays {
  padding: 0.75rem;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 0.6rem;
  margin-top: 0.5rem;
}

.sidebar__birthdays-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.sidebar__birthdays-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar__birthdays-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(34, 197, 94, 0.15);
}

.sidebar__birthdays-item:last-child {
  border-bottom: none;
}

.sidebar__birthdays-name {
  color: var(--text);
  font-weight: 500;
}

.sidebar__birthdays-type {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar__birthdays-empty {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.sidebar__birthdays-form {
  margin-top: 0.6rem;
}

.sidebar__birthdays-button {
  width: 100%;
  padding: 0.35rem 0.6rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(34, 197, 94, 0.5);
  background: rgba(15, 23, 42, 0.9);
  color: #bbf7d0;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.sidebar__birthdays-button:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.8);
  transform: translateY(-1px);
}

.sidebar__footer {
  margin-top: auto;
  border-top: 1px solid rgba(31, 41, 55, 0.9);
  padding-top: 1rem;
}

.user-summary {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.4rem;
}

.user-summary__name {
  font-size: 0.9rem;
}

/* Hamburger toggle – visible only on mobile */
.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sidebar-toggle:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(148, 163, 184, 0.5);
}

.sidebar-toggle__icon {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.layout--nav-open .sidebar-toggle__icon {
  box-shadow: none;
  transform: rotate(45deg);
}

.layout--nav-open .sidebar-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: currentColor;
  transform: rotate(-90deg);
  transform-origin: center;
}

@media (max-width: 900px) {
  .sidebar-toggle {
    display: flex;
  }

  body.nav-open {
    overflow: hidden;
  }
}

.main {
  padding: 1.75rem 2rem;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 900px) {
  .main {
    padding: 1rem 1rem 2rem;
  }
}

@media (max-width: 480px) {
  .main {
    padding: 0.5rem 0.5rem 1.25rem;
  }
}

@media (max-width: 360px) {
  .main {
    padding: 0.5rem 0.4rem 1rem;
  }
}

.main__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.main__title {
  font-size: 1.5rem;
  font-weight: 600;
  min-width: 0;
}

@media (max-width: 480px) {
  .main__title {
    font-size: 1.25rem;
  }
}

.main__content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  min-width: 0;
}

@media (max-width: 1100px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .grid {
    gap: 0.75rem;
  }
}

.card {
  background: linear-gradient(145deg, var(--bg-card), #020617);
  border-radius: 1rem;
  padding: 1.25rem 1.3rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.7);
  min-width: 0;
}

.card--accent {
  border-color: var(--accent-soft);
  box-shadow: 0 18px 45px rgba(22, 163, 74, 0.5);
}

@media (max-width: 480px) {
  .card {
    padding: 0.9rem 0.75rem;
  }
}

.card__title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}

@media (max-width: 480px) {
  .card__title {
    font-size: 0.8rem;
  }
}

.card__value {
  font-size: 1.35rem;
  font-weight: 600;
}

.card__hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--accent-soft);
  color: var(--accent);
}

.list {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0;
}

.list__item {
  padding: 0.4rem 0;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(31, 41, 55, 0.6);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.list__item:last-child {
  border-bottom: none;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.9rem;
  border-radius: 0.7rem;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #022c22;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(22, 163, 74, 0.45);
}

.btn-primary:hover {
  filter: brightness(1.02);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.9rem;
  border-radius: 0.7rem;
  background: linear-gradient(135deg, #f97373, #ef4444);
  color: #1f2933;
  font-size: 0.85rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-secondary:hover {
  filter: brightness(1.08);
}

/* Small action links in tables (Edit, Open, Pay salary) – same style as .btn-primary */
.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.75rem;
  border-radius: 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #022c22;
  border: none;
  box-shadow: 0 10px 25px rgba(22, 163, 74, 0.45);
  transition: filter 0.15s ease;
}

.btn-action:hover {
  filter: brightness(1.02);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: radial-gradient(circle at top, #111827, #020617 60%);
  border-radius: 1.25rem;
  padding: 2rem 2.1rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 25px 65px rgba(15, 23, 42, 0.95);
}

.login-card__logo {
  display: block;
  max-width: 160px;
  max-height: 100px;
  width: auto;
  height: auto;
  margin: 0 auto 1.25rem;
  object-fit: contain;
}

.login-card h1 {
  margin: 0 0 0.4rem;
}

.login-card p.sub {
  margin: 0 0 1.4rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.login-error {
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

label {
  font-size: 0.8rem;
  color: var(--text-dim);
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  font-family: inherit;
}

.form-input {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

.login-card button[type="submit"] {
  margin-top: 0.4rem;
  width: 100%;
}

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

@media (max-width: 720px) {
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

table.data-table th,
table.data-table td {
  padding: 0.5rem 0.4rem;
  text-align: left;
}

table.data-table thead {
  border-bottom: 1px solid rgba(51, 65, 85, 0.9);
  color: var(--text-dim);
}

table.data-table tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.5);
}

.phone-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.phone-row {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 0.5rem;
}

@media (max-width: 720px) {
  .phone-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.phone-row button {
  font-size: 0.75rem;
  padding-inline: 0.6rem;
}

.teacher-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.teacher-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: rgba(15, 23, 42, 0.85);
  font-size: 0.8rem;
}

.teacher-pill input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

/* Student credentials page */
.credentials-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1.5rem;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.credentials-dl dt {
  color: var(--text-dim);
  font-weight: 500;
}

.credentials-dl dd {
  margin: 0;
}

.credentials-value {
  display: inline-block;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  padding: 0.35rem 0.65rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-family: ui-monospace, monospace;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ---- Responsive: phones and small screens ---- */

/* KPI grid: on narrow screens allow wrap so cards don’t shrink too much */
@media (max-width: 768px) {
  .kpi-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
}

@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.5rem;
  }
}

/* Cards containing tables: horizontal scroll on small viewports */
@media (max-width: 600px) {
  .card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .card table.data-table {
    min-width: 400px;
  }

  table.data-table th,
  table.data-table td {
    padding: 0.5rem 0.35rem;
    font-size: 0.85rem;
  }
}

/* Login page */
@media (max-width: 480px) {
  .login-card {
    margin: 0 0.75rem;
    padding: 1.5rem 1.25rem;
  }
}

/* Buttons: ensure touch-friendly min size on touch devices */
@media (max-width: 600px) {
  .btn-primary,
  .btn-secondary,
  .btn-action {
    min-height: 44px;
    padding: 0.5rem 1rem;
  }
}

/* Chart containers: prevent overflow on narrow screens */
.chart-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

@media (max-width: 600px) {
  .chart-wrap {
    min-height: 180px;
  }
}

/* ========== Public landing page ========== */
.landing-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #0f172a;
  color: #e5e7eb;
}

.landing-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.landing-header__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
  text-decoration: none;
}

.landing-header__logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.landing-header__name {
  font-weight: 600;
  font-size: 1.1rem;
}


.landing-header__nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.landing-header__link {
  padding: 0.4rem 0.75rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 0.5rem;
  transition: color 0.2s, background 0.2s;
}

.landing-header__link:hover {
  color: #e5e7eb;
  background: rgba(148, 163, 184, 0.1);
}

.landing-header__btn {
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 0.6rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.landing-header__btn {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #022c22;
}

.landing-header__btn--outline {
  background: transparent;
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.landing-header__btn--outline:hover {
  color: #e5e7eb;
  border-color: #64748b;
}

.landing-header__btn--logout {
  background: transparent;
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.45);
}

.landing-header__btn--logout:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.7);
}

/* Language switcher – modern pill buttons (shared for public header and app header) */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.75rem;
}

.lang-switch__btn {
  min-width: 34px;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: radial-gradient(circle at top, #020617 0, #020617 70%);
  color: #e5e7eb;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    transform 0.1s ease;
}

.lang-switch__btn:hover {
  border-color: rgba(34, 197, 94, 0.7);
  color: #bbf7d0;
  transform: translateY(-0.5px);
}

.lang-switch__btn--active {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: transparent;
  color: #022c22;
}

@media (max-width: 640px) {
  .lang-switch {
    margin-left: 0.5rem;
  }
  .lang-switch__btn {
    min-width: 30px;
    padding: 0.2rem 0.4rem;
    font-size: 0.65rem;
  }
}

.landing-main {
  flex: 1;
  padding-top: 56px;
}

.landing-hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.landing-slideshow {
  position: absolute;
  inset: 0;
}

.landing-slideshow__track {
  position: absolute;
  inset: 0;
}

.landing-slideshow__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.landing-slideshow__slide--active {
  opacity: 1;
  z-index: 1;
}

.landing-slideshow__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.5) 0%, rgba(15, 23, 42, 0.85) 100%);
  z-index: 2;
}

.landing-hero__content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 720px;
}

.landing-hero__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.landing-hero__tagline {
  margin: 0 0 1.5rem;
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  color: #cbd5e1;
  line-height: 1.5;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}

.landing-hero__cta {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #022c22;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 0.7rem;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(22, 163, 74, 0.4);
  transition: filter 0.2s, transform 0.2s;
}

.landing-hero__cta:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.landing-slideshow__dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 0.5rem;
}

.landing-slideshow__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, border-color 0.2s;
}

.landing-slideshow__dot:hover {
  background: rgba(255, 255, 255, 0.4);
}

.landing-slideshow__dot--active {
  background: #fff;
  border-color: #fff;
}

.landing-section {
  padding: 4rem 1.5rem;
}

.landing-container {
  max-width: 900px;
  margin: 0 auto;
}

.landing-section__title {
  margin: 0 0 1.5rem;
  font-size: 1.75rem;
  font-weight: 600;
  text-align: center;
  color: #e5e7eb;
}

.landing-about {
  background: rgba(30, 41, 59, 0.4);
}

.landing-about__lead {
  font-size: 1.1rem;
  line-height: 1.65;
  color: #cbd5e1;
  margin: 0 0 1rem;
}

.landing-about__subtitle {
  margin: 2rem 0 0.6rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: #e5e7eb;
}

.landing-about__subtitle:first-of-type {
  margin-top: 1.5rem;
}

.landing-about__text {
  font-size: 1rem;
  line-height: 1.6;
  color: #94a3b8;
  margin: 0;
}

.landing-about__text + .landing-about__subtitle,
.landing-about__text + .landing-about__text {
  margin-top: 1rem;
}

.landing-majors__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.landing-majors__item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.15);
  font-size: 1rem;
  color: #cbd5e1;
}

.landing-majors__check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
}

.landing-majors__item strong {
  color: #e5e7eb;
}

.landing-contact {
  background: rgba(30, 41, 59, 0.3);
}

.landing-contact__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.landing-contact__block {
  padding: 1.25rem;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.landing-contact__subtitle {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.landing-contact__text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #cbd5e1;
}

.landing-contact__link {
  color: #22c55e;
  text-decoration: none;
}

.landing-contact__link:hover {
  text-decoration: underline;
}

.landing-footer {
  padding: 1rem 1.5rem;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.8);
}

.landing-footer__text {
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
}

@media (max-width: 640px) {
  .landing-header {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  .landing-header__brand {
    min-width: 0;
  }
  .landing-header__nav {
    gap: 0.35rem;
    flex-shrink: 0;
  }
  .landing-header__link {
    display: none;
  }
  .landing-header__link--mobile-visible {
    display: inline-block;
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }
  .landing-header__btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }
  .landing-hero {
    min-height: 75vh;
  }
  .landing-section {
    padding: 3rem 1rem;
  }
}

@media (max-width: 420px) {
  .landing-header__logo {
    width: 28px;
    height: 28px;
  }
  .landing-header__name {
    font-size: 1rem;
  }
  .landing-header__link--mobile-visible {
    padding: 0.3rem 0.45rem;
    font-size: 0.75rem;
  }
  .landing-header__btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
  }
}

/* ========== School posts (public) ========== */
.posts-section {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.6) 0%, rgba(30, 41, 59, 0.25) 100%);
}

.posts-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.posts-title {
  margin: 0 0 0.4rem;
  font-size: 1.85rem;
  font-weight: 700;
  color: #e5e7eb;
  letter-spacing: -0.02em;
}

.posts-intro {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: #94a3b8;
}

.posts-new-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #022c22;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 0.6rem;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.35);
  transition: filter 0.2s, transform 0.2s;
}

.posts-new-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.posts-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.post-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 1rem;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.post-card:hover {
  border-color: rgba(34, 197, 94, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.post-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.post-card__preview {
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: rgba(30, 41, 59, 0.6);
}

.post-card__content {
  padding: 1.25rem 1.5rem;
}

.post-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: #e5e7eb;
  line-height: 1.35;
}

.post-card__meta {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: #64748b;
}

.post-card__author {
  color: #94a3b8;
}

.post-card__stats {
  display: flex;
  gap: 1rem;
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  color: #64748b;
}

.post-card__stat {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.post-card__excerpt {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #94a3b8;
}

.post-card__read {
  font-size: 0.9rem;
  font-weight: 500;
  color: #22c55e;
}

.posts-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #64748b;
  font-size: 1rem;
}

/* Post detail */
.post-detail-section {
  background: rgba(30, 41, 59, 0.25);
}

.post-detail-container {
  max-width: 720px;
}

.post-detail__back {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: #22c55e;
  text-decoration: none;
}

.post-detail__back:hover {
  text-decoration: underline;
}

.post-detail {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 1rem;
  padding: 2rem;
}

.post-detail__header {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.post-detail__title {
  margin: 0 0 0.5rem;
  font-size: 1.65rem;
  font-weight: 700;
  color: #e5e7eb;
  line-height: 1.3;
}

.post-detail__meta {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
}

.post-detail__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.post-detail__stat {
  font-size: 0.85rem;
  color: #94a3b8;
}

.post-detail__like-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 0.5rem;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  text-decoration: none;
  border: 1px solid rgba(34, 197, 94, 0.35);
  transition: background 0.2s, color 0.2s;
}

.post-detail__like-btn:hover {
  background: rgba(34, 197, 94, 0.25);
  color: #4ade80;
}

.post-detail__liked {
  font-size: 0.85rem;
  color: #22c55e;
  font-weight: 500;
}

.post-detail__body {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #cbd5e1;
}

.post-detail__body p {
  margin: 0 0 1rem;
}

.post-detail__body--rich a {
  color: #22c55e;
  text-decoration: none;
}

.post-detail__body--rich a:hover {
  text-decoration: underline;
}

.post-detail__body--rich ul,
.post-detail__body--rich ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.post-detail__body--rich h2,
.post-detail__body--rich h3,
.post-detail__body--rich h4 {
  margin: 1.25rem 0 0.5rem;
  color: #e5e7eb;
}

.post-detail__body--rich blockquote {
  margin: 1rem 0;
  padding-left: 1rem;
  border-left: 3px solid rgba(34, 197, 94, 0.5);
  color: #94a3b8;
}

/* Post detail slideshow */
.post-detail__slideshow {
  position: relative;
  height: 320px;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: rgba(30, 41, 59, 0.5);
}

.post-detail__slideshow-track {
  position: absolute;
  inset: 0;
}

.post-detail__slideshow-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.post-detail__slideshow-slide--active {
  opacity: 1;
  z-index: 1;
}

.post-detail__slideshow-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.4) 0%, transparent 50%);
  z-index: 2;
  pointer-events: none;
}

.post-detail__slideshow-dots {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 0.4rem;
}

.post-detail__slideshow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, border-color 0.2s;
}

.post-detail__slideshow-dot:hover {
  background: rgba(255, 255, 255, 0.3);
}

.post-detail__slideshow-dot--active {
  background: #fff;
  border-color: #fff;
}

.post-detail__actions {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

/* Post comments (public, anonymous) */
.post-comments {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.post-comments__title {
  margin: 0 0 1.25rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #e5e7eb;
}

.comment-form {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: rgba(30, 41, 59, 0.4);
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.comment-form__input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.6);
  color: #e5e7eb;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.comment-form__input::placeholder {
  color: #64748b;
}

.comment-form__input:focus {
  outline: none;
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.comment-form__errors {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: #f87171;
}

.comment-form__hint {
  margin: 0.4rem 0 0.75rem;
  font-size: 0.8rem;
  color: #64748b;
}

.comment-form__submit {
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 0.6rem;
  border: none;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #022c22;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.3);
  transition: filter 0.2s, transform 0.15s;
}

.comment-form__submit:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

.comment-item {
  padding: 1.25rem;
  background: rgba(30, 41, 59, 0.35);
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-left: 3px solid rgba(34, 197, 94, 0.5);
}

.comment-item__text {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-item__date {
  font-size: 0.8rem;
  color: #64748b;
}

.comment-list__empty {
  padding: 1.5rem;
  text-align: center;
  font-size: 0.95rem;
  color: #64748b;
  background: rgba(30, 41, 59, 0.25);
  border-radius: 0.75rem;
  border: 1px dashed rgba(148, 163, 184, 0.2);
}

/* Post form (staff) */
.form-card {
  max-width: 640px;
  background: linear-gradient(145deg, var(--bg-card), #020617);
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.form-card__back {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
}

.form-card__back:hover {
  text-decoration: underline;
}

.post-form .form-group {
  margin-bottom: 1.25rem;
}

.post-form .form-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
}

.post-form .form-errors,
.post-form .form-field-errors {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: #f87171;
}

.post-form .form-help {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.post-form .form-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.post-form__existing-images {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.post-form__image-preview {
  position: relative;
  width: 120px;
  height: 90px;
  border-radius: 0.5rem;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.post-form__image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-form__remove {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.25rem;
  background: rgba(15, 23, 42, 0.9);
  font-size: 0.75rem;
  color: #fca5a5;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.post-form__remove input {
  margin: 0;
}

/* Modern file upload (images) */
.file-upload {
  position: relative;
}

.file-upload__input {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.file-upload__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  padding: 1.5rem;
  border: 2px dashed rgba(148, 163, 184, 0.4);
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.4);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.file-upload__label:hover {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.06);
}

.file-upload__label:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.file-upload__label--dragover {
  border-color: var(--accent);
  background: rgba(34, 197, 94, 0.12);
}

.file-upload__icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.file-upload__text {
  font-size: 0.95rem;
  color: var(--text);
  text-align: center;
}

.file-upload__text strong {
  color: var(--accent);
}

.file-upload__hint {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.file-upload__names {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

