/* HabiVox End-User Design System
   Public booking, appointment and account surfaces use only --eu-* tokens.
   Tenant branding is limited to the accent colour (--brand). */
:root {
  color-scheme: light;
  --brand: #0f5a43;
  --brand-ink: #fff;
  --accent-text: #0f5a43;
  --eu-bg: #f4f6f4;
  --eu-bg-raised: #fafbf9;
  --eu-card: #fff;
  --eu-card-subtle: #f7f9f7;
  --eu-line: #d8dfdb;
  --eu-line-strong: #bdc9c2;
  --eu-text: #10211b;
  --eu-dim: #5a6862;
  --eu-danger: #b4232c;
  --eu-ok: #14724a;
  --eu-warning: #9a5b00;
  --eu-shadow-sm: 0 1px 2px rgba(12, 30, 24, .05);
  --eu-shadow-md: 0 14px 40px rgba(12, 30, 24, .09);
  --eu-radius-sm: 12px;
  --eu-radius-md: 18px;
  --eu-radius-lg: 24px;
}
html[data-eu-theme="dark"] {
  color-scheme: dark;
  --eu-bg: #071510;
  --eu-bg-raised: #0b1b15;
  --eu-card: #10231c;
  --eu-card-subtle: #142a22;
  --eu-line: #30473d;
  --eu-line-strong: #486257;
  --eu-text: #f2f8f5;
  --eu-dim: #b9c8c1;
  --eu-danger: #ff8b91;
  --eu-ok: #65d7a2;
  --eu-warning: #ffc768;
  --eu-shadow-sm: 0 1px 2px rgba(0, 0, 0, .24);
  --eu-shadow-md: 0 18px 50px rgba(0, 0, 0, .34);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; background: var(--eu-bg); color: var(--eu-text); }
html { font-family: var(--font, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif); line-height: 1.55; }
body { margin: 0; padding: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 5%, var(--eu-bg)) 0, var(--eu-bg) 260px), var(--eu-bg); }
a { color: var(--accent-text); }
[hidden] { display: none !important; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 1000; padding: 10px 16px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font-weight: 700; }
.skip-link:focus { left: 12px; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; }
.wrap { width: min(100%, 800px); margin: 0 auto; padding: 28px 20px 64px; }

/* Shared utility navigation: home/account, theme and languages form one unit. */
.book-utility, .eu-utility-bar { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; }
.eu-utility-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.eu-utility-actions .lang-switch, .book-utility .lang-switch, .eu-utility-bar .lang-switch { margin: 0; }
.lang-switch { display: flex; justify-content: flex-end; gap: 6px; margin: 0 0 16px; flex-wrap: wrap; }
.lang-switch button, .acct-link, .eu-theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 7px 12px; border: 1px solid var(--eu-line); border-radius: 999px; background: var(--eu-card); color: var(--eu-dim); box-shadow: var(--eu-shadow-sm); font: 700 .75rem/1 var(--font, inherit); text-decoration: none; cursor: pointer; }
.lang-switch button:hover, .acct-link:hover, .eu-theme-toggle:hover { border-color: var(--eu-line-strong); color: var(--eu-text); }
.lang-switch button.active { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--eu-card)); color: var(--eu-text); box-shadow: inset 0 0 0 1px var(--brand); }
.lang-switch button svg { flex: 0 0 auto; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .14); }
.lang-switch button .lang-code { line-height: 1; }
.eu-theme-toggle svg { width: 16px; height: 16px; }
.acct-link { margin: 0; }
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; margin: 0; color: var(--eu-dim); text-decoration: none; font-size: .875rem; font-weight: 650; }
.back-link:hover { color: var(--eu-text); }

/* Content hierarchy */
header.hero-band, .card { background: var(--eu-card); border: 1px solid var(--eu-line); color: var(--eu-text); border-radius: var(--eu-radius-lg); box-shadow: var(--eu-shadow-sm), var(--eu-shadow-md); }
header.hero-band { padding: 30px 28px; margin: 0 0 18px; text-align: center; }
header.hero-band h1 { margin: 0 0 6px; color: var(--eu-text); font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.16; letter-spacing: -.035em; text-wrap: balance; }
header.hero-band p, header.hero-band .praxis { margin: 0; color: var(--eu-dim); font-size: .9375rem; }
#tenantLogo { display: none; max-width: 260px !important; max-height: 112px !important; width: auto; height: auto; object-fit: contain; margin: 0 auto 18px !important; padding: 10px; border: 1px solid var(--eu-line); border-radius: var(--eu-radius-md); background: var(--eu-card-subtle); box-shadow: none; }
header.hero-band.has-tenant-logo { display: grid; grid-template-columns: 124px minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; column-gap: 28px; text-align: left; }
header.hero-band.has-tenant-logo #tenantLogo { grid-column: 1; grid-row: 1 / span 2; max-width: 124px !important; max-height: 124px !important; margin: 0 !important; }
header.hero-band.has-tenant-logo h1 { grid-column: 2; grid-row: 1; align-self: end; }
header.hero-band.has-tenant-logo p, header.hero-band.has-tenant-logo .praxis { grid-column: 2; grid-row: 2; align-self: start; }
.card { padding: 28px; margin: 0 0 18px; }
.card h2 { margin: 0 0 18px; color: var(--eu-text); font-size: 1.125rem; line-height: 1.3; letter-spacing: -.02em; }
.card p { color: var(--eu-dim); line-height: 1.55; }
.steps { display: flex; justify-content: center; gap: 7px; margin: 18px 0 20px; }
.step-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--eu-line-strong); }
.step-dot.active { background: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }
.emergency-note, .hint-box { padding: 13px 15px; border: 1px solid color-mix(in srgb, #d97706 34%, var(--eu-line)); border-left: 4px solid #d97706; border-radius: var(--eu-radius-sm); background: color-mix(in srgb, #f59e0b 9%, var(--eu-card)); color: var(--eu-text); font-size: .8125rem; line-height: 1.5; }
.emergency-note { margin: 0 0 18px; }
.hint-box { margin-top: 10px; }

/* Choices, slots and records */
.type-option, .appt-row, .row, .pet-row { border: 1px solid var(--eu-line); border-radius: var(--eu-radius-md); background: var(--eu-card); }
.type-option { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; margin-bottom: 10px; padding: 15px 18px; color: var(--eu-text); cursor: pointer; transition: border-color .15s, background .15s, transform .08s; }
.type-option:hover { border-color: var(--brand); transform: translateY(-1px); }
.type-option.selected { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--eu-card)); box-shadow: inset 0 0 0 1px var(--brand); }
.type-option .label { color: var(--eu-text); font-weight: 700; }
.type-option .duration, .type-option .sub { color: var(--eu-dim); font-size: .8125rem; }
.day-group { margin-bottom: 20px; }
.day-group h3 { margin: 0 0 10px; color: var(--eu-dim); font-size: .75rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); gap: 8px; }
.slot-btn { min-height: 44px; padding: 9px 8px; border: 1px solid var(--eu-line-strong); border-radius: 999px; background: var(--eu-card); color: var(--eu-text); font: 650 .875rem var(--font, inherit); cursor: pointer; transition: border-color .15s, background .15s; }
.slot-btn:hover, .slot-btn:focus-visible { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, var(--eu-card)); }
.slot-btn.selected { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.appt-row { margin-bottom: 12px; padding: 16px 18px; }
.appt-row .when { color: var(--eu-text); }
.appt-row .reason { color: var(--eu-dim); }

/* Forms */
label { display: block; margin: 13px 0 6px; color: var(--eu-text); font-size: .875rem; font-weight: 650; }
input[type="text"], input[type="tel"], input[type="email"], input[type="password"], input[type="number"], input[type="datetime-local"], input[type="date"], input[type="time"], textarea, select, select.pet-select, .hv-phone-cc { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid var(--eu-line-strong); border-radius: var(--eu-radius-sm); background: var(--eu-card); color: var(--eu-text); font: 400 1rem var(--font, inherit); }
textarea { resize: vertical; }
input:hover, textarea:hover, select:hover { border-color: color-mix(in srgb, var(--brand) 46%, var(--eu-line-strong)); }
input:focus, textarea:focus, select:focus, select.pet-select:focus { outline: 3px solid color-mix(in srgb, var(--brand) 24%, transparent); border-color: var(--brand); }
input::placeholder, textarea::placeholder { color: var(--eu-dim); opacity: .78; }
[aria-invalid="true"] { border-color: var(--eu-danger) !important; }
.field-error, .msg.error { color: var(--eu-danger); }
.msg { margin-top: 12px; font-size: .875rem; }
.msg.success { color: var(--eu-ok); }
.auth-submit { margin-top: 18px !important; }
.form-link-row { margin-top: 16px; text-align: center; }
button.primary, .btn-primary, a.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border: 1px solid transparent; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font: 700 .9375rem var(--font, inherit); text-decoration: none; cursor: pointer; transition: filter .15s, transform .08s; }
button.primary:hover, .btn-primary:hover, a.btn:hover { filter: brightness(1.06); }
button.primary:active, .btn-primary:active, a.btn:active { transform: scale(.985); }
button.primary:disabled { opacity: .5; cursor: not-allowed; }
.card > button.primary, .card button.primary:only-of-type { width: 100%; }
button.danger-outline { min-height: 48px; padding: 12px 22px; border: 1.5px solid var(--eu-danger); border-radius: 999px; background: transparent; color: var(--eu-danger); font: 700 .9375rem var(--font, inherit); cursor: pointer; }
button.danger-outline:hover { background: color-mix(in srgb, var(--eu-danger) 9%, transparent); }
button.link { min-height: 44px; border: 0; background: none; color: var(--accent-text); font: 650 .875rem var(--font, inherit); text-decoration: underline; cursor: pointer; }
.actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.actions button { flex: 1 1 150px; }
.tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.tab-btn { flex: 1; min-height: 44px; border: 1px solid var(--eu-line); border-radius: 999px; background: var(--eu-card); color: var(--eu-dim); font: 700 .875rem var(--font, inherit); cursor: pointer; }
.tab-btn.active { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, var(--eu-card)); color: var(--eu-text); box-shadow: inset 0 0 0 1px var(--brand); }
.pet-row { margin-bottom: 12px; padding: 6px 14px 14px; background: var(--eu-card-subtle); }
.privacy-confirm { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: var(--eu-radius-sm); background: var(--eu-card-subtle); color: var(--eu-dim); }
.privacy-confirm a { color: var(--accent-text); }
.status-icon, .confirm-icon { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 50%; }
.status-icon.ok, .confirm-icon { background: color-mix(in srgb, var(--brand) 13%, var(--eu-card)); color: var(--accent-text); }
.status-icon.off { background: color-mix(in srgb, var(--eu-danger) 12%, var(--eu-card)); color: var(--eu-danger); }
.status-icon svg, .confirm-icon svg { width: 28px; height: 28px; }
.summary-row { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--eu-line); font-size: .9375rem; }
.summary-row:last-of-type { border-bottom: 0; }
.summary-row .k { flex-shrink: 0; color: var(--eu-dim); }
.summary-row span:last-child { text-align: right; font-weight: 650; }
.account-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.account-topline .who { color: var(--eu-dim); }
.empty { padding: 22px; color: var(--eu-dim); text-align: center; font-size: .875rem; }
.eu-foot { margin-top: 30px; color: var(--eu-dim); text-align: center; font-size: .75rem; }
.eu-foot a { color: inherit; }
.legal-footer { width: 100%; margin: 0; padding: 22px 20px 26px; border-top: 1px solid var(--eu-line) !important; background: var(--eu-bg-raised) !important; color: var(--eu-dim) !important; font-size: .75rem; line-height: 1.5; text-align: center; }
@media (max-width: 640px) {
  .wrap { padding: 18px 14px 44px; }
  .book-utility { flex-direction: column; }
  .book-utility, .eu-utility-bar { align-items: flex-start; }
  .book-utility .back-link { width: 100%; order: 0; }
  .book-utility .eu-utility-actions { order: 1; }
  .eu-utility-actions { width: 100%; justify-content: flex-start; margin-left: 0; }
  .lang-switch { justify-content: flex-start; }
  .lang-switch button { min-height: 36px; padding: 6px 9px; }
  header.hero-band { padding: 24px 18px; }
  header.hero-band.has-tenant-logo { display: block; text-align: center; }
  header.hero-band.has-tenant-logo #tenantLogo { max-width: 220px !important; max-height: 104px !important; margin: 0 auto 18px !important; }
  .card { padding: 22px 18px; border-radius: 20px; }
  .actions button { min-width: 0; }
  .summary-row { gap: 12px; }
  .legal-footer { padding: 18px 14px 22px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
