:root {
  color-scheme: light;
  --ink: #182033;
  --muted: #667085;
  --line: #d8dee9;
  --soft-line: #eef1f5;
  --paper: #ffffff;
  --wash: #f6f8fb;
  --navy: #1d3557;
  --blue: #2f80ed;
  --blue-strong: #1659b8;
  --green: #15845a;
  --red: #b42318;
  --gold: #c78b21;
  --shadow: 0 18px 45px rgba(24, 32, 51, 0.09);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(47, 128, 237, 0.12), transparent 34rem),
    linear-gradient(180deg, #fbfcff 0%, #f5f7fb 100%);
  color: var(--ink);
}

body.modal-open {
  overflow: hidden;
}

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

button {
  cursor: pointer;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.auth-card {
  width: min(460px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.brand-logo {
  width: 290px;
  max-width: 88%;
  height: auto;
  object-fit: contain;
}

.eyebrow {
  margin: 0;
  color: var(--blue-strong);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.auth-card h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 8vw, 3.15rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.muted,
.message,
.panel-header p,
.summary-card p,
.sidebar-note span {
  color: var(--muted);
}

label {
  display: grid;
  gap: 7px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid #cfd7e3;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(47, 128, 237, 0.14);
}

.primary-button,
.ghost-button,
.icon-button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  font-weight: 850;
}

.primary-button {
  padding: 0 18px;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 12px 24px rgba(47, 128, 237, 0.22);
}

.primary-button:hover {
  background: var(--blue-strong);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.ghost-button {
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.ghost-button.compact {
  min-height: 34px;
  padding: 0 12px;
}

.icon-button {
  width: 42px;
  background: #f4f6f9;
  color: var(--muted);
  font-size: 1.3rem;
}

.message {
  min-height: 22px;
  margin: 0;
  font-weight: 700;
}

.stack {
  display: grid;
  gap: 14px;
}

.portal-shell {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 42px;
}

.portal-hero {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 14px 0;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.welcome-card,
.setup-card,
.portal-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.welcome-card {
  min-height: 210px;
  display: grid;
  align-content: center;
  gap: 10px;
  margin: 14px 0;
  padding: clamp(24px, 5vw, 46px);
  background:
    linear-gradient(135deg, rgba(29, 53, 87, 0.94), rgba(47, 128, 237, 0.78)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.3), transparent 18rem);
  color: #fff;
  overflow: hidden;
}

.welcome-card .eyebrow,
.welcome-card p {
  color: rgba(255, 255, 255, 0.82);
}

.welcome-card h1 {
  margin-bottom: 0;
  font-size: clamp(2.2rem, 7vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.welcome-actions {
  display: flex;
  margin-top: 8px;
}

.ghost-button.light {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(10px);
}

.ghost-button.light:hover {
  background: rgba(255, 255, 255, 0.22);
}

.setup-card {
  overflow: hidden;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 16px;
}

.wide-panel {
  grid-column: 1 / -1;
}

.child-list,
.trip-list,
.registration-list {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.child-card,
.trip-card,
.registration-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--soft-line);
  border-radius: 18px;
  background: #fff;
}

.child-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, auto);
  align-items: start;
  position: relative;
}

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

.child-avatar {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid #d9e3f0;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(47, 128, 237, 0.16), rgba(29, 53, 87, 0.08)),
    #f8fafc;
  color: var(--blue-strong);
  font-weight: 950;
}

.child-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.child-card strong,
.trip-card strong,
.registration-card strong {
  display: block;
  font-size: 1.05rem;
}

.child-card p,
.trip-card p,
.registration-card p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.trip-card small,
.trip-match small,
.registration-meta,
.registration-friends {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

.detailed-registration {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
}

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

.registration-status {
  justify-self: end;
}

.registration-details {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.registration-details div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--soft-line);
  border-radius: 14px;
  background: #f8fafc;
}

.registration-details dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.registration-details dd {
  margin: 0;
  color: var(--ink);
  font-weight: 850;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.trip-card {
  overflow: hidden;
  padding: 0;
  align-items: flex-start;
  flex-direction: column;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.trip-card:hover,
.trip-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(20, 91, 181, 0.28);
  box-shadow: 0 16px 34px rgba(24, 32, 51, 0.08);
  outline: none;
}

.trip-image {
  width: 100%;
  height: 170px;
  display: block;
  object-fit: cover;
}

.trip-card-content {
  width: 100%;
  padding: 16px;
}

.trip-card-brochure {
  width: fit-content;
  margin-top: 14px;
}

.trip-card-brochure,
.trip-brochure-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.trip-card span {
  color: var(--blue-strong);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.registration-friends strong {
  color: var(--ink);
  font-size: inherit;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.child-card [data-edit-child] {
  position: static;
}

.child-card .card-actions {
  grid-column: 2;
  grid-row: 1;
  align-items: stretch;
  flex-direction: column;
  flex-wrap: nowrap;
  min-width: 170px;
  padding-top: 0;
}

.child-card .card-actions .ghost-button,
.child-card .card-actions .primary-button {
  width: 100%;
}

.appointment-panel {
  display: grid;
  grid-column: 1 / -1;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid #d9e8ff;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(47, 128, 237, 0.1), rgba(255, 255, 255, 0.96)),
    #fff;
}

.appointment-panel.booked {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-color: #cfe8d8;
  background:
    linear-gradient(135deg, rgba(18, 183, 106, 0.1), rgba(255, 255, 255, 0.96)),
    #fff;
}

.appointment-panel span {
  display: block;
  color: var(--blue-strong);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.appointment-panel strong {
  margin-top: 2px;
  font-size: 1rem;
}

.appointment-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 750;
}

.appointment-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, auto);
  gap: 10px;
}

.appointment-controls select {
  min-height: 42px;
}

.primary-button.compact {
  min-height: 36px;
  padding: 0 13px;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 14px 22px 12px;
  border-bottom: 1px solid var(--soft-line);
  background: linear-gradient(180deg, #fff, #fbfcff);
}

.stepper span {
  position: relative;
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 8px 6px;
  border: 1px solid #e4eaf2;
  border-radius: 999px;
  background: #f8fafc;
  color: #667085;
  font-size: 0.74rem;
  font-weight: 900;
  text-align: center;
}

.stepper span.is-active {
  border-color: #94bdf8;
  background: #eaf3ff;
  color: var(--blue-strong);
  box-shadow: inset 0 0 0 1px rgba(47, 128, 237, 0.12);
}

.stepper span.is-done {
  border-color: #bcebd5;
  background: #eefbf5;
  color: var(--green);
}

.trip-match {
  padding: 14px;
  border: 1px solid #d6e4ff;
  border-radius: 16px;
  background: #f3f8ff;
  color: var(--blue-strong);
  font-weight: 800;
}

.trip-match span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 700;
}

.drawer-actions .primary-button {
  margin-left: auto;
}

.app-shell {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
}

.table-nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #344054;
  text-align: left;
  font-weight: 850;
}

.nav-item:hover,
.nav-item.is-active {
  border-color: #d6e4ff;
  background: #eef5ff;
  color: var(--blue-strong);
}

.sidebar-note {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--soft-line);
  border-radius: 16px;
  background: #fbfcff;
  font-size: 0.9rem;
  line-height: 1.35;
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(21, 132, 90, 0.13);
  flex: 0 0 auto;
}

.workspace {
  display: grid;
  align-content: start;
  gap: 20px;
  padding: 22px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topbar h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(24, 32, 51, 0.05);
}

.user-pill span {
  max-width: 240px;
  overflow: hidden;
  padding-left: 10px;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.summary-card,
.view-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.summary-card {
  display: grid;
  gap: 8px;
  min-height: 152px;
  padding: 20px;
}

.summary-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.summary-card strong {
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.parent-card strong {
  font-size: 1.35rem;
}

.summary-card p {
  margin: 0;
  line-height: 1.45;
}

.view-panel {
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--soft-line);
}

.panel-header h2 {
  margin-bottom: 4px;
  font-size: 1.25rem;
}

.panel-header p {
  margin: 0;
}

.record-table {
  min-height: 180px;
}

.grid-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--soft-line);
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f9fbfd;
  color: #475467;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

td {
  color: #344054;
}

.row-action {
  width: 1%;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef2f6;
  color: #475467;
  font-size: 0.82rem;
  font-weight: 850;
}

.badge.green {
  background: #e7f7ef;
  color: #087443;
}

.badge.red {
  background: #ffebe9;
  color: var(--red);
}

.mobile-records {
  display: none;
}

.mobile-card {
  display: grid;
  gap: 11px;
  margin: 12px;
  padding: 16px;
  border: 1px solid var(--soft-line);
  border-radius: 18px;
  background: #fff;
}

.mobile-card div {
  display: grid;
  gap: 3px;
}

.mobile-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 210px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
  font-size: 1.1rem;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  width: min(420px, calc(100% - 36px));
  padding: 15px 16px;
  border: 1px solid #cfe8d8;
  border-radius: 18px;
  background: #f0fff6;
  color: #075b3a;
  box-shadow: 0 18px 44px rgba(16, 24, 40, 0.18);
  font-weight: 850;
  line-height: 1.4;
}

.toast.error {
  border-color: #ffd1cb;
  background: #fff3f1;
  color: var(--red);
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 100%;
  max-height: none;
  margin: 0;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  border: 0;
  border-radius: 0;
  background: rgba(13, 22, 39, 0.55);
  backdrop-filter: blur(8px);
  overflow: auto;
}

.drawer::backdrop {
  display: none;
}

.trip-modal {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  background: rgba(13, 22, 39, 0.58);
  backdrop-filter: blur(8px);
  overflow: auto;
}

.trip-modal-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(920px, 100%);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(16, 24, 40, 0.3);
}

.trip-modal-card .icon-button {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.92);
}

.trip-modal-image {
  width: 100%;
  height: min(260px, 34vh);
  display: block;
  object-fit: cover;
}

.trip-modal-content {
  overflow: auto;
  padding: clamp(20px, 4vw, 30px);
}

.trip-modal-content h2 {
  margin-bottom: 8px;
  font-size: clamp(1.7rem, 5vw, 2.55rem);
  letter-spacing: -0.055em;
}

.trip-modal-meta,
.trip-modal-description {
  max-width: 68ch;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.55;
}

.trip-modal-description {
  margin-top: 12px;
}

.trip-brochure-link {
  width: fit-content;
  margin: 18px 0;
}

.trip-brochure-note {
  margin: -8px 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
}

.trip-brochure-frame {
  width: 100%;
  height: min(58vh, 560px);
  border: 1px solid var(--soft-line);
  border-radius: 18px;
  background: #f8fafc;
}

.drawer-card {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(780px, 100%);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.98)),
    #fff;
  box-shadow: 0 24px 70px rgba(16, 24, 40, 0.28);
}

.drawer-header,
.drawer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 22px;
}

.drawer-header {
  border-bottom: 1px solid var(--soft-line);
  background: #fff;
}

.drawer-header h2 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 4vw, 2.05rem);
  letter-spacing: -0.04em;
}

.drawer-body {
  overflow-y: auto;
  background:
    radial-gradient(circle at top right, rgba(47, 128, 237, 0.08), transparent 18rem),
    #fbfcff;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  overflow-y: auto;
  padding: 20px;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.form-grid > .wide:last-child {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.step-panel.form-grid {
  min-height: 480px;
  align-content: start;
  gap: 18px;
  padding: clamp(18px, 3vw, 26px);
}

.wide,
.section-label,
.check-row {
  grid-column: 1 / -1;
}

.section-label {
  margin: 0 0 2px;
  padding: 0;
  border-top: 0;
  color: var(--blue-strong);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.choice-field {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 136px;
  padding: 18px;
  border: 1px solid #e6ebf2;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(24, 32, 51, 0.04);
}

.field-title {
  color: #344054;
  font-size: clamp(1.05rem, 3vw, 1.28rem);
  font-weight: 850;
  letter-spacing: -0.018em;
  line-height: 1.25;
}

.field-title b,
.large-question b {
  display: none;
}

.choice-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding-left: 0;
}

.choice-group.two-up {
  display: flex;
}

.choice-pill {
  position: relative;
  display: inline-flex;
  width: fit-content;
  min-height: 42px;
  align-items: center;
  cursor: pointer;
  font-weight: 850;
}

.choice-pill input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  opacity: 0;
}

.choice-pill span {
  position: relative;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid #d8e0eb;
  border-radius: 14px;
  background: #fff;
  color: #344054;
  font-size: 1rem;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(24, 32, 51, 0.04);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.choice-pill span::before {
  content: none;
}

.choice-pill input:checked + span::after {
  content: "✓";
  display: inline-grid;
  width: 18px;
  height: 18px;
  margin-left: 2px;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: var(--blue-strong);
  font-size: 0.78rem;
  font-weight: 950;
}

.choice-pill input:checked + span {
  border-color: #86b8ff;
  background: #eaf3ff;
  color: #0f4fa8;
  box-shadow: 0 10px 22px rgba(47, 128, 237, 0.14);
  transform: translateY(-1px);
}

.choice-pill.alt span {
  background: #fff;
}

.choice-pill.mint span {
  background: #fff;
}

.choice-pill.gold span {
  background: #fff;
}

.choice-pill.pink span {
  background: #fff;
}

.choice-pill.alt input:checked + span {
  border-color: #8fd8ef;
  background: #ecfbff;
  color: #07546c;
}

.choice-pill.mint input:checked + span {
  border-color: #84dfcc;
  background: #ecfffb;
  color: #096452;
}

.choice-pill.gold input:checked + span {
  border-color: #f1c46d;
  background: #fff8e6;
  color: #79510b;
}

.choice-pill.pink input:checked + span {
  border-color: #f3abc0;
  background: #fff0f5;
  color: #8a2443;
}

.nested-choice {
  min-height: auto;
  margin: 0;
  padding: 18px;
  border: 1px solid #dbe9ff;
  border-radius: 22px;
  background: #f4f9ff;
}

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

.upload-card {
  position: relative;
  min-height: 178px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border: 1.5px dashed #b8c6d9;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 255, 0.96)),
    #fff;
  color: #344054;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.upload-card:hover {
  border-color: var(--blue);
  box-shadow: 0 14px 28px rgba(47, 128, 237, 0.1);
  transform: translateY(-1px);
}

.upload-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 16px;
  background: #eaf3ff;
  color: var(--blue-strong);
  font-size: 1.9rem;
  font-weight: 800;
}

.upload-card strong {
  font-size: 1rem;
}

.upload-card small,
.upload-card em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  line-height: 1.35;
}

.upload-card img {
  width: 78px;
  height: 78px;
  border: 1px solid var(--soft-line);
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(24, 32, 51, 0.1);
}

.upload-current-link {
  position: relative;
  z-index: 2;
  color: var(--blue-strong);
  font-size: 0.85rem;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.large-question {
  display: block;
  color: #344054;
  padding: 18px;
  border: 1px solid #e6ebf2;
  border-radius: 22px;
  background: #fff;
  font-size: clamp(1.02rem, 3vw, 1.2rem);
  font-weight: 850;
  letter-spacing: -0.015em;
  line-height: 1.35;
  box-shadow: 0 10px 28px rgba(24, 32, 51, 0.04);
}

.large-question input,
.large-question textarea {
  margin-top: 10px;
  font-size: 1rem;
  font-weight: 500;
}

.arabic-note {
  max-width: 760px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff7e6;
  color: #694b12;
  direction: rtl;
  font-size: 0.95rem;
  line-height: 1.55;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.terms-box {
  border: 1px solid #d9e3f0;
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
}

.terms-box summary {
  cursor: pointer;
  padding: 16px 18px;
  color: var(--ink);
  font-weight: 950;
  list-style-position: inside;
}

.terms-box[open] summary {
  border-bottom: 1px solid var(--soft-line);
  background: #f8fafc;
}

.terms-content {
  max-height: 360px;
  overflow: auto;
  padding: 18px;
  color: #344054;
  font-size: 0.98rem;
  line-height: 1.85;
}

.terms-content h3 {
  margin: 18px 0 6px;
  color: var(--blue-strong);
  font-size: 1.05rem;
}

.terms-content h3:first-child {
  margin-top: 0;
}

.terms-content p {
  margin: 0 0 8px;
}

.terms-warning {
  margin-top: 16px !important;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff3f1;
  color: var(--red);
  font-weight: 900;
}

.check-row input {
  width: 20px;
  min-height: 20px;
}

.drawer-actions {
  border-top: 1px solid var(--soft-line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -12px 30px rgba(24, 32, 51, 0.05);
}

.drawer-actions .ghost-button,
.drawer-actions .primary-button {
  min-width: 130px;
}

@media (max-width: 900px) {
  .portal-shell {
    width: min(100% - 20px, 760px);
  }

  .portal-hero {
    position: sticky;
    top: 0;
    z-index: 4;
    padding: 10px 0;
    background: rgba(246, 248, 251, 0.88);
    backdrop-filter: blur(16px);
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .ghost-button {
    min-height: 38px;
    padding: 0 11px;
  }

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

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    z-index: 5;
    height: auto;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-note {
    display: none;
  }

  .table-nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-item {
    white-space: nowrap;
  }

  .workspace {
    padding: 14px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .user-pill {
    justify-content: space-between;
    border-radius: 16px;
  }

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

@media (max-width: 640px) {
  input,
  select,
  textarea {
    font-size: 16px;
  }

  .auth-card {
    padding: 22px;
  }

  .welcome-card {
    min-height: 180px;
    border-radius: 20px;
  }

  .child-card,
  .registration-card {
    align-items: stretch;
  }

  .child-card {
    grid-template-columns: 1fr;
  }

  .detailed-registration {
    grid-template-columns: 1fr;
  }

  .registration-status {
    justify-self: start;
  }

  .registration-details {
    grid-template-columns: 1fr;
  }

  .child-summary,
  .registration-main {
    align-items: flex-start;
  }

  .card-actions {
    justify-content: stretch;
  }

  .child-card [data-edit-child] {
    width: auto;
  }

  .child-card .child-summary {
    padding-right: 0;
  }

  .child-card .card-actions {
    grid-column: 1;
    grid-row: auto;
    flex-direction: row;
    padding-top: 18px;
  }

  .card-actions .primary-button {
    width: 100%;
  }

  .appointment-panel.booked,
  .appointment-controls {
    grid-template-columns: 1fr;
  }

  .stepper {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    padding-inline: 12px;
  }

  .stepper span {
    padding: 8px 4px;
    font-size: 0.68rem;
  }

  .summary-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .step-panel.form-grid {
    min-height: 470px;
    padding: 22px 18px;
  }

  .choice-group.two-up {
    display: flex;
  }

  .drawer {
    width: 100%;
    max-height: none;
    padding: 6px;
    place-items: stretch;
  }

  .drawer-card {
    width: 100%;
    max-height: calc(100vh - 12px);
    max-height: calc(100dvh - 12px);
    border-radius: 22px;
  }

  .trip-modal {
    align-items: stretch;
    padding: 6px;
  }

  .trip-modal-card {
    width: 100%;
    max-height: calc(100vh - 12px);
    max-height: calc(100dvh - 12px);
    border-radius: 22px;
  }

  .trip-modal-image {
    height: 180px;
  }

  .trip-brochure-link {
    width: 100%;
  }

  .trip-brochure-frame {
    display: none;
  }

  .drawer-header,
  .drawer-actions {
    padding: 14px 16px;
  }

  .choice-field,
  .large-question,
  .nested-choice {
    padding: 15px;
    border-radius: 18px;
  }

  .choice-group {
    gap: 8px;
  }

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

  .choice-pill span {
    min-height: 39px;
    padding: 8px 12px;
    font-size: 0.95rem;
  }

  .grid-scroll {
    display: none;
  }

  .mobile-records {
    display: block;
  }

  .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-header .primary-button,
  .drawer-actions .primary-button,
  .drawer-actions .ghost-button {
    width: 100%;
  }

  .drawer-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }
}
