:root {
  color-scheme: dark;

  --background: #02050a;
  --panel: rgba(5, 11, 21, 0.9);
  --panel-soft: rgba(10, 19, 34, 0.78);
  --border: rgba(92, 157, 232, 0.28);
  --border-strong: rgba(100, 174, 255, 0.55);
  --text: #eef5ff;
  --muted: #93a7c0;
  --blue: #5cacff;
  --blue-strong: #1876de;
  --danger: #ff7d8c;
  --success: #5ee6aa;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #02050a;
}

button,
input,
select,
textarea {
  font: inherit;
}

.background,
.background-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.background {
  z-index: -3;
  background:
    url("/assets/hero-bg.png")
    center top / cover no-repeat;
  filter: saturate(0.88) brightness(0.54);
  transform: scale(1.02);
}

.background-overlay {
  z-index: -2;
  background:
    linear-gradient(
      180deg,
      rgba(1, 4, 10, 0.45),
      rgba(1, 5, 12, 0.86) 36%,
      rgba(1, 4, 9, 0.97)
    ),
    radial-gradient(
      circle at 62% 10%,
      rgba(37, 127, 234, 0.19),
      transparent 32%
    );
}

.topbar {
  width: min(1420px, calc(100% - 40px));
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--text);
  text-decoration: none;
}

.brand-logo {
  width: 68px;
  height: 68px;
  object-fit: contain;
  filter:
    drop-shadow(0 8px 18px rgba(0, 0, 0, 0.65))
    drop-shadow(0 0 14px rgba(57, 143, 238, 0.22));
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.brand-copy strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  letter-spacing: 1.5px;
}

.brand-copy small {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 3px;
}

.back-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 17px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: #d8e8fb;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  background: rgba(3, 9, 17, 0.6);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.back-link:hover {
  border-color: var(--border-strong);
  background: rgba(17, 45, 78, 0.6);
  transform: translateY(-1px);
}

.page-shell {
  width: min(1420px, calc(100% - 40px));
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(520px, 1.35fr);
  gap: 34px;
  align-items: start;
  margin: 54px auto 70px;
}

.intro-panel {
  position: sticky;
  top: 32px;
  padding: 38px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background:
    linear-gradient(
      145deg,
      rgba(6, 15, 29, 0.9),
      rgba(3, 8, 16, 0.88)
    );
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
}

.eyebrow,
.section-kicker {
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 3px;
}

.intro-panel h1 {
  max-width: 540px;
  margin: 13px 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 0.98;
  letter-spacing: -1.5px;
}

.intro-text {
  margin: 0;
  color: #b9c9dd;
  font-size: 16px;
  line-height: 1.75;
}

.process-list {
  display: grid;
  gap: 15px;
  margin-top: 34px;
}

.process-item {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: start;
  padding: 17px;
  border: 1px solid rgba(99, 159, 226, 0.18);
  border-radius: 13px;
  background: rgba(8, 18, 32, 0.66);
}

.process-item > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(90, 170, 255, 0.4);
  border-radius: 50%;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  background: rgba(35, 111, 190, 0.14);
}

.process-item strong {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

.process-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.form-panel {
  padding: 38px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(3, 8, 16, 0.92);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
}

.form-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
}

.form-heading h2 {
  margin: 8px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
}

.required-note {
  color: var(--muted);
  font-size: 12px;
}

fieldset {
  min-width: 0;
  margin: 0 0 32px;
  padding: 0;
  border: 0;
}

legend {
  width: 100%;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(95, 153, 220, 0.19);
  color: #f4f8ff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 700;
}

.form-grid {
  display: grid;
  gap: 20px;
}

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

.field {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.field > span,
.days-field > span {
  color: #d9e7f7;
  font-size: 13px;
  font-weight: 750;
}

.field small {
  color: #8297b0;
  font-size: 11px;
  line-height: 1.5;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(88, 146, 213, 0.29);
  border-radius: 10px;
  outline: none;
  color: var(--text);
  background: rgba(4, 12, 23, 0.88);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

input,
select {
  min-height: 49px;
  padding: 0 14px;
}

textarea {
  min-height: 145px;
  padding: 14px;
  resize: vertical;
  line-height: 1.55;
}

input::placeholder,
textarea::placeholder {
  color: #586a81;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(79, 167, 255, 0.78);
  background: rgba(6, 17, 32, 0.97);
  box-shadow: 0 0 0 3px rgba(46, 134, 224, 0.14);
}

select:disabled {
  cursor: wait;
  opacity: 0.65;
}

.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 64px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  min-width: 47px;
  height: 35px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  color: #9dcbff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  background: rgba(40, 112, 191, 0.2);
}

.days-field {
  margin-top: 21px;
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.day-option {
  position: relative;
  cursor: pointer;
}

.day-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.day-option span {
  min-height: 43px;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 1px solid rgba(87, 145, 212, 0.25);
  border-radius: 9px;
  color: #9fb2ca;
  font-size: 12px;
  font-weight: 750;
  background: rgba(5, 14, 26, 0.8);
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease;
}

.day-option input:checked + span {
  border-color: rgba(82, 174, 255, 0.7);
  color: #ffffff;
  background:
    linear-gradient(
      135deg,
      rgba(20, 96, 181, 0.72),
      rgba(35, 130, 220, 0.45)
    );
}

.consent {
  display: grid;
  grid-template-columns: 21px 1fr;
  gap: 12px;
  align-items: start;
  margin: 3px 0 22px;
  color: #a8bad0;
  font-size: 12px;
  line-height: 1.6;
  cursor: pointer;
}

.consent input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #288eea;
}

.submit-button {
  width: 100%;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(102, 190, 255, 0.72);
  border-radius: 11px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-decoration: none;
  cursor: pointer;
  background:
    linear-gradient(
      135deg,
      #0c58a9,
      #168ce4 52%,
      #47b0f3
    );
  box-shadow:
    0 14px 34px rgba(17, 107, 194, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition:
    transform 160ms ease,
    filter 160ms ease,
    opacity 160ms ease;
}

.submit-button:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.form-message {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 105, 122, 0.35);
  border-radius: 10px;
  color: #ffd2d8;
  font-size: 13px;
  line-height: 1.55;
  background: rgba(135, 26, 44, 0.18);
}

.form-message.success {
  border-color: rgba(80, 222, 162, 0.35);
  color: #c9ffe7;
  background: rgba(24, 117, 78, 0.18);
}

.success-panel {
  padding: 40px 16px 18px;
  text-align: center;
}

.success-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin: 0 auto 24px;
  border: 1px solid rgba(91, 233, 171, 0.5);
  border-radius: 50%;
  color: var(--success);
  font-size: 34px;
  background: rgba(43, 172, 117, 0.13);
  box-shadow: 0 0 35px rgba(52, 192, 131, 0.13);
}

.success-panel h2 {
  margin: 11px 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
}

.success-panel p {
  max-width: 610px;
  margin: 0 auto 14px;
  color: #b4c6dc;
  line-height: 1.7;
}

.success-secondary {
  color: #8da2bb !important;
  font-size: 13px;
}

.success-back {
  max-width: 310px;
  margin: 27px auto 0;
}

footer {
  width: min(1420px, calc(100% - 40px));
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0 auto;
  padding: 24px 0 34px;
  border-top: 1px solid var(--border);
  color: #70849c;
  font-size: 11px;
}

footer strong {
  color: #9ebce0;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1020px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .intro-panel {
    position: static;
  }

  .intro-panel h1 {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .topbar,
  .page-shell,
  footer {
    width: min(100% - 24px, 1420px);
  }

  .topbar {
    min-height: 76px;
  }

  .brand-logo {
    width: 54px;
    height: 54px;
  }

  .brand-copy strong {
    font-size: 17px;
  }

  .back-link {
    padding: 0 12px;
    font-size: 11px;
  }

  .page-shell {
    gap: 18px;
    margin-top: 22px;
  }

  .intro-panel,
  .form-panel {
    padding: 24px 18px;
    border-radius: 16px;
  }

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

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

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

  footer {
    align-items: center;
    flex-direction: column;
    text-align: center;
  }
}

/* =========================================================
   FRANJAS HORARIAS DINÁMICAS DEL REGISTRO
   ========================================================= */

.registration-availability-field {
  display: block;
}

.registration-availability-heading {
  margin-bottom: 12px;
}

.registration-availability-heading > div > span {
  display: block;
  color: #e7fff3;
  font-size: 13px;
  font-weight: 800;
}

.registration-availability-heading small {
  display: block;
  margin-top: 5px;
  color: #8aa096;
  font-size: 11px;
  line-height: 1.45;
}

.registration-availability-ranges {
  display: grid;
  gap: 10px;
}

.registration-availability-range {
  position: relative;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1fr) 34px;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid rgba(130, 255, 200, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.registration-range-number {
  align-self: center;
  color: #95aa9f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.registration-availability-range label {
  display: grid;
  gap: 6px;
}

.registration-availability-range label > span {
  color: #91a69b;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.registration-availability-range input {
  min-height: 42px;
}

.registration-add-range-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  margin-top: 10px;
  padding: 0 16px;
  border: 1px dashed rgba(130, 255, 200, 0.25);
  border-radius: 9px;
  color: #b1f7d2;
  background: rgba(80, 225, 157, 0.05);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.registration-add-range-button:hover {
  border-color: rgba(130, 255, 200, 0.44);
  background: rgba(80, 225, 157, 0.09);
}

.registration-add-range-button span {
  font-size: 18px;
  line-height: 1;
}

.registration-remove-range-button {
  display: grid;
  width: 34px;
  height: 34px;
  align-self: end;
  border: 1px solid rgba(255, 104, 124, 0.24);
  border-radius: 8px;
  color: #ff9cab;
  background: rgba(255, 104, 124, 0.06);
  font-size: 18px;
  cursor: pointer;
  place-items: center;
}

.registration-remove-range-button:hover {
  background: rgba(255, 104, 124, 0.12);
}

.registration-availability-help {
  display: block;
  margin-top: 9px;
  color: #788d82;
  font-size: 10px;
  line-height: 1.5;
}

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

  .registration-remove-range-button {
    position: absolute;
    top: 10px;
    right: 10px;
  }
}
