:root { font: 16px/1.5 system-ui, sans-serif; color: #27231e; background: #f8f5ee; --line: #e1d9c9; --muted: #655b4b; --gold: #8c6227; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: #62491f; text-underline-offset: .2em; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid #9b681d; outline-offset: 3px; }
.topbar { background: #fffdf8; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem clamp(1rem,5vw,4rem); }
.brand img { display: block; width: auto; height: 52px; }
main { max-width: 1360px; margin: auto; padding: clamp(1rem,4vw,3.5rem) clamp(1rem,5vw,4rem) 4rem; }
.agenda-heading,.toolbar,.actions,.date-nav,.views,.dialog-head,.dialog-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.agenda-heading,.toolbar,.dialog-head { justify-content: space-between; }
.mobile-booking { display: none; }
h1,h2,h3,p { margin-top: 0; }
h1,h2,h3 { font-family: Georgia,serif; font-weight: 500; }
h1,h2 { margin-bottom: 0; font-size: clamp(1.45rem,3vw,2.2rem); }
.demo-note { margin: .9rem 0 1.4rem; color: var(--muted); font-size: .91rem; }
.button,.views button,.section-nav button { border: 1px solid var(--line); border-radius: 7px; padding: .56rem .78rem; min-height: 42px; color: #342a20; background: #fffdf8; font-weight: 620; }
.button:hover,.views button:hover,.section-nav button:hover { background: #f1e8d7; }
.button.primary { background: #31271b; border-color: #31271b; color: #fff9ec; }
.button.primary:hover { background: #4a3823; }
.icon { padding-inline: .65rem; min-width: 42px; font-size: 1.2rem; line-height: 1; }
.section-nav { display: flex; gap: .5rem; padding: 0 0 .75rem; margin-bottom: 1.05rem; border-bottom: 1px solid var(--line); }
.desktop-booking { margin-inline-start: auto; }
button[aria-pressed=true], #add-pause[aria-expanded=true] { background: #ede2ce; border-color: #bfa370; }
.date-select { display: flex; align-items: center; gap: .45rem; }
.date-select span { font-size: .85rem; color: var(--muted); }
#planning-weekday::first-letter { text-transform: uppercase; }
input,select { min-width: 0; max-width: 100%; min-height: 42px; padding: .45rem .5rem; background: #fffdf8; color: #27231e; border: 1px solid #baab91; border-radius: 6px; }
.agenda-heading { margin: 1rem 0 .8rem; }
.calendar-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #fffdf9; }
.day-grid { display: grid; grid-template-columns: clamp(3.25rem, 12vw, 4.1rem) repeat(2,minmax(0,1fr)); }
.time-head,.lane-head { padding: .7rem .4rem; text-align: center; background: #f0eadd; border-bottom: 1px solid var(--line); font-weight: 700; }
.lane-head.women { background: #f3e8e2; }
.time-label { padding: .18rem .45rem; color: var(--muted); font-size: .77rem; border-bottom: 1px solid #eee7da; font-variant-numeric: tabular-nums; }
.slot { min-width: 0; min-height: 30px; border: 0; border-bottom: 1px solid #eee7da; border-left: 1px solid #eee7da; background: transparent; color: #846b44; padding: 0; }
.slot:hover { background: #f4ecdc; }
.slot::after { content: '+'; opacity: 0; }
.slot:hover::after,.slot:focus-visible::after { opacity: 1; }
.slot.closed { background: #f1eee7; }
.event { z-index: 2; display: block; align-self: stretch; min-height: 0; width: calc(100% - .48rem); margin: .12rem .24rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; color: #29251f; background: color-mix(in srgb, var(--chip) 20%, #fffdf8); border: 1px solid color-mix(in srgb, var(--chip) 32%, #fffdf8); border-left: 4px solid var(--chip); border-radius: 5px; padding: .13rem .35rem; font-size: .8rem; font-weight: 650; }
.event small { display: block; overflow: hidden; text-overflow: ellipsis; color: #4c4035; font-weight: 450; }
.day-status { margin: 0; padding: .65rem .85rem; color: var(--muted); background: #f0ebe0; border-bottom: 1px solid var(--line); }
.period-grid { display: grid; grid-template-columns: repeat(7,minmax(6.5rem,1fr)); min-width: 48rem; }
.period-grid > * { min-width: 0; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.day-cell { min-height: 6.5rem; background: #fffdf8; color: #322a1f; text-align: left; padding: .55rem; }
.day-cell:hover { background: #f0e7d6; }
.day-cell.out { background: #f4f0e7; }
.day-cell[aria-current=date] { box-shadow: inset 0 0 0 2px #a88043; }
.day-cell small { display: block; margin-top: .25rem; color: var(--muted); }
.label-catalog { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,19rem),1fr)); gap: 1rem; margin-top: .9rem; }
.label-group { border-radius: 8px; border: 1px solid var(--line); background: #fffdf8; padding: 1rem; }
.label-group h3 { margin-bottom: .45rem; }
.label-group label { display: flex; align-items: center; justify-content: space-between; gap: .65rem; border-top: 1px solid var(--line); padding-block: .35rem; }
.label-group input { width: 44px; min-height: 34px; padding: .15rem; flex: none; }
dialog { width: min(95vw,38rem); max-height: 90dvh; background: #fffdf8; color: #27231e; border: 1px solid #c3a571; border-radius: 10px; padding: clamp(1rem,4vw,1.7rem); box-shadow: 0 16px 50px #31271b35; }
dialog::backdrop { background: #21180f70; }
.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; margin: 1rem 0; }
.fields label { display: grid; min-width: 0; gap: .2rem; font-weight: 650; font-size: .89rem; }
.fields .wide,#service-field { grid-column: 1 / -1; }
.dialog-actions { justify-content: flex-end; }
.danger,.error { color: #8b2f2b; }
.error:empty { display: none; }
.notice { position: fixed; bottom: 1rem; right: 1rem; max-width: calc(100vw - 2rem); margin: 0; padding: .7rem 1rem; border-radius: 7px; background: #33291c; color: #fff9ec; box-shadow: 0 4px 18px #31271b45; z-index: 3; }
@media(max-width: 530px) {
  .topbar { font-size: .88rem; }
  .section-nav { flex-wrap: wrap; }
  .desktop-booking { display: none; }
  .date-nav { display: grid; grid-template-columns: auto auto auto minmax(0,1fr); gap: .3rem; width: 100%; }
  .date-nav .button { padding-inline: .35rem; font-size: .8rem; }
  .date-nav .icon { min-width: 2.125rem; font-size: 1.2rem; }
  .date-select { flex-wrap: wrap; }
  .date-nav .date-select { flex-wrap: nowrap; gap: .25rem; }
  #day { flex: 1; width: 100%; padding-inline: .25rem; }
  .agenda-heading .actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .4rem; width: 100%; }
  .agenda-heading .actions .button { padding-inline: .35rem; font-size: .85rem; }
  .mobile-booking { display: block; }
  .fields { grid-template-columns: minmax(0,1fr); }
  .event small { display: none; }
}
@media(max-width: 365px) {
  .date-nav .date-select { flex-direction: column; align-items: stretch; gap: 0; }
}
.lane-head small { display: block; font-weight: 500; color: var(--muted); }
.slot:focus-visible { outline-offset: -3px; }
.pause-mode .slot:not(.closed):hover { background: #f7dfad; }
.event { line-height: 1.15; }
.event small { display: block; }
.client-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin: .7rem 0; }
.client-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; gap: 1rem; }
.list-panel { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: #fffdf8; padding: .85rem; margin-bottom: .8rem; }
.list-panel h3 { margin-bottom: .6rem; }
.list-panel > p:last-child { margin-bottom: 0; }
.list-row { display: block; width: 100%; border: 1px solid var(--line); border-radius: 5px; padding: .55rem .65rem; background: #fffdf8; color: #302719; text-align: left; overflow-wrap: anywhere; }
.list-row + .list-row { margin-top: .35rem; }
.list-row:hover { background: #f4ecdc; }
.list-row small { display: block; color: var(--muted); }
#archived-day:not(:empty) { margin-top: 1rem; }
.mail-entry { border-top: 1px solid var(--line); padding: .45rem 0; }
.mail-entry summary { cursor: pointer; font-weight: 650; }
.mail-meta { margin: .4rem 0; color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.mail-body { margin: .35rem 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-field { display: grid; gap: .3rem; margin-bottom: .7rem; font-weight: 650; }
.message-field textarea { resize: vertical; min-height: 7rem; font: inherit; border: 1px solid var(--line); border-radius: 6px; padding: .55rem; }
@media (max-width: 620px) { .client-layout { grid-template-columns: minmax(0, 1fr); } }
.pause-clock { min-width: 0; margin: 0; padding: .55rem .75rem .3rem; border: 1px solid var(--line); border-radius: 8px; }
.pause-clock legend { padding-inline: .25rem; font-weight: 650; }
.clock-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .7rem; }
.clock-columns span { display: block; margin-bottom: .2rem; font-size: .86rem; font-weight: 650; text-align: center; }
.time-wheel { --clock-row: 2.25rem; height: calc(5 * var(--clock-row)); overflow-y: auto; overscroll-behavior-y: contain; scroll-snap-type: y mandatory; border: 1px solid var(--line); border-radius: 6px; background: #f8f4eb; }
.time-wheel::before,.time-wheel::after { content: ''; display: block; height: calc(2 * var(--clock-row)); }
.time-option { display: grid; place-items: center; height: var(--clock-row); font-variant-numeric: tabular-nums; scroll-snap-align: center; user-select: none; cursor: pointer; }
.time-option[aria-selected=true] { background: #e7d7b6; color: #3e2c10; font-weight: 725; }
.time-option:hover { text-decoration: underline; }
#pause-clock-note { margin: .45rem 0 0; text-align: center; }
.daily-scroll { max-height: min(66dvh, 46rem); }
.day-grid { --slot-height: 27px; --walkthrough-slot-height: var(--slot-height); }
.day-grid .time-head,.day-grid .lane-head { position: sticky; top: 0; z-index: 3; }
.day-grid .time-head { left: 0; z-index: 4; }
.day-grid .time-label { position: sticky; left: 0; z-index: 2; background: #fffdf9; }
.day-grid .slot { min-height: 0; }
.day-grid .slot::after { content: none; }
.client-directory { margin-top: 1rem; border: 1px solid var(--line); border-radius: 9px; background: #fffdf8; }
.client-directory > summary { cursor: pointer; padding: .75rem .9rem; font-weight: 700; }
.client-directory-content { padding: 0 .8rem .1rem; }
.client-directory-content > .date-select { margin-bottom: .7rem; }
.directory-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem .6rem; padding: .65rem 0; border-top: 1px solid var(--line); }
.directory-info { flex: 1 1 9rem; min-width: 0; overflow-wrap: anywhere; }
.directory-info small { display: block; color: var(--muted); }
.directory-row > .button { flex: 0 0 auto; }
.customer-facts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); margin: 1rem 0 1.15rem; gap: .3rem .65rem; }
.customer-facts dt { color: var(--muted); }
.customer-facts dd { margin: 0; overflow-wrap: anywhere; }
.pause-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .8rem; padding: .65rem .75rem; margin-bottom: .7rem; background: #f6edda; border: 1px solid #cdb285; border-radius: 8px; }
.pause-tools p { flex: 1 1 16rem; margin: 0; }
.event.event-red,.list-row.list-row-red { color: #6b1a19; background: #f9d6d4; border-color: #b63130; border-left: 4px solid #b63130; }
.event.event-red small { color: #6b1a19; }
.list-row.list-row-red:hover { background: #f4c2bf; }
.pause-manager-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .45rem .8rem; margin-block: .8rem .6rem; }
.pause-check { display: flex; align-items: center; gap: .55rem; min-height: 44px; cursor: pointer; }
.pause-check input { width: 1.15rem; height: 1.15rem; min-height: 0; margin: 0; flex: 0 0 auto; accent-color: #8c6227; }
.pause-delete-row { padding: .45rem .3rem; border-top: 1px solid var(--line); }
.pause-delete-row small { display: block; color: var(--muted); }
#pause-delete-list { max-height: min(40dvh, 20rem); overflow: auto; }
.pause-confirm { margin-top: .75rem; padding: .7rem .8rem; border: 1px solid #c78a84; border-radius: 6px; background: #fbede9; }
.pause-confirm p { margin-bottom: .55rem; }

.event-name { display: block; overflow: hidden; text-overflow: ellipsis; }
.event-status { display: block; width: fit-content; max-width: 100%; margin-bottom: .15rem; border-radius: 3px; padding: .05rem .25rem; white-space: normal; font-size: .68rem; font-weight: 750; }
.status-completed { background: #e4eadc; color: #3b4d32; }
.status-cancelled { background: #ab302c; color: #fff; }
.status-absent { background: #fff0be; color: #553409; border: 1px solid #a87620; }
.event-released { z-index: 1; }
.history-status { border-left: 4px solid var(--chip); background: color-mix(in srgb, var(--chip) 20%, #fffdf8); }
.client-suggestions { margin-top: .25rem; border: 1px solid var(--line); border-radius: 7px; background: #fffdf8; max-height: 11rem; overflow: auto; }
.client-suggestion { display: block; width: 100%; min-height: 44px; border: 0; background: transparent; text-align: left; padding: .4rem .6rem; color: #322a1f; overflow-wrap: anywhere; }
.client-suggestion + .client-suggestion { border-top: 1px solid var(--line); }
.client-suggestion:hover,.client-suggestion:focus-visible { background: #f4ecdc; }
.client-suggestion small { display: block; color: var(--muted); }
#selected-client-history { margin: .35rem 0 0; }
.event { position: relative; }
@media (max-width: 600px) {
  .day-grid { --walkthrough-slot-height: 34px; grid-template-columns: 3.05rem repeat(2,minmax(0,1fr)); }
  .day-grid .lane-head { font-size: .9rem; }
  .day-grid .time-label { padding-inline: .3rem; }
  .day-grid .event { margin: .12rem .17rem; width: calc(100% - .34rem); padding: .18rem .27rem; font-size: .76rem; line-height: 1.13; }
  .day-grid .event-booking .event-extra { display: none; }
  .day-grid .event-service { margin-top: .14rem; overflow-wrap: anywhere; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .day-grid .event-status { font-size: .62rem; margin-bottom: .1rem; }
  .client-directory-content { padding-inline: .55rem; }
  .directory-row > .button { padding-inline: .6rem; font-size: .86rem; }
}

.day-grid [data-walkthrough-booking] { white-space: normal; overflow-wrap: anywhere; }
.day-grid [data-walkthrough-booking] .event-name,
.day-grid [data-walkthrough-booking] small { display: block; overflow: visible; text-overflow: clip; line-height: 1.25; }
.day-grid [data-walkthrough-booking] small { margin-top: .12rem; font-size: .72rem; }
.day-grid [data-walkthrough-booking] .walkthrough-reference { font-weight: 700; }
.pause-mode .event-released { pointer-events: none; }
#profile-subtitle { margin: .35rem 0 .6rem; }

.management-intro { display: none; }
.show-management-intro { overflow: hidden; }
.show-management-intro .topbar,
.show-management-intro main { visibility: hidden; }
.show-management-intro .management-intro {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: auto;
  padding: max(.5rem, env(safe-area-inset-top)) 1rem max(.5rem, env(safe-area-inset-bottom));
  text-align: center;
  color: #fcf2dd;
  background: radial-gradient(ellipse at 50% 30%, #382a1c, #171310 62%, #0e0d0c);
}
.management-intro-copy { flex: none; }
.management-intro-logo { display: block; width: clamp(4.5rem, 12vh, 7.75rem); height: auto; margin: 0 auto .3rem; }
.management-intro h1 { margin: 0 0 .25rem; font-size: clamp(1.15rem, 3.7vw, 1.85rem); line-height: 1.15; }
.management-intro-copy p { margin: 0; color: #e4d4b6; font-size: .88rem; }
.install-video {
  display: block;
  flex: 1 1 0;
  width: min(100%, 32rem);
  height: auto;
  min-height: 12rem;
  max-height: 48rem;
  margin: .4rem auto .35rem;
  object-fit: contain;
  border-radius: .8rem;
}
.install-instruction { flex: none; width: min(100%, 26rem); min-height: 2.7em; margin: 0 0 .35rem; font-size: .94rem; line-height: 1.35; }
.install-replay {
  flex: none;
  min-height: 44px;
  margin: 0 0 .45rem;
  padding: .35rem .9rem;
  border: 1px solid #bc975e;
  border-radius: .55rem;
  background: #251d16;
  color: #f8e4ba;
  font-size: .88rem;
  font-weight: 650;
}
.install-replay:hover { background: #3b2b1d; }
.install-progress { flex: none; width: 5rem; height: .3rem; margin-bottom: auto; accent-color: #eac67d; }
@media (prefers-reduced-motion: no-preference) {
  .show-management-intro .management-intro-copy { animation: install-reveal .42s ease-out both; }
}
@keyframes install-reveal {
  from { opacity: 0; transform: translateY(.5rem); }
  to { opacity: 1; transform: translateY(0); }
}
