:root {
  --cream: #f5f0e9;
  --cream-2: #ece3da;
  --paper: #fffdfb;
  --ink: #292321;
  --muted: #786d66;
  --accent: #a65a45;
  --accent-dark: #854532;
  --green: #426753;
  --line: #e4d9cf;
  --danger: #9c3b35;
  --shadow: 0 22px 65px rgba(67, 40, 27, .10);
  --radius: 22px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
  font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; line-height: 1.08; }
h1 { font-size: clamp(38px, 6vw, 66px); letter-spacing: -.035em; }
h2 { font-size: clamp(25px, 3vw, 34px); letter-spacing: -.02em; }
small { font-size: 12px; }

.site-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  color: white; background: var(--accent); font: italic 26px Georgia, serif;
}
.brand > span:last-child { display: grid; line-height: 1.1; }
.brand b { font: 700 21px/1 Georgia, serif; letter-spacing: .13em; }
.brand small { color: var(--muted); margin-top: 4px; letter-spacing: .02em; }
.brand-light { color: white; }
.brand-light small { color: rgba(255,255,255,.6); }
.header-actions { display: flex; gap: 10px; }

.button {
  border: 1px solid transparent; border-radius: 13px; min-height: 45px; padding: 11px 19px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; transition: .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .46; transform: none; }
.button-primary { color: white; background: var(--accent); box-shadow: 0 10px 28px rgba(166,90,69,.22); }
.button-primary:hover { background: var(--accent-dark); }
.button-secondary { background: var(--ink); color: white; }
.button-ghost { background: rgba(255,255,255,.58); border-color: var(--line); }
.button-danger { color: var(--danger); background: #fff5f3; border-color: #efcbc6; }
.button-wide { width: 100%; }
.button-small { min-height: 34px; padding: 6px 10px; font-size: 12px; background: #f4eee9; }
.text-link, .link-button { color: var(--accent); border: 0; padding: 0; background: transparent; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font: inherit; }
.back-button { border: 0; background: transparent; color: var(--muted); padding: 0; margin-bottom: 22px; cursor: pointer; }

.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .16em; font-size: 12px; font-weight: 800; }
.muted { color: var(--muted); }
.card, .panel { background: var(--paper); border: 1px solid rgba(228,217,207,.92); border-radius: var(--radius); box-shadow: var(--shadow); }
.narrow { width: min(660px, calc(100% - 32px)); margin: 50px auto; }
.center { text-align: center; padding: 50px 30px; }

.landing-page { background: #f5f0e9; }
.landing-header { width: min(1220px, calc(100% - 48px)); min-height: 94px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.landing-main { width: min(1220px, calc(100% - 48px)); margin: 18px auto 70px; }
.landing-hero { min-height: 650px; display: grid; grid-template-columns: .92fr 1.08fr; border-radius: 34px; overflow: hidden; box-shadow: var(--shadow); }
.landing-copy { position: relative; padding: clamp(38px, 6vw, 82px); color: white; background: var(--ink); display: flex; flex-direction: column; justify-content: center; }
.landing-copy::after { content: ""; width: 270px; height: 270px; position: absolute; right: -100px; bottom: -115px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: 0 0 0 44px rgba(255,255,255,.025), 0 0 0 88px rgba(255,255,255,.018); }
.landing-copy .eyebrow { color: #d88b73; }
.landing-copy h1 { position: relative; z-index: 1; max-width: 650px; margin: 18px 0 27px; font-size: clamp(48px, 6vw, 82px); }
.landing-copy > p:last-child { position: relative; z-index: 1; max-width: 520px; margin: 0; color: rgba(255,255,255,.66); font-size: clamp(16px, 1.7vw, 20px); }
.landing-actions { padding: clamp(28px, 5vw, 65px); background: var(--paper); display: grid; align-content: center; gap: 16px; }
.landing-choice { min-height: 210px; padding: 26px; border: 1px solid var(--line); border-radius: 24px; display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 20px; color: var(--ink); background: #faf7f3; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.landing-choice:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 18px 38px rgba(67,40,27,.10); }
.landing-choice-primary { color: white; border-color: var(--accent); background: var(--accent); }
.landing-choice-primary:hover { border-color: var(--accent-dark); background: var(--accent-dark); }
.choice-number { align-self: start; font: 500 14px Georgia, serif; opacity: .68; }
.landing-choice > span:nth-child(2) { display: grid; gap: 8px; }
.landing-choice b { font: 500 clamp(26px, 3vw, 39px) Georgia, serif; line-height: 1; }
.landing-choice small { color: var(--muted); font-size: 13px; }
.landing-choice-primary small { color: rgba(255,255,255,.7); }
.landing-choice i { width: 44px; height: 44px; border: 1px solid currentColor; border-radius: 50%; display: grid; place-items: center; font-style: normal; }
.landing-client-note { margin-top: 22px; padding: 21px 26px; border: 1px solid var(--line); border-radius: 18px; display: flex; gap: 18px; align-items: center; background: rgba(255,255,255,.45); }
.landing-client-note span { flex: none; color: var(--green); font-weight: 800; }
.landing-client-note p { margin: 0; color: var(--muted); }
.landing-how { margin-top: 90px; display: grid; grid-template-columns: .75fr 1.25fr; gap: clamp(35px, 8vw, 110px); align-items: start; }
.landing-how h2 { max-width: 440px; font-size: clamp(32px, 4vw, 50px); }
.landing-how ol { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.landing-how li { padding: 22px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 44px 1fr; gap: 18px; }
.landing-how li > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--accent); font-size: 12px; font-weight: 800; }
.landing-how li b { font: 500 22px Georgia, serif; }
.landing-how li p { margin: 4px 0 0; color: var(--muted); }
.landing-footer { width: min(1220px, calc(100% - 48px)); margin: 0 auto; padding: 24px 0 34px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }

.booking-main {
  width: min(1180px, calc(100% - 40px));
  margin: 30px auto 70px;
  display: grid;
  grid-template-columns: minmax(280px, .78fr) minmax(460px, 1.22fr);
  gap: clamp(35px, 7vw, 100px);
  align-items: start;
}
.booking-hero { padding: 72px 0 20px; position: sticky; top: 20px; }
.booking-hero::before {
  content: ""; position: absolute; width: 310px; height: 310px; border-radius: 50%; z-index: -1;
  left: -110px; top: 20px; background: radial-gradient(circle, rgba(166,90,69,.15), rgba(166,90,69,0) 69%);
}
.booking-hero h1 { margin-bottom: 20px; }
.booking-hero > p:not(.eyebrow) { color: var(--muted); max-width: 470px; font-size: 18px; }
.master-chip { display: inline-flex; gap: 12px; align-items: center; margin-top: 24px; padding: 10px 14px 10px 10px; border: 1px solid var(--line); border-radius: 50px; background: rgba(255,255,255,.45); }
.master-chip > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green); font: 20px Georgia, serif; }
.master-chip div { display: grid; line-height: 1.2; }
.master-chip small { color: var(--muted); }
.booking-card { padding: clamp(24px, 5vw, 48px); min-height: 590px; }
.step-indicator { display: flex; align-items: center; margin-bottom: 42px; }
.step-indicator span { width: 31px; height: 31px; border-radius: 50%; display: grid; place-items: center; background: #ece5df; color: #95887f; font-size: 13px; font-weight: 800; transition: .2s; }
.step-indicator span.active { background: var(--accent); color: white; }
.step-indicator i { height: 1px; flex: 1; background: var(--line); }
.booking-step { display: none; animation: rise .24s ease both; }
.booking-step.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.step-label { color: var(--muted); font-size: 13px; font-weight: 700; margin-bottom: 7px; }
.booking-step h2 { margin-bottom: 11px; }
.audience-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px; }
.audience-card {
  min-height: 210px; border: 1px solid var(--line); border-radius: 18px; background: #faf6f1;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; text-align: left;
  padding: 22px; cursor: pointer; transition: .2s ease;
}
.audience-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 14px 30px rgba(70,40,25,.08); }
.audience-card b { font: 500 21px Georgia, serif; }
.audience-card small { color: var(--muted); margin-top: 6px; }
.audience-icon { width: 54px; height: 54px; margin-bottom: auto; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: white; font: italic 25px Georgia, serif; }
.audience-card:last-child .audience-icon { background: var(--accent); }
.service-list { display: grid; gap: 10px; margin: 22px 0; max-height: 270px; overflow: auto; padding-right: 3px; }
.service-card { width: 100%; border: 1px solid var(--line); border-radius: 15px; background: #fff; padding: 15px; display: flex; justify-content: space-between; gap: 18px; text-align: left; cursor: pointer; }
.service-card:hover, .service-card.selected { border-color: var(--accent); background: #fff9f5; }
.service-card > span { display: grid; }
.service-card small { color: var(--muted); margin-top: 4px; }
.service-meta { min-width: 90px; text-align: right; align-content: start; }
.field { display: grid; gap: 7px; margin-bottom: 17px; }
.field > label, .slots-wrap > label { font-size: 13px; font-weight: 750; }
.field label small { color: var(--muted); font-weight: 400; }
input, textarea, select {
  width: 100%; color: var(--ink); background: #fff; border: 1px solid #d8cec6; border-radius: 12px;
  padding: 12px 13px; outline: 0; transition: .15s; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(166,90,69,.12); }
textarea { resize: vertical; }
.slots-wrap { display: grid; gap: 8px; margin-bottom: 20px; }
.slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.slot { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 4px; cursor: pointer; font-weight: 700; }
.slot:hover, .slot.selected { color: white; border-color: var(--accent); background: var(--accent); }
.slots-message { grid-column: 1/-1; color: var(--muted); background: #f8f3ee; padding: 12px; border-radius: 10px; text-align: center; }
.booking-summary { background: #f8f3ee; border-radius: 14px; padding: 14px 16px; margin: 18px 0; font-size: 14px; }
.booking-summary b { display: block; }
.notification-consent { display: flex; align-items: flex-start; gap: 11px; padding: 14px; margin: 2px 0 18px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.notification-consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.notification-consent span { display: grid; }
.notification-consent small { color: var(--muted); margin-top: 3px; line-height: 1.45; }
.form-error { color: var(--danger); background: #fff1ef; border-radius: 10px; padding: 10px 12px; }
.privacy-note { text-align: center; color: var(--muted); font-size: 11px; margin: 10px 0 0; }
.site-footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto 30px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }

.confirmation-page { margin-top: 40px; }
.confirmation-card { padding: clamp(28px, 6vw, 50px); text-align: center; }
.success-mark { width: 64px; height: 64px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: white; font-size: 30px; }
.booking-ticket { border: 1px solid var(--line); border-radius: 16px; margin: 26px 0; text-align: left; overflow: hidden; }
.booking-ticket div { display: flex; justify-content: space-between; gap: 18px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.booking-ticket div:last-child { border-bottom: 0; }
.booking-ticket small { color: var(--muted); }
.confirmation-card .text-link { display: inline-block; margin-top: 22px; }
.flash { border-radius: 13px; padding: 13px 15px; margin-bottom: 18px; }
.flash-success { color: #285f3d; background: #e8f4ec; }
.flash-error { color: var(--danger); background: #fae8e5; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: .85fr 1.15fr; }
.login-aside { padding: 48px clamp(30px, 6vw, 90px); background: var(--ink); color: white; display: flex; flex-direction: column; justify-content: space-between; }
.login-aside h1 { max-width: 560px; }
.login-aside > div > p:last-child { color: rgba(255,255,255,.66); max-width: 520px; font-size: 18px; }
.login-panel { display: grid; place-items: center; padding: 35px; }
.login-card { width: min(440px, 100%); padding: 35px; }
.auth-switch { margin: 18px 0 0; color: var(--muted); text-align: center; font-size: 14px; }
.auth-switch a, .auth-title > a { color: var(--accent); text-underline-offset: 3px; }
.register-panel { align-items: start; padding-top: 48px; padding-bottom: 48px; }
.register-card { width: min(680px, 100%); }
.auth-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.auth-title h2, .auth-title p { margin-bottom: 0; }
.auth-title > a { margin-top: 8px; white-space: nowrap; font-size: 13px; }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.auth-grid-wide { grid-column: 1 / -1; }
.field-hint { color: var(--muted); margin-top: -2px; }
.slug-field { display: flex; align-items: center; border: 1px solid #d8cec6; border-radius: 12px; background: #fff; overflow: hidden; transition: .15s; }
.slug-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(166,90,69,.12); }
.slug-field span { padding-left: 12px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.slug-field input { border: 0; box-shadow: none !important; padding-left: 3px; }
.terms-line { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 13px; margin: 2px 0 18px; cursor: pointer; }
.terms-line input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--accent); }
.honeypot { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; }
.mobile-auth-switch { display: none; }

.dashboard-body { background: #f2eee9; }
.dashboard-shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 30px 24px; background: var(--ink); color: white; display: flex; flex-direction: column; z-index: 20; }
.side-nav { display: grid; gap: 6px; margin-top: 55px; }
.side-nav a { padding: 11px 13px; border-radius: 10px; color: rgba(255,255,255,.66); text-decoration: none; }
.side-nav a:hover, .side-nav a.active { color: white; background: rgba(255,255,255,.09); }
.sidebar-footer { margin-top: auto; display: grid; gap: 12px; font-size: 13px; color: rgba(255,255,255,.65); }
.sidebar-footer .link-button { color: rgba(255,255,255,.65); }
.dashboard-main { min-width: 0; padding: 45px clamp(24px, 4vw, 60px) 70px; }
.mobile-dashboard-header { display: none; }
.dashboard-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.dashboard-heading h1 { font-size: clamp(36px, 4vw, 50px); margin-bottom: 8px; }
.dashboard-heading p { margin-bottom: 0; }
.share-booking-card { margin-bottom: 20px; padding: 21px 23px; border-radius: 18px; display: flex; align-items: center; justify-content: space-between; gap: 25px; color: white; background: var(--green); box-shadow: 0 14px 34px rgba(49,85,65,.15); }
.share-booking-card > div:first-child { min-width: 0; display: grid; }
.share-booking-card small { color: rgba(255,255,255,.7); margin-bottom: 4px; }
.share-booking-card b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-booking-card p { margin: 5px 0 0; color: rgba(255,255,255,.72); font-size: 13px; }
.share-actions { flex: none; display: flex; gap: 8px; }
.share-booking-card .button-secondary { color: var(--ink); background: white; }
.share-booking-card .button-ghost { color: white; background: transparent; border-color: rgba(255,255,255,.35); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { padding: 22px; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); }
.stat-card small { display: block; color: var(--muted); margin-bottom: 14px; }
.stat-card > b { font: 500 36px Georgia, serif; }
.stat-card .small-stat { font-size: 25px; }
.panel { padding: 22px; box-shadow: 0 10px 40px rgba(67,40,27,.05); }
.panel-heading { display: flex; justify-content: space-between; margin-bottom: 18px; }
.panel-heading h2 { margin-bottom: 4px; }
.panel-heading p { color: var(--muted); margin: 0; font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th { text-align: left; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 11px 10px; border-bottom: 1px solid var(--line); }
td { padding: 14px 10px; border-bottom: 1px solid #eee6df; vertical-align: middle; }
td > small { display: block; color: var(--muted); }
tbody tr:last-child td { border-bottom: 0; }
.empty-cell { padding: 35px; text-align: center; color: var(--muted); }
.status { display: inline-block; border-radius: 20px; padding: 5px 8px; font-size: 11px; white-space: nowrap; background: #eee8e2; }
.status-confirmed { background: #e7f2eb; color: #315e42; }
.status-completed { background: #e7edf5; color: #3c5876; }
.status-cancelled, .status-no_show { background: #f7e7e5; color: #913d36; }
.inline-form { display: flex; gap: 7px; }
.inline-form select { min-width: 135px; padding: 7px; font-size: 12px; }

.calendar-layout { display: grid; grid-template-columns: minmax(570px, 1fr) 340px; gap: 20px; align-items: start; }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.calendar-toolbar h2 { margin: 0; font-size: 28px; }
.month-arrow { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { color: var(--muted); font-size: 11px; text-align: center; text-transform: uppercase; letter-spacing: .07em; }
.calendar-weekdays span { padding: 7px; }
.month-grid { border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.calendar-day { min-height: 104px; position: relative; padding: 10px 8px; color: inherit; text-decoration: none; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: white; transition: .15s; }
.calendar-day:hover { background: #fbf5ef; }
.calendar-day.selected { z-index: 1; outline: 2px solid var(--accent); background: #fff8f3; }
.calendar-day.outside { opacity: .35; }
.calendar-day.custom i { width: 7px; height: 7px; position: absolute; right: 7px; top: 7px; border-radius: 50%; background: var(--accent); }
.day-number { display: block; font-weight: 800; font-size: 13px; margin-bottom: 15px; }
.calendar-day small { color: var(--green); font-size: 10px; line-height: 1.5; }
.calendar-day .day-off { color: #9e9189; }
.day-editor { position: sticky; top: 20px; }
.day-editor h2 { margin-bottom: 24px; }
.switch-row { display: flex; justify-content: space-between; gap: 15px; align-items: center; padding: 13px 0 17px; border-bottom: 1px solid var(--line); }
.switch-row > span { display: grid; }
.switch-row small { color: var(--muted); margin-top: 2px; }
.switch-row input, .mini-switch input { width: 19px; height: 19px; accent-color: var(--accent); }
.windows-editor { margin: 20px 0; }
.windows-heading { display: flex; justify-content: space-between; margin-bottom: 10px; }
.window-list { display: grid; gap: 8px; }
.window-row { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 6px; align-items: center; }
.window-row input { padding: 9px 7px; }
.remove-window { width: 30px; height: 30px; border: 0; background: #f3e9e5; color: var(--danger); border-radius: 8px; cursor: pointer; font-size: 20px; }
.reset-day-form { margin-top: 16px; text-align: center; }

.services-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.service-edit-card { box-shadow: none; }
.service-edit-head { display: flex; justify-content: space-between; margin-bottom: 16px; }
.audience-badge { color: var(--accent); background: #f7eae5; padding: 5px 9px; border-radius: 20px; font-size: 11px; font-weight: 800; }
.mini-switch, .checkbox-line { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.mini-switch input, .checkbox-line input { width: 17px; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.new-service { border-style: dashed; background: #fbf7f2; }
.settings-grid { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(430px, 1.2fr); gap: 18px; }
.settings-grid h2 { margin-bottom: 23px; }
.week-row { display: grid; grid-template-columns: 145px 1fr; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid #eee7e0; }
.week-row > label, .week-row > div { display: flex; align-items: center; gap: 7px; }
.week-row > label input { width: 17px; accent-color: var(--accent); }
.week-row input[type="time"] { padding: 8px; }
.settings-actions { grid-column: 1/-1; display: flex; justify-content: flex-end; }
.cron-help { margin-top: 18px; }
.cron-help code { display: block; overflow-x: auto; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #f7f1eb; color: var(--accent-dark); white-space: nowrap; }

.toast { position: fixed; left: 50%; bottom: 22px; z-index: 100; max-width: min(430px, calc(100% - 30px)); padding: 12px 18px; color: white; background: var(--ink); border-radius: 12px; box-shadow: var(--shadow); transform: translate(-50%, 30px); opacity: 0; pointer-events: none; transition: .2s; }
.toast.visible { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 1050px) {
  .calendar-layout { grid-template-columns: 1fr; }
  .day-editor { position: static; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 850px) {
  .landing-hero { grid-template-columns: 1fr; }
  .landing-copy { min-height: 430px; }
  .landing-actions { grid-template-columns: 1fr 1fr; }
  .landing-choice { min-height: 230px; grid-template-columns: 1fr auto; }
  .landing-choice .choice-number { grid-column: 1 / -1; }
  .landing-how { grid-template-columns: 1fr; }
  .booking-main { grid-template-columns: 1fr; margin-top: 0; }
  .booking-hero { position: static; padding: 32px 0 0; }
  .booking-hero h1 { font-size: 47px; }
  .dashboard-shell { display: block; }
  .sidebar { position: fixed; left: 0; transform: translateX(-101%); width: 260px; transition: .2s; }
  .sidebar.open { transform: translateX(0); }
  .dashboard-main { padding-top: 20px; }
  .mobile-dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
  .menu-toggle { border: 1px solid var(--line); background: white; border-radius: 9px; padding: 8px 11px; }
  .services-admin-grid { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: 1fr; }
  .login-aside { min-height: 330px; gap: 60px; }
}
@media (max-width: 650px) {
  .landing-header, .landing-main, .landing-footer { width: calc(100% - 24px); }
  .landing-header { min-height: 78px; }
  .landing-hero { min-height: 0; border-radius: 21px; }
  .landing-copy { min-height: 390px; padding: 36px 24px; }
  .landing-copy h1 { font-size: clamp(44px, 14vw, 62px); }
  .landing-actions { grid-template-columns: 1fr; padding: 16px; }
  .landing-choice { min-height: 165px; padding: 21px; }
  .landing-choice b { font-size: 29px; }
  .landing-client-note { align-items: flex-start; flex-direction: column; gap: 5px; padding: 18px; }
  .landing-how { margin-top: 58px; }
  .landing-footer { align-items: flex-start; flex-direction: column; gap: 8px; }
  .site-header { width: calc(100% - 28px); height: 76px; }
  .brand small { display: none; }
  .header-actions .button { min-height: 39px; padding: 8px 11px; font-size: 12px; }
  .booking-main { width: calc(100% - 24px); gap: 23px; margin-bottom: 35px; }
  .booking-hero > p:not(.eyebrow) { font-size: 16px; }
  .booking-card { padding: 23px 17px; min-height: 0; border-radius: 18px; }
  .step-indicator { margin-bottom: 29px; }
  .audience-grid { grid-template-columns: 1fr; }
  .audience-card { min-height: 155px; }
  .audience-icon { width: 43px; height: 43px; }
  .service-card { padding: 13px 11px; }
  .slots { grid-template-columns: repeat(4, 1fr); }
  .site-footer { width: calc(100% - 28px); }
  .dashboard-main { padding: 18px 12px 50px; }
  .dashboard-heading { align-items: flex-start; flex-direction: column; }
  .dashboard-heading .button { width: 100%; }
  .stats-grid { grid-template-columns: 1fr; }
  .share-booking-card { align-items: stretch; flex-direction: column; }
  .share-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .panel { padding: 16px; border-radius: 16px; }
  .calendar-panel { padding: 11px; overflow-x: auto; }
  .calendar-toolbar { min-width: 540px; }
  .calendar-weekdays, .month-grid { min-width: 540px; }
  .calendar-day { min-height: 87px; }
  .two-fields { grid-template-columns: 1fr; }
  .week-row { grid-template-columns: 1fr; }
  .settings-actions .button { width: 100%; }
  .login-panel { padding: 20px 14px 40px; }
  .login-aside { padding: 28px 20px; }
  .register-panel { padding-top: 20px; }
  .register-card { padding: 24px 18px; }
  .auth-grid { grid-template-columns: 1fr; }
  .auth-grid-wide { grid-column: auto; }
  .auth-title > a { display: none; }
  .mobile-auth-switch { display: block; }
}

/* ===== Mobile polish (v5) ===== */
html { -webkit-text-size-adjust: 100%; }
body { padding-bottom: env(safe-area-inset-bottom); overflow-x: hidden; }
.day-win, .day-count > b { display: block; }
.day-count > span { display: inline; }
@media (max-width: 850px) {
  .button, .button-small, .month-arrow, .menu-toggle, .remove-window { min-height: 44px; }
  .button-small { min-width: 44px; }
  .remove-window { width: 44px; height: 44px; }
  .menu-toggle { font-weight: 700; }
  .sidebar.open { visibility: visible; }
  .side-nav a { padding: 14px 13px; font-size: 16px; }
  .sidebar.open { box-shadow: 8px 0 40px rgba(0,0,0,.25); }
  .sidebar { visibility: hidden; transition: transform .2s, visibility .2s; padding-top: calc(30px + env(safe-area-inset-top)); }
  .mobile-dashboard-header { position: sticky; top: 0; z-index: 15; margin: -20px -12px 18px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; background: rgba(242,238,233,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
}
@media (max-width: 650px) {
  /* inputs: 16px+ prevents iOS zoom on focus */
  input, textarea, select { font-size: 16px; min-height: 46px; }
  input[type="checkbox"], input[type="radio"] { min-height: 0; }
  .inline-form select { font-size: 14px; min-height: 40px; }

  /* booking page: card first, compact hero */
  .site-header { height: 64px; }
  .booking-main { margin-top: 0; gap: 16px; }
  .booking-hero { padding: 4px 4px 0; }
  .booking-hero h1 { font-size: 33px; margin-bottom: 10px; }
  .booking-hero > p:not(.eyebrow) { display: none; }
  .booking-hero .master-chip { margin-top: 8px; }
  .booking-card { padding: 20px 16px 24px; }
  .step-indicator { margin-bottom: 22px; }
  .booking-step h2 { font-size: 26px; }
  .audience-grid { gap: 10px; margin-top: 18px; }
  .audience-card { min-height: 112px; flex-direction: row; align-items: center; gap: 14px; padding: 16px; }
  .audience-card .audience-icon { margin: 0; flex: none; }
  .audience-card > b, .audience-card > small { display: block; }
  .audience-card { flex-wrap: wrap; }
  .audience-card b { flex: 1 1 calc(100% - 70px); }
  .audience-card small { flex: 1 1 100%; margin: -8px 0 0 68px; }
  .service-list { max-height: none; overflow: visible; }
  .service-card { padding: 14px; min-height: 64px; align-items: center; }
  .slots { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .slot { min-height: 46px; padding: 10px 2px; font-size: 15px; }
  .booking-step .button-wide:not(:disabled) { position: sticky; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 5; box-shadow: 0 10px 28px rgba(166,90,69,.32); }
  .back-button { padding: 8px 0; margin-bottom: 12px; font-size: 15px; }
  .booking-ticket div { flex-direction: column; gap: 2px; }

  /* auth */
  .login-aside { min-height: 0; gap: 26px; padding: calc(22px + env(safe-area-inset-top)) 20px 26px; }
  .login-aside h1 { font-size: 34px; }
  .login-aside > div > p:last-child { font-size: 15px; }
  .register-page .login-aside > div > p:last-child { display: none; }

  /* landing */
  .landing-choice { min-height: 130px; }

  /* dashboard */
  .dashboard-heading h1 { font-size: 32px; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat-card { padding: 14px 12px; border-radius: 14px; }
  .stat-card small { font-size: 11px; margin-bottom: 8px; line-height: 1.25; }
  .stat-card > b { font-size: 28px; }
  .share-booking-card { padding: 18px; }
  .share-booking-card b { white-space: normal; word-break: break-all; font-size: 15px; }

  /* tables -> cards */
  .responsive-table { min-width: 0; }
  .responsive-table thead { display: none; }
  .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; }
  .responsive-table tr { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
  .responsive-table td { border: 0; padding: 5px 0; display: flex; justify-content: space-between; gap: 14px; align-items: baseline; text-align: right; }
  .responsive-table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12px; text-align: left; flex: none; }
  .responsive-table .cell-when { display: block; text-align: left; font-size: 17px; padding-bottom: 8px; border-bottom: 1px solid #eee6df; margin-bottom: 4px; }
  .responsive-table .cell-when small { display: inline; margin-left: 6px; }
  .responsive-table .cell-client { display: block; text-align: left; }
  .responsive-table .cell-client::before { display: none; }
  .responsive-table .cell-client small a { color: var(--accent); font-weight: 700; text-decoration: none; }
  .responsive-table .cell-action { display: block; padding-top: 8px; }
  .responsive-table .cell-action .inline-form { width: 100%; }
  .responsive-table .cell-action select { flex: 1; min-width: 0; }
  .responsive-table .empty-cell { display: block; text-align: center; padding: 28px 8px; }
  .responsive-table tr:has(.empty-cell) { border: 0; background: none; }

  /* calendar: 7 columns fit the screen */
  .calendar-panel { padding: 10px 6px 14px; overflow: visible; }
  .calendar-toolbar { min-width: 0; padding: 0 4px; }
  .calendar-toolbar h2 { font-size: 22px; }
  .calendar-weekdays, .month-grid { min-width: 0; }
  .calendar-weekdays span { padding: 6px 0; font-size: 10px; }
  .calendar-day { min-height: 58px; padding: 6px 2px; text-align: center; }
  .calendar-day .day-number { margin-bottom: 4px; font-size: 14px; }
  .calendar-day .day-win { display: none; }
  .calendar-day .day-off { font-size: 0; line-height: 0; }
  .calendar-day .day-off span { display: none; }
  .calendar-day .day-off::after { content: "—"; font-size: 12px; line-height: 1; color: #b3a79f; }
  .calendar-day .day-count > span { display: none; }
  .calendar-day .day-count > b { display: inline-block; min-width: 20px; padding: 1px 5px; border-radius: 10px; color: #fff; background: var(--green); font-size: 11px; line-height: 16px; }
  .calendar-day.custom i { right: 4px; top: 4px; width: 6px; height: 6px; }
  .window-row { grid-template-columns: 1fr auto 1fr auto; }
  .day-editor { padding: 16px; }

  /* services & settings */
  .service-edit-card { padding: 16px; }
  .week-row { grid-template-columns: 1fr; gap: 8px; padding: 12px 0; }
  .week-row > label { font-weight: 700; min-height: 30px; }
  .week-row > div { display: grid; grid-template-columns: 1fr auto 1fr; }
  .settings-grid { gap: 14px; }
  #whatsapp .two-fields { gap: 0; }
  .cron-help code { white-space: normal; word-break: break-all; font-size: 13px; }
  .toast { bottom: calc(22px + env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) {
  .slots { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { gap: 6px; }
  .stat-card > b { font-size: 24px; }
}

/* ===== Admin ===== */
.admin-stats { grid-template-columns: repeat(3, 1fr); }
.cell-services details { min-width: 240px; }
.cell-services summary { cursor: pointer; color: var(--accent); font-weight: 700; padding: 6px 0; }
.admin-services { list-style: none; margin: 6px 0 4px; padding: 0; display: grid; gap: 6px; }
.admin-services li { display: flex; justify-content: space-between; gap: 14px; font-size: 14px; padding: 8px 10px; background: #f8f3ee; border-radius: 10px; }
.admin-services li b { white-space: nowrap; }
@media (max-width: 650px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-stats .stat-card > b { font-size: 30px; }
  .responsive-table .cell-services { display: block; text-align: left; padding-top: 8px; }
  .cell-services details { min-width: 0; }
}

/* ===== WhatsApp wizard & guide ===== */
.wa-status { display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin-bottom: 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--paper); }
.wa-status > div { flex: 1; min-width: 0; }
.wa-status p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.wa-dot { width: 14px; height: 14px; flex: none; border-radius: 50%; background: #b9aea6; }
.wa-status[data-level="ok"] { background: #e8f4ec; border-color: #c5e0cf; }
.wa-status[data-level="ok"] .wa-dot { background: var(--green); }
.wa-status[data-level="warn"] { background: #fff6e5; border-color: #f0dba9; }
.wa-status[data-level="warn"] .wa-dot { background: #d9a22b; }
.wa-status[data-level="error"] { background: #fae8e5; border-color: #efcbc6; }
.wa-status[data-level="error"] .wa-dot { background: var(--danger); }
.wa-steps, .guide-steps { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 14px; }
.wa-steps > li, .guide-steps > li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.wa-steps h2, .guide-steps h2 { font-size: 24px; margin-bottom: 8px; }
.wa-steps p, .guide-steps p { margin-bottom: 12px; }
.wa-num { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--accent); font-weight: 800; font-size: 14px; }
.wa-advanced { margin: 6px 0 4px; }
.wa-advanced summary, .guide-box summary { cursor: pointer; color: var(--accent); font-weight: 700; padding: 8px 0; }
.wa-qr { margin-top: 16px; text-align: center; }
.wa-qr img { width: min(280px, 100%); height: auto; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 16px; image-rendering: pixelated; }
.guide { width: min(820px, calc(100% - 32px)); margin: 10px auto 50px; }
.guide h1 { margin-bottom: 14px; }
.guide-lead { font-size: 18px; color: var(--muted); margin-bottom: 20px; }
.guide-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.guide-box { padding: 24px; margin-bottom: 18px; }
.guide-box h2 { font-size: 26px; margin-bottom: 12px; }
.guide-box ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.guide-box details { border-top: 1px solid var(--line); }
.guide-box details p { margin: 0 0 12px; color: var(--muted); }
.guide-steps > li.card { padding: 22px; }
@media (max-width: 650px) {
  .wa-status { align-items: flex-start; flex-wrap: wrap; padding: 16px; }
  .wa-status .button { width: 100%; }
  .wa-steps > li { grid-template-columns: 1fr; gap: 8px; }
  .wa-steps h2, .guide-steps h2 { font-size: 22px; }
  .guide-steps > li { grid-template-columns: 1fr; gap: 10px; }
  .guide-cta .button { width: 100%; }
  .guide-box { padding: 18px; }
  .landing-footer { gap: 8px; }
}
