/**
 * Shell público FEN I+E (landing, reservas, calendario).
 * Iconos SVG propios (sin emojis).
 */
body.page-shell {
  --brand-bg: #080c14;
  --brand-card: #111726;
  --brand-input: #172033;
  --brand-border: #232f48;
  --brand-accent: #6366f1;
  --brand-accent-light: #818cf8;
  --brand-hint: #8b9bb4;
  --brand-muted: #1e293b;
  --radius: 8px;
  --radius-lg: 12px;

  font-family: "Inter", "Outfit", system-ui, sans-serif;
  background: var(--brand-bg) !important;
  color: #fff;
  display: block;
  padding: 0;
  min-height: 100vh;
  align-items: stretch;
  justify-content: flex-start;
}

body.page-shell .background-elements {
  display: none;
}

/* Top bar sticky */
body.page-shell .reserva-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--brand-border);
  background: rgba(17, 23, 38, 0.92);
  backdrop-filter: blur(10px);
}

body.page-shell .reserva-topbar-inner {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

body.page-shell .reserva-topbar .nav-link,
body.page-shell .reserva-topbar .link-disponibilidad {
  width: auto;
  margin: 0;
  min-height: 0;
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid var(--brand-border);
  background: var(--brand-input);
  color: var(--brand-hint);
  box-shadow: none;
  transform: none;
}

body.page-shell .reserva-topbar .nav-link:hover {
  background: var(--brand-border);
  color: #fff;
  border-color: var(--brand-border);
}

body.page-shell .reserva-topbar .link-disponibilidad {
  color: var(--brand-accent-light);
  border-color: var(--brand-border);
}

body.page-shell .reserva-topbar .link-disponibilidad:hover {
  background: var(--brand-border);
  color: #fff;
}

/* Main canvas (sin card grande) */
body.page-shell .reserva-main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  width: 100%;
  flex: 1;
}

body.page-shell .reserva-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.page-shell .container {
  all: unset;
  display: block;
  width: 100%;
  max-width: none;
  animation: none;
  opacity: 1;
  transform: none;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* Title + toggle */
body.page-shell .reserva-title-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--brand-border);
}

@media (min-width: 640px) {
  body.page-shell .reserva-title-row {
    flex-direction: row;
    align-items: flex-end;
  }
}

body.page-shell .reserva-title-row h1 {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  text-align: left;
  color: #fff;
}

body.page-shell .reserva-title-row .highlight {
  color: var(--brand-accent-light);
  -webkit-text-fill-color: var(--brand-accent-light);
}

body.page-shell .reserva-title-row p {
  margin: 0.4rem 0 0;
  font-size: 0.875rem;
  color: var(--brand-hint);
  text-align: left;
}

body.page-shell .tipo-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0.2rem;
  margin: 0;
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  margin-left: 0;
}

body.page-shell .tipo-toggle-btn {
  min-height: 0;
  padding: 0.4rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--brand-hint);
  gap: 0.35rem;
}

body.page-shell .tipo-toggle-btn:hover {
  color: #fff;
  background: transparent;
}

body.page-shell .tipo-toggle-btn.is-active {
  background: var(--brand-input);
  border-color: var(--brand-border);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Form sections */
body.page-shell #bookingForm {
  display: flex;
  flex-direction: column;
  gap: 0;
}

body.page-shell .form-section {
  padding-top: 1.25rem;
  margin-top: 1.25rem;
  border-top: 1px solid var(--brand-border);
  space: 1rem;
}

body.page-shell .form-section:first-of-type {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}

body.page-shell .form-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 0.75rem;
  text-align: left;
}

body.page-shell .form-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

body.page-shell .form-section-head .form-section-title {
  margin: 0;
}

body.page-shell .member-counter {
  font-size: 0.75rem;
  color: var(--brand-hint);
}

body.page-shell #bookingForm .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0;
}

body.page-shell #bookingForm .form-row.form-row-3 {
  grid-template-columns: 1fr 1fr;
}

body.page-shell #bookingForm .form-row.form-row-3 .input-group:first-child {
  grid-column: 1 / -1;
}

@media (min-width: 640px) {
  body.page-shell #bookingForm .form-row.form-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
  }

  body.page-shell #bookingForm .form-row.form-row-3 .input-group:first-child {
    grid-column: auto;
  }
}

body.page-shell #bookingForm input[type="date"],
body.page-shell #bookingForm input[type="time"] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: block;
}

body.page-shell #bookingForm .input-group {
  margin-bottom: 1rem;
}

body.page-shell #bookingForm label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: #fff;
  margin-bottom: 0.4rem;
}

body.page-shell #bookingForm input,
body.page-shell #bookingForm textarea,
body.page-shell #bookingForm select {
  width: 100%;
  background: var(--brand-input);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  padding: 0.65rem 0.9rem;
  font-size: 0.875rem;
  color: #fff;
  box-shadow: none;
  transition: border-color 0.15s ease;
}

body.page-shell #bookingForm input:focus,
body.page-shell #bookingForm textarea:focus,
body.page-shell #bookingForm select:focus {
  outline: none;
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 1px var(--brand-accent);
  background: var(--brand-input);
}

body.page-shell #bookingForm input::placeholder,
body.page-shell #bookingForm textarea::placeholder {
  color: #64748b;
}

body.page-shell .input-with-affix {
  position: relative;
}

body.page-shell .input-with-affix input {
  padding-right: 2.25rem;
}

body.page-shell .input-affix {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brand-hint);
  pointer-events: none;
  font-size: 0.875rem;
}

body.page-shell #bookingForm .hint,
body.page-shell #bookingForm .hint-block {
  font-size: 0.75rem;
  color: var(--brand-hint);
  margin: 0 0 0.75rem;
  line-height: 1.4;
}

body.page-shell .horario-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

body.page-shell .horario-row .hint-block {
  margin: 0;
  flex: 1;
}

body.page-shell #bookingForm .form-actions-right {
  display: flex;
  justify-content: flex-end;
  margin: 0;
}

body.page-shell #bookingForm .btn-verificar-link,
body.page-shell #bookingForm .btn-add-integrante,
body.page-shell #bookingForm .btn-thin {
  width: auto !important;
  min-height: 0;
  padding: 0.4rem 0.75rem !important;
  font-size: 0.75rem !important;
  font-weight: 500;
  border-radius: var(--radius) !important;
  background: var(--brand-input) !important;
  border: 1px solid var(--brand-border) !important;
  color: #fff !important;
  text-decoration: none !important;
  margin: 0 !important;
}

body.page-shell #bookingForm .btn-verificar-link:hover,
body.page-shell #bookingForm .btn-add-integrante:hover {
  background: var(--brand-border) !important;
  color: #fff !important;
}

body.page-shell #bookingForm .btn-verificar-link .icon-svg {
  color: var(--brand-accent-light);
}

body.page-shell #bookingForm .disp-result {
  text-align: right;
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
}

body.page-shell #bookingForm .disp-result.disp-ok {
  color: #34d399;
}

body.page-shell #bookingForm .disp-result.disp-no {
  color: #f87171;
}

/* Integrantes card */
body.page-shell .integrantes-card {
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

body.page-shell .integrantes-card > .hint-block {
  margin-bottom: 0.75rem;
  font-size: 0.7rem;
}

body.page-shell .integrantes-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

body.page-shell .integrante-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  font-size: 0.75rem;
}

body.page-shell .integrante-item-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  min-width: 0;
}

body.page-shell .integrante-item-info strong {
  color: #fff;
  font-weight: 600;
}

body.page-shell .integrante-item-meta {
  color: var(--brand-hint);
  margin: 0;
  font-size: 0.75rem;
}

body.page-shell .integrante-tag {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--brand-accent-light);
  background: var(--brand-input);
  border: 1px solid var(--brand-border);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
}

body.page-shell .btn-remove-int {
  width: auto !important;
  min-width: 0;
  min-height: 0;
  padding: 0.25rem 0.45rem !important;
  margin: 0;
  background: transparent !important;
  border: none !important;
  color: var(--brand-hint) !important;
  font-size: 1rem !important;
  font-weight: 700;
  border-radius: var(--radius);
}

body.page-shell .btn-remove-int:hover {
  color: #fb7185 !important;
  background: transparent !important;
}

/* Submit CTA */
body.page-shell .form-submit-block {
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--brand-border);
}

body.page-shell .form-submit-bar {
  display: block;
  justify-content: stretch;
}

body.page-shell .form-submit-bar button[type="submit"],
body.page-shell #bookingForm button[type="submit"] {
  width: 100% !important;
  min-width: 0;
  padding: 0.9rem 1.5rem !important;
  font-size: 0.875rem !important;
  font-weight: 700;
  border-radius: var(--radius-lg) !important;
  background: var(--brand-accent) !important;
  border: 1px solid var(--brand-accent) !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.28);
}

body.page-shell .form-submit-bar button[type="submit"]:hover {
  background: #4f46e5 !important;
  border-color: #4f46e5 !important;
}

body.page-shell #bookingForm .correo-nota {
  text-align: center;
  font-size: 0.7rem;
  color: var(--brand-hint);
  margin: 0.75rem 0 0;
}

body.page-shell .response-banner {
  margin-top: 1.25rem;
}

body.page-shell .reserva-footer {
  border-top: 1px solid var(--brand-border);
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--brand-hint);
}

body.page-shell .reserva-footer p {
  margin: 0.15rem 0;
  color: var(--brand-hint);
  font-size: 0.75rem;
}

@media (max-width: 639px) {
  body.page-shell {
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
  }

  body.page-shell #bookingForm .form-row {
    grid-template-columns: 1fr;
  }

  body.page-shell #bookingForm .form-row.form-row-3 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.65rem;
  }

  body.page-shell #bookingForm .form-row.form-row-3 .input-group {
    min-width: 0;
    margin-bottom: 0;
  }

  body.page-shell #bookingForm .form-row.form-row-3 .input-group:first-child {
    grid-column: 1 / -1;
  }

  body.page-shell #bookingForm input[type="date"],
  body.page-shell #bookingForm input[type="time"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100% !important;
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    padding: 0.7rem 0.65rem;
    color-scheme: dark;
    box-sizing: border-box;
  }

  body.page-shell .horario-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
    margin-top: 0.85rem;
  }

  body.page-shell #bookingForm .form-actions-right {
    width: 100%;
    justify-content: stretch;
  }

  body.page-shell #bookingForm .form-actions-right > * {
    width: 100%;
    justify-content: center;
  }

  body.page-shell #bookingForm .btn-verificar-link {
    width: 100% !important;
    justify-content: center;
    min-height: 44px !important;
    padding: 0.7rem 0.85rem !important;
    font-size: 0.8rem !important;
  }

  body.page-shell #bookingForm .disp-result {
    text-align: left;
  }

  body.page-shell .reserva-topbar-inner {
    flex-wrap: nowrap;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
  }

  body.page-shell .reserva-topbar .nav-link {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  body.page-shell .reserva-topbar .link-disponibilidad {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.25;
    padding: 0.45rem 0.55rem;
  }

  body.page-shell .reserva-topbar .link-disponibilidad .icon-svg {
    flex-shrink: 0;
  }

  body.page-shell .reserva-main {
    padding: 1.25rem 0.85rem 2.5rem;
  }

  body.page-shell:has(#bookingForm) .reserva-main {
    padding-bottom: 6.5rem;
  }

  body.page-shell .reserva-title-row {
    gap: 0.85rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
  }

  body.page-shell .reserva-title-row h1 {
    font-size: 1.5rem;
  }

  body.page-shell .reserva-title-row p {
    font-size: 0.8rem;
  }

  body.page-shell .tipo-toggle {
    width: 100%;
    align-self: stretch;
  }

  body.page-shell .tipo-toggle-btn {
    flex: 1;
    justify-content: center;
    padding: 0.55rem 0.5rem;
  }

  body.page-shell .integrante-item {
    flex-direction: row;
    align-items: flex-start;
  }

  body.page-shell .integrante-item-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  body.page-shell .form-section-head {
    flex-wrap: wrap;
  }

  body.page-shell .form-submit-block {
    padding-bottom: 0.5rem;
  }

  /* Sticky CTA: lo define mobile.css; aquí solo deja espacio */
  body.page-shell #bookingForm {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 380px) {
  body.page-shell .reserva-topbar .link-disponibilidad {
    font-size: 0.68rem;
  }

  body.page-shell .reserva-title-row h1 {
    font-size: 1.35rem;
  }
}

/* ——— Landing / ingreso ——— */
body.page-shell .topbar-brand {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}

body.page-shell .shell-choice-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

body.page-shell .shell-choice {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: #fff;
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-lg);
  transition: border-color 0.15s ease, background 0.15s ease;
}

body.page-shell .shell-choice:hover {
  border-color: rgba(129, 140, 248, 0.45);
  background: var(--brand-input);
}

body.page-shell .shell-choice-icon {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  overflow: visible;
  color: var(--brand-accent-light);
}

body.page-shell .shell-choice-icon .icon-svg {
  width: 1.35rem !important;
  height: 1.35rem !important;
  max-width: 1.35rem;
  max-height: 1.35rem;
  margin: 0 !important;
}

body.page-shell .shell-choice-body {
  min-width: 0;
  flex: 1;
}

body.page-shell .shell-choice-body h2 {
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

body.page-shell .shell-choice-body p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--brand-hint);
  text-align: left;
}

body.page-shell .shell-choice-arrow {
  flex-shrink: 0;
  align-self: center;
  color: var(--brand-hint);
}

body.page-shell .shell-resource-link {
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-lg);
}

body.page-shell .shell-resource-link .icon-svg {
  width: 1.35rem !important;
  height: 1.35rem !important;
  margin: 0 !important;
  color: var(--brand-accent-light);
  flex-shrink: 0;
}

body.page-shell .shell-resource-link:hover {
  background: var(--brand-input);
  border-color: rgba(129, 140, 248, 0.45);
  color: #fff;
}

body.page-shell .shell-resource-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

/* ——— Calendario (estructura shell; colores de celdas viven en calendario.html) ——— */
body.page-calendario .reserva-main--wide {
  max-width: 56rem;
}

body.page-calendario .cal-week-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

body.page-calendario .cal-week-bar .cal-titulo {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

body.page-calendario .cal-nav {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  flex-wrap: wrap;
}

body.page-calendario .cal-nav button {
  width: auto !important;
  max-width: none;
  padding: 0.4rem 0.65rem !important;
  min-height: 36px !important;
  font-size: 0.8rem !important;
  border-radius: 6px;
  background: transparent !important;
  color: var(--brand-hint) !important;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: none;
}

body.page-calendario .cal-nav button:hover {
  background: rgba(99, 102, 241, 0.12);
  color: #fff;
}

body.page-calendario .cal-nav button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

@media (max-width: 639px) {
  body.page-calendario .cal-week-bar {
    flex-direction: column;
    align-items: stretch;
  }

  body.page-calendario .cal-nav {
    justify-content: stretch;
  }

  body.page-calendario .cal-nav button {
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
    line-height: 1.2;
    font-size: 0.75rem;
  }

  body.page-shell .shell-choice {
    padding: 0.9rem;
  }
}
