:root {
  --bg: #f3f3f1;
  --surface: #ffffff;
  --surface-soft: #f8f8f5;
  --text: #4f5a42;
  --muted: #7b826d;

  --primary: #b7cf59;
  --primary-dark: #9fba47;
  --secondary: #d8a15d;
  --accent: #d9895d;
  --accent-soft: #9ed4e6;

  --border: rgba(120, 130, 109, 0.18);
  --shadow: 0 20px 50px rgba(120, 130, 109, 0.14);

  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(217, 164, 65, 0.18), transparent 34%),
    var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.siteHeader {
  width: calc(100% - 80px);
  max-width: 1280px;
  margin: 24px auto 0;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 36px rgba(120, 130, 109, 0.1);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 14px;
  z-index: 20;
}

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

.siteHeaderLogo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  flex-shrink: 0;
}

.siteHeaderBrand div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.siteHeaderBrand strong {
  color: var(--text);
  font-size: 16px;
  letter-spacing: 0.04em;
}

.siteHeaderBrand span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.siteHeaderNav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.siteHeaderNav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  background: var(--surface-soft);
  border: 1px solid transparent;
}

.siteHeaderNav a:hover {
  border-color: rgba(183, 207, 89, 0.45);
  color: var(--primary-dark);
}

.pageShell {
  min-height: calc(100vh - 96px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 32px;
  padding: 32px 40px 40px;
}

.heroPanel,
.loginPanel {
  display: flex;
  align-items: center;
}

.heroPanel {
  padding: 48px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(
      135deg,
      rgba(183, 207, 89, 0.20),
      rgba(216, 161, 93, 0.18),
      rgba(157, 212, 230, 0.18)
    ),
    var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  border: 1px solid var(--border);
}

.heroBrand {
  display: flex;
  align-items: center;
  gap: 22px;
  width: 100%;
}

.heroLogo {
  width: 78px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

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

.brandOverline {
  margin: 0;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.heroPanel h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--text);
}

.heroText {
  max-width: 650px;
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

.heroFeatures {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 48px;
}

.heroFeatures article {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.heroFeatures span {
  display: block;
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.heroFeatures strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
  color: var(--text);
}

.heroFeatures p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.loginPanel {
  justify-content: center;
}

.loginCard {
  width: 100%;
  max-width: 440px;
  padding: 32px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.loginEyebrow,
.dashboardEyebrow {
  margin: 0 0 8px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.loginCard h2 {
  margin: 0 0 24px;
  font-size: 34px;
  letter-spacing: -0.04em;
}

.loginForm {
  display: grid;
  gap: 16px;
} 

.loginForm label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.loginForm input {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.loginForm input:focus {
  border-color: rgba(183, 207, 89, 0.55);
  box-shadow: 0 0 0 4px rgba(183, 207, 89, 0.16);
}

.loginForm button,
.dashboardHeader button {
  border: 0;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-weight: 600;
}

.loginForm button:hover,
.dashboardHeader button:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
}

.loginStatus {
  min-height: 20px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.demoAccess {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.demoAccess p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

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

.demoButtons button {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 12px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.demoButtons button:hover {
  border-color: rgba(183, 207, 89, 0.45);
  color: var(--primary-dark);
}

.dashboard {
  max-width: 1120px;
  margin: 0 auto 40px;
  padding: 0 40px;
}

.dashboard.isHidden {
  display: none;
}

.dashboardHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.dashboardHeader h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.dashboardContent {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.moduleCard {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(31, 41, 51, 0.08);
}

.moduleCard h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.moduleCard p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}


.headerLogoutBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border-radius: 999px;
  color: white;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: 0;
}

.headerLogoutBtn:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
}

.adminShell {
  width: calc(100% - 80px);
  max-width: 1280px;
  margin: 32px auto 48px;
}

.adminHero {
  padding: 34px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(
      135deg,
      rgba(183, 207, 89, 0.18),
      rgba(216, 161, 93, 0.14),
      rgba(158, 212, 230, 0.14)
    ),
    var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.adminHero h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--text);
}

.adminHeroText {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.adminModules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.adminModuleCard {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(120, 130, 109, 0.08);
}

.adminModuleCard span {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.adminModuleCard h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 22px;
  letter-spacing: -0.03em;
}

.adminModuleCard p {
  min-height: 44px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.adminModuleCard button {
  width: 100%;
  border: 0;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 600;
  border: 1px solid var(--border);
}

.adminModuleCard button:hover {
  border-color: rgba(183, 207, 89, 0.45);
  color: var(--primary-dark);
  background: #fcfcf8;
}
@media (max-width: 960px) {
  .siteHeader {
    width: calc(100% - 36px);
    margin-top: 18px;
    border-radius: 24px;
    align-items: flex-start;
  }

  .siteHeaderNav {
    display: none;
  }

  .siteHeaderBrand span {
    white-space: normal;
    line-height: 1.25;
  }

  .siteHeaderLogo {
    width: 42px;
    height: 42px;
  }

  .pageShell {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 18px;
    padding-top: 18px;
  }

  .heroPanel {
    padding: 32px 24px;
  }

  .heroBrand {
    flex-direction: column;
    align-items: flex-start;
  }

  .heroLogo {
    width: 68px;
  }

  .heroFeatures {
    grid-template-columns: 1fr;
    margin-top: 32px;
  }

  .dashboard {
    padding: 0 18px 28px;
  }

  .dashboardContent {
    grid-template-columns: 1fr;
  }

  .adminShell {
    width: calc(100% - 36px);
    margin-top: 18px;
  }

  .adminHero {
    padding: 26px 22px;
  }

  .adminModules {
    grid-template-columns: 1fr;
  }
  
  .formGrid {
  grid-template-columns: 1fr;
}

.studentsList {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}

.studentsTable {
  min-width: 760px;
}

.studentsTableRow {
  grid-template-columns: 1.4fr 0.7fr 1.5fr 1fr 0.7fr;
  gap: 12px;
}

.studentsTableHead {
  display: grid;
}

.studentsTableRow span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
}
.adminWorkspace {
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(120, 130, 109, 0.08);
}

.adminWorkspaceEmpty {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.moduleHeader {
  margin-bottom: 22px;
}

.moduleHeader h2 {
  margin: 0 0 8px;
  font-size: 34px;
  letter-spacing: -0.04em;
  color: var(--text);
}

.moduleHeader p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.studentForm {
  display: grid;
  gap: 16px;
  margin-bottom: 26px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

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

.studentForm label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.studentForm input,
.studentForm select,
.studentForm textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.studentForm textarea {
  resize: vertical;
}

.studentForm input:focus,
.studentForm select:focus,
.studentForm textarea:focus {
  border-color: rgba(183, 207, 89, 0.55);
  box-shadow: 0 0 0 4px rgba(183, 207, 89, 0.16);
}

.formActions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.formActions button,
.studentsListHeader button {
  border: 0;
  border-radius: var(--radius-md);
  padding: 12px 15px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-weight: 600;
}

.formStatus {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.formStatus.isError,
.errorText {
  color: #b42318;
}

.studentsListHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.studentsListHeader h3 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  letter-spacing: -0.03em;
}

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

.studentsTableRow {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1.2fr 0.9fr 0.6fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14px;
}

.studentsTableHead {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.statusPill {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(183, 207, 89, 0.18);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 600;
}
/* Corrección mobile para listado de alumnos */
.studentsList,
.studentsTable {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.studentsTableRow {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.studentsTableRow span {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.statusPill {
  white-space: normal;
  overflow-wrap: anywhere;
}
/* Tabla de alumnos con scroll horizontal */
.studentsList {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

.studentsTable {
  width: 100%;
  min-width: 760px;
}

.studentsTableRow {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 1.5fr 1fr 0.7fr;
  gap: 12px;
  align-items: center;
}

.studentsTableRow span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ================================
   Admin modules navigation
================================ */

.adminModuleButton {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 600;
  border: 1px solid var(--border);
  text-decoration: none;
  font-size: 14px;
}

.adminModuleButton:hover {
  border-color: rgba(183, 207, 89, 0.45);
  color: var(--primary-dark);
  background: #fcfcf8;
}

/* ================================
   Students module
================================ */

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

.studentFormTop h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 24px;
  letter-spacing: -0.03em;
}

.studentFormTop p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.secondaryBtn {
  border: 1px solid var(--border) !important;
  background: var(--surface) !important;
  color: var(--text) !important;
}

.secondaryBtn:hover {
  border-color: rgba(183, 207, 89, 0.45) !important;
  color: var(--primary-dark) !important;
}

.studentsListHeader {
  align-items: flex-end;
}

.studentsCountText {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.studentsListActions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.studentsListActions input {
  min-width: 280px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.studentsListActions input:focus {
  border-color: rgba(183, 207, 89, 0.55);
  box-shadow: 0 0 0 4px rgba(183, 207, 89, 0.16);
}

.studentsRowActions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.studentsRowActions button {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 9px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.studentsRowActions button:hover {
  border-color: rgba(183, 207, 89, 0.45);
  color: var(--primary-dark);
}

.studentsRowActions .dangerBtn {
  border-color: rgba(180, 35, 24, 0.25);
  color: #b42318;
  background: rgba(180, 35, 24, 0.06);
}

.studentsRowActions .dangerBtn:hover {
  border-color: rgba(180, 35, 24, 0.45);
  color: #912018;
}

.studentsTable {
  width: 100%;
  min-width: 980px;
}

.studentsTableRow {
  display: grid;
  grid-template-columns: 1.35fr 0.7fr 1.35fr 0.9fr 0.7fr 1.15fr;
  gap: 12px;
  align-items: center;
}

.studentsTableRow.isEditing {
  border-color: rgba(183, 207, 89, 0.65);
  box-shadow: 0 0 0 4px rgba(183, 207, 89, 0.12);
}

.studentsTableHead {
  grid-template-columns: 1.35fr 0.7fr 1.35fr 0.9fr 0.7fr 1.15fr;
}

.statusPill--activo {
  background: rgba(183, 207, 89, 0.18);
  color: var(--primary-dark);
}

.statusPill--pausado {
  background: rgba(216, 161, 93, 0.16);
  color: #9a641f;
}

.statusPill--egresado {
  background: rgba(158, 212, 230, 0.22);
  color: #31758a;
}

.statusPill--baja {
  background: rgba(180, 35, 24, 0.08);
  color: #b42318;
}

@media (max-width: 960px) {
  .studentsListHeader {
    align-items: stretch;
    flex-direction: column;
  }

  .studentsListActions {
    justify-content: stretch;
  }

  .studentsListActions input,
  .studentsListActions button {
    width: 100%;
  }

  .studentsTable {
    min-width: 980px;
  }

  .studentsTableRow,
  .studentsTableHead {
    grid-template-columns: 1.35fr 0.7fr 1.35fr 0.9fr 0.7fr 1.15fr;
  }
}

/* ================================
   Ajustes finos módulo Alumnos
================================ */

/* Asegura scroll horizontal en mobile */
.studentsList {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* La tabla mantiene ancho mínimo y scrollea dentro del contenedor */
.studentsTable {
  min-width: 980px;
}

/* Botones más livianos */
.studentForm button,
.studentsListHeader button,
.studentsRowActions button,
.adminModuleButton,
.headerLogoutBtn {
  font-weight: 600;
  letter-spacing: 0;
}

/* Botón principal Guardar alumno */
.studentForm button[type="submit"] {
  font-weight: 650;
}

/* Botón Actualizar */
.studentsListActions button {
  font-weight: 600;
}

/* Botones Editar / Baja / Reactivar / Borrar */
.studentsRowActions button {
  font-weight: 600;
  font-size: 12px;
}

/* Pastillas de estado: activo, baja, pausado, egresado */
.statusPill {
  font-weight: 600;
  letter-spacing: 0;
  text-transform: capitalize;
}

/* Si querés que la tabla se sienta menos pesada */
.studentsTableHead {
  font-weight: 600;
}

.studentsTableRow {
  font-size: 14px;
}

/* ================================
   Student detail panel
================================ */

.studentDetailPanel {
  margin: 22px 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

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

.studentDetailHeader h3 {
  margin: 4px 0 6px;
  font-size: 26px;
  color: var(--text);
  letter-spacing: -0.03em;
}

.studentDetailHeader p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.studentDetailActions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.studentDetailActions button {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.studentDetailActions button:hover {
  border-color: rgba(183, 207, 89, 0.45);
  color: var(--primary-dark);
}

.studentDetailGrid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
}

.studentDetailCard {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.studentDetailCard h4 {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--text);
}

.studentDetailCard dl {
  margin: 0;
  display: grid;
  gap: 10px;
}

.studentDetailCard dl div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  align-items: baseline;
}

.studentDetailCard dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.studentDetailCard dd {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.studentDetailNotes {
  margin-top: 14px;
}

.studentDetailNotes p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

.studentDetailNotes em {
  color: var(--muted);
}

@media (max-width: 760px) {
  .studentDetailHeader {
    flex-direction: column;
  }

  .studentDetailActions {
    width: 100%;
    justify-content: stretch;
  }

  .studentDetailActions button {
    flex: 1;
  }

  .studentDetailGrid {
    grid-template-columns: 1fr;
  }

  .studentDetailCard dl div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

/* ================================
   Student detail academic fields
================================ */

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

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

/* ================================
   Students filters
================================ */

.studentsListActions select {
  min-width: 170px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  outline: none;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
}

.studentsListActions select:focus {
  border-color: rgba(183, 207, 89, 0.55);
  box-shadow: 0 0 0 4px rgba(183, 207, 89, 0.16);
}

.studentsListActions .secondaryBtn {
  white-space: nowrap;
}

@media (max-width: 960px) {
  .studentsListActions select {
    width: 100%;
    min-width: 0;
  }
}

/* ================================
   Student detail extended cards
================================ */

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

@media (min-width: 1180px) {
  .studentDetailGrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

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

/* ================================
   Student detail layout refinement
================================ */

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

@media (min-width: 1180px) {
  .studentDetailGrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 960px) {
  .studentDetailCard--wide {
    grid-column: span 1;
  }
}

/* ================================
   Student detail: 4 cards in one row
================================ */

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

.studentDetailCard--wide {
  grid-column: span 1;
}

.studentDetailCard {
  min-width: 0;
}

.studentDetailCard dl div {
  grid-template-columns: 1fr;
  gap: 3px;
}

.studentDetailCard dt {
  font-size: 12px;
}

.studentDetailCard dd {
  font-size: 13px;
  overflow-wrap: anywhere;
}

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

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

/* ================================
   Print student detail
================================ */

@media print {
  body.isPrintingStudentDetail {
    background: #ffffff;
  }

  body.isPrintingStudentDetail .siteHeader,
  body.isPrintingStudentDetail .adminHero,
  body.isPrintingStudentDetail .studentForm,
  body.isPrintingStudentDetail .studentsListHeader,
  body.isPrintingStudentDetail .studentsList,
  body.isPrintingStudentDetail .studentDetailActions {
    display: none !important;
  }

  body.isPrintingStudentDetail .adminShell {
    max-width: none;
    padding: 0;
    margin: 0;
  }

  body.isPrintingStudentDetail .adminWorkspace {
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    background: #ffffff;
  }

  body.isPrintingStudentDetail .studentDetailPanel {
    display: block !important;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    background: #ffffff;
  }

  body.isPrintingStudentDetail .studentDetailHeader {
    border-bottom: 1px solid #dddddd;
    padding-bottom: 14px;
    margin-bottom: 18px;
  }

  body.isPrintingStudentDetail .studentDetailHeader h3 {
    font-size: 24px;
    color: #111111;
  }

  body.isPrintingStudentDetail .studentDetailHeader p,
  body.isPrintingStudentDetail .dashboardEyebrow {
    color: #555555;
  }

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

  body.isPrintingStudentDetail .studentDetailCard {
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px solid #dddddd;
    box-shadow: none;
    background: #ffffff;
  }

  body.isPrintingStudentDetail .studentDetailNotes {
    margin-top: 12px;
  }

  body.isPrintingStudentDetail .statusPill {
    border: 1px solid #cccccc;
    background: #ffffff !important;
    color: #111111 !important;
  }
}

/* ================================
   Documents / legajo
================================ */

.teacherDocumentsCard {
  margin-top: 14px;
}

.documentsHeader {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.documentsHeader p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.documentUploadForm {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  margin-bottom: 14px;
}

.documentsGrid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.documentUploadForm label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.documentUploadForm input,
.documentUploadForm select,
.documentUploadForm textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
}

.documentUploadForm input:focus,
.documentUploadForm select:focus,
.documentUploadForm textarea:focus {
  border-color: rgba(183, 207, 89, 0.55);
  box-shadow: 0 0 0 4px rgba(183, 207, 89, 0.16);
}

.documentsList {
  display: grid;
  gap: 10px;
}

.documentsItems {
  display: grid;
  gap: 10px;
}

.documentItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.documentItem strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.documentItem span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.documentItem small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}

.documentItemActions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.documentItemActions button {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.documentItemActions button:hover {
  border-color: rgba(183, 207, 89, 0.45);
  color: var(--primary-dark);
}

.documentItemActions .dangerBtn {
  border-color: rgba(180, 35, 24, 0.25);
  color: #b42318;
  background: rgba(180, 35, 24, 0.06);
}

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

  .documentItem {
    align-items: flex-start;
    flex-direction: column;
  }

  .documentItemActions {
    width: 100%;
    justify-content: stretch;
  }

  .documentItemActions button {
    flex: 1;
  }
}

/* ================================
   Student documents
================================ */

.studentDocumentsCard {
  margin-top: 14px;
}

@media print {
  body.isPrintingStudentDetail .documentUploadForm,
  body.isPrintingStudentDetail .documentItemActions {
    display: none !important;
  }
}

/* ================================
   Mobile admin header fix
================================ */

@media (max-width: 720px) {
  .siteHeader {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    overflow: visible;
  }

  .siteHeaderBrand {
    min-width: 0;
    flex: 1;
  }

  .siteHeaderBrand div {
    min-width: 0;
  }

  .siteHeaderBrand strong,
  .siteHeaderBrand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .siteHeaderLogo {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
  }

  .siteHeaderNav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex: 0 0 auto;
  }

  .siteHeaderNav a,
  .headerLogoutBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
  }
}

/* ================================
   Course status
================================ */

.statusPill--finalizada {
  background: rgba(158, 212, 230, 0.22);
  color: #31758a;
}

/* ================================
   Enrollment status
================================ */

.statusPill--inscripto {
  background: rgba(183, 207, 89, 0.18);
  color: var(--primary-dark);
}

.statusPill--regular {
  background: rgba(158, 212, 230, 0.22);
  color: #31758a;
}

.statusPill--libre {
  background: rgba(216, 161, 93, 0.16);
  color: #9a641f;
}

.statusPill--aprobado {
  background: rgba(183, 207, 89, 0.22);
  color: var(--primary-dark);
}

/* ================================
   Enrollments grouped by student
================================ */

.enrollmentsAccordion {
  display: grid;
  gap: 12px;
}

.enrollmentStudentGroup {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.enrollmentStudentGroup summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
  cursor: pointer;
  list-style: none;
  background: var(--surface-soft);
}

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

.enrollmentStudentGroup summary::after {
  content: "▾";
  color: var(--muted);
  font-size: 14px;
  transition: transform 0.2s ease;
}

.enrollmentStudentGroup:not([open]) summary::after {
  transform: rotate(-90deg);
}

.enrollmentStudentSummaryMain {
  display: grid;
  gap: 3px;
}

.enrollmentStudentSummaryMain strong {
  color: var(--text);
  font-size: 15px;
}

.enrollmentStudentSummaryMain span {
  color: var(--muted);
  font-size: 13px;
}

.enrollmentStudentSummaryMeta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-left: auto;
}

.enrollmentStudentSummaryMeta span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
}

.enrollmentStudentItems {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.enrollmentItem {
  display: grid;
  grid-template-columns: 1.4fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.enrollmentItemMain {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.enrollmentItemMain strong {
  color: var(--text);
  font-size: 14px;
}

.enrollmentItemMain span,
.enrollmentItemMain small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.enrollmentItemStatus {
  display: flex;
  justify-content: center;
}

.enrollmentItemActions {
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .enrollmentStudentGroup summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .enrollmentStudentSummaryMeta {
    margin-left: 0;
  }

  .enrollmentItem {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .enrollmentItemStatus {
    justify-content: flex-start;
  }

  .enrollmentItemActions {
    justify-content: stretch;
  }

  .enrollmentItemActions button {
    flex: 1;
  }
}

/* ================================
   Enrollments view mode
================================ */

.enrollmentsAccordion--course .enrollmentStudentGroup summary {
  background: #fcfcf8;
}

.enrollmentCourseGroup .enrollmentStudentSummaryMain strong::before {
  content: "📚 ";
}
/* ================================
   Public enrollment page
================================ */

.publicEnrollmentShell {
  max-width: 980px;
}

.publicEnrollmentShell .adminWorkspace {
  margin-top: 20px;
}

.publicEnrollmentShell .studentForm {
  margin-top: 0;
}