:root {
  color-scheme: light;
  --ink: #102d42;
  --ink-soft: #23465d;
  --teal: #147a9b;
  --green: #197f66;
  --coral: #f2a18f;
  --paper: #fbf8f3;
  --white: #fff;
  --muted: #61717e;
  --line: #d8e1e5;
  --success: #13795b;
  --warning: #a76305;
  --danger: #b42318;
  --shadow: 0 18px 50px rgb(16 45 66 / 12%);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  line-height: 1.55;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}
html {
  background: var(--paper);
}
body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}
body,
button,
input,
select {
  font: inherit;
}
button,
input,
select {
  color: inherit;
}
a {
  color: inherit;
}
[hidden] {
  display: none !important;
}
.shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}
.skip-link {
  position: fixed;
  z-index: 1000;
  top: -80px;
  left: 16px;
  padding: 10px 16px;
  background: var(--white);
}
.skip-link:focus {
  top: 16px;
}
:where(a, button, input, select, summary):focus-visible {
  outline: 3px solid rgb(20 122 155 / 38%);
  outline-offset: 3px;
}

.profile-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgb(251 248 243 / 94%);
  backdrop-filter: blur(16px);
}
.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--white);
  background: var(--teal);
  font-weight: 900;
  box-shadow: 0 9px 22px rgb(20 122 155 / 23%);
}
.brand-copy {
  display: grid;
  line-height: 1.05;
}
.brand-copy small {
  margin-top: 3px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}
.profile-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.profile-nav a,
.link-button {
  border: 0;
  background: none;
  text-decoration: none;
  color: #53697a;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.profile-nav a:hover,
.link-button:hover {
  color: var(--teal);
}

.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 850;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.button:hover {
  transform: translateY(-2px);
}
.button:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}
.button-primary {
  color: var(--white);
  background: var(--green);
  box-shadow: 0 12px 24px rgb(25 127 102 / 22%);
}
.button-secondary {
  border-color: var(--line);
  background: var(--white);
}
.text-button {
  padding: 4px 0;
  border: 0;
  border-bottom: 2px solid var(--coral);
  background: transparent;
  font-weight: 850;
  cursor: pointer;
}
.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  font-size: 24px;
  cursor: pointer;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.18em;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2 {
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.06;
  letter-spacing: -0.035em;
}
h1 {
  margin-bottom: 20px;
  font-size: clamp(44px, 6vw, 72px);
}
h2 {
  margin-bottom: 10px;
  font-size: clamp(32px, 4vw, 46px);
}
h3 {
  margin-bottom: 8px;
  font-size: 21px;
}

.auth-view {
  min-height: calc(100vh - 78px);
  display: grid;
  place-items: center;
  padding: 70px 0;
  background:
    radial-gradient(circle at 78% 18%, #d7eef0 0, transparent 31%),
    linear-gradient(135deg, #fbf8f3, #eef6f6);
}
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 0.78fr;
  align-items: center;
  gap: clamp(40px, 8vw, 100px);
}
.auth-intro p:not(.eyebrow) {
  max-width: 620px;
  color: var(--ink-soft);
  font-size: 19px;
}
.benefit-list {
  display: grid;
  gap: 12px;
  margin-top: 30px;
  padding: 0;
  list-style: none;
  font-weight: 750;
}
.benefit-list li::before {
  content: '✓';
  margin-right: 10px;
  color: var(--green);
}
.auth-card {
  padding: clamp(25px, 4vw, 42px);
  border: 1px solid rgb(20 122 155 / 15%);
  border-radius: 28px;
  background: var(--white);
  box-shadow: var(--shadow);
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 34px;
  padding: 4px;
  border-radius: 999px;
  background: #edf3f4;
}
.auth-tabs button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-weight: 850;
  cursor: pointer;
}
.auth-tabs button[aria-selected='true'] {
  color: var(--white);
  background: var(--ink);
}
.auth-form,
.profile-form,
.inline-form,
.dialog-card {
  display: grid;
  gap: 18px;
}
.form-heading p,
.section-title p,
.dialog-legal {
  color: var(--muted);
}
label {
  display: grid;
  gap: 7px;
  font-size: 14px;
  font-weight: 800;
}
label small {
  color: var(--muted);
  font-weight: 500;
}
input,
select {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid #bdcbd2;
  border-radius: 12px;
  background: var(--white);
}
input:disabled {
  color: var(--muted);
  background: #f2f5f5;
}
.consent {
  grid-template-columns: auto 1fr;
  align-items: start;
  font-weight: 500;
}
.consent input {
  width: 20px;
  min-height: 20px;
  margin-top: 2px;
}
.form-status {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--danger);
  font-weight: 750;
}
.form-status.success {
  color: var(--success);
}

.dashboard-hero {
  padding: 54px 0 50px;
  color: var(--white);
  background: linear-gradient(135deg, var(--ink), #174a5e);
}
.dashboard-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}
.dashboard-heading h1 {
  margin-bottom: 10px;
  font-size: clamp(38px, 5vw, 62px);
}
.dashboard-heading p:not(.eyebrow) {
  margin: 0;
  color: #d2e0e7;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 42px;
  padding-block: 48px 80px;
}
.dashboard-sidebar {
  position: sticky;
  top: 104px;
  height: max-content;
  display: grid;
  gap: 8px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}
.sidebar-link.active {
  color: var(--white);
  background: var(--ink);
}
.sidebar-link span {
  width: 20px;
  text-align: center;
}
.dashboard-content {
  min-width: 0;
}
.dashboard-section {
  display: grid;
  gap: 28px;
}
.section-title,
.block-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}
.section-title p,
.block-heading p {
  margin-bottom: 0;
}
.sync-state {
  color: var(--muted);
  font-size: 13px;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.summary-grid article {
  display: grid;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 8px 22px rgb(16 45 66 / 5%);
}
.summary-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.summary-grid strong {
  margin: 9px 0 4px;
  color: var(--teal);
  font-family: Georgia, serif;
  font-size: 40px;
  line-height: 1;
}
.summary-grid small {
  color: var(--muted);
}
.content-block {
  display: grid;
  gap: 19px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.block-heading .eyebrow {
  margin-bottom: 4px;
}
.block-heading h3 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 29px;
}
.page-alert {
  margin-bottom: 22px;
  padding: 15px 18px;
  border-left: 4px solid var(--teal);
  border-radius: 10px;
  background: #e7f2f3;
  font-weight: 750;
}
.page-alert.error {
  border-color: var(--danger);
  color: #7a1a14;
  background: #fff0ee;
}

.booking-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.booking-list {
  display: grid;
  gap: 20px;
}
.booking-card {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 10px 30px rgb(16 45 66 / 7%);
}
.booking-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}
.booking-card-top p {
  margin-bottom: 0;
  color: var(--muted);
}
.status-badge {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--warning);
  background: #fff4df;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.status-badge[data-tone='success'] {
  color: var(--success);
  background: #e6f5ef;
}
.status-badge[data-tone='muted'] {
  color: var(--muted);
  background: #edf1f2;
}
.status-badge[data-tone='danger'] {
  color: var(--danger);
  background: #fff0ee;
}
.remaining-number {
  display: grid;
  flex: 0 0 auto;
  color: var(--teal);
  font-family: Georgia, serif;
  font-size: 38px;
  line-height: 1;
  text-align: right;
}
.remaining-number small {
  margin-top: 5px;
  color: var(--muted);
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 750;
}
.progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 22px 0 8px;
  color: var(--muted);
  font-size: 12px;
}
.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edef;
}
.progress-track span {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--green));
  transition: width 0.4s ease;
}
.booking-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 22px 0;
  padding: 16px 0;
  border-block: 1px solid var(--line);
}
.booking-facts div {
  min-width: 0;
}
.booking-facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}
.booking-facts dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 750;
}
.booking-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
  margin-bottom: 18px;
}
.booking-actions:empty {
  display: none;
}
.booking-payment-instructions {
  display: grid;
  flex: 1 1 100%;
  gap: 13px;
  padding: 22px;
  border: 2px solid rgb(27 113 104 / 34%);
  border-radius: 18px;
  background: linear-gradient(135deg, rgb(229 247 243 / 92%), #fff);
}
.booking-payment-instructions .bizum-payment-title {
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: clamp(23px, 4vw, 30px);
  line-height: 1.12;
}
.bizum-payment-intro {
  margin: 0;
  color: var(--muted);
}
.bizum-payment-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}
.bizum-payment-steps strong {
  color: var(--ink);
}
.bizum-concept {
  display: inline-block;
  margin-left: 4px;
  padding: 5px 9px;
  border: 1px dashed var(--green);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: .08em;
}
.booking-payment-instructions .button {
  width: fit-content;
}
.booking-payment-instructions small {
  color: var(--muted);
  font-weight: 750;
}
.booking-paid-button {
  flex: 1 1 100%;
}
.booking-refund-status {
  flex: 1 1 100%;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--soft-mint);
  color: var(--ink);
  font-weight: 700;
}
details summary {
  cursor: pointer;
  font-weight: 850;
}
.timeline {
  display: grid;
  gap: 12px;
  margin-top: 15px;
}
.timeline-item {
  position: relative;
  padding: 14px 16px 14px 42px;
  border-radius: 12px;
  background: #f4f7f7;
}
.timeline-item::before {
  content: '✓';
  position: absolute;
  left: 15px;
  top: 14px;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--green);
  font-size: 11px;
  font-weight: 900;
}
.timeline-item strong,
.timeline-item span {
  display: block;
}
.timeline-item span {
  color: var(--muted);
  font-size: 12px;
}
.empty-state {
  padding: 24px;
  border: 1px dashed #bdcbd2;
  border-radius: 14px;
  color: var(--muted);
  background: rgb(255 255 255 / 50%);
  text-align: center;
}

.student-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 17px;
}
.student-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
}
.student-card-top {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.student-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--white);
  background: var(--teal);
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 900;
}
.student-card p {
  color: var(--muted);
}
.inline-form,
.profile-form {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
}
.inline-form-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.inline-form-heading h3 {
  margin: 0;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.booking-dialog {
  width: min(640px, calc(100% - 28px));
  max-height: calc(100vh - 30px);
  padding: 0;
  border: 0;
  border-radius: 26px;
  box-shadow: 0 25px 80px rgb(0 0 0 / 25%);
}
.booking-dialog::backdrop {
  background: rgb(5 25 38 / 70%);
  backdrop-filter: blur(6px);
}
.dialog-card {
  padding: clamp(24px, 5vw, 40px);
}
.dialog-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 25px;
}
.dialog-heading h2 {
  margin: 0;
}
.booking-notice {
  display: grid;
  gap: 4px;
  padding: 17px 19px;
  border-left: 4px solid var(--coral);
  border-radius: 12px;
  background: #fff3ef;
}
.booking-notice span {
  color: var(--ink-soft);
  font-size: 13px;
}
.pack-summary {
  padding: 18px;
  border-radius: 14px;
  color: var(--white);
  background: var(--ink);
}
.pack-summary:empty {
  display: none;
}
.pack-summary strong,
.pack-summary span {
  display: block;
}
.pack-summary span {
  margin-top: 4px;
  color: #cad9e0;
  font-size: 13px;
}
.dialog-legal {
  margin: 0;
  font-size: 13px;
}
.dialog-actions {
  display: flex;
  justify-content: end;
  gap: 12px;
}

footer {
  padding: 28px 0;
  border-top: 1px solid var(--line);
  background: var(--white);
}
footer .shell {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 13px;
}
footer nav {
  display: flex;
  gap: 18px;
}

@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }
  .auth-intro {
    max-width: 700px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 24px;
  }
  .dashboard-sidebar {
    position: static;
    grid-template-columns: repeat(4, minmax(max-content, 1fr));
    overflow-x: auto;
    padding-bottom: 5px;
  }
  .sidebar-link {
    justify-content: center;
  }
  .booking-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 24px, 1180px);
  }
  .header-inner {
    min-height: 68px;
  }
  .profile-nav > a {
    display: none;
  }
  .auth-view {
    min-height: calc(100vh - 68px);
    padding: 38px 0;
  }
  .auth-intro h1 {
    font-size: 41px;
  }
  .auth-intro p:not(.eyebrow) {
    font-size: 17px;
  }
  .auth-card {
    border-radius: 20px;
  }
  .dashboard-hero {
    padding: 40px 0;
  }
  .dashboard-heading,
  .section-title,
  .block-heading {
    align-items: start;
    flex-direction: column;
  }
  .dashboard-heading .button,
  .section-title .button {
    width: 100%;
  }
  .dashboard-sidebar {
    grid-template-columns: repeat(4, max-content);
    margin-inline: -12px;
    padding-inline: 12px;
  }
  .summary-grid {
    grid-template-columns: 1fr;
  }
  .student-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .booking-card {
    padding: 19px;
  }
  .booking-card-top {
    flex-direction: column;
  }
  .remaining-number {
    text-align: left;
  }
  .booking-facts {
    grid-template-columns: 1fr;
  }
  .dialog-actions {
    flex-direction: column-reverse;
  }
  .dialog-actions .button {
    width: 100%;
  }
  footer .shell {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
