:root {
  color-scheme: light;
  --ink: #182333;
  --muted: #778397;
  --line: #e8ebf0;
  --paper: #fff;
  --canvas: #f7f8fb;
  --navy: #243b65;
  --navy-soft: #eef2f9;
  --teal: #2a8b82;
  --teal-soft: #e7f5f2;
  --amber: #ba7b23;
  --amber-soft: #fff4df;
  --shadow: 0 12px 36px rgba(35, 54, 86, .07);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: flex; }
.app-shell[hidden], .mobile-nav[hidden] { display: none; }
.button, .nav-item, .icon-button, .text-button, .mobile-nav-item { touch-action: manipulation; }
.sidebar { width: 248px; flex: 0 0 248px; background: #fff; border-right: 1px solid var(--line); padding: 25px 15px 17px; display: flex; flex-direction: column; min-height: 100vh; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 11px 28px; color: inherit; text-decoration: none; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: var(--navy); font: 800 21px Manrope, sans-serif; box-shadow: 0 5px 13px rgba(36,59,101,.18); }
.brand-copy, .profile-copy { display: flex; flex-direction: column; gap: 2px; }
.brand-copy strong { font: 800 16px Manrope, sans-serif; letter-spacing: -.4px; }
.brand-copy small { color: var(--muted); font-size: 10px; }
.workspace-label { color: #a0a8b6; font-size: 9px; font-weight: 700; letter-spacing: 1px; padding: 0 12px 11px; }
.main-nav { display: grid; gap: 4px; }
.nav-item { border: 0; border-radius: 9px; padding: 11px 12px; text-align: left; background: transparent; color: #647188; font-weight: 500; display: flex; align-items: center; gap: 12px; transition: .15s ease; }
.nav-item:hover { background: #f7f8fa; color: var(--ink); }
.nav-item.is-active { background: var(--navy-soft); color: var(--navy); font-weight: 700; }
.nav-icon { width: 17px; text-align: center; font-size: 17px; color: currentColor; }
.sidebar-spacer { flex: 1; min-height: 42px; }
.storage-status { margin: 0 4px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid #cfe9d8; border-radius: 10px; background: #f3fbf5; padding: 11px 10px; }
.storage-status-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #38a36b; margin-top: 4px; box-shadow: 0 0 0 3px #dff2e5; }
.storage-status div, .storage-status small { display: block; }
.storage-status strong { font-size: 11px; color: #246a43; }
.storage-status small { margin-top: 3px; color: #5d876b; font-size: 10px; }
.main-area { min-width: 0; flex: 1; }
.topbar { height: 69px; background: rgba(255,255,255,.82); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 36px; }
.breadcrumbs { display: flex; align-items: center; gap: 10px; color: #929baa; font-size: 12px; }
.breadcrumbs strong { color: #39465b; font-weight: 600; }
.crumb-sep { color: #c3c9d2; }
.account-actions { display: flex; align-items: center; gap: 12px; color: #69788d; font-size: 11px; }
.account-actions .button { min-height: 36px; }
.icon-button { width: 34px; height: 34px; border: 1px solid transparent; border-radius: 9px; display: grid; place-items: center; background: transparent; color: #69788d; position: relative; }
.icon-button:hover { background: #f5f7fa; border-color: var(--line); }
.menu-toggle { display: none; }
.mobile-nav { display: none; }
.content-wrap { max-width: 1390px; margin: 0 auto; padding: 34px 38px 24px; }
.page-footer { padding-top: 33px; text-align: center; color: #a1a9b5; font-size: 10px; }
.page-footer span { padding: 0 5px; color: #c3c8d0; }
.eyebrow { color: #8d98a9; text-transform: uppercase; letter-spacing: 1.1px; font-size: 9px; font-weight: 700; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-heading h1 { font: 800 27px Manrope, sans-serif; letter-spacing: -.8px; margin: 7px 0 5px; }
.page-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.heading-actions { display: flex; gap: 9px; align-items: center; }
.button { border: 1px solid var(--line); background: #fff; color: #40506a; border-radius: 8px; padding: 10px 13px; font-size: 11px; font-weight: 600; transition: .15s ease; }
.button:hover { border-color: #cbd4e2; background: #fbfcfe; }
.button-primary { color: white; background: var(--navy); border-color: var(--navy); box-shadow: 0 4px 10px rgba(36,59,101,.13); }
.button-primary:hover { background: #1d3258; border-color: #1d3258; }
.button-icon { margin-right: 7px; font-size: 14px; vertical-align: -1px; }
.date-chip { border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; color: #52627b; font-size: 11px; background: #fff; white-space: nowrap; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 17px; }
.summary-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px 17px 15px; background: var(--paper); box-shadow: 0 2px 7px rgba(38,54,76,.015); }
.summary-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.summary-label { color: #7f899a; font-size: 10px; }
.summary-icon { width: 27px; height: 27px; border-radius: 8px; display: grid; place-items: center; font-size: 15px; }
.tint-blue { color: #5a73a3; background: #edf1f8; }
.tint-teal { color: #39877c; background: #e8f5f1; }
.tint-amber { color: #b47b31; background: #fff4e1; }
.tint-violet { color: #8070ac; background: #f1eff8; }
.summary-value { margin-top: 8px; font: 800 24px Manrope, sans-serif; letter-spacing: -.6px; }
.summary-foot { margin-top: 5px; display: flex; gap: 5px; align-items: center; font-size: 9px; color: #97a0ae; }
.booking-requests-panel { margin-top: 18px; }
.booking-request-list { display: grid; gap: 1px; background: var(--line); }
.booking-request-card { display: grid; gap: 13px; padding: 18px 20px; background: #fff; }
.booking-request-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.booking-request-top > div { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.booking-request-top > strong { font: 700 15px Manrope, sans-serif; }
.booking-request-top small { color: var(--muted); font-size: 11px; }
.booking-request-details { display: flex; flex-wrap: wrap; gap: 10px 22px; color: #53627a; font-size: 13px; }
.booking-request-details a { color: var(--navy); font-weight: 700; }
.booking-request-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 600px) { .booking-request-card { padding: 15px; } .booking-request-top { flex-direction: column-reverse; } }
.positive { color: #459277; font-weight: 700; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(290px,.85fr); gap: 16px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 2px 7px rgba(38,54,76,.015); overflow: hidden; }
.panel-header { padding: 17px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #eff1f4; }
.panel-title { font: 700 13px Manrope, sans-serif; }
.panel-subtitle { margin-top: 4px; color: #98a1af; font-size: 10px; }
.text-button { border: 0; background: transparent; color: #4d6792; font-size: 10px; font-weight: 700; padding: 5px; }
.text-button:hover { color: #243b65; }
.appointments { padding: 2px 18px 5px; }
.appointment-row { display: grid; grid-template-columns: 58px 3px minmax(0,1fr) auto; gap: 12px; align-items: stretch; padding: 13px 0; border-bottom: 1px solid #f0f2f5; }
.appointment-row:last-child { border-bottom: 0; }
.appointment-time { font: 700 11px Manrope, sans-serif; color: #44536a; padding-top: 3px; }
.appointment-time small { display: block; margin-top: 4px; color: #a1a9b5; font: 400 9px 'DM Sans',sans-serif; }
.appointment-bar { width: 3px; border-radius: 5px; background: #8095ba; }
.appointment-bar.teal { background: #6ab0a2; }
.appointment-bar.amber { background: #dcad61; }
.appointment-main { min-width: 0; }
.appointment-client { font-size: 11px; font-weight: 700; color: #35445b; }
.appointment-service { color: #8590a0; font-size: 9px; margin-top: 4px; }
.appointment-meta { display: flex; gap: 9px; align-items: center; color: #8c97a7; font-size: 9px; margin-top: 7px; }
.master-avatar { width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; background: #edf1f7; color: #677a9f; font-size: 7px; font-weight: 700; margin-right: 4px; vertical-align: middle; }
.status { align-self: start; padding: 4px 7px; border-radius: 20px; font-size: 8px; font-weight: 700; white-space: nowrap; }
.status-confirmed { color: #438875; background: #eaf6f1; }
.status-waiting { color: #ae7a2f; background: #fff4e2; }
.status-done { color: #78859a; background: #f0f2f5; }
.right-stack { display: grid; gap: 15px; }
.occupancy { padding: 15px 18px 17px; }
.occupancy-top { display: flex; align-items: center; justify-content: space-between; color: #8993a3; font-size: 10px; }
.occupancy-top strong { color: #45566f; font-size: 11px; }
.progress { height: 7px; background: #edf0f5; border-radius: 10px; margin: 11px 0 8px; overflow: hidden; }
.progress span { display: block; width: 68%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#5975a5,#6c8ab4); }
.occupancy-foot { color: #a0a8b5; font-size: 9px; }
.team-list { padding: 4px 17px 9px; }
.team-row { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px solid #f1f2f5; }
.team-row:last-child { border-bottom: 0; }
.team-row .avatar { width: 29px; height: 29px; flex-basis: 29px; font-size: 8px; }
.team-person { min-width: 0; flex: 1; }
.team-person strong { display: block; font-size: 10px; }
.team-person small { display: block; margin-top: 3px; color: #969fad; font-size: 9px; }
.team-count { color: #657590; font: 700 10px Manrope,sans-serif; }
.team-count small { display: block; font: 400 8px 'DM Sans',sans-serif; color: #a0a8b5; text-align: right; margin-top: 2px; }
.clients-toolbar { display: flex; gap: 10px; margin: 0 0 15px; }
.search-box { flex: 1; min-width: 130px; position: relative; }
.search-box span { position: absolute; top: 9px; left: 12px; color: #a0a8b5; }
.search-box input { width: 100%; border: 1px solid var(--line); border-radius: 8px; height: 36px; padding: 0 12px 0 34px; outline: 0; color: var(--ink); background: #fff; font-size: 11px; }
.search-box input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: #91a5c7; box-shadow: 0 0 0 3px rgba(73,101,151,.09); }
.filter-button { min-width: 88px; }
.table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.data-table th { padding: 11px 16px; text-align: left; color: #9ba4b1; background: #fbfcfd; text-transform: uppercase; letter-spacing: .6px; font-size: 8px; font-weight: 700; }
.data-table td { padding: 12px 16px; border-top: 1px solid #f0f2f4; color: #59677d; font-size: 10px; }
.client-cell { display: flex; align-items: center; gap: 9px; }
.client-cell strong { display: block; color: #39485e; font-size: 10px; }
.client-cell small { display: block; margin-top: 3px; color: #a0a8b5; font-size: 8px; }
.table-empty { text-align: center; color: #99a3b1; padding: 26px !important; }
.link-button { padding: 0; border: 0; background: transparent; color: #385c94; text-align: left; font: inherit; font-weight: 700; }
.link-button:hover { text-decoration: underline; }
.table-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.search-input { width: min(260px,100%); min-height: 40px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; outline: 0; background: white; color: var(--ink); font-size: 12px; }
.placeholder-card { min-height: 260px; display: grid; place-items: center; text-align: center; padding: 35px; }
.placeholder-icon { width: 47px; height: 47px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 14px; color: #667da7; background: #edf1f8; font-size: 20px; }
.placeholder-card h2 { margin: 0 0 7px; font: 700 14px Manrope,sans-serif; }
.placeholder-card p { max-width: 390px; margin: 0; color: #8994a4; font-size: 11px; line-height: 1.6; }

.system-notice { margin-bottom: 16px; padding: 12px 14px; border: 1px solid #d8e7df; border-radius: 10px; background: #f6fbf8; color: #557361; font-size: 11px; line-height: 1.5; }
.system-notice strong { display: block; margin-bottom: 3px; color: #3d6a50; }
.empty-state { display: grid; gap: 5px; padding: 24px 12px; text-align: center; color: #8a95a5; font-size: 11px; line-height: 1.5; }
.empty-state strong { color: #53627a; font-size: 12px; }
.auth-root { min-height: 100dvh; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); display: grid; place-items: center; background: var(--canvas); }
.auth-root[hidden] { display: none; }
.auth-card { width: min(440px,100%); padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; }
.auth-card h1 { margin: 0 0 7px; font-size: 22px; }
.auth-card p { margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.auth-switch { display: flex; gap: 8px; margin: 16px 0; }
.auth-switch button { flex: 1; }
.auth-register-link { display: block; margin: -8px 0 12px; }
.auth-form { display: grid; gap: 12px; }
.auth-form .button { min-height: 44px; }
.auth-live-link { display: flex; justify-content: center; align-items: center; margin-top: 10px; min-height: 44px; text-decoration: none; }
.auth-error { min-height: 1em; color: #9a493c; font-size: 11px; line-height: 1.5; }
.auth-footnote { margin-top: 15px; color: #919bab; font-size: 10px; line-height: 1.5; }
.form-toolbar, .table-toolbar { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid #eff1f4; }
.form-toolbar .button, .table-toolbar .button { min-height: 40px; }
.inline-form { display: grid; gap: 12px; padding: 16px; border-bottom: 1px solid #eff1f4; background: #fbfcfd; }
.inline-form[hidden] { display: none; }
.inline-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.inline-form-grid .field-full { grid-column: 1 / -1; }
.field-label { display: block; margin-bottom: 7px; color: #68768b; font-size: 10px; font-weight: 600; }
.service-choice-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.service-choice { position: relative; display: block; cursor: pointer; }
.service-choice input { position: absolute; opacity: 0; pointer-events: none; }
.service-choice span { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid #e4e9ef; border-radius: 9px; background: #fff; color: #52627a; }
.service-choice strong { color: #394a63; font-size: 11px; }
.service-choice small { color: #72829a; font-size: 10px; white-space: nowrap; }
.service-choice input:checked + span { border-color: #8298bd; background: #eff3f9; box-shadow: inset 0 0 0 1px #8298bd; }
.service-choice input:focus-visible + span { outline: 3px solid rgba(73,101,151,.22); }
.appointment-total { margin-top: 10px; padding: 11px 13px; border-radius: 8px; background: #f2f5fa; color: #60708a; font-size: 11px; }
.appointment-total strong { margin-left: 5px; color: #263e67; font-size: 14px; }
.service-empty { border: 1px dashed #e2e7ee; border-radius: 9px; }
.field small { display: block; margin-top: 5px; color: #8995a5; font-size: 9px; line-height: 1.45; }
.table-edit-input { width: 100%; min-width: 110px; min-height: 38px; padding: 7px 9px; border: 1px solid #e1e6ed; border-radius: 7px; background: #fff; color: #40506a; font-size: 11px; }
.price-edit { display: flex; align-items: center; gap: 6px; }
.price-edit input { max-width: 130px; text-align: right; }
.price-edit span { color: #76849a; font-size: 11px; }
.active-toggle { display: inline-flex; align-items: center; gap: 7px; color: #596a82; font-size: 10px; white-space: nowrap; }
.active-toggle input { width: 17px; height: 17px; accent-color: #2a8b82; }
.services-table { min-width: 720px; }
.client-appointments-panel { margin-bottom: 14px; }
.client-appointments { display: grid; gap: 9px; padding: 12px; }
.client-appointment { padding: 12px; border: 1px solid #e9edf2; border-radius: 9px; background: #fff; }
.client-appointment-heading, .client-appointment-total, .client-appointment li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.client-appointment-heading { color: #42536c; font-size: 10px; }
.client-appointment-heading span { color: #8491a3; }
.client-appointment ul { display: grid; gap: 6px; margin: 10px 0; padding: 0; list-style: none; color: #68768b; font-size: 10px; }
.client-appointment li strong { color: #4c5d76; font-weight: 600; white-space: nowrap; }
.client-appointment-total { padding-top: 9px; border-top: 1px solid #edf0f4; color: #66758b; font-size: 10px; }
.client-appointment-total strong { color: #243b65; font-size: 13px; text-align: right; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.calendar-month { min-width: 130px; text-align: center; font-weight: 700; color: #40506a; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }
.calendar-day-name { padding: 9px 4px; border-bottom: 1px solid var(--line); color: #96a0ae; text-align: center; font-size: 9px; font-weight: 700; }
.calendar-day { min-height: 100px; padding: 7px; border-right: 1px solid #f0f2f4; border-bottom: 1px solid #f0f2f4; background: #fff; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.is-outside { background: #fafbfc; color: #b3bac4; }
.calendar-day.is-selected { background: #f0f4fa; box-shadow: inset 0 0 0 2px #91a5c7; }
.calendar-day-number { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: #56657a; font-size: 10px; }
.calendar-event { display: block; width: 100%; margin-top: 4px; padding: 4px 5px; overflow: hidden; border: 0; border-radius: 5px; background: #eaf1fb; color: #3e5d8a; text-align: left; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.calendar-event.status-confirmed { background: #eaf6f1; color: #438875; }
.calendar-event.status-cancelled { opacity: .5; text-decoration: line-through; }
.finance-total { display: flex; gap: 16px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); color: #7e8998; font-size: 11px; }
.finance-total strong { color: #33465f; }
.record-client-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 0 0 14px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.record-client-toolbar .field { flex: 1 1 220px; }
.visit-history { margin-top: 16px; }
.visit-history-item { border-bottom: 1px solid #eff1f4; background: #fff; }
.visit-history-item:last-child { border-bottom: 0; }
.visit-history-item summary { min-height: 46px; padding: 14px 16px; color: #40506a; font-size: 11px; font-weight: 700; cursor: pointer; }
.visit-history-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 0; padding: 0 16px 16px; }
.visit-detail { min-width: 0; padding: 9px 10px; border: 1px solid #eef0f4; border-radius: 7px; overflow-wrap: anywhere; }
.visit-detail dt { color: #8b96a5; font-size: 9px; }
.visit-detail dd { margin: 4px 0 0; color: #435269; font-size: 11px; white-space: pre-wrap; }
.toast { position: fixed; z-index: 30; right: 22px; bottom: 22px; max-width: min(420px,calc(100vw - 32px)); padding: 12px 16px; border-radius: 9px; color: #fff; background: #263c64; box-shadow: var(--shadow); font-size: 11px; line-height: 1.4; }
.toast[hidden] { display: none; }

.field label { display: block; margin-bottom: 6px; color: #69768a; font-size: 10px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; min-height: 37px; border: 1px solid #e5e9ef; border-radius: 7px; padding: 8px 10px; outline: 0; color: var(--ink); background: #fff; font-size: 11px; }
.field textarea { min-height: 70px; resize: vertical; }

@media (max-width: 1060px) {
  .content-wrap { padding: 29px 24px 22px; }
  .topbar { padding: 0 24px; }
  .sidebar { width: 220px; flex-basis: 220px; }
  .summary-grid { gap: 10px; }
  .summary-card { padding: 14px; }
  .dashboard-grid { grid-template-columns: minmax(0,1.25fr) minmax(255px,.85fr); gap: 12px; }
}
@media (max-width: 780px) {
  .sidebar { position: fixed; z-index: 15; inset: 0 auto 0 0; width: 255px; transform: translateX(-101%); transition: transform .2s ease; box-shadow: 10px 0 35px rgba(24,35,51,.08); }
  .sidebar.is-open { transform: translateX(0); }
  .menu-toggle { display: grid; margin-right: 9px; }
  .topbar { justify-content: flex-start; height: 60px; padding: 0 16px; }
  .breadcrumbs { flex: 1; }
  .account-actions span { display: none; }
  .content-wrap { padding: 23px 16px 18px; }
  .mobile-nav { position: fixed; z-index: 14; inset: auto 0 0; min-height: calc(62px + env(safe-area-inset-bottom)); padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 2px; background: rgba(255,255,255,.97); border-top: 1px solid var(--line); box-shadow: 0 -5px 18px rgba(28,42,63,.05); backdrop-filter: blur(16px); }
  .mobile-nav-item { border: 0; min-height: 52px; border-radius: 9px; background: transparent; color: #8490a1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 9px; font-weight: 600; }
  .mobile-nav-item span { font-size: 17px; line-height: 1; }
  .mobile-nav-item.is-active { color: var(--navy); background: #f1f4f9; }
  .content-wrap { padding-bottom: calc(97px + env(safe-area-inset-bottom)); }
  .calendar-day { min-height: 78px; padding: 4px; }
  .calendar-event { font-size: 8px; padding: 4px 3px; }
  .auth-card { padding: 20px; }
  .page-footer { padding-bottom: 8px; }
  .summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .content-wrap { padding: 20px 12px calc(97px + env(safe-area-inset-bottom)); }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 13px; margin-bottom: 17px; }
  .page-heading h1 { font-size: 23px; }
  .heading-actions { width: 100%; }
  .heading-actions .button-primary { flex: 1; }
  .summary-card { padding: 12px; }
  .summary-value { font-size: 21px; }
  .summary-label { font-size: 9px; }
  .appointment-row { grid-template-columns: 45px 3px minmax(0,1fr); gap: 9px; }
  .appointment-row .status { grid-column: 3; justify-self: start; margin-top: -5px; }
  .panel-header { padding: 15px 13px; }
  .appointments { padding: 2px 13px 5px; }
  .occupancy { padding: 14px; }
  .clients-toolbar { flex-wrap: wrap; }
  .filter-button { flex: 1; }
  .page-footer { line-height: 1.6; }
  .button { min-height: 44px; padding: 11px 14px; }
  .icon-button { width: 42px; height: 42px; }
  .summary-grid { gap: 9px; }
  .summary-card { min-height: 106px; }
  .panel { border-radius: 11px; }
  .search-box input { height: 44px; font-size: 16px; }
  .field input, .field select, .field textarea { font-size: 16px; }
  .record-section .field input, .record-section .field select, .record-section .field textarea { font-size: 16px; }
  .data-table { min-width: 0; display: block; }
  .data-table thead { display: none; }
  .data-table tbody { display: grid; gap: 8px; padding: 9px; }
  .data-table tbody tr { display: block; border: 1px solid #e9edf2; border-radius: 9px; overflow: hidden; }
  .data-table tbody td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 10px; border-top: 1px solid #f0f2f4; text-align: right; font-size: 10px; }
  .data-table tbody td::before { content: attr(data-label); color: #98a1af; font-size: 9px; text-align: left; }
  .data-table tbody td:first-child { justify-content: flex-start; border-top: 0; text-align: left; }
  .data-table tbody td:first-child::before { content: none; }
  .data-table .table-empty { display: block; text-align: center; }
  .inline-form-grid { grid-template-columns: 1fr; }
  .inline-form-grid .field-full { grid-column: auto; }
  .visit-history-details { grid-template-columns: 1fr; }
  .calendar-day { min-height: 62px; }
  .calendar-day-name { font-size: 8px; }
}

/* Phone-first client forms */
.form-notice { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 14px; padding: 12px 13px; color: #775a2b; background: #fff7e8; border: 1px solid #f1e4c7; border-radius: 10px; font-size: 10px; line-height: 1.5; }
.form-notice strong { display: block; margin-bottom: 2px; color: #745523; }
.form-tabs { position: sticky; top: 0; z-index: 3; display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; margin-bottom: 13px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.96); }
.form-tab { min-height: 42px; padding: 7px 8px; border: 0; border-radius: 7px; background: transparent; color: #738096; font-size: 10px; font-weight: 700; }
.form-tab.is-active { background: var(--navy); color: white; box-shadow: 0 3px 8px rgba(36,59,101,.12); }
.record-pane[hidden] { display: none; }
.record-section { margin: 0 0 10px; border: 1px solid var(--line); border-radius: 11px; background: #fff; overflow: hidden; }
.record-section summary { min-height: 49px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 14px; list-style: none; cursor: pointer; color: #35445b; font: 700 11px Manrope,sans-serif; }
.record-section summary::-webkit-details-marker { display: none; }
.record-section summary::after { content: '＋'; color: #8a96a7; font: 400 16px 'DM Sans',sans-serif; }
.record-section[open] summary::after { content: '−'; }
.record-section-body { display: grid; gap: 12px; padding: 0 14px 15px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.form-grid .field-full { grid-column: 1 / -1; }
.record-section .field label { font-size: 10px; }
.record-section .field input, .record-section .field select, .record-section .field textarea { min-height: 44px; font-size: 14px; }
.record-section .field textarea { min-height: 83px; }
.option-group { display: grid; gap: 7px; }
.option-label { color: #69768a; font-size: 10px; font-weight: 700; }
.choice-row { display: flex; flex-wrap: wrap; gap: 7px; }
.choice-chip { position: relative; }
.choice-chip input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice-chip span { min-height: 40px; padding: 10px 12px; display: flex; align-items: center; border: 1px solid #e3e8ee; border-radius: 8px; background: #fff; color: #69768a; font-size: 10px; cursor: pointer; }
.choice-chip input:checked + span { border-color: #8298bd; background: #eff3f9; color: #304c7a; font-weight: 700; }
.choice-chip input:focus-visible + span { outline: 3px solid rgba(73,101,151,.2); }
.check-list { display: grid; gap: 8px; }
.check-line { display: flex; gap: 9px; align-items: flex-start; color: #5d6c80; font-size: 10px; line-height: 1.5; }
.check-line input { margin: 1px 0 0; width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--navy); }
.toe-groups { display: grid; gap: 12px; }
.toe-group { border: 1px solid #edf0f4; border-radius: 9px; padding: 10px; }
.toe-group h3 { margin: 0 0 8px; color: #56657a; font-size: 10px; }
.toe-zones { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 5px; }
.toe-zone { min-height: 43px; border: 1px solid #e1e6ed; border-radius: 7px; background: #fff; color: #778397; font-size: 10px; font-weight: 700; }
.toe-zone[aria-pressed="true"] { border-color: #d59a75; background: #fff0e7; color: #8a5437; }
.finding-map { display: grid; gap: 9px; }
.finding-map-summary { min-height: 40px; padding: 10px 12px; border-radius: 8px; background: #f5f7fa; color: #4d5c72; font-size: 11px; font-weight: 700; line-height: 1.45; }
.record-actions { position: sticky; bottom: 0; z-index: 2; margin-top: 11px; padding: 10px 0 calc(8px + env(safe-area-inset-bottom)); display: flex; gap: 8px; background: linear-gradient(0deg,var(--canvas) 78%,rgba(247,248,251,0)); }
.record-client-toolbar { display: flex; align-items: end; gap: 9px; margin-bottom: 12px; }
.record-client-toolbar .field { flex: 1; }
.section-note { color: #929dac; font-size: 9px; line-height: 1.5; }
.consent-review { padding: 10px; border: 1px solid #f0e4ca; border-radius: 8px; color: #7a633a; background: #fffaf1; font-size: 9px; line-height: 1.5; }

@media (max-width: 520px) {
  .page-heading h1 { font-size: 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .field-full { grid-column: auto; }
  .form-tabs { top: 0; }
  .form-tab { font-size: 9px; padding: 6px 4px; }
  .record-section summary { min-height: 52px; padding: 14px 13px; font-size: 12px; }
  .record-section-body { padding: 0 12px 14px; }
  .record-section .field input, .record-section .field select, .record-section .field textarea { font-size: 16px; }
  .choice-chip span { min-height: 44px; }
  .toe-zones { gap: 4px; }
  .toe-zone { min-height: 45px; }
  .finding-map-summary { font-size: 12px; }
  .record-actions { bottom: calc(62px + env(safe-area-inset-bottom)); }
}
\n\n.booking-payment-status{display:grid;gap:4px;margin:12px 0;padding:12px 14px;border:1px solid #eadde3;border-radius:12px;background:#fff8fb;color:#713d56}.booking-payment-status strong{font-size:14px}.booking-payment-status span,.booking-payment-status small{color:#766a70}.booking-payment-status.is-pending{background:#fffaf0;border-color:#f0e2c8;color:#80631d}\n