:root {
  --ink: #10211b;
  --ink-soft: #243b33;
  --green: #20c875;
  --green-dark: #116b3f;
  --green-pale: #e9f8ef;
  --cream: #f6f3ec;
  --paper: #fff;
  --line: #d8e0da;
  --muted: #5e6d66;
  --amber-pale: #fff3dd;
  --danger: #9c302b;
  --shadow: 0 12px 34px rgba(16, 33, 27, .08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 16px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea, select { font: inherit; }
button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 0 19px; border: 1px solid var(--green-dark); border-radius: 11px; background: var(--green-dark); color: #fff; font-weight: 850; cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
button:hover { background: #0b5833; border-color: #0b5833; transform: translateY(-1px); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(32, 200, 117, .34); outline-offset: 2px; }
button:disabled { opacity: .52; cursor: not-allowed; transform: none; }
button.secondary-button { border-color: #bdc9c1; background: #fff; color: var(--ink); }
button.secondary-button:hover { border-color: var(--green-dark); background: var(--green-pale); color: var(--ink); }
button.pause { border-color: var(--danger); background: var(--danger); color: #fff; }
a { color: var(--green-dark); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(2rem, 4vw, 3.35rem); line-height: 1; letter-spacing: -.052em; }
h2 { margin-bottom: 11px; font-size: clamp(1.28rem, 2vw, 1.75rem); line-height: 1.15; letter-spacing: -.032em; }
h3 { margin: 24px 0 8px; font-size: 1rem; }
p { line-height: 1.58; }
.eyebrow { margin-bottom: 9px; color: var(--green-dark); font-size: .69rem; font-weight: 900; letter-spacing: .14em; }
.section-copy, .page-head p:not(.eyebrow), .panel p { color: var(--muted); }
.message { min-height: 1.25em; margin: 10px 0 0; color: var(--danger); font-size: .86rem; font-weight: 750; }

.topbar { position: fixed; z-index: 50; inset: 0 0 auto; height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(18px, 3vw, 40px); background: var(--ink); color: #fff; box-shadow: 0 1px rgba(255,255,255,.08); }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 900; letter-spacing: -.02em; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border: 2px solid var(--green); border-radius: 50%; color: var(--green); font-size: .74rem; letter-spacing: -.04em; }
.topbar-actions { display: flex; align-items: center; gap: 18px; font-size: .82rem; }
.topbar-actions > span { color: #b9c8c0; }
.topbar .topbar-button, .topbar .menu-button { min-height: 36px; padding: 0; border: 0; background: transparent; color: #fff; }
.topbar .topbar-button:hover, .topbar .menu-button:hover { background: transparent; color: var(--green); transform: none; }
.menu-button { display: none; width: 38px; font-size: 1.35rem; }

.login-wrap { width: min(620px, calc(100% - 32px)); margin: 0 auto; padding: 130px 0 70px; }
.auth { display: grid; gap: 14px; padding: clamp(30px, 7vw, 58px); border: 1px solid var(--line); border-radius: 28px; background: var(--paper); box-shadow: 0 24px 70px rgba(16,33,27,.12); }
.auth > p:not(.eyebrow) { margin-bottom: 6px; color: var(--muted); }
label { display: grid; gap: 7px; margin: 12px 0; color: var(--ink-soft); font-size: .82rem; font-weight: 800; }
label small, small { color: var(--muted); font-weight: 650; }
input, textarea, select { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #c7d2ca; border-radius: 10px; background: #fff; color: var(--ink); }
textarea { resize: vertical; }

.portal-shell { min-height: 100vh; padding-top: 76px; }
.sidebar { position: fixed; z-index: 30; inset: 76px auto 0 0; width: 254px; display: flex; flex-direction: column; padding: 25px 18px; overflow-y: auto; background: var(--ink); color: #fff; }
.shop-card { display: grid; gap: 5px; padding: 18px; margin-bottom: 20px; border: 1px solid rgba(255,255,255,.1); border-radius: 15px; background: rgba(255,255,255,.045); }
.shop-card span { color: #8fa39a; font-size: .62rem; font-weight: 900; letter-spacing: .13em; }
.shop-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-card small { color: #b9c8c0; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav button { justify-content: flex-start; gap: 12px; min-height: 45px; padding: 0 13px; border: 0; border-radius: 10px; background: transparent; color: #c5d1cb; font-size: .88rem; font-weight: 750; text-align: left; }
.sidebar nav button span { display: grid; width: 22px; height: 22px; place-items: center; color: #91a49b; }
.sidebar nav button:hover, .sidebar nav button.active { background: rgba(32,200,117,.15); color: #fff; transform: none; }
.sidebar nav button.active span { color: var(--green); }
.sidebar nav .nav-badge { min-width: 23px; margin-left: auto; padding: 2px 7px; border-radius: 999px; background: #ffcf55; color: #442f00; font-size: .66rem; font-style: normal; font-weight: 900; text-align: center; }
.sidebar-help { margin: auto 10px 0; padding-top: 30px; color: #91a49b; font-size: .78rem; }
.sidebar-help a { color: #fff; }
.workspace-wrap { min-height: calc(100vh - 76px); margin-left: 254px; display: flex; flex-direction: column; }
.workspace { flex: 1; padding: clamp(28px, 4vw, 54px); outline: none; }
.workspace > section { width: min(1120px, 100%); margin: 0 auto; }
.workspace-message { width: min(1120px, 100%); margin: 18px auto 0; }
.portal-footer { width: min(1120px, 100%); margin: 0 auto; padding: 14px 22px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .74rem; text-align: center; }
.footer-status-scroll { max-width: 100%; overflow-x: auto; margin-bottom: 10px; padding: 3px 0 7px; }
.footer-status-scroll:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 3px; border-radius: 4px; }
.footer-status { display: flex; align-items: center; gap: 14px; width: max-content; margin-inline: auto; font-size: .75rem; white-space: nowrap; }
.footer-status > span { display: inline-flex; align-items: center; gap: 4px; }
.footer-status > span + span { border-left: 1px solid #bdc9c1; padding-left: 14px; }
.footer-status strong { color: var(--ink-soft); font-weight: 750; }
.footer-status-dot { width: 8px; height: 8px; flex: 0 0 8px; margin-right: 3px; border-radius: 50%; background: #758078; }
.footer-status-dot[data-state="active"] { background: var(--green-dark); box-shadow: 0 0 0 3px var(--green-pale); }
.footer-status-dot[data-state="paused"] { background: #9b6400; box-shadow: 0 0 0 3px var(--amber-pale); }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.page-head > div { max-width: 760px; }
.page-head p:not(.eyebrow) { margin: 0; }
.user-pill { display: inline-flex; min-height: 34px; align-items: center; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: .74rem; font-weight: 750; white-space: nowrap; }

.panel { margin-bottom: 22px; padding: clamp(22px, 3vw, 32px); border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.panel-head h2 { margin-bottom: 0; }
.summary-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: var(--shadow); }
.summary-strip > div { display: grid; gap: 3px; padding: 20px 22px; border-right: 1px solid var(--line); }
.summary-strip > div:last-child { border: 0; }
.summary-strip small { color: var(--muted); font-size: .62rem; font-weight: 900; letter-spacing: .1em; }
.summary-strip strong { font-size: 1.2rem; }
.summary-strip span { color: var(--muted); font-size: .73rem; }
.summary-strip.booking-counts { grid-template-columns: repeat(2,1fr); }
.summary-strip.booking-counts > div:nth-child(2) { border-right: 0; }
.next-step-card { display: flex; align-items: center; justify-content: space-between; gap: 26px; background: linear-gradient(135deg,#fff 0%,#f1faf4 100%); }
.next-step-card p:last-child { margin-bottom: 0; }
.overview-bookings .item { display: flex; justify-content: space-between; gap: 18px; }

.booking-calendar-panel { min-width: 0; overflow: hidden; }
.booking-calendar { overflow-x: auto; }
.booking-calendar:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 2px; }
.booking-month-day > .calendar-date-add { display: flex; opacity: 1; justify-content: space-between; width: 100%; min-height: 32px; padding: 3px 5px; border: 0; background: transparent; color: var(--ink); box-shadow: none; font-size: .8rem; }
.booking-month-day > .calendar-date-add > span { color: var(--green-dark); }
.booking-month-day > .calendar-date-add:hover { background: var(--green-pale); color: var(--ink); }
.booking-month-day.today > .calendar-date-add { background: var(--green-pale); }
.booking-month-day[data-create-date] { cursor: pointer; }
.calendar-add { min-height: 36px; font-size: .75rem; padding: 7px; }
.workspace-dialog #visit-service-fields { min-width: 0; padding: 0; border: 0; margin: 16px 0; }
.visit-service-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: end; gap: 10px; }
.multiple-services .visit-service-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.visit-service-row:has([data-remove-service]:not([hidden])) { grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; }
.visit-service-row label { display: grid; min-width: 0; margin: 0; }
.visit-service-row small { grid-column: 1 / -1; color: var(--muted); }
#add-visit-service, #add-visit-notes { margin-top: 10px; min-height: 36px; padding: 6px 10px; font-size: .8rem; }
.visit-actions { position: sticky; bottom: -28px; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; padding: 14px 0; border-top: 1px solid var(--line); background: #fff; z-index: 2; }
.visit-total { padding: 14px; background: var(--green-pale); border-radius: 12px; font-weight: 750; }
.previous-client-notes { white-space: pre-wrap; max-height: 180px; overflow-y: auto; padding: 12px; margin-bottom: 15px; background: #f3f5f3; border-radius: 10px; }
.monthly-stats-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 15px; }
.monthly-stats-grid div { padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.monthly-stats-grid small, .monthly-stats-grid strong { display: block; }
.stats-note { margin-top: 14px; color: var(--muted); font-size: .8rem; }
.booking-calendar-head,
.booking-calendar-controls { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.booking-calendar-head h2 { margin-bottom: 0; }
.booking-calendar-controls { margin: 20px 0 16px; }
.booking-calendar-controls > label { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; margin: 0; white-space: nowrap; }
.booking-calendar-controls > label select { flex: 1; min-width: 120px; width: 0; }
.booking-calendar-controls > .calendar-actions, .booking-calendar-controls > .calendar-view-switch { flex-shrink: 0; }
.booking-calendar-controls select { min-height: 42px; }
.calendar-view-switch { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #f5f7f5; }
.calendar-view-switch button { min-height: 36px; padding: 0 16px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: .76rem; }
.calendar-view-switch button:hover,
.calendar-view-switch button.active { background: var(--ink); color: #fff; transform: none; }
.booking-day-view { display: grid; gap: 10px; }
.booking-calendar-event { display: grid; grid-template-columns: 86px 1fr; align-items: center; gap: 14px; min-height: 68px; padding: 13px 16px; border: 1px solid var(--line); border-left: 4px solid var(--green-dark); border-radius: 12px; background: #fbfcfb; }
.booking-calendar-event time { color: var(--green-dark); font-size: .82rem; font-weight: 900; }
.booking-calendar-event div { display: grid; gap: 2px; min-width: 0; }
.booking-calendar-event strong,
.booking-calendar-event span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.booking-calendar-event span { color: var(--muted); font-size: .73rem; }
.booking-week-view { display: grid; min-width: 820px; grid-template-columns: repeat(7,minmax(112px,1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--line); }
.booking-week-day { min-height: 310px; background: #fff; }
.booking-week-day > header { display: flex; align-items: center; justify-content: space-between; padding: 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .72rem; }
.booking-week-day > header strong { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: var(--ink); }
.booking-week-day.today > header strong { background: var(--green-dark); color: #fff; }
.booking-week-day > div { display: grid; gap: 7px; padding: 8px; }
.booking-week-day > div > small { padding: 9px 2px; color: #8a9790; font-size: .68rem; }
.booking-calendar-event.compact { grid-template-columns: 1fr; gap: 2px; min-height: 0; padding: 8px; border-left-width: 3px; }
.booking-calendar-event.compact div { gap: 0; }
.booking-calendar-event.compact strong { font-size: .73rem; }
.booking-month-weekdays,
.booking-month-view { display: grid; min-width: 720px; grid-template-columns: repeat(7,minmax(0,1fr)); }
.booking-month-weekdays { color: var(--muted); font-size: .68rem; font-weight: 900; text-align: center; text-transform: uppercase; }
.booking-month-weekdays span { padding: 8px; }
.booking-month-view { gap: 1px; padding: 1px; overflow: hidden; border-radius: 13px; background: var(--line); }
.booking-month-day { min-height: 112px; padding: 8px; background: #fff; }
.booking-month-day.outside { background: #f4f5f3; }
.booking-month-day > time { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; font-size: .75rem; font-weight: 850; }
.booking-month-day.today > time { background: var(--green-dark); color: #fff; }
.booking-month-day > div { display: grid; gap: 4px; margin-top: 5px; }
.booking-month-day > div span { overflow: hidden; padding: 4px 5px; border-radius: 5px; background: var(--green-pale); color: #0c6038; font-size: .61rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.booking-month-day > div small { color: var(--muted); font-size: .61rem; font-weight: 800; }
.booking-month-day > div > button { display: block; width: 100%; min-height: 30px; overflow: hidden; padding: 5px; border: 0; border-radius: 5px; background: var(--green-pale); color: #0c6038; font-size: .66rem; text-align: left; text-overflow: ellipsis; white-space: nowrap; box-shadow: none; }
.booking-month-day > div > button.calendar-more { color: var(--ink); background: #f1f4f2; }
button.booking-calendar-event { width: 100%; color: var(--ink); text-align: left; box-shadow: none; }
.footer-status .footer-link { padding: 0; min-height: 0; background: none; border: 0; border-radius: 0; color: inherit; font: inherit; box-shadow: none; }
.footer-status .footer-link:not(:disabled) { text-decoration: underline; text-underline-offset: 3px; }
.footer-status .footer-link:disabled { opacity: 1; cursor: default; }
.booking-alerts { position: relative; }
.booking-alerts > summary { cursor: pointer; list-style: none; padding: 8px 12px; border: 1px solid #63786d; border-radius: 12px; }
.booking-alerts > summary span { margin-left: 5px; }
.alert-popup { position: absolute; top: 48px; right: 0; width: min(420px, calc(100vw - 32px)); max-height: min(650px, 75vh); overflow-y: auto; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: 0 16px 48px #10211b30; }
.alert-popup h2 { font-size: 1.15rem; }
.alert-popup article { padding: 14px 0; border-bottom: 1px solid var(--line); }
.alert-popup p { margin: 5px 0; }
.alert-actions { display: flex; gap: 8px; margin-top: 10px; }
.alert-actions button { font-size: .75rem; min-height: 38px; padding: 8px 12px; }
.booking-alert-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding: 14px; border-radius: 14px; border: 1px solid #bad1c4; background: #eaf5ee; }
.booking-alert-bar > span { flex: 1; }
.workspace-dialog { width: min(700px, calc(100vw - 28px)); max-height: calc(100dvh - 40px); overflow: auto; border: 1px solid var(--line); border-radius: 20px; padding: 28px; color: var(--ink); }
.workspace-dialog::backdrop { background: #10211b85; backdrop-filter: blur(3px); }
.workspace-dialog h2 { font-size: 1.5rem; }
.workspace-dialog fieldset { margin: 16px 0; border: 1px solid var(--line); border-radius: 14px; }
.workspace-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 16px 0; }
.workspace-form p { grid-column: 1 / -1; }
.workspace-form label { margin: 0; }
.client-list { display: grid; gap: 10px; margin-top: 20px; }
.client-card, .team-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #f8faf8; color: var(--ink); text-align: left; }
.client-card small, .team-card small { display: block; margin-top: 6px; color: var(--muted); overflow-wrap: anywhere; }
.visit-count { flex-shrink: 0; font-size: .85rem; }
.team-card { margin-bottom: 12px; }
.team-card button { flex-shrink: 0; }
.client-summary, .client-payment { display: grid; gap: 5px; padding: 14px 0; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
#team-settings, #service-settings { scroll-margin-top: 95px; }
.inline-check { display: flex; align-items: center; gap: 10px; }
.inline-check input { width: auto; }
.notification-list { display: grid; gap: 12px; }
.notification-card { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow); }
.notification-card.needs-attention { border-color: #eccb7d; background: #fffaf0; }
.notification-card.is-read { opacity: .72; }
.notification-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: var(--green-pale); color: var(--green-dark); font-weight: 950; }
.notification-card.needs-attention .notification-icon { background: #ffe8ad; color: #6f4900; }
.notification-card > div { display: grid; gap: 3px; }
.notification-card p { margin: 0; }
.notification-card small { font-size: .72rem; }
.setup-link-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 20px; margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #f8faf8; }
.setup-link-card strong { font-size: .95rem; }
.setup-link-card span { color: var(--muted); font-size: .8rem; }
.setup-link-card button { grid-column: 2; grid-row: 1/3; }

.choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 22px; }
button.choice-card { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; min-height: 146px; align-content: start; justify-items: start; padding: 20px; border: 2px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); text-align: left; }
button.choice-card:hover { border-color: #8ab59b; background: #f8fcf9; transform: none; }
button.choice-card.selected { border-color: var(--green-dark); background: var(--green-pale); box-shadow: 0 0 0 3px rgba(17,107,63,.1); }
.choice-card .choice-check { grid-row: 1/3; display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: #edf2ee; color: var(--green-dark); }
.choice-card.selected .choice-check { background: var(--green-dark); color: #fff; }
.choice-card strong { font-size: .98rem; }
.choice-card small { line-height: 1.45; }
.setup-stepper { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; margin: 0 0 16px; }
.setup-stepper button { gap: 8px; min-height: 48px; padding: 0 10px; border-color: var(--line); background: #fff; color: var(--muted); font-size: .78rem; }
.setup-stepper button:hover, .setup-stepper button.active { border-color: var(--green-dark); background: var(--green-pale); color: var(--ink); transform: none; }
.setup-stepper button span { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: #e8ede9; font-size: .7rem; }
.setup-stepper button.active span { background: var(--green-dark); color: #fff; }
.setup-panel { animation: reveal .18s ease; }
@keyframes reveal { from { opacity: .4; transform: translateY(4px); } }
.step-actions { display: flex; justify-content: flex-end; gap: 10px; margin: 20px 0 0; }
.item { padding: 15px 0; border-top: 1px solid #e9edea; }
.item:first-child { border-top: 0; }
.item > strong { color: var(--ink); }
.item small { display: inline-block; margin-top: 3px; }
.service-card { margin: 16px 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fafbf9; }
.service-edit-grid { display: grid; grid-template-columns: 1.5fr repeat(3,minmax(110px,.65fr)); gap: 12px; align-items: end; }
.service-edit-grid label { margin: 0; }
.service-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.qualification-card { padding: 16px 0; border-top: 1px solid var(--line); }
.qualification-options { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 10px 0 14px; }
.qualification-options label { display: flex; align-items: center; gap: 7px; margin: 0; }
.shop-hours-panel { padding-top: 24px; padding-bottom: 24px; }
.shop-hours-panel .section-copy { margin-bottom: 15px; }
.shop-hours-list { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.shop-hours-day { display: grid; grid-template-columns: minmax(150px,.72fr) minmax(0,2fr); align-items: center; gap: 16px; min-height: 61px; padding: 7px 12px; border-top: 1px solid var(--line); background: #fff; }
.shop-hours-day:first-child { border-top: 0; }
.shop-hours-day.is-closed { background: #f5f6f4; }
.day-state { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.day-state strong { font-size: .88rem; }
button.hours-toggle { gap: 7px; min-height: 34px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: .7rem; }
button.hours-toggle:hover { background: transparent; color: var(--ink); transform: none; }
.toggle-track { position: relative; width: 36px; height: 21px; border-radius: 999px; background: #9aa59f; transition: background .16s ease; }
.toggle-track span { position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16,33,27,.28); transition: transform .16s ease; }
.hours-toggle[aria-pressed="true"] { color: var(--green-dark); }
.hours-toggle[aria-pressed="true"] .toggle-track { background: var(--green-dark); }
.hours-toggle[aria-pressed="true"] .toggle-track span { transform: translateX(15px); }
.day-open-fields { display: grid; grid-template-columns: minmax(105px,.6fr) minmax(105px,.6fr) minmax(250px,1.3fr); align-items: end; gap: 10px; }
.day-open-fields > label { gap: 2px; margin: 0; font-size: .65rem; }
.day-open-fields input[type="time"] { min-height: 38px; padding: 6px 9px; }
.lunch-fields { display: grid; grid-template-columns: auto minmax(230px,1fr); align-items: center; gap: 9px; min-height: 38px; }
.lunch-fields .lunch-choice { margin: 0; white-space: nowrap; }
.lunch-times { display: grid; grid-template-columns: minmax(105px,1fr) auto minmax(105px,1fr); align-items: center; gap: 6px; }
.lunch-times span { color: var(--muted); font-size: .7rem; }
.shop-hours-save { display: flex; justify-content: flex-end; margin-top: 13px; }
.schedule-block { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); }
.schedule-block > div { display: grid; gap: 3px; }
.schedule-block small { flex: 1; }
.schedule-block button { min-height: 38px; }
.operation-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 16px; }
.calendar-panel { overflow-x: auto; }
.calendar-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.calendar-toolbar h2 { margin-bottom: 0; }
.calendar-actions, .holiday-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.calendar-actions .icon-button { width: 46px; padding: 0; font-size: 1.5rem; }
.calendar-filter { width: min(280px,100%); margin: 22px 0 16px; }
.calendar-weekdays, .time-off-calendar { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }
.calendar-weekdays { color: var(--muted); font-size: .69rem; font-weight: 900; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.calendar-weekdays span { padding: 8px; }
.time-off-calendar { gap: 1px; padding: 1px; background: var(--line); border-radius: 13px; overflow: hidden; }
.calendar-day { position: relative; min-height: 112px; padding: 9px; background: #fff; }
.calendar-day:has(.calendar-date-button:not(:disabled)):hover { background: #f0f9f3; }
.calendar-day.selected, .calendar-day.range-preview { background: #d9f3e3; box-shadow: inset 0 0 0 2px var(--green-dark); }
.calendar-date-button { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 9px; align-items: flex-start; justify-content: space-between; border: 0; border-radius: 0; background: transparent; color: var(--ink); }
.calendar-date-button:hover { background: transparent; transform: none; }
.calendar-date-button:disabled { opacity: 1; cursor: default; }
.calendar-date-button:focus-visible { outline-offset: -3px; }
.calendar-date-add { opacity: 0; color: var(--green-dark); font-size: 1.2rem; }
.calendar-date-button:hover .calendar-date-add, .calendar-date-button:focus-visible .calendar-date-add { opacity: 1; }
.calendar-day.outside { background: #f5f6f4; }
.calendar-day time { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 50%; color: var(--ink-soft); font-size: .78rem; font-weight: 850; }
.calendar-day.today time { background: var(--green-dark); color: #fff; }
.calendar-events { display: grid; gap: 5px; margin-top: 36px; pointer-events: none; }
.calendar-event { position: relative; z-index: 1; display: grid; width: 100%; min-height: 34px; overflow: hidden; padding: 7px; border: 0; border-left: 3px solid currentColor; border-radius: 6px; font-size: .67rem; font-weight: 850; line-height: 1.35; text-align: left; justify-content: stretch; pointer-events: auto; }
.calendar-event span, .calendar-event small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event small { color: inherit; font-size: .64rem; font-weight: 600; }
.calendar-event:hover { filter: brightness(.95); transform: none; }
.calendar-event.shop-closed { background: #ffe9e5; color: #7a251f; }
.calendar-event.staff-off { background: #fff0dd; color: #914600; }
.time-off-controls { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin: 22px 0 12px; }
.time-off-controls .calendar-filter { margin: 0; }
#time-off-range[aria-pressed="true"] { background: var(--green-dark); color: #fff; }
.calendar-hint { min-height: 22px; margin: 0 0 16px; font-size: .8rem; }
.calendar-loading { grid-column: 1 / -1; margin: 0; min-height: 360px; display: grid; align-content: center; justify-items: center; padding: 24px; background: #fff; color: var(--muted); }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 18px; color: var(--muted); font-size: .74rem; }
.calendar-legend .shop-closed::before, .calendar-legend .staff-off::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #9c302b; }
.calendar-legend .staff-off::before { background: #c96a08; }
.time-off-dialog { width: min(600px,calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: #fff; color: var(--ink); box-shadow: 0 30px 100px #10211b40; }
.time-off-dialog::backdrop { background: #10211b99; backdrop-filter: blur(4px); }
.time-off-dialog .panel-head { flex-direction: row; align-items: flex-start; gap: 16px; }
.time-off-dialog .panel-head button { flex: 0 0 38px; width: 38px; min-height: 38px; padding: 0; }
.time-off-summary { margin: 12px 0; padding: 12px 16px; border-radius: 10px; background: var(--green-pale); color: var(--green-dark); font-size: .88rem; font-weight: 750; }
.time-off-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.time-off-dialog .danger-button { margin-right: auto; color: var(--danger); border-color: #dcbfbd; }
.time-off-dialog .all-day-choice { display: flex; align-items: center; gap: 9px; }
.holiday-toggle { width: 100%; justify-content: space-between; padding: 16px 18px; text-align: left; }
.holiday-toggle > span:first-child { display: grid; gap: 3px; }
.holiday-toggle small { font-size: .76rem; font-weight: 500; }
.holiday-chevron { font-size: 1.5rem; }
.holiday-toggle[aria-expanded="true"] .holiday-chevron { transform: rotate(180deg); }
.calendar-event .calendar-event-mobile { display: none; }
#holiday-details { margin-top: 24px; }
@media (max-width: 600px) {
  .calendar-panel { padding: 16px; }
  .calendar-day { min-height: 86px; padding: 3px; }
  .calendar-date-button { padding: 3px; }
  .calendar-date-add { display: none; }
  .calendar-events { margin-top: 34px; gap: 3px; }
  .calendar-event { min-height: 28px; padding: 4px 2px; font-size: .59rem; border-left-width: 2px; }
  .calendar-event small { display: none; }
  .calendar-event .calendar-event-label { display: none; }
  .calendar-event .calendar-event-mobile { display: block; }
  .calendar-weekdays { font-size: .58rem; letter-spacing: 0; }
  .calendar-weekdays span { padding: 8px 0; }
  .time-off-dialog { padding: 20px; }
  .time-off-dialog .time-off-form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 10px; }
  .time-off-dialog input, .time-off-dialog select { min-width: 0; padding: 10px 7px; }
}
.time-off-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 16px; }
.all-day-choice { width: fit-content; }
.holiday-year { min-width: 135px; margin: 0; }
.holiday-actions { margin: 22px 0 10px; }
.holiday-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 14px; margin-top: 16px; }
.holiday-option { display: flex; align-items: flex-start; gap: 10px; min-height: 74px; margin: 0; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #fafbf9; }
.holiday-option span { display: grid; gap: 3px; }
.holiday-option.unavailable { opacity: .64; background: #f1f3f1; }
.holiday-note { margin: 18px 0 0; font-size: .8rem; }
fieldset { padding: 16px; border: 1px solid #c7d2ca; border-radius: 12px; }
fieldset label, .panel label:has(input[type="checkbox"]) { display: flex; align-items: center; gap: 8px; }
input[type="checkbox"], input[type="radio"] { width: 18px; min-height: 18px; margin: 0; accent-color: var(--green-dark); }
.check-list { display: grid; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.check-list li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 11px; background: #f4f6f4; color: var(--muted); text-transform: capitalize; }
.check-list li.done { background: var(--green-pale); color: var(--green-dark); font-weight: 800; }
.attendance-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

@media (max-width: 980px) {
  .summary-strip { grid-template-columns: repeat(2,1fr); }
  .summary-strip > div:nth-child(2) { border-right: 0; }
  .summary-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .summary-strip.booking-counts > div:nth-child(-n+2) { border-bottom: 0; }
  .service-edit-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .holiday-options { grid-template-columns: 1fr; }
  .shop-hours-day { grid-template-columns: 140px minmax(0,1fr); }
  .day-open-fields { grid-template-columns: repeat(2,minmax(100px,.6fr)); }
  .lunch-fields { grid-column: 1/-1; }
}

@media (max-width: 780px) {
  .topbar { padding: 0 16px; }
  .menu-button { display: inline-flex; }
  .brand { position: absolute; left: 50%; transform: translateX(-50%); }
  .brand > span:last-child, .topbar-actions > span { display: none; }
  .sidebar { width: min(290px,calc(100vw - 46px)); transform: translateX(-105%); box-shadow: 12px 0 40px rgba(0,0,0,.24); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .workspace-wrap { margin-left: 0; }
  .workspace { padding: 27px 18px 55px; }
  .page-head, .next-step-card { align-items: flex-start; flex-direction: column; }
  .choice-grid { grid-template-columns: 1fr; }
  .setup-stepper { display: flex; overflow-x: auto; padding-bottom: 6px; }
  .setup-stepper button { flex: 0 0 auto; }
  .notification-card { grid-template-columns: 42px 1fr; }
  .notification-card > button { grid-column: 1/-1; }
}

@media (max-width: 560px) {
  h1 { font-size: 2.15rem; }
  .login-wrap { padding-top: 105px; }
  .auth { padding: 28px 22px; border-radius: 20px; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .summary-strip > div { padding: 16px; }
  .summary-strip strong { font-size: 1rem; }
  .summary-strip span { display: none; }
  .panel { padding: 21px 18px; }
  .panel-head { align-items: flex-start; flex-direction: column; }
  .panel-head button { width: 100%; }
  .operation-grid, .service-edit-grid, .time-off-form-grid { grid-template-columns: 1fr; }
  .shop-hours-day { grid-template-columns: 1fr; gap: 6px; padding: 10px; }
  .day-state { min-height: 34px; }
  .day-open-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .lunch-fields { grid-template-columns: 1fr; }
  .service-actions, .schedule-block { align-items: stretch; flex-direction: column; }
  .step-actions { display: grid; grid-template-columns: 1fr; }
  .step-actions button { width: 100%; }
  .summary-strip.booking-counts { grid-template-columns: 1fr 1fr; }
  .booking-calendar-head { align-items: flex-start; flex-direction: column; }
  .booking-calendar-controls { align-items: stretch; flex-direction: column; }
  .booking-calendar-controls > label { display: block; white-space: normal; }
  .booking-calendar-controls > label select { width: 100%; }
  .workspace-form { grid-template-columns: 1fr; }
  .visit-service-row, .visit-service-row:has([data-remove-service]:not([hidden])) { grid-template-columns: 1fr; }
  .visit-actions { bottom: -20px; }
  .monthly-stats-grid { grid-template-columns: 1fr 1fr; }
  .workspace-dialog { padding: 20px; }
  .team-card, .booking-alert-bar { flex-wrap: wrap; }
  .client-card { padding: 14px; gap: 10px; }
  .client-card small { font-size: .72rem; }
  .alert-popup { right: -65px; }
  .calendar-view-switch { width: 100%; }
  .calendar-view-switch button { flex: 1; }
  .setup-link-card { grid-template-columns: 1fr; }
  .setup-link-card button { grid-column: 1; grid-row: auto; width: 100%; margin-top: 8px; }
}

.booking-field-label { position: relative; display: inline-flex; align-items: center; gap: 7px; }
.booking-field-help { display: inline-grid; place-items: center; width: 19px; height: 19px; border: 1px solid var(--muted); border-radius: 50%; color: var(--green-dark); font-size: .7rem; cursor: help; }
.booking-field-help [role="tooltip"] { position: absolute; z-index: 5; top: 24px; left: 0; width: min(230px, calc(100vw - 100px)); padding: 11px; border-radius: 9px; background: var(--ink); color: #fff; font-size: .78rem; font-weight: 500; line-height: 1.5; visibility: hidden; box-shadow: var(--shadow); }
.booking-field-help:hover [role="tooltip"], .booking-field-help:focus [role="tooltip"] { visibility: visible; }
.booking-field-help:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.booking-payment, .booking-payment-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 18px 0; }
.booking-payment [data-payment-summary] { color: var(--green-dark); font-size: .82rem; }
.booking-payment-dialog { width: min(460px, calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 26px; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); box-shadow: var(--shadow); animation: reveal .18s ease; }
.booking-payment-dialog::backdrop { background: rgba(16,33,27,.5); }
.booking-payment-dialog p { color: var(--muted); font-size: .86rem; }
.booking-payment-actions { justify-content: flex-end; margin-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .booking-payment-dialog { animation: none; } }
