:root {
  color-scheme: light;
  --page: #f7f7fb;
  --white: #fff;
  --text: #202036;
  --muted: #66677e;
  --line: #e7e7f0;
  --primary: #5543c9;
  --primary-dark: #4432b2;
  --lilac: #efedff;
  --teal: #16725e;
  --radius: 16px;
  --shadow: 0 1px 2px #24224506, 0 5px 22px #30305b05;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page);
  color: var(--text);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 3px solid #8274f1; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, strong { overflow-wrap: anywhere; }
h1 { font-size: clamp(1.9rem, 3.3vw, 2.6rem); letter-spacing: -.052em; line-height: 1.12; }
h2 { font-size: 1.18rem; letter-spacing: -.025em; line-height: 1.25; }
p { line-height: 1.55; }
[hidden] { display: none !important; }
.small, small { font-size: .84rem; line-height: 1.4; }
.muted, small { color: var(--muted); }
.loading { max-width: 36rem; margin: 12vh auto; padding: 1.6rem; }
.loading p { margin: 0 0 1rem; }
.page-loader {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  justify-items: center;
  padding: 1rem;
  text-align: center;
}
.page-loader img {
  object-fit: contain;
  grid-row: 2;
  animation: logo-pulse 1.6s ease-in-out infinite;
}
.page-loader p { grid-row: 3; margin-top: 1rem; color: var(--muted); }
@keyframes logo-pulse {
  50% { transform: scale(.88); opacity: .65; }
}
@media (prefers-reduced-motion: reduce) {
  .page-loader img { animation: none; }
}
.button {
  display: inline-flex; min-height: 42px; padding: .65rem .95rem; gap: .5rem;
  align-items: center; justify-content: center; border: 1px solid var(--line);
  border-radius: 10px; background: var(--white); color: var(--text); font-size: .9rem;
  font-weight: 650; line-height: 1.2; white-space: nowrap;
}
.button svg { width: 18px; height: 18px; flex: 0 0 auto; }
.button:hover:not(:disabled) { background: #f4f3fc; border-color: #d9d5f1; }
.button.primary {
  background: var(--primary); color: var(--white); border-color: var(--primary);
  box-shadow: 0 2px 4px #5543c92b;
}
.button.primary:hover:not(:disabled) { background: var(--primary-dark); border-color: var(--primary-dark); }
.button.square { width: 42px; padding: .5rem; }
.button.danger { color: #a03147; }
.brand { display: inline-flex; align-items: center; width: fit-content; }
.brand img { display: block; width: 7.5rem; max-width: 100%; height: auto; }
.brand img.tenant-logo { max-height: 5rem; object-fit: contain; object-position: left center; }
.logo-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: .8rem; }
.logo-controls > .form-stack { min-width: 0; max-width: 100%; }
.logo-controls input { max-width: 100%; }
.logo-preview { display: grid; place-items: center; width: 8.75rem; min-height: 6.25rem; padding: .65rem; border: 1px solid var(--line); border-radius: 10px; }
.logo-preview img { display: block; max-width: 100%; max-height: 5rem; object-fit: contain; }

.workspace { display: grid; grid-template-columns: 226px minmax(0,1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 1.75rem 1rem 1rem; border-right: 1px solid var(--line); background: var(--white);
}
.sidebar .brand { margin: 0 .63rem 2.3rem; }
.sidebar nav { display: grid; align-content: start; gap: .32rem; }
.nav-label { font-size: .77rem; font-weight: 700; color: #696983; margin: 0 .68rem .4rem; }
.secondary-nav { margin-top: 1.55rem; }
.sidebar nav a {
  display: flex; align-items: center; gap: .62rem; color: #545571; padding: .73rem .65rem;
  border-radius: 10px; font-size: .96rem; font-weight: 600;
}
.sidebar nav a svg { width: 19px; height: 19px; flex: 0 0 auto; }
.sidebar nav a:hover, .sidebar nav a[aria-current] { background: var(--lilac); color: #4232ac; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--line); padding: .95rem 0 0; display: flex; align-items: center; gap: .65rem; }
.sidebar-foot strong { font-size: .87rem; }
.sidebar-foot small { display: block; }
.main-panel { width: min(100%, 1515px); margin: 0 auto; padding: 2.1rem clamp(1.15rem,3vw,2.8rem) 2rem; min-width: 0; }
.main-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin: .1rem 0 1.7rem; }
.main-header p { margin-top: .55rem; color: var(--muted); }
.main-header .button { margin-bottom: .15rem; min-height: 45px; }
.plan-heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.booking-text-fields { margin-top: .9rem; }
.booking-link-output { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; margin-top: .75rem; }
.booking-link-output label { flex: 1 1 16rem; }
.booking-link-output .button { min-height: 44px; }
.stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin-bottom: 1.3rem; }
.stat {
  min-width: 0; display: flex; gap: .85rem; align-items: flex-start; min-height: 119px; padding: 1rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow);
}
.stat p { color: #555670; font-size: .93rem; font-weight: 650; line-height: 1.25; }
.stat strong { display: block; font-size: 1.85rem; line-height: 1.1; letter-spacing: -.04em; margin: .25rem 0; }
.stat small { display: block; }
.stat-icon, .avatar { display: inline-grid; place-items: center; flex: 0 0 auto; }
.stat-icon { border-radius: 12px; width: 43px; height: 43px; }
.avatar { font-size: .85rem; font-weight: 750; border-radius: 50%; width: 36px; height: 36px; }
.purple { color: #4d39b9; background: #efecff; }
.teal { color: #146956; background: #e2f5ee; }
.orange { color: #95532d; background: #fff0e3; }
.blue { color: #31589a; background: #e8f1ff; }
.pink { color: #943970; background: #faeafa; }

.plan-card, .settings-form {
  border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow);
}
.plan-card { overflow: hidden; }
.plan-toolbar { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: 1.03rem 1.15rem; }
.date-group, .date-buttons, .date-title, .toolbar-actions, .view-controls { display: flex; align-items: center; gap: .46rem; }
.date-group, .toolbar-actions { gap: .8rem; }
.date-title h2 { font-size: clamp(1rem,1.65vw,1.22rem); }
.date-picker {
  position: relative; display: inline-grid; place-items: center; flex: 0 0 auto;
  width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; color: #565675; cursor: pointer;
}
.date-picker:focus-within { outline: 3px solid #8274f1; outline-offset: 2px; }
.date-picker input {
  color: transparent; opacity: 0; padding: 0; background: transparent; border: 0;
  position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer;
}
.date-picker input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.view-controls { gap: .12rem; padding: .18rem; border-radius: 11px; background: #f5f4fa; }
.view-controls .button { min-height: 36px; padding: .45rem .6rem; background: transparent; border: 1px solid transparent; color: #5b5b74; }
.view-controls .button[aria-pressed=true] { background: white; color: var(--primary-dark); border-color: var(--line); box-shadow: 0 1px 3px #2422450d; }
.legend { display: flex; align-items: center; gap: .95rem; flex-wrap: wrap; padding: .67rem 1.15rem; border-top: 1px solid #f1f0f7; border-bottom: 1px solid var(--line); color: #5d5c75; font-size: .86rem; }
.legend span { display: inline-flex; align-items: center; gap: .38rem; }
.legend i { width: 11px; height: 11px; border-radius: 4px; display: inline-block; border: 1px solid; }
.legend i.free { background: #edf8f2; border-color: #a9d1bb; }
.legend i.booked { background: #e8e3ff; border-color: #a897ea; }
.legend i.checked-in { background: #ddf4e9; border-color: #66ac96; }
.legend i.pending { background: #fff3d7; border-color: #bd974c; }
.legend i.closed { background: #f1f1f6; border-color: #d3d3e3; }
.legend .legend-tip { margin-left: auto; font-size: .82rem; }
.plan-filters {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1.6fr);
  align-items: end; gap: .65rem; padding: .85rem 1.15rem; border-bottom: 1px solid var(--line);
}
.plan-filters form { display: flex; align-items: end; min-width: 0; gap: .35rem; }
.plan-filters form label { flex: 1; }
.plan-filters form .button { min-height: 44px; flex: 0 0 44px; }
.search-summary, .search-error { margin: .85rem 1.15rem .2rem; }
.search-summary { color: var(--muted); }
.timeline-scroll { overflow: auto; }
.timeline { display: grid; grid-template-columns: 75px repeat(var(--columns),minmax(148px,1fr)); }
.time-heading, .person-heading { min-height: 61px; min-width: 0; border-bottom: 1px solid var(--line); }
.time-heading { display: grid; place-content: center; justify-items: center; gap: .22rem; color: var(--muted); font-size: .75rem; }
.time-heading svg { width: 17px; height: 17px; }
.person-heading { display: flex; align-items: center; gap: .6rem; padding: .55rem .72rem; border-left: 1px solid var(--line); }
.person-heading strong { display: block; font-size: .94rem; }
.person-heading small { display: block; }
.time-axis, .lane { position: relative; height: var(--timeline-height); }
.time-axis { background: #fff; }
.time-axis span { position: absolute; top: 0; left: 0; width: 100%; padding: .26rem .2rem 0; text-align: center; font-size: .87rem; color: #585a75; font-variant-numeric: tabular-nums; }
.lane {
  background: repeating-linear-gradient(to bottom,#dedeea 0 1px,transparent 1px var(--hour-height)), repeating-linear-gradient(135deg,#f4f4fa 0 5px,#f7f7fb 5px 10px);
  border-left: 1px solid var(--line); min-width: 0;
}
.working-block { position: absolute; inset-inline: 0; background: #f5fbf7; }
.lane::after { content: ""; pointer-events: none; position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom,#535b661a 0 1px,transparent 1px var(--hour-height)); }
.grid-slot { position: absolute; inset-inline: 0; width: 100%; display: block; padding: 0; border: 0; border-bottom: 1px solid #dcebe359; background: transparent; }
.grid-slot:not([aria-disabled]):hover, .grid-slot:focus-visible { background: #dceee6; box-shadow: inset 0 0 0 1px #81b69b; outline-offset: -3px; }
.grid-slot[aria-disabled] { pointer-events: none; }
.dragging .lane:hover { box-shadow: inset 0 0 0 2px #8b7ee8; }
.appointment { position: absolute; z-index: 2; inset-inline: 4px; border: 1px solid #5543c940; border-left: 4px solid currentColor; border-radius: 7px; text-align: left; padding: 1px .4rem; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.appointment:focus-visible { outline-offset: -1px; }
.appointment strong, .appointment small { flex: 0 0 auto; min-width: 0; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; line-height: 1.15; }
.appointment strong { font-size: .87rem; }
.appointment small { color: inherit; font-size: .82rem; }
.appointment.compact { flex-direction: row; align-items: center; justify-content: flex-start; gap: .34rem; }
.appointment.compact small { font-variant-numeric: tabular-nums; }
.appointment.compact strong { flex: 1 1 auto; }
.appointment[draggable] { cursor: grab; }
.appointment.checked-in { color: #116b54; background: #ddf4e9; }
.appointment:is(.pending,.email-pending), .week-appointment:is(.pending,.email-pending) { color: #754e10; background: #fff3d7; border-style: dashed; }
.booking-buffer { pointer-events: none; position: absolute; z-index: 1; inset-inline: 4px; background: repeating-linear-gradient(135deg,#e7e2fc 0 5px,#f2eeff 5px 10px); border-radius: 0 0 5px 5px; }
.filtered-booking { position: absolute; inset-inline: 4px; z-index: 1; border-radius: 5px;
  background: repeating-linear-gradient(135deg,#e4e4ef 0 5px,#f0f0f6 5px 10px); }
.now-line { position: absolute; z-index: 3; pointer-events: none; height: 2px; background: #c94b73; inset-inline: 0; }
.empty { padding: 1.5rem; color: var(--muted); }
.list-view { padding: .4rem 1.15rem 1rem; }
.list-row { width: 100%; display: grid; grid-template-columns: 7rem minmax(0,1fr) auto; align-items: center; gap: .6rem; border: 0; border-bottom: 1px solid var(--line); background: white; padding: .8rem .35rem; text-align: left; color: var(--text); border-radius: 5px; }
.list-row:hover { background: #f7f6fd; }
.list-row small { display: block; }
.series-summary { margin-bottom: .4rem; }
.series-summary small { display: block; }
.series-link { margin: .75rem 0; }
#series-details .list-view { padding: 0; }
.status { border-radius: 30px; padding: .28rem .6rem; background: #f1f1f5; font-size: .83rem; font-weight: 650; }
.status.booked { background: var(--lilac); color: #4132a7; }
.status.checked-in { background: #e2f5ee; color: #146956; }
.status.cancelled { background: #ffe9ec; color: #98384b; }
.status.no-show { background: #fff0d8; color: #814c11; }
.status:is(.pending,.email-pending) { background: #fff3d7; color: #754e10; }
.status.declined { background: #ffe9ec; color: #98384b; }
.staff-requests { margin-bottom: 1rem; }
.staff-request { border-top: 1px solid var(--line); display: flex; flex-wrap: wrap;
  justify-content: space-between; align-items: center; gap: .7rem; padding: .65rem 0; }
.staff-request small { display: block; }
.staff-request-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.week-board { display: grid; grid-template-columns: repeat(7,minmax(112px,1fr)); overflow-x: auto;
  border-top: 1px solid var(--line); }
.week-day { min-width: 0; min-height: 190px; background: white; }
.week-day + .week-day { border-left: 1px solid var(--line); }
.week-day > header { padding: .3rem; border-bottom: 1px solid var(--line); background: #f7f7fb; }
.week-day.current-day > header { background: var(--lilac); }
.week-day-button { display: block; width: 100%; min-height: 43px; padding: .35rem; border: 0; border-radius: 8px;
  background: transparent; color: var(--text); text-align: left; font-weight: 700; font-size: .9rem; }
.week-day-button:hover { color: var(--primary-dark); background: var(--white); }
.week-entries { display: grid; gap: .45rem; align-content: start; padding: .45rem; }
.week-appointment { display: grid; justify-items: start; gap: .18rem; width: 100%; min-width: 0; padding: .45rem;
  border: 1px solid currentColor; border-left-width: 3px; border-radius: 8px; text-align: left; }
.week-appointment small { color: inherit; overflow-wrap: anywhere; }
.week-appointment .status { margin-top: .17rem; justify-self: start; padding: .2rem .38rem; }
.week-appointment.checked-in { color: #116b54; background: #ddf4e9; }
.week-appointment.no-show { color: #814c11; background: #fff8ec; }
.week-appointment.cancelled, .week-appointment.completed { color: var(--muted); background: #f7f7fb; }

.settings-tabs { display: flex; gap: .35rem; overflow: auto; margin: 0 0 1rem; padding: 4px; scrollbar-width: thin; }
.settings-tabs .button { border-color: transparent; background: transparent; color: var(--muted); }
.settings-tabs .button[aria-current=page] { color: var(--primary-dark); border-color: #e1dcfc; background: #efedff; }
.settings-form > .error { margin: 1rem 1.2rem 0; }
.settings-section { padding: 1.25rem; }
.settings-section + .settings-section { border-top: 1px solid var(--line); }
.settings-section h2 { margin-bottom: .82rem; }
.settings-section p { color: var(--muted); }
.settings-section p + .hours-list { margin-top: 1rem; }
.section-heading { display: flex; gap: .8rem; align-items: flex-start; justify-content: space-between; }
.section-heading h2 { margin-bottom: .28rem; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .85rem; }
.form-grid.compact { grid-template-columns: minmax(140px,1.5fr) repeat(3,minmax(0,1fr)); }
.form-stack { display: grid; gap: .85rem; }
.form-stack > .button { justify-self: start; }
label { min-width: 0; }
label:not(.date-picker):not(.check-label) { display: flex; flex-direction: column; gap: .36rem; }
label > span { font-size: .89rem; font-weight: 650; color: #44455f; }
label small { display: block; }
input:not([type=checkbox]), select, textarea {
  min-width: 0; width: 100%; min-height: 44px; border: 1px solid #d9d9ea; border-radius: 9px;
  padding: .57rem .66rem; color: var(--text); background-color: white; font-size: 1rem;
}
textarea { min-height: 68px; resize: vertical; }
select {
  appearance: none; padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2366677e' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .65rem center;
}
.repeat { display: grid; gap: .85rem; margin-top: 1.05rem; }
.config-item { padding: .9rem; border: 1px solid var(--line); border-radius: 12px; background: #fcfcff; }
.config-item header { display: flex; gap: .65rem; align-items: center; margin-bottom: .85rem; }
.config-item header .check-label, .config-item header .button { margin-left: auto; }
.employee-card { padding: 0; }
.employee-card > summary, .employee-toggle { width: 100%; display: grid; grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center; gap: .65rem; min-height: 58px; padding: .7rem .85rem; border: 0; border-radius: 12px;
  color: var(--text); background: transparent; text-align: left; list-style: none; }
.employee-card > summary::-webkit-details-marker { display: none; }
.employee-card > summary::after, .employee-toggle::after { content: ""; width: .5rem; height: .5rem;
  justify-self: center; border-bottom: 2px solid var(--muted); border-right: 2px solid var(--muted); transform: rotate(45deg); }
.employee-card[open] > summary::after, .employee-toggle[aria-expanded=true]::after { transform: rotate(225deg); }
.employee-card > summary:hover, .employee-toggle:hover { background: #f3f1fb; }
.employee-card > summary small, .employee-toggle small { display: block; }
.employee-toggle { grid-template-columns: auto minmax(0,1fr) auto 1rem; }
.shift-count { font-size: .84rem; color: var(--muted); }
.employee-body { border-top: 1px solid var(--line); padding: .9rem; }
.employee-body h3 { font-size: 1rem; margin-bottom: .5rem; }
.employee-body > .small { margin-top: .4rem; }
.shift-permission { margin-bottom: .7rem; }
.shift-permission > p { margin: .35rem 0 0; }
.check-label { display: inline-flex; align-items: center; gap: .45rem; font-size: .9rem; line-height: 1.3; }
input[type=checkbox] { width: 1.07rem; height: 1.07rem; accent-color: var(--primary); margin: 0; flex: 0 0 auto; }
.qualifications { display: flex; flex-wrap: wrap; gap: .7rem; border: 1px solid var(--line); border-radius: 9px; margin: .85rem 0; padding: .65rem; }
.qualifications legend { font-size: .9rem; font-weight: 650; }
.config-item > .check-label { margin-top: .8rem; }
.config-item > .small { margin-top: .45rem; }
.hours-list { margin-top: .43rem; }
.own-shifts { padding-bottom: 1.5rem; }
.shift-toggle { margin-top: .75rem; }
.shift-editor { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .95rem; }
.shift-editor h3 { font-size: 1.04rem; margin: 0 0 .7rem; }
.shift-week { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; margin: .65rem 0 .4rem; }
.shift-editor > .section-heading { align-items: center; flex-wrap: wrap; }
.shift-editor > .section-heading h3 { margin: 0; }
.shift-week-list { display: flex; flex-wrap: wrap; align-content: start; gap: .45rem;
  max-height: 14rem; overflow-y: auto; padding: .32rem; margin: .38rem -.32rem 0; }
.shift-week-button { flex: 0 0 auto; display: grid; justify-items: start; gap: .24rem;
  min-width: 8.65rem; min-height: 58px; text-align: left; }
.shift-week-button[aria-pressed=true] { color: #4432ac; border-color: #8274f1; background: var(--lilac); }
.shift-week-button small { font-size: .83rem; }
.new-shift-week { display: flex; align-items: end; flex-wrap: wrap; gap: .45rem; padding: .65rem;
  border: 1px solid var(--line); border-radius: 10px; margin-top: .6rem; }
.new-shift-week label { flex: 1 1 11rem; }
.new-shift-week .button { min-height: 44px; }
.shift-editor > .muted { margin-top: .45rem; }
.hours-day { border-top: 1px solid var(--line); padding: 0; }
.hours-day summary { min-height: 44px; padding: .58rem .15rem; }
.hours-day summary strong { display: inline-block; min-width: 6.4rem; }
.hours-day summary time { margin-left: .18em; color: var(--muted); font-size: .88rem; font-weight: 500; white-space: nowrap; }
.hours-day summary span { margin-left: .45rem; color: var(--muted); font-size: .88rem; font-weight: 500; }
.hours-day-body { display: grid; gap: .55rem; padding: .22rem .15rem .75rem; }
.hours-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.hours-copy-days { display: grid; gap: .55rem; padding: .75rem; margin: 0; border: 1px solid var(--line); border-radius: 10px; }
.hours-copy-days .check-label small { display: block; }
.period { display: grid; grid-template-columns: repeat(2,minmax(0,155px)) 42px; align-items: end; justify-content: start; gap: .55rem; }
.clock-select { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center;
  min-width: 0; padding: 0; margin: 0; gap: .15rem; border: 0; }
.clock-select legend { padding: 0; margin: 0 0 .3rem; font-size: .88rem; font-weight: 650; }
.clock-select select { padding-inline: .4rem 1rem; background-position: right .18rem center; background-size: .7rem; font-variant-numeric: tabular-nums; }
.period .button { min-height: 44px; }
.period-warning { grid-column: 1 / -1; }
.error { background: #fff0f2; color: #8a263b; border: 1px solid #f0c5cf; padding: .65rem .75rem; border-radius: 9px; }
.toast { position: fixed; z-index: 20; bottom: max(1rem,env(safe-area-inset-bottom)); right: 1rem; max-width: calc(100vw - 2rem); color: white; background: #252043; box-shadow: 0 4px 16px #2520432b; border-radius: 10px; padding: .85rem 1rem; }
dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; width: min(33rem,calc(100% - 1.5rem)); max-height: calc(100dvh - 1.5rem); color: var(--text); overflow: auto; box-shadow: 0 10px 65px #16122c45; }
dialog::backdrop { background: #19163177; }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-bottom: .9rem; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .85rem; }
.dialog-actions .primary { margin-left: auto; }
.detail { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .7rem; margin: 0 0 .8rem; }
.detail dt { font-size: .84rem; color: var(--muted); }
.detail dd { margin: .14rem 0 0; overflow-wrap: anywhere; }
details { border-top: 1px solid var(--line); padding: .55rem 0; }
summary { cursor: pointer; font-weight: 650; padding: .25rem 0; }
details form { margin: .5rem 0 0; }
.inline-form { display: flex; align-items: end; gap: .55rem; }

.public-shell {
  --primary: #007148;
  --primary-dark: #005539;
  --lilac: #eaf5ef;
  --line: #dce8e1;
  --belivo-gold: #b38f39;
  max-width: 1130px; padding: 0 2rem; margin: 0 auto;
}
.public-shell :focus-visible { outline-color: var(--belivo-gold); }
.public-shell .button:hover:not(:disabled):not(.primary) { background: #edf6f0; border-color: #b5d1bf; }
.public-shell .button.primary { box-shadow: 0 2px 4px #00714830; }
.public-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 0 1.5rem; }
.booking-card { display: grid; grid-template-columns: minmax(240px,.77fr) minmax(0,1.17fr); border: 1px solid #dce8e1; border-radius: 22px; overflow: hidden; background: white; box-shadow: 0 12px 40px #1232260d; }
.booking-aside { color: white; background: radial-gradient(ellipse at 60% 15%,#008052 0,#007148 48%,#00452f 100%); padding: 2rem; position: relative; isolation: isolate; overflow: hidden; }
.booking-aside h1 { font-size: clamp(1.8rem, 1.1rem + 2.6vw, 3.4rem); letter-spacing: -.045em; text-wrap: balance; }
.booking-aside::before, .booking-aside::after { content: ""; position: absolute; width: 25rem; height: 25rem; border: 1px solid #e5c77365; border-radius: 50%; top: -8rem; right: -13rem; z-index: -1; }
.booking-aside::after { width: 30rem; height: 30rem; top: -11rem; right: -16rem; }
.booking-art { height: 200px; display: grid; place-items: center; position: relative; }
.art-tile { transform: rotate(-10deg); width: 138px; padding: .65rem; display: grid; grid-template-columns: repeat(3,1fr); gap: .28rem; border-radius: 17px; background: #acd7bb53; border: 1px solid #f4e0a890; box-shadow: 0 15px 35px #00332192; }
.art-tile div { grid-column: span 3; height: 16px; border-bottom: 1px solid #f4e0a8a0; margin-bottom: .12rem; }
.art-tile i { aspect-ratio: 1.23; border-radius: 5px; background: #d5ead68c; }
.art-tile i:nth-child(6) { background: #f2dfaa; }
.art-check { position: absolute; left: calc(50% + 38px); bottom: 29px; width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; background: #e5c773; color: #17452e; transform: rotate(12deg); box-shadow: 0 6px 15px #00332170; }
.art-check svg { width: 30px; height: 30px; }
.aside-copy p { margin-top: .62rem; color: #e0f2e7; }
.lead-note { display: flex; gap: .42rem; align-items: center; color: #f2fcf4; margin-top: 1.75rem; padding-top: .8rem; border-top: 1px solid #e5c77374; font-size: .89rem; }
.closure-note { background: #003a275e; border: 1px solid #e5c77374; border-radius: 12px; padding: .72rem; margin-top: .9rem; }
.closure-note h2 { font-size: 1rem; margin-bottom: .45rem; }
.closure-note div + div { margin-top: .45rem; }
.closure-note strong, .closure-note small { display: block; font-size: .88rem; }
.closure-note small { color: #e6f4e9; }
.booking-main { padding: clamp(1.2rem,3vw,2rem); min-width: 0; }
.booking-main h2 { font-size: clamp(1.4rem,2.7vw,1.9rem); }
.booking-progress { display: flex; gap: 1rem; font-size: .86rem; font-weight: 650; color: #6c6d82; border-bottom: 1px solid var(--line); margin-bottom: 1.2rem; }
.booking-progress span { padding-bottom: .56rem; }
.booking-progress .selected { color: var(--primary-dark); box-shadow: 0 2px var(--primary); }
.public-intro { color: var(--muted); margin-top: .45rem; }
.booking-options { margin-top: 1.15rem; }
.date-section { margin-top: 1.18rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.booking-date-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.booking-date-header > div { display: flex; gap: .3rem; }
.booking-date-header h3, .time-section h3 { font-size: 1rem; }
.day-strip { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: .36rem; margin-top: .65rem; }
.day-strip button { display: grid; justify-items: center; align-content: center; gap: .21rem; min-height: 58px; padding: .3rem .05rem; background: white; border: 1px solid var(--line); border-radius: 9px; color: var(--text); }
.day-strip button span { font-size: .83rem; color: var(--muted); }
.day-strip button:not(:disabled):hover, .day-strip button[aria-pressed=true], .time-options button[aria-pressed=true] { background: var(--lilac); border-color: #88b5a0; color: var(--primary-dark); }
.day-strip button:disabled { background: #f6f6fa; color: var(--muted); }
.day-strip button[aria-pressed=true] span { color: var(--primary-dark); }
.day-strip button[data-availability="available"] { background: #f0faf5; border-color: #bddfce; }
.day-strip button[data-availability="unavailable"] { background: #f8f8fb; color: var(--muted); }
.day-strip button[data-availability][aria-pressed=true] { box-shadow: inset 0 0 0 1px var(--primary); border-color: var(--primary); }
.day-indicator { width: .42rem; height: .42rem; border-radius: 50%; }
.day-strip [data-availability="available"] .day-indicator, .availability-key .available { background: #197956; }
.day-strip [data-availability="unavailable"] .day-indicator, .availability-key .unavailable { border: 1px solid #7b7c92; }
.availability-key { margin-top: .35rem; display: flex; flex-wrap: wrap; gap: .2rem .8rem; color: var(--muted); font-size: .82rem; }
.availability-key span { display: inline-flex; align-items: center; gap: .3rem; }
.availability-key i { width: .42rem; height: .42rem; border-radius: 50%; }
.chosen-times { margin-top: 1rem; padding: .7rem; border: 1px solid #e8d6a7; border-radius: 10px; background: #fffbef; }
.chosen-times > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .7rem; }
.chosen-times ul { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: .5rem 0 0; }
.chosen-times li { display: inline-flex; align-items: center; gap: .35rem; padding-left: .55rem; min-height: 44px;
  border-radius: 9px; background: white; border: 1px solid var(--line); font-size: .9rem; }
.chosen-times .button { min-height: 42px; border-color: transparent; }
.time-section { margin-top: .9rem; }
#slots { margin-top: .55rem; }
.time-options { display: grid; grid-template-columns: repeat(auto-fill,minmax(66px,1fr)); gap: .4rem; }
.time-options .button { padding-inline: .32rem; }
.booking-actions { display: flex; align-items: center; justify-content: space-between; gap: .65rem; margin-top: 1rem; }
.booking-actions .primary { min-width: 120px; margin-left: auto; }
.public-footer { color: var(--muted); font-size: .84rem; text-align: center; padding: 1rem; }
.public-footer a { display: inline-block; padding: .45rem .6rem; text-decoration: underline; text-underline-offset: .18em; }
.admin-signin h1 { margin-bottom: .75rem; }
.admin-signin .brand { margin-bottom: 1rem; }
.admin-signin-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.tenant-access {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: #f2f7f4;
  --primary: #007148;
  --primary-dark: #005a39;
  --line: #d5e2da;
}
.tenant-access-card {
  width: min(100%, 29rem);
  display: grid;
  gap: 1rem;
  padding: clamp(1.25rem, 5vw, 2.5rem);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.tenant-access-card > .brand { justify-self: center; }
.tenant-access-card #loginform { display: grid; gap: .95rem; }
.tenant-access-card #loginform label:not(.check-label) { display: block; font-weight: 600; }
.tenant-access-card .show-password { min-height: 40px; cursor: pointer; }
.tenant-access-card :is(input[type=text], input[type=password], input[type=email], input:not([type])) {
  width: 100%;
  min-height: 44px;
  padding: .6rem .75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.tenant-access-card #loginform .input { margin-top: .35rem; }
.tenant-access-card #wp-submit {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--primary);
  font-weight: 650;
  cursor: pointer;
}
.tenant-access-links { display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.tenant-access-links a { color: var(--primary); text-decoration: underline; }
.recap { display: flex; align-items: center; gap: .65rem; margin: .9rem 0; padding: .65rem; background: #f1f8f3; border: 1px solid #dce8e1; border-radius: 10px; }
.recap small { display: block; }
.confirmed > .stat-icon { margin: .35rem 0 .7rem; }
.confirmed > .button { margin-top: .8rem; }

@media (max-width: 900px) {
  .workspace { grid-template-columns: 185px minmax(0,1fr); }
  .main-panel { padding-inline: 1rem; }
  .stat { padding: .8rem; gap: .5rem; }
  .stat-icon { width: 37px; height: 37px; border-radius: 10px; }
  .form-grid.compact { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .legend .legend-tip { margin-left: 0; }
}
@media (max-width: 720px) {
  .workspace { display: block; }
  .sidebar { position: static; height: auto; padding: .75rem .75rem .42rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { margin: 0 0 .66rem .12rem; }
  .sidebar nav { display: flex; gap: .13rem; flex-wrap: wrap; }
  .sidebar nav a { min-height: 42px; font-size: .87rem; padding: .45rem .5rem; gap: .33rem; }
  .sidebar nav a svg { width: 16px; height: 16px; }
  .sidebar-foot, .nav-label { display: none; }
  .main-panel { padding: 1.15rem .75rem 1.3rem; }
  .main-header { gap: .6rem; align-items: flex-start; margin-bottom: .85rem; }
  .main-header p { margin-top: .37rem; font-size: .94rem; }
  .main-header .button { margin-bottom: 0; }
  .stats { gap: .38rem; margin-bottom: .75rem; }
  .stat { display: block; min-height: auto; padding: .52rem; border-radius: 12px; }
  .stat .stat-icon { display: none; }
  .stat p { font-size: .81rem; }
  .stat strong { font-size: 1.45rem; }
  .stat small { display: none; }
  .plan-toolbar { flex-wrap: wrap; padding: .65rem .55rem; gap: .42rem; }
  .date-group { width: 100%; gap: .45rem; }
  .date-title { flex: 1; justify-content: space-between; gap: .3rem; }
  .date-buttons { gap: .22rem; }
  .date-buttons .square { width: 36px; }
  .date-title h2 { font-size: 1rem; }
  .toolbar-actions { width: 100%; justify-content: space-between; }
  .week-board { display: block; }
  .week-day { min-height: 0; }
  .week-day + .week-day { border-left: 0; border-top: 1px solid var(--line); }
  .week-entries { padding: .52rem .65rem; }
  .week-appointment { grid-template-columns: minmax(0,1fr) auto; }
  .week-appointment > .status { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .legend { padding: .5rem .6rem; gap: .34rem .65rem; font-size: .79rem; }
  .legend .legend-tip { display: none; }
  .plan-filters { grid-template-columns: repeat(2,minmax(0,1fr)); padding: .65rem; }
  .plan-filters form { grid-column: 1 / -1; }
  .timeline { grid-template-columns: 53px repeat(var(--columns),minmax(125px,1fr)); }
  .time-heading { font-size: .71rem; }
  .person-heading { padding-inline: .4rem; gap: .4rem; }
  .person-heading .avatar { width: 30px; height: 30px; }
  .settings-section { padding: .78rem; }
  .settings-tabs { margin-bottom: .7rem; }
  .period { grid-template-columns: repeat(2,minmax(0,1fr)) 44px; justify-content: stretch; }
  .clock-select select { padding-inline: .29rem .72rem; background-position: right .06rem center; background-size: .58rem; }
  .public-shell { padding: 0 .7rem; }
  .public-header { display: grid; grid-template-columns: 1fr auto 1fr; padding: 1rem 0 1.25rem; gap: .65rem; }
  .public-header .brand { grid-column: 2; justify-self: center; }
  .public-header .button { grid-column: 3; justify-self: end; }
  .brand img { width: 6.2rem; }
  .booking-card { display: flex; flex-direction: column; border-radius: 15px; }
  .booking-aside { padding: 1.15rem; }
  .booking-art { display: none; }
  .lead-note { margin-top: .65rem; padding-top: .57rem; }
  .booking-main { padding: .95rem; }
}
@media (max-width: 420px) {
  .main-header { flex-wrap: wrap; }
  .main-header .button { min-height: 42px; }
  .plan-heading-actions { justify-content: flex-start; }
  .public-header .button { grid-column: 1 / -1; justify-self: center; padding: .45rem; }
  .booking-options, .settings-section .form-grid, .settings-section .form-grid.compact { grid-template-columns: 1fr; }
  .form-grid { gap: .56rem; }
  .list-row { grid-template-columns: auto minmax(0,1fr); }
  .list-row .status { grid-column: 2; justify-self: start; }
}

.directory { display: grid; gap: 1rem; max-width: 53rem; margin: 0 auto; padding: 1rem 0 3rem; }
.directory-links { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: .6rem; }
.directory .button, .directory input { min-height: 44px; }
.settings-help { margin: -.35rem 0 .9rem; }
.settings-help a { display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; }
.help-guide { display: grid; gap: 1rem; max-width: 58rem; }
.help-contents ul { display: grid; gap: .45rem 1.5rem; grid-template-columns: repeat(auto-fit,minmax(min(100%,16rem),1fr)); }
.help-contents a, .settings-help a { color: var(--primary-dark); text-decoration: underline; text-underline-offset: .2em; }
.help-topic { scroll-margin-top: 1rem; }
.help-topic ol { padding-inline-start: 1.4rem; }
.help-topic li { margin-block: .55rem; line-height: 1.6; }
.help-topic h3 { margin-top: .9rem; }
.help-topic .button { margin-top: .65rem; }
