@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500&display=swap');

/* Warm Editorial (default) */
:root {
  --bg:            #faf7f2;
  --surface:       #ffffff;
  --surface-2:     #f5f1eb;
  --surface-3:     #ede8e0;
  --border:        #e8e2d8;
  --border-light:  #d8d0c4;
  --text:          #1a1510;
  --text-muted:    #8a8278;
  --text-dim:      #b8b0a4;
  --primary:       #f97316;
  --primary-dark:  #ea6c0a;
  --primary-light: #fff7ed;
  --primary-glow:  rgba(249,115,22,0.08);
  --alert-bg:      #fff7ed;
  --success:       #4a9e6a;
  --success-bg:    rgba(74,158,106,0.08);
  --error:         #c84b3c;
  --error-bg:      rgba(200,75,60,0.06);
  --radius:        2px;
  --radius-md:     4px;
  --radius-full:   999px;
  --shadow:        0 8px 32px rgba(0,0,0,0.08);
  --font-display:  'Cormorant Garamond', Georgia, serif;
  --font-body:     'DM Sans', -apple-system, sans-serif;
}

/* Dark Concierge */
[data-theme="dark"] {
  --bg:            #0f0e0c;
  --surface:       #1a1915;
  --surface-2:     #232118;
  --surface-3:     #2e2b24;
  --border:        #2e2b24;
  --border-light:  #3a3730;
  --text:          #ede8df;
  --text-muted:    #7a7568;
  --text-dim:      #4a4840;
  --primary:       #e06410;
  --primary-dark:  #c95b0e;
  --primary-light: #3a1f08;
  --primary-glow:  rgba(224,100,16,0.08);
  --alert-bg:      rgba(224,100,16,0.08);
  --success:       #4a9e6a;
  --success-bg:    rgba(74,158,106,0.12);
  --error:         #c84b3c;
  --error-bg:      rgba(200,75,60,0.1);
  --shadow:        0 8px 32px rgba(0,0,0,0.4);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-body); font-size: 14px; line-height: 1.6; background: var(--bg); color: var(--text); min-height: 100vh; }

body.auth-page { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }

.page { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; min-height: 100vh; padding: 40px 24px; }

.page-content { width: 100%; max-width: 640px; margin: 0 auto; padding: 48px 24px; box-sizing: border-box; }

.auth-footer { margin-top: 20px; text-align: center; font-size: 14px; color: var(--text-muted); }
.milo-help-footer { margin-top: 24px; }
.milo-help-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  width: auto;
  max-width: none;
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: none;
}
.milo-help-link:hover { color: var(--text); background: none; box-shadow: none; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 48px 40px; width: 100%; max-width: 480px; }
.card--wide { max-width: 640px; }
.card--full { max-width: none; }

.logo { font-family: var(--font-display); font-weight: 300; font-size: 20px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--text); text-decoration: none; display: inline-block; }

h1, .display { font-family: var(--font-display); font-weight: 300; font-size: 40px; line-height: 1.1; letter-spacing: -0.02em; color: var(--text); }
h1 em, .display em { font-style: italic; color: var(--primary); }
h2, .heading { font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: 1.2; letter-spacing: -0.01em; color: var(--text); }
h3 { font-family: var(--font-body); font-weight: 500; font-size: 14px; color: var(--text); }
p.subtitle { font-size: 13px; color: var(--text-muted); line-height: 1.7; font-weight: 300; }

label, .label { display: block; font-size: 10px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }
label.label--has-optional::after,
.label.label--has-optional::after {
  content: ' (optional)';
  text-transform: none;
  letter-spacing: 0.04em;
  font-weight: 400;
  color: var(--text-dim);
}
.label-optional { text-transform: none; letter-spacing: 0.02em; font-weight: 400; color: var(--text-dim); }

input[type="text"], input[type="tel"], input[type="email"], input[type="password"], input[type="date"], select, textarea {
  width: 100%;
  padding: 12px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-light);
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 300;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 28px;
  -webkit-appearance: none;
  appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--text-dim); opacity: 1; }
input:focus, select:focus, textarea:focus {
  border-bottom-color: var(--primary);
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text);
  box-shadow: 0 0 0 1000px var(--surface) inset;
  transition: background-color 9999s ease-out;
}
.auth-page input[type="text"],
.auth-page input[type="tel"],
.auth-page input[type="email"],
.auth-page input[type="password"] {
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
}
textarea { resize: vertical; min-height: 80px; line-height: 1.6; }

input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; margin: 0; border-radius: 0; padding: 0; border-bottom: none; margin-bottom: 0; vertical-align: middle; }
.checkbox-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.checkbox-row:last-child { border-bottom: none; }
.checkbox-row input[type="checkbox"] { flex-shrink: 0; margin-top: 2px; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 1px; background: var(--border-light); border: none; border-radius: 0; outline: none; cursor: pointer; padding: 0; margin-bottom: 0; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; background: var(--primary); border-radius: 50%; border: 3px solid var(--bg); cursor: pointer; }

button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 28px; width: 100%; max-width: 100%; font-family: var(--font-body); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; border: none; border-radius: var(--radius); cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s; text-decoration: none; background: var(--primary); color: #fff; margin-top: 8px; }
button:hover, .btn:hover { background: var(--primary-dark); }
button:disabled, .btn:disabled { background: var(--surface-3); color: var(--text-dim); cursor: not-allowed; }

.btn--outline { background: transparent; color: var(--text-muted); border: 1px solid var(--border-light); }
.btn--outline:hover { background: transparent; border-color: var(--text-muted); color: var(--text); }
.btn--ghost { background: transparent; color: var(--primary); padding: 0; width: auto; max-width: none; font-size: 11px; margin: 0; }
.btn--ghost:hover { background: transparent; color: var(--primary-dark); }

.badge { display: inline-block; padding: 4px 12px; font-size: 10px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; border-radius: var(--radius-full); }
.badge--active { background: var(--success-bg); color: var(--success); border: 1px solid rgba(74,158,106,0.25); }
.badge--pending { background: var(--primary-glow); color: var(--primary); border: 1px solid var(--primary-light); }
.badge--muted { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.badge--error { background: var(--error-bg); color: var(--error); border: 1px solid rgba(200,75,60,0.25); }

.alert { padding: 14px 18px; border-left: 2px solid var(--primary); background: var(--primary-glow); font-size: 13px; color: var(--text-muted); line-height: 1.6; border-radius: 0 var(--radius) var(--radius) 0; }
.alert a { color: var(--primary); text-decoration: none; font-weight: 500; }

.divider { width: 32px; height: 1px; background: var(--primary); opacity: 0.5; margin: 8px 0; }
hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

.nav { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-link { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--primary); }

.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-value { font-family: var(--font-display); font-size: 48px; font-weight: 300; line-height: 1; color: var(--text); }
.stat-value .unit { font-size: 20px; color: var(--text-muted); margin-left: 4px; }
.stat-label { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); }
.stat-delta--up { color: var(--success); font-size: 12px; font-weight: 300; }
.stat-delta--down { color: var(--error); font-size: 12px; font-weight: 300; }

.session-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--border); gap: 12px; }
.session-row:last-child { border-bottom: none; }
.session-date { font-family: var(--font-display); font-size: 18px; font-weight: 400; color: var(--text); min-width: 72px; flex-shrink: 0; }
.session-meta { font-size: 12px; color: var(--text-muted); letter-spacing: 0.04em; flex: 1; }

.hep-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 13px; gap: 12px; }
.hep-row:last-child { border-bottom: none; }
.hep-done { color: var(--success); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.hep-pending { color: var(--text-dim); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }

.progress-track { height: 1px; background: var(--border); overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); transition: width 0.4s ease; }

.steps { display: flex; gap: 4px; }
.step-line { flex: 1; height: 2px; background: var(--border); transition: background 0.3s; }
.step-line.done { background: var(--primary); }
.step-line.active { background: var(--primary); opacity: 0.4; }

.payment-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
.payment-option { border: 1px solid var(--border); padding: 20px 24px; cursor: pointer; transition: border-color 0.2s, background 0.2s; display: flex; justify-content: space-between; align-items: center; border-radius: var(--radius); }
.payment-option:hover { border-color: var(--primary); }
.payment-option.selected { border-color: var(--primary); background: var(--primary-glow); }
.payment-option-name { font-family: var(--font-display); font-size: 18px; font-weight: 400; color: var(--text); margin-bottom: 2px; }
.payment-option-desc { font-size: 11px; color: var(--text-muted); letter-spacing: 0.04em; }
.payment-option-price { font-family: var(--font-display); font-size: 26px; font-weight: 300; color: var(--text); text-align: right; }
.payment-option-savings { font-size: 10px; color: var(--success); letter-spacing: 0.1em; text-transform: uppercase; text-align: right; }

.quick-links { display: flex; gap: 10px; margin: 24px 0; }
.quick-link-card { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 8px; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text-muted); font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; transition: border-color 0.2s, color 0.2s; }
.quick-link-card:hover { border-color: var(--primary); color: var(--text); }
.quick-link-icon { font-size: 18px; }

.slider-group { margin-bottom: 32px; }
.slider-display { display: flex; align-items: flex-end; gap: 6px; margin-bottom: 16px; }
.slider-number { font-family: var(--font-display); font-size: 56px; font-weight: 300; line-height: 1; color: var(--text); }
.slider-max { font-size: 18px; color: var(--text-dim); margin-bottom: 8px; }
.slider-labels { display: flex; justify-content: space-between; margin-top: 10px; font-size: 10px; color: var(--text-dim); letter-spacing: 0.08em; }

.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-full); color: var(--text-muted); cursor: pointer; transition: border-color 0.2s, color 0.2s; padding: 0; margin: 0; max-width: none; font-size: 0; }
.theme-toggle:hover { border-color: var(--text-muted); color: var(--text); background: var(--surface-2); box-shadow: none; }

.visit-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 10px; }
.visit-summary { font-size: 13px; line-height: 1.7; color: var(--text-muted); margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); display: none; }
.visit-toggle { font-size: 11px; color: var(--primary); cursor: pointer; background: none; border: none; padding: 0; width: auto; max-width: none; margin: 8px 0 0; text-transform: none; letter-spacing: 0.06em; font-weight: 400; display: inline-flex; align-items: center; gap: 4px; }
.visit-toggle:hover { background: none; box-shadow: none; color: var(--primary-dark); }

.empty-state { text-align: center; padding: 48px 24px; color: var(--text-dim); font-size: 13px; line-height: 1.7; }
.empty-state-heading { font-family: var(--font-display); font-size: 20px; font-weight: 300; color: var(--text-muted); margin-bottom: 8px; }

.auth-page .error-msg { position: static; margin-top: 12px; margin-bottom: 12px; }
.error-msg { font-size: 12px; color: var(--error); margin-top: -20px; margin-bottom: 20px; display: none; letter-spacing: 0.02em; }
.error-msg.visible { display: block; }

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: var(--radius-full); }

@media (max-width: 480px) {
  .card { padding: 36px 24px; }
  h1, .display { font-size: 32px; }
  .quick-links { flex-wrap: wrap; }
  .quick-link-card { min-width: calc(50% - 5px); }
  .payment-option-price { font-size: 22px; }
  .stat-value { font-size: 36px; }
}



.session-card,
.hep-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
}
.session-card h3,
.hep-card h3 {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--text);
}
.session-card p,
.hep-card p {
  font-size: 12px;
  color: var(--text-muted);
}

.alert-banner {
  background: var(--alert-bg);
  border: 1px solid var(--border-light);
  border-left: 2px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  font-size: 13px;
  margin-bottom: 24px;
  color: var(--text-muted);
}
.alert-banner a { color: var(--primary); font-weight: 500; text-decoration: none; }

.back-link {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
  text-decoration: none;
}
.back-link:hover { color: var(--primary); }

.page-content { width: 100%; max-width: 640px; margin: 0 auto; }

.billing-section { margin-bottom: 40px; }
.billing-section h2 {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

button.secondary,
.btn--secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  margin-top: 8px;
}
button.secondary:hover,
.btn--secondary:hover {
  border-color: var(--text-muted);
  color: var(--text);
  background: transparent;
}

.pm-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
}
.pm-card button.remove-pm {
  width: auto;
  max-width: none;
  padding: 6px 12px;
  font-size: 10px;
  margin: 0;
  background: transparent;
  color: var(--error);
  border: 1px solid var(--border);
}
.pm-card button.remove-pm:hover { background: var(--error-bg); }

#card-element,
#payment-card-element {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 20px;
}

.history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.history-table th,
.history-table td {
  text-align: left;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.history-table th { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }

.error { font-size: 12px; color: var(--error); margin-top: -20px; margin-bottom: 20px; display: none; }
.error.visible { display: block; }

.slider-value {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 300;
  line-height: 1;
  color: var(--text);
  margin-bottom: 8px;
}


.alert { background: var(--alert-bg); }

