:root {
  --member-blue: #1261c9;
  --member-blue-dark: #0b3978;
  --member-green: #167a5a;
  --member-orange: #d66b18;
  --member-red: #c43b42;
  --member-ink: #142033;
  --member-muted: #657188;
  --member-line: #dde3eb;
  --member-soft: #f4f7fa;
  --member-white: #fff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body.member-page { margin: 0; min-width: 320px; color: var(--member-ink); background: var(--member-soft); font-family: "DM Sans", sans-serif; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(18, 97, 201, .24); outline-offset: 2px; }

.member-header { position: sticky; z-index: 20; top: 0; display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 10px clamp(18px, 5vw, 72px); border-bottom: 1px solid rgba(221, 227, 235, .88); background: rgba(255, 255, 255, .96); }
.member-brand { display: flex; align-items: center; gap: 11px; color: var(--member-ink); text-decoration: none; }
.member-brand img { width: 40px; height: 40px; object-fit: contain; }
.member-brand strong, .member-brand small { display: block; letter-spacing: 0; }
.member-brand strong { font-family: Outfit, sans-serif; font-size: 15px; }
.member-brand small { margin-top: 2px; color: var(--member-muted); font-size: 8px; font-weight: 700; }
.member-header nav { display: flex; align-items: center; gap: 24px; }
.member-header nav a, .member-logout { min-height: 44px; color: #3e4a5e; font-size: 13px; font-weight: 700; text-decoration: none; }
.member-header nav a { display: inline-flex; align-items: center; }
.member-logout { padding: 0 16px; border: 1px solid var(--member-line); border-radius: 6px; background: var(--member-white); cursor: pointer; }

.auth-view { display: grid; grid-template-columns: minmax(360px, 1.12fr) minmax(440px, .88fr); min-height: calc(100vh - 126px); }
.auth-image { position: relative; min-height: 660px; background: linear-gradient(90deg, rgba(8, 28, 49, .24), rgba(8, 28, 49, .04)), url("assets/images/generated-1783689577352.png") center/cover no-repeat; }
.auth-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(7, 26, 48, .83)); }
.auth-image-copy { position: absolute; z-index: 1; right: clamp(32px, 5vw, 80px); bottom: 68px; left: clamp(32px, 5vw, 80px); max-width: 620px; color: #fff; }
.auth-image-copy > p, .member-kicker { margin: 0 0 9px; color: var(--member-blue); font-size: 10px; font-weight: 800; letter-spacing: 0; }
.auth-image-copy > p { color: #b6d7ff; }
.auth-image-copy h1 { margin: 0; font: 700 clamp(32px, 4.2vw, 58px)/1.04 Outfit, sans-serif; }
.auth-image-copy ul { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 24px 0 0; padding: 0; list-style: none; }
.auth-image-copy li { position: relative; padding-left: 18px; font-size: 13px; }
.auth-image-copy li::before { content: ""; position: absolute; top: 6px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: #5ecb9b; }
.auth-panel { display: grid; align-items: center; padding: 52px clamp(28px, 6vw, 86px); background: #fff; }
.auth-panel-inner { width: min(100%, 470px); margin: auto; }
.auth-panel h1 { margin: 0; font: 700 34px/1.15 Outfit, sans-serif; }
.auth-intro { margin: 12px 0 28px; color: var(--member-muted); font-size: 14px; line-height: 1.7; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 24px; border-bottom: 1px solid var(--member-line); }
.auth-tabs button { min-height: 48px; border: 0; border-bottom: 3px solid transparent; color: var(--member-muted); background: transparent; font-weight: 700; cursor: pointer; }
.auth-tabs button.active { border-color: var(--member-blue); color: var(--member-blue); }

.member-form label, .order-form label, .traveler-row label, .contract-form label { display: grid; gap: 7px; color: #354158; font-size: 12px; font-weight: 700; }
.member-form label + label { margin-top: 15px; }
.member-form label small { color: var(--member-muted); font-size: 10px; font-weight: 500; line-height: 1.45; }
.member-form input:not([type="checkbox"]), .order-form input:not([type="checkbox"]), .order-form textarea, .traveler-row input, .traveler-row select, .contract-form input:not([type="checkbox"]) { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #cfd7e2; border-radius: 6px; color: var(--member-ink); background: #fff; }
.member-form input:focus, .order-form input:focus, .order-form textarea:focus, .traveler-row input:focus, .traveler-row select:focus, .contract-form input:focus { border-color: var(--member-blue); box-shadow: 0 0 0 3px rgba(18, 97, 201, .09); outline: none; }
.member-form input[aria-invalid="true"], .order-form input[aria-invalid="true"], .traveler-row input[aria-invalid="true"], .traveler-row select[aria-invalid="true"], .contract-form input[aria-invalid="true"] { border-color: var(--member-red); }
.check-label { display: flex !important; align-items: flex-start; min-height: 44px; gap: 10px !important; margin-top: 17px !important; cursor: pointer; }
.check-label input { flex: 0 0 auto; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--member-blue); }
.check-label span { color: var(--member-muted); font-weight: 500; line-height: 1.55; }
.check-label a { color: var(--member-blue); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.member-primary, .member-secondary { min-height: 46px; border-radius: 6px; font-weight: 800; cursor: pointer; }
.member-primary { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 22px; border: 0; padding: 0 20px; color: #fff; background: var(--member-blue); }
.member-primary:hover { background: #0e54ae; }
.member-primary:disabled { cursor: wait; opacity: .62; }
.member-secondary { padding: 0 18px; border: 1px solid #b9c7d7; color: var(--member-blue-dark); background: #fff; }
.form-message { min-height: 20px; margin: 12px 0 0; color: var(--member-muted); font-size: 12px; line-height: 1.5; }
.form-message.is-error { color: var(--member-red); }
.form-message.is-success { color: var(--member-green); }

.portal-view { width: min(1440px, 100%); min-height: calc(100vh - 126px); margin: auto; padding: 42px clamp(18px, 4vw, 58px) 64px; }
.portal-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.portal-heading h1 { margin: 0; font: 700 clamp(28px, 3vw, 42px)/1.15 Outfit, sans-serif; }
.portal-heading p:last-child { margin: 8px 0 0; color: var(--member-muted); font-size: 14px; }
.portal-alert { margin-bottom: 18px; padding: 13px 16px; border-left: 4px solid var(--member-blue); background: #eaf3ff; color: #24446c; font-size: 13px; line-height: 1.55; }
.portal-alert.is-error { border-color: var(--member-red); background: #fff0f1; color: #7b2a31; }
.portal-alert.is-success { border-color: var(--member-green); background: #eaf8f2; color: #245f4c; }

.booking-section { margin-bottom: 26px; padding: 24px clamp(18px, 3vw, 34px) 30px; border-top: 4px solid var(--member-blue); background: #fff; box-shadow: 0 12px 34px rgba(24, 45, 76, .08); }
.section-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.section-bar h2 { margin: 0; font: 700 25px Outfit, sans-serif; }
.icon-close { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; color: var(--member-muted); background: var(--member-soft); font-size: 24px; cursor: pointer; }
.booking-product { display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 18px; margin: 22px 0; padding: 14px; border: 1px solid var(--member-line); background: #f9fbfd; }
.booking-product img { width: 112px; height: 82px; object-fit: cover; }
.booking-product h3 { margin: 0 0 5px; font: 700 18px Outfit, sans-serif; }
.booking-product p { margin: 0; color: var(--member-muted); font-size: 12px; }
.order-form { max-width: 880px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 18px; }
.form-grid .is-full { grid-column: 1 / -1; }
.order-form textarea { resize: vertical; }
.booking-notice { display: grid; gap: 3px; margin-top: 18px; padding: 13px 15px; border-left: 4px solid var(--member-orange); background: #fff6e9; font-size: 12px; line-height: 1.55; }
.booking-notice span { color: #705b42; }
.order-form .member-primary { width: auto; min-width: 250px; }

.orders-workspace { display: grid; grid-template-columns: minmax(270px, 330px) minmax(0, 1fr); min-height: 560px; border: 1px solid var(--member-line); background: #fff; box-shadow: 0 14px 38px rgba(24, 45, 76, .07); }
.orders-sidebar { border-right: 1px solid var(--member-line); background: #f9fbfd; }
.orders-sidebar-heading { display: flex; align-items: center; justify-content: space-between; min-height: 67px; padding: 0 19px; border-bottom: 1px solid var(--member-line); }
.orders-sidebar-heading h2 { margin: 0; font: 700 16px Outfit, sans-serif; }
.orders-sidebar-heading span { display: grid; place-items: center; min-width: 28px; height: 28px; border-radius: 50%; color: var(--member-blue); background: #e5f0ff; font-size: 11px; font-weight: 800; }
.order-list { max-height: 760px; overflow: auto; }
.order-list-button { display: grid; gap: 7px; width: 100%; min-height: 116px; padding: 17px 18px; border: 0; border-bottom: 1px solid var(--member-line); text-align: left; background: transparent; cursor: pointer; }
.order-list-button:hover { background: #f1f6fc; }
.order-list-button.active { box-shadow: inset 4px 0 var(--member-blue); background: #fff; }
.order-list-button > span:first-child { display: flex; justify-content: space-between; gap: 10px; }
.order-list-button strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.order-list-button small { color: var(--member-muted); font-size: 10px; }
.order-list-button p { overflow: hidden; margin: 0; color: #4b5870; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; width: fit-content; min-height: 25px; padding: 3px 8px; border-radius: 4px; color: #5f536e; background: #f0edf5; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill.is-waiting { color: #8a561c; background: #fff0dc; }
.status-pill.is-ready { color: #155e9b; background: #e7f3ff; }
.status-pill.is-paid, .status-pill.is-complete { color: #17684f; background: #e4f6ef; }
.status-pill.is-closed { color: #7b4750; background: #f8e9ec; }

.order-detail { min-width: 0; padding: clamp(20px, 3vw, 36px); }
.empty-state { display: grid; place-items: center; align-content: center; min-height: 440px; text-align: center; }
.empty-state > span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; color: var(--member-blue); background: #e9f2fe; font-size: 30px; }
.empty-state h2 { margin: 16px 0 5px; font: 700 20px Outfit, sans-serif; }
.empty-state p, .member-loading { color: var(--member-muted); font-size: 12px; }
.member-loading { padding: 18px; }
.order-detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--member-line); }
.order-detail-heading h2 { margin: 3px 0 6px; font: 700 clamp(22px, 2.5vw, 30px) Outfit, sans-serif; }
.order-detail-heading p { margin: 0; color: var(--member-muted); font-size: 12px; }
.order-amount { text-align: right; }
.order-amount small, .order-amount strong { display: block; }
.order-amount small { color: var(--member-muted); font-size: 10px; }
.order-amount strong { margin-top: 4px; font: 700 25px Outfit, sans-serif; }
.order-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 25px 0; }
.progress-step { position: relative; min-width: 0; padding-top: 24px; color: var(--member-muted); font-size: 10px; font-weight: 700; }
.progress-step::before { content: ""; position: absolute; z-index: 1; top: 0; left: 0; width: 12px; height: 12px; border: 3px solid #c9d1dc; border-radius: 50%; background: #fff; }
.progress-step::after { content: ""; position: absolute; top: 7px; right: 0; left: 12px; height: 2px; background: #dbe1e9; }
.progress-step:last-child::after { display: none; }
.progress-step.done { color: var(--member-green); }
.progress-step.done::before { border-color: var(--member-green); background: var(--member-green); }
.progress-step.done::after { background: var(--member-green); }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--member-line); background: var(--member-line); }
.detail-grid div { min-width: 0; padding: 13px 15px; background: #fff; }
.detail-grid small, .detail-grid strong { display: block; }
.detail-grid small { margin-bottom: 5px; color: var(--member-muted); font-size: 9px; text-transform: uppercase; }
.detail-grid strong { overflow-wrap: anywhere; font-size: 12px; }
.order-block { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--member-line); }
.order-block-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.order-block h3 { margin: 0; font: 700 17px Outfit, sans-serif; }
.order-block-heading p, .order-block > p { margin: 4px 0 0; color: var(--member-muted); font-size: 11px; line-height: 1.55; }
.traveler-list { display: grid; gap: 12px; }
.traveler-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(150px, .72fr) minmax(190px, 1.15fr); align-items: end; gap: 12px; padding: 14px; border: 1px solid var(--member-line); background: #fafbfd; }
.traveler-row-heading { display: flex; align-items: baseline; justify-content: space-between; grid-column: 1 / -1; padding-bottom: 9px; border-bottom: 1px solid var(--member-line); }
.traveler-row-heading strong { color: var(--member-blue-dark); font-size: 13px; }
.traveler-row-heading span { color: var(--member-muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.inline-button { min-height: 44px; padding: 0 15px; border: 1px solid #b7c5d6; border-radius: 5px; color: var(--member-blue-dark); background: #fff; font-size: 12px; font-weight: 800; cursor: pointer; }
.inline-button.is-primary { border-color: var(--member-blue); color: #fff; background: var(--member-blue); }
.inline-button:disabled { cursor: not-allowed; opacity: .55; }
.contract-box { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; padding: 17px; border: 1px solid var(--member-line); background: #f9fbfd; }
.contract-box h4 { margin: 0 0 5px; font-size: 13px; }
.contract-box p { margin: 0; color: var(--member-muted); font-size: 11px; line-height: 1.5; }
.contract-box .contract-fingerprint { margin: 5px 0; overflow-wrap: anywhere; }
.contract-fingerprint code { color: var(--member-ink); font-size: 10px; }
.contract-box a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 15px; border: 1px solid var(--member-blue); border-radius: 5px; color: var(--member-blue); font-size: 12px; font-weight: 800; text-decoration: none; }
.contract-form { margin-top: 16px; }
.contract-signatory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.payment-box { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 24px; align-items: center; padding: 20px; border: 1px solid #cfe1d8; background: #f2faf6; }
.payment-box h4 { margin: 0 0 7px; font: 700 18px Outfit, sans-serif; }
.payment-box p { margin: 0; color: #4b6d60; font-size: 11px; line-height: 1.6; }
.payment-qr { display: grid; place-items: center; width: 190px; height: 190px; padding: 10px; border: 1px solid #d2ddd7; background: #fff; }
.payment-qr img { width: 100%; height: 100%; object-fit: contain; }
.payment-link { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border-radius: 5px; color: #fff; background: #16865d; font-size: 12px; font-weight: 800; text-decoration: none; }
.payment-code { overflow-wrap: anywhere; font-size: 10px; }
.blocked-note { padding: 14px 16px; border-left: 4px solid var(--member-orange); color: #765c3b; background: #fff5e7; font-size: 12px; line-height: 1.6; }

.member-footer { display: flex; justify-content: space-between; gap: 20px; min-height: 54px; padding: 18px clamp(18px, 5vw, 72px); color: #788397; background: #fff; font-size: 11px; }
.member-footer a { color: var(--member-blue); }

@media (max-width: 900px) {
  .auth-view { grid-template-columns: 1fr; }
  .auth-image { min-height: 340px; }
  .auth-image-copy { bottom: 35px; }
  .auth-image-copy h1 { font-size: 36px; }
  .auth-panel { padding: 42px 24px 58px; }
  .orders-workspace { grid-template-columns: 1fr; }
  .orders-sidebar { border-right: 0; border-bottom: 1px solid var(--member-line); }
  .order-list { display: flex; max-height: none; overflow-x: auto; }
  .order-list-button { flex: 0 0 260px; border-right: 1px solid var(--member-line); border-bottom: 0; }
  .order-list-button.active { box-shadow: inset 0 -4px var(--member-blue); }
  .traveler-row { grid-template-columns: 1fr 1fr; }
  .traveler-row label:last-child { grid-column: 1 / -1; }
  .contract-signatory-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .member-header { position: static; min-height: 64px; padding: 8px 14px; }
  .member-brand img { width: 36px; height: 36px; }
  .member-brand small, .member-header nav a { display: none; }
  .member-header nav { gap: 0; }
  .member-logout { padding: 0 12px; }
  .auth-image { min-height: 300px; }
  .auth-image-copy { right: 22px; bottom: 26px; left: 22px; }
  .auth-image-copy h1 { font-size: 31px; }
  .auth-image-copy ul { display: grid; gap: 7px; }
  .auth-panel { padding: 35px 18px 48px; }
  .auth-panel h1 { font-size: 28px; }
  .portal-view { padding: 30px 12px 48px; }
  .portal-heading { align-items: stretch; flex-direction: column; }
  .portal-heading .member-secondary { width: 100%; }
  .booking-section { padding: 20px 14px 24px; }
  .booking-product { grid-template-columns: 82px 1fr; }
  .booking-product img { width: 82px; height: 68px; }
  .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .form-grid .is-full { grid-column: auto; }
  .order-form .member-primary { width: 100%; min-width: 0; }
  .order-detail { padding: 20px 14px 26px; }
  .order-detail-heading { flex-direction: column; }
  .order-amount { text-align: left; }
  .order-progress { overflow: visible; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .progress-step { font-size: 9px; }
  .traveler-row { grid-template-columns: 1fr; }
  .traveler-row label:last-child { grid-column: auto; }
  .contract-signatory-grid { grid-template-columns: 1fr; }
  .contract-box, .payment-box { grid-template-columns: 1fr; }
  .contract-box a { justify-content: center; }
  .payment-qr { width: min(190px, 100%); }
  .member-footer { flex-direction: column; }
}

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