:root {
  --green: #3d6b4f;
  --green-light: #5a8f6e;
  --orange: #d45a2a;
  --orange-light: #e87a4f;
  --beige: #f5f0e8;
  --beige-dark: #e8dfd0;
  --cream: #fff6f1;
  --text: #2c2c2c;
  --text-muted: #6b6b6b;
  --white: #ffffff;
  --border: #ddd5c8;
  --shadow: 0 2px 12px rgba(44, 44, 44, 0.08);
  --radius: 8px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--beige);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--green);
  text-decoration: none;
}

a:hover {
  color: var(--orange);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.logo__img {
  display: block;
  height: 3.25rem;
  width: auto;
  max-width: min(200px, 45vw);
  object-fit: contain;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  align-items: center;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--green);
}

.site-nav a.active {
  color: var(--green);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.3rem;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--green);
}

.nav-admin {
  font-size: 0.85rem !important;
  color: var(--orange) !important;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-light) 100%);
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* Hero con foto (inicio) */
.hero-photo {
  position: relative;
  min-height: min(75vh, 720px);
  padding: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  text-align: left;
}

.hero-photo__overlay {
  min-height: inherit;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 3rem 1.5rem;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.25) 45%, rgba(0, 0, 0, 0.1) 100%);
}

.hero-photo__content {
  max-width: 520px;
  margin-left: auto;
  text-align: right;
}

.hero-photo__title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 0.95;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero-photo__lead {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--white);
  opacity: 0.95;
  max-width: none;
  margin: 0 0 1.75rem auto;
}

/* Inicio — 3 columnas estilo Canva */
.home-features-section {
  background: var(--beige);
}

.home-features-heading {
  text-align: center;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.home-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.home-feature {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.home-feature__img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.home-feature__panel {
  flex: 1;
  background: var(--green);
  color: var(--white);
  padding: 1.25rem;
}

.home-feature__panel h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
}

.home-feature__panel p {
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  opacity: 0.95;
}

.home-feature__link {
  color: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-feature__link:hover {
  color: var(--orange-light);
}

/* Layout con fotos en lateral izquierdo */
.public-page-layout {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.public-page-layout__content {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.public-page-layout__content .section {
  padding-left: 0;
  padding-right: 0;
}

.public-side-photos {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 5.5rem;
  z-index: 0;
}

.public-side-photos__img {
  width: 100%;
  height: auto;
  min-height: 140px;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Sobre nosotros — paneles con foto de fondo */
.about-panel {
  position: relative;
  padding: 4rem 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.about-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.about-panel--alt::before {
  background: rgba(61, 107, 79, 0.72);
}

.about-panel__inner {
  position: relative;
  z-index: 1;
  color: var(--white);
}

.about-panel__inner .section-title {
  color: var(--white);
}

.about-panel__cards .card {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
}

.about-panel__cards .card h3 {
  color: var(--green);
}

.about-faqs-section {
  position: relative;
  background-color: var(--beige);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 4rem 0;
}

.about-faqs-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.35);
}

.about-faqs-section .container {
  position: relative;
  z-index: 1;
}

.about-faqs-title {
  color: var(--green);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

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

.about-faq {
  background: rgba(232, 93, 44, 0.82);
  color: var(--white);
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
}

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

.about-faq__num {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.about-faq__q {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  line-height: 1.3;
}

.about-faq__a {
  font-size: 0.92rem;
  line-height: 1.55;
  opacity: 0.97;
}

.public-filters {
  margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--orange-light);
  color: var(--white);
}

.btn-secondary {
  background: var(--white);
  color: var(--green);
  border: 2px solid var(--green);
}

.btn-secondary:hover {
  background: var(--beige);
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}

/* Sections */
.section {
  padding: 3rem 0;
}

.section-title {
  font-size: 1.6rem;
  color: var(--green);
  margin-bottom: 1.5rem;
}

.section-alt {
  background: var(--white);
}

/* Cards */
.section-intro {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 42rem;
}

.course-card-level {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.course-card-schedule {
  font-weight: 500;
  margin: 0.35rem 0;
}

.course-card-price {
  margin: 0.5rem 0;
}

.course-grid .card {
  display: flex;
  flex-direction: column;
}

.course-grid .card .btn {
  margin-top: auto;
  align-self: flex-start;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Rejilla de campos en formularios de gestión: colapsa en pantallas pequeñas. */
.form-grid {
  display: grid;
  gap: 1.5rem;
}

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

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

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

@media (max-width: 640px) {
  .form-grid--2,
  .form-grid--4 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.card h3 {
  color: var(--green);
  margin-bottom: 0.5rem;
}

.card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-green {
  background: #e8f5ec;
  color: var(--green);
}

.badge-orange {
  background: #fdeee8;
  color: var(--orange);
}

.badge-gray {
  background: var(--beige-dark);
  color: var(--text-muted);
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(61, 107, 79, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-error {
  color: #c0392b;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.medical-alert {
  color: #c0392b;
  font-weight: 600;
  font-size: 0.85rem;
  margin: 0.25rem 0;
}

.form-success {
  background: #e8f5ec;
  color: var(--green);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.checkbox-group input {
  width: auto;
  margin-top: 0.25rem;
}

/* Inscripción parcial — selector de modalidad en tarjetas de curso */
.enrollment-options-wrap {
  margin-bottom: 0.75rem;
}

.enrollment-options-title,
.enrollment-schedule-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.45rem;
  color: var(--text);
}

.enrollment-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.enrollment-option {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  font-weight: 400;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.enrollment-option:hover:not(.is-disabled) {
  border-color: color-mix(in srgb, var(--green) 45%, var(--border));
  background: color-mix(in srgb, var(--beige) 55%, var(--white));
}

.enrollment-option:has(input:checked) {
  border-color: var(--green);
  background: color-mix(in srgb, var(--beige) 70%, var(--white));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--green) 25%, transparent);
}

.enrollment-option.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.enrollment-option input[type="radio"] {
  width: 1rem;
  height: 1rem;
  margin: 0.1rem 0 0;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--green);
  cursor: pointer;
}

.enrollment-option.is-disabled input[type="radio"] {
  cursor: not-allowed;
}

.enrollment-option-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  line-height: 1.35;
}

.enrollment-option-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.enrollment-option-price {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.enrollment-schedule-pick {
  margin-top: 0.65rem;
}

.enrollment-schedule-pick[hidden] {
  display: none !important;
}

.enrollment-schedule-select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9rem;
  background: var(--white);
}

.enrollment-upgrade-panel {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.enrollment-upgrade-panel[hidden] {
  display: none !important;
}

.enrollment-upgrade-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.enrollment-upgrade-feedback {
  margin-top: 0.65rem;
  margin-bottom: 0;
}

.enrollment-upgrade-feedback.form-success {
  background: #e8f5ec;
  color: var(--green);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
}

/* Footer */
.site-footer {
  background: var(--green);
  color: rgba(255, 255, 255, 0.8);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.9rem;
  margin-top: auto;
}

.site-footer a {
  color: var(--white);
}

.site-footer-legal {
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.site-footer-legal a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-page__inner {
  max-width: 720px;
}

.legal-page h2 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}

.legal-page ul {
  margin: 0.5rem 0 1rem 1.25rem;
}

.legal-updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.legal-nav-links {
  margin-top: 2rem;
  font-size: 0.9rem;
}

.doc-viewer-card {
  padding: 0;
  overflow: hidden;
}

.doc-iframe {
  display: block;
  width: 100%;
  min-height: 70vh;
  border: none;
  background: #f5f5f5;
}

.doc-list-card h3 {
  margin: 0 0 0.35rem;
}

.doc-content {
  max-width: 720px;
}

.doc-content h2 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}

.doc-content h2:first-child {
  margin-top: 0;
}

.doc-content p {
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

.doc-content ul {
  margin: 0.5rem 0 1rem 1.25rem;
}

.doc-content li {
  margin-bottom: 0.35rem;
}

/* Views */
.view {
  display: none;
}

.view.active {
  display: block;
}

/* Loading / empty */
.loading,
.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

/* Admin */
.admin-body {
  display: flex;
  min-height: 100vh;
}

body.has-site-header {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.has-site-header .admin-body--below-header {
  flex: 1;
  min-height: 0;
}

.email-verify-banner {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  background: #fff8f4;
  border: 1px solid var(--orange);
  border-radius: 8px;
  color: var(--text);
}

.email-verify-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  justify-content: space-between;
}

.email-verify-banner p {
  margin: 0;
  flex: 1 1 220px;
}

.courses-trial-banner {
  background: var(--beige, #f5f0e8);
  border-left: 4px solid var(--green, #2d5a3d);
  padding: 0.85rem 1rem;
  margin: 0 0 1.25rem;
  border-radius: var(--radius, 8px);
  font-size: 0.95rem;
}

.admin-sidebar {
  width: 220px;
  background: var(--green);
  color: var(--white);
  padding: 1.5rem 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-sidebar-nav {
  flex: 1;
}

.admin-nav-group {
  margin-top: 1.25rem;
}

.admin-nav-group-label {
  margin: 0;
  padding: 0 1.25rem 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.45);
}

.admin-nav-footer,
.admin-nav-group--session {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-nav a.admin-nav-external {
  opacity: 0.85;
}

.admin-sidebar h2 {
  font-size: 0.95rem;
  padding: 0 1.25rem;
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

.admin-nav {
  list-style: none;
}

.admin-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
}

.nav-dot[hidden] {
  display: none;
}

.admin-nav a:hover,
.admin-nav a.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.admin-main {
  flex: 1;
  padding: 2rem;
  background: var(--beige);
}

#user-app .admin-main {
  padding-bottom: 5rem;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.admin-header h1 {
  margin: 0;
  font-size: 1.4rem;
  color: var(--green);
}

.admin-card {
  background: #fff;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.admin-card h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.admin-form label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.admin-form input:not([type="radio"]):not([type="checkbox"]),
.admin-form select {
  display: block;
  width: 100%;
  max-width: 320px;
  margin-top: 0.25rem;
  padding: 0.5rem;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
}

.radio-option {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0;
  cursor: pointer;
}

.radio-option input[type="radio"],
.radio-option input[type="checkbox"] {
  width: auto;
  margin: 0;
  flex-shrink: 0;
}

.admin-sidebar-note {
  font-size: 0.85rem;
  color: #666;
  margin: 0.5rem 0 0;
  padding: 0 1rem;
}

.students-search {
  max-width: 280px;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.students-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.students-active-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.profile-incomplete-banner {
  background: #fff8e6;
  border-bottom: 1px solid #f0d78c;
}

.profile-add-child-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.25rem 0;
  list-style: none;
}

.profile-add-child-summary::-webkit-details-marker {
  display: none;
}

.profile-add-child-summary::before {
  content: "▸ ";
  color: var(--green);
}

.profile-add-child[open] .profile-add-child-summary::before {
  content: "▾ ";
}

.student-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.student-list--compact {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.student-row-head,
.student-row-summary {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 1.2fr 1fr 0.7fr;
  gap: 0.75rem;
  align-items: center;
}

.student-row-head {
  padding: 0.75rem 1rem;
  background: var(--beige);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.student-row {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.student-row:last-child {
  border-bottom: none;
}

.student-row-summary {
  padding: 0.85rem 1rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.9rem;
}

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

.student-row-summary::before {
  content: "▸";
  position: absolute;
  left: 0.35rem;
  color: var(--green);
  font-size: 0.8rem;
  transition: transform 0.15s ease;
}

.student-row {
  position: relative;
}

.student-row-summary {
  padding-left: 1.5rem;
}

.student-row[open] .student-row-summary::before {
  transform: rotate(90deg);
}

.student-row-summary:hover {
  background: rgba(0, 0, 0, 0.02);
}

.student-row-name {
  font-weight: 600;
  color: var(--green);
}

.student-row-email,
.student-row-courses,
.student-row-status,
.student-row-children {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-row-email {
  color: inherit;
}

.student-row-detail {
  padding: 0 1rem 1rem 1.5rem;
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
  background: #faf9f7;
}

.student-card h3.student-name {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  color: var(--green);
}

.student-label {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.student-card-grid,
.student-child-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

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

.student-enroll-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.student-link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--green);
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.student-link-btn:hover {
  text-decoration: underline;
}

.student-children-block {
  margin-top: 1rem;
}

.student-children {
  margin-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 0.75rem;
}

.student-children summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--green);
  list-style: none;
}

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

.student-children summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s ease;
}

.student-children[open] summary::before {
  transform: rotate(90deg);
}

.student-children-body {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.student-child {
  background: var(--beige);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}

.student-child-header {
  margin-bottom: 0.35rem;
}

.student-no-children {
  margin: 0.75rem 0 0;
}

@media (max-width: 900px) {
  .student-row-head {
    display: none;
  }

  .student-row-summary {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .student-row-summary::before {
    top: 0.95rem;
  }

  .student-row-children::before {
    content: "Hijos: ";
    font-weight: 600;
  }

  .student-row-courses::before {
    content: "Cursos: ";
    font-weight: 600;
  }

  .student-row-status::before {
    content: "Estado: ";
    font-weight: 600;
  }
}

@media (max-width: 768px) {
  .student-card-grid,
  .student-child-grid {
    grid-template-columns: 1fr;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

.payment-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.45);
}

.payment-modal {
  width: min(100%, 420px);
  padding: 1.25rem;
  margin: 0;
}

.payment-method-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.payment-method-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--white);
}

.payment-method-option:has(input:checked) {
  border-color: var(--green);
  background: #f6fbf8;
}

.payment-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.admin-table th,
.admin-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.admin-table th {
  background: var(--beige-dark);
  font-weight: 600;
  color: var(--green);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.login-box {
  max-width: 380px;
  margin: 6rem auto;
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-box h1 {
  color: var(--green);
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.nav-cta { margin-left: 0.5rem !important; }
.nav-auth-session { margin-left: 0; }
.nav-auth-session:first-of-type { margin-left: auto; }
.nav-auth-logout {
  margin-left: 1.25rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border);
}
.nav-auth-session a { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); }
.nav-auth-session a:hover,
.nav-auth-session a.active { color: var(--green); font-weight: 700; }
.nav-auth-logout a {
  font-size: 0.78rem;
  line-height: 1.1;
  padding: 0.15rem 0;
}
.nav-logout-text {
  display: inline-block;
  text-align: center;
}

.whatsapp-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #25d366;
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  z-index: 200;
}

.whatsapp-fab:hover { color: white; background: #1fb855; }

.kpi-card { text-align: center; }
.kpi-card h3 { font-size: 2rem; color: var(--green); margin-bottom: 0.25rem; }
.kpi-card p { color: var(--text-muted); font-size: 0.9rem; }
.kpi-card--clickable { cursor: pointer; transition: box-shadow 0.15s, transform 0.15s; }
.kpi-card--clickable:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-1px); }
.kpi-card--alert { border: 2px solid var(--orange); background: #fff8f4; }
.kpi-card--alert h3 { color: var(--orange); }
.kpi-card--muted { opacity: 0.55; }
.kpi-card--muted.kpi-card--clickable:hover { opacity: 0.75; }

.cal-view-toggle {
  display: inline-flex;
  border: 2px solid var(--green);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
.cal-view-toggle .cal-view-btn {
  border: none;
  border-radius: 0;
  margin: 0;
  padding: 0.35rem 0.85rem;
  font-weight: 600;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  font-size: 0.85rem;
}
.cal-view-toggle .cal-view-btn--active {
  background: var(--green);
  color: var(--white);
}
.cal-view-toggle .cal-view-btn:hover:not(.cal-view-btn--active) {
  background: rgba(45, 90, 61, 0.08);
}

.admin-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.admin-header-row h1 { margin: 0; }

.admin-form-compact {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}
.admin-form-compact h3 {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.holiday-cal-cell {
  aspect-ratio: 1;
  min-height: 0;
  background: #f0ede6;
  border: 1px solid #ddd8ce;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.holiday-cal-cell--empty {
  background: transparent;
  border: none;
}
.holiday-cal-cell--today {
  box-shadow: inset 0 0 0 2px var(--orange);
}
.holiday-cal-cell.holiday-cal-cell--closed {
  background: #f5c6c6;
  border-color: #e8a0a0;
}
.holiday-cal-cell.holiday-cal-cell--closed .holiday-cal-day-num {
  color: #8b2020;
  font-weight: 600;
}
.holiday-cal-cell.holiday-cal-cell--class-day {
  background: #c8e6c9;
  border-color: #9ccc9c;
}
.holiday-cal-cell.holiday-cal-cell--class-day .holiday-cal-day-num {
  color: #1b5e20;
  font-weight: 600;
}
.holiday-cal-cell.holiday-cal-cell--weekend {
  background: #ffe8d9;
  border-color: #f0c4a8;
}
.holiday-cal-cell.holiday-cal-cell--weekend .holiday-cal-day-num {
  color: #9a4518;
  font-weight: 600;
}
.holiday-cal-day-num {
  font-size: 0.62rem;
  line-height: 1;
}
.holiday-split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.25rem;
  align-items: start;
}
.holiday-list-panel { min-width: 0; }
.holiday-mini-cal-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 8rem);
}
.holiday-mini-cal-scroll {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 0.15rem;
}
.holiday-mini-month-title {
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: var(--text-muted);
  text-align: center;
}
.holiday-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 2px;
}
.holiday-cal-weekdays span {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  line-height: 1;
}
.holiday-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.holiday-mini-cal-legend {
  display: flex;
  gap: 0.6rem;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  justify-content: center;
  flex-shrink: 0;
}
.holiday-legend-swatch {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 2px;
  margin-right: 0.2rem;
  vertical-align: middle;
}
.holiday-legend-swatch--closed { background: #f5c6c6; border: 1px solid #e8a0a0; }
.holiday-legend-swatch--class { background: #c8e6c9; border: 1px solid #9ccc9c; }
.holiday-legend-swatch--weekend { background: #ffe8d9; border: 1px solid #f0c4a8; }
.holiday-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.holiday-season-select {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}
.holiday-season-select select {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.holiday-footer {
  margin-top: 1.25rem;
}
.holiday-add-toggle {
  width: 100%;
}
.holiday-form-card,
.holiday-review-card {
  margin-top: 0.75rem;
  padding: 1rem 1.25rem;
}
.holiday-review-card--danger {
  border-left: 4px solid #c44;
}
.holiday-form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.holiday-review-warn {
  background: #fff8e6;
  border: 1px solid #f0d89a;
  border-radius: var(--radius);
  padding: 0.75rem;
  margin: 0.75rem 0;
  font-size: 0.9rem;
}
.holiday-review-table { margin: 0.75rem 0; }
.holiday-row-actions { white-space: nowrap; }
.holiday-row-actions .btn { margin-left: 0.25rem; }
.holiday-group-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 0.35rem 0 0;
  color: var(--green);
  font-size: 0.85rem;
  line-height: 1;
}
.holiday-group-toggle[aria-expanded="true"] { transform: rotate(90deg); }
.holiday-group-days {
  margin: 0.35rem 0 0 1.25rem;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.holiday-group-days li { padding: 0.1rem 0; }

@media (max-width: 900px) {
  .holiday-split-layout {
    grid-template-columns: 1fr;
  }
}
.manager-detail-back { margin-bottom: 1rem; }
.manager-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.manager-tabs button.active { background: var(--green); color: white; }
.row-highlight { background: #fff8f4; }

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.schedule-day {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid var(--border);
}

.schedule-day h3 {
  color: var(--green);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--orange);
}

.schedule-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--beige-dark);
  font-size: 0.85rem;
}

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

.calendar-session {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--beige-dark);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.testimonial-card p:first-child { font-style: italic; }

.testimonial-card__author { margin-top: 0.75rem; }

.testimonial-card--wide {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.testimonial-card--wide .testimonial-card__body { flex: 1; }

.testimonial-card--wide .testimonial-card__author {
  margin-top: 0;
  white-space: nowrap;
  align-self: flex-end;
}

@media (max-width: 640px) {
  .testimonial-card--wide {
    flex-direction: column;
    gap: 0.5rem;
  }

  .testimonial-card--wide .testimonial-card__author {
    align-self: flex-start;
    white-space: normal;
  }
}

/* Calendar widget */
.cal-widget { margin-top: 1rem; }
.cal-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; align-items: center; }
.cal-nav { display: flex; align-items: center; gap: 0.5rem; }
.cal-title { margin: 0 0 0 0.5rem; font-size: 1.2rem; color: var(--green); }
.cal-filters { display: flex; gap: 0.75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.cal-filters select { padding: 0.4rem 0.6rem; min-width: 180px; }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 1.5rem; align-items: start; }
.cal-body { min-width: 0; overflow-x: auto; }
.cal-weekdays { display: grid; gap: 4px; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-align: center; min-width: 0; }
.cal-weekday--idle { font-size: 0.65rem; color: var(--text-muted); opacity: 0.75; }
.cal-month-grid { display: flex; flex-direction: column; gap: 4px; width: 100%; min-width: 0; }
.cal-month-header { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 4px; margin-bottom: 0; }
.cal-month-week-gutter { width: 36px; }
.cal-month-week-row { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 4px; align-items: stretch; }
.cal-month-week-days { display: grid; gap: 4px; min-width: 0; }
.cal-week-picker { width: 36px; min-width: 36px; padding: 0; height: auto; align-self: stretch; font-size: 1rem; line-height: 1; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-grid--week { grid-template-columns: repeat(7, 1fr); }
.cal-cell { min-height: 90px; min-width: 0; background: var(--white); border-radius: 6px; padding: 4px; font-size: 0.75rem; border: 1px solid var(--beige-dark); display: flex; flex-direction: column; }
.cal-cell--outside { background: #f3f1ec; border-color: #e8e4dc; color: var(--text-muted); }
.cal-cell--outside .cal-day-num { color: var(--text-muted); font-weight: 600; }
.cal-cell--outside .cal-chip { opacity: 0.85; }
.cal-cell--idle-col { padding: 2px; min-height: 52px !important; }
.cal-cell--idle-col .cal-day-num { font-size: 0.7rem; text-align: center; margin-bottom: 0; }
.cal-cell--idle-col.cal-cell--outside { opacity: 0.55; }
.cal-cell--week { min-height: 200px; }
.cal-cell--muted { background: transparent; border: none; }
.cal-cell--today { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.cal-day-num { font-weight: 700; display: block; margin-bottom: 4px; }
.cal-chip { display: block; width: 100%; text-align: left; border: 2px solid transparent; background: var(--beige); border-radius: 4px; padding: 2px 4px; margin-bottom: 2px; cursor: pointer; font-size: 0.68rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 0; }
.cal-chip--level-prekids { background: #c8e6c9; color: #1b3d1f; }
.cal-chip--level-kids { background: #4caf50; color: #fff; }
.cal-chip--level-teens { background: #78909c; color: #fff; }
.cal-chip--level-adultos { background: #e65100; color: #fff; }
.cal-chip--loc-calderon { border-color: var(--orange); }
.cal-chip--loc-ongravity { border-color: var(--beige); }
.cal-chip--workshop { background: #e8f4fc; }
.cal-chip--class_slot { background: #f5f0e6; border-left: 2px solid var(--gold, #c9a227); }
.cal-chip--holiday { background: #fde8e8; color: #a33; font-weight: 600; }
.cal-chip--cancelled { opacity: 0.5; text-decoration: line-through; }
.cal-more-btn {
  display: block;
  width: 100%;
  margin-top: auto;
  padding: 2px 4px;
  border: none;
  border-radius: 4px;
  background: rgba(61, 107, 79, 0.12);
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  flex-shrink: 0;
}
.cal-more-btn:hover { background: rgba(61, 107, 79, 0.22); }
.cal-more { font-size: 0.65rem; color: var(--text-muted); }
.cal-detail { background: var(--white); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); font-size: 0.9rem; }
.cal-detail-empty { color: var(--text-muted); font-size: 0.9rem; }

/* Week time grid (12:00–22:00) */
.cal-timegrid { border-radius: 8px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.15); background: #3d6b4f; }
.cal-timegrid-header {
  display: grid;
  grid-template-columns: 52px repeat(7, minmax(0, 1fr));
  background: #3d6b4f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.cal-timegrid-corner { min-height: 48px; }
.cal-timegrid-day-head {
  padding: 0.4rem 0.25rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.75rem;
}
.cal-timegrid-day-head--today { background: rgba(255, 255, 255, 0.1); }
.cal-timegrid-day-head--holiday { background: rgba(253, 232, 232, 0.15); }
.cal-timegrid-day-name { display: block; font-weight: 600; }
.cal-timegrid-day-num { display: block; font-size: 1rem; font-weight: 700; }
.cal-timegrid-holiday-badge {
  display: block;
  margin-top: 2px;
  font-size: 0.6rem;
  color: #ffc9c9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-timegrid-body {
  display: grid;
  grid-template-columns: 52px repeat(7, minmax(0, 1fr));
  max-height: 680px;
  overflow-y: auto;
}
.cal-timegrid-times {
  background: #3d6b4f;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}
.cal-timegrid-time {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0 6px 0 2px;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
}
.cal-timegrid-day-col {
  position: relative;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.06);
  min-width: 0;
}
.cal-timegrid-day-col--holiday {
  background: rgba(253, 232, 232, 0.12);
  cursor: pointer;
}
.cal-timegrid-slots { position: absolute; inset: 0; pointer-events: none; }
.cal-timegrid-slot { border-bottom: 1px solid rgba(255, 255, 255, 0.08); box-sizing: border-box; }
.cal-timegrid-events { position: absolute; inset: 0 2px; pointer-events: none; }
.cal-timegrid-event {
  position: absolute;
  left: 2px;
  right: 2px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 1px;
  padding: 4px 3px;
  border: 3px solid transparent;
  border-radius: 4px;
  text-align: center;
  font-size: 0.65rem;
  line-height: 1.15;
  cursor: pointer;
  pointer-events: auto;
  overflow: hidden;
  background: var(--beige);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}
.cal-timegrid-event--level-prekids { background: #c8e6c9; color: #1b3d1f; }
.cal-timegrid-event--level-kids { background: #4caf50; color: #fff; }
.cal-timegrid-event--level-teens { background: #78909c; color: #fff; }
.cal-timegrid-event--level-adultos { background: #e65100; color: #fff; }
.cal-timegrid-event--loc-calderon { border-color: var(--orange); }
.cal-timegrid-event--loc-ongravity { border-color: rgba(255, 255, 255, 0.85); }
.cal-timegrid-event--workshop { background: #e8f4fc; color: var(--text); }
.cal-timegrid-event--class_slot { background: #f5f0e6; color: var(--text); border-left: 3px solid var(--gold, #c9a227); }
.cal-timegrid-event--session:not([class*="--level-"]) { background: #eef5ea; color: var(--text); }
.cal-timegrid-event--cancelled { opacity: 0.5; text-decoration: line-through; }
.cal-timegrid-event-time { font-weight: 400; font-size: 0.58rem; opacity: 0.95; flex-shrink: 0; }
.cal-timegrid-event-title {
  font-weight: 800;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  max-width: 100%;
  line-height: 1.1;
}
.cal-timegrid-event-meta {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  opacity: 0.95;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.cal-timegrid-holiday-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  color: #ffc9c9;
  pointer-events: none;
}
.cal-timegrid-holiday-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.cal-timegrid-holiday-name { font-size: 0.75rem; text-align: center; padding: 0 0.5rem; }
.cal-timegrid-overflow {
  position: absolute;
  top: 0;
  left: 2px;
  right: 2px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
}
.cal-timegrid-overflow-event {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 100%;
  border: none;
  border-radius: 4px;
  padding: 2px 4px;
  font-size: 0.58rem;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  pointer-events: auto;
  background: #e8f4fc;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.cal-timegrid-overflow-event--workshop { background: #e8f4fc; border-left: 3px solid #5ba4d9; }
.cal-timegrid-overflow-event--session { background: #eef5ea; border-left: 3px solid var(--green); }
.cal-timegrid-overflow-event--class_slot { background: #f5f0e6; border-left: 3px solid var(--gold, #c9a227); }
.cal-timegrid-overflow-event span:first-child { font-weight: 700; }

.cal-chip.cal-access--payment_required,
.cal-chip.cal-access--pending_payment,
.cal-timegrid-event.cal-access--payment_required,
.cal-timegrid-event.cal-access--pending_payment,
.cal-timegrid-overflow-event.cal-access--payment_required,
.cal-timegrid-overflow-event.cal-access--pending_payment {
  background: #fff4e6;
  border-left: 3px solid var(--orange, #e67e22);
  opacity: 0.95;
}
.cal-chip.cal-access--payment_upcoming,
.cal-timegrid-event.cal-access--payment_upcoming,
.cal-timegrid-overflow-event.cal-access--payment_upcoming {
  background: #f0f0f0;
  opacity: 0.75;
  border-left: 3px dashed #999;
}
.cal-chip.cal-access--cancelled,
.cal-timegrid-event.cal-access--cancelled,
.cal-timegrid-overflow-event.cal-access--cancelled {
  opacity: 0.55;
  text-decoration: line-through;
}

.cal-chip.cal-event--makeup-blocked,
.cal-timegrid-event.cal-event--makeup-blocked,
.cal-timegrid-overflow-event.cal-event--makeup-blocked {
  background: #ececec !important;
  color: #777;
  cursor: not-allowed;
  opacity: 0.8;
  border-left: 3px solid #bbb !important;
}
.cal-makeup-block-msg { margin-top: 0.75rem; }

.schedule-row, .exclusion-row { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; flex-wrap: wrap; }
.payments-mock { opacity: 0.65; pointer-events: none; user-select: none; margin-top: 1rem; }
.payments-mock-disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 900px) {
  .cal-layout { grid-template-columns: 1fr; }
  .home-features { grid-template-columns: 1fr; }
  .public-page-layout { grid-template-columns: 1fr; }
  .public-side-photos { display: none; }
  .about-faq-grid { grid-template-columns: 1fr; }
  .about-faq--wide { grid-column: auto; }
}

@media (max-width: 640px) {
  /* La cabecera es sticky: cuanto más baja, más contenido visible. */
  .site-header .container {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
  }

  .logo__img {
    height: 2.4rem;
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 1rem;
  }

  .site-nav a {
    font-size: 0.85rem;
  }

  .nav-logout-text br {
    display: none;
  }

  .container {
    padding: 0 1rem;
  }

  .hero {
    padding: 2.5rem 0;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .hero-photo__overlay {
    justify-content: center;
    padding: 2.5rem 1rem;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.65) 100%);
  }

  .hero-photo__content {
    margin: 0 auto;
    text-align: center;
    max-width: 100%;
  }

  .hero-photo__lead {
    margin-left: auto;
    margin-right: auto;
  }

  .admin-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: calc(var(--app-header-h, 0px) + 0.5rem);
    left: 0.75rem;
    z-index: 102;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    border: none;
    background: var(--green);
    color: var(--white);
    font-size: 1.3rem;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    cursor: pointer;
  }

  .admin-body {
    flex-direction: column;
  }

  .admin-sidebar {
    position: fixed;
    top: var(--app-header-h, 0px);
    left: 0;
    width: 82vw;
    max-width: 300px;
    height: calc(100vh - var(--app-header-h, 0px));
    min-height: 0;
    z-index: 101;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.25);
  }

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

  .admin-sidebar-backdrop {
    display: none;
    position: fixed;
    top: var(--app-header-h, 0px);
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 100;
  }

  .admin-sidebar-backdrop.admin-sidebar-backdrop--visible {
    display: block;
  }

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

  .admin-main {
    padding: 4rem 1rem 1.5rem;
  }

  /* Con 4-6 columnas las celdas se estrujan: mejor scroll horizontal. */
  .admin-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.6rem 0.75rem;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .card {
    padding: 1rem;
  }

  .cal-filters select {
    flex: 1 1 100%;
    min-width: 0;
  }

  .cal-cell {
    min-height: 64px;
    padding: 2px;
    font-size: 0.7rem;
  }

  .cal-chip {
    font-size: 0.6rem;
    padding: 1px 3px;
  }

  /* Siete columnas no caben: la rejilla horaria se desplaza en horizontal. */
  .cal-timegrid {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .cal-timegrid-header,
  .cal-timegrid-body {
    min-width: 600px;
  }

  .whatsapp-fab {
    bottom: 1rem;
    right: 1rem;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }

  .site-footer {
    padding-bottom: 4.5rem;
  }
}

@media (min-width: 641px) {
  .admin-mobile-toggle,
  .admin-sidebar-backdrop {
    display: none !important;
  }
}

.invite-block {
  padding: 0.5rem 0;
}

.invite-options-list {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
}

.invite-option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border, #eee);
}

.invite-option-row:last-child {
  border-bottom: none;
}

.invite-session-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.invite-session-row .invite-session-select {
  flex: 1 1 180px;
  max-width: 260px;
  min-width: 0;
}
