/* Berberce panel 2026-09-17 svg-mobil-glass */
:root {
  --brand: #DF7D3B;
  --brand-strong: #B45316;
  --brand-hover: #933F0F;
  --brand-soft: #F6E4D4;
  --saxe: var(--brand-strong);
  --saxe-dark: var(--brand-hover);
  --saxe-soft: var(--brand-soft);
  --ink: #272725;
  --ink-2: #272725;
  --ink-3: #3a3a37;
  --purple: #3a2754;
  --surface: #F5F6F7;
  --card: #FFFFFF;
  --line: #E4E7EC;
  --text: #272725;
  --muted: #667085;
  --ok: #1c6b45;
  --ok-bg: #e6f4ec;
  --warn: #8a5a00;
  --warn-bg: #fff4d6;
  --danger: #a61b1b;
  --danger-bg: #fdecec;
  --pending: #9d174d;
  --pending-bg: #fde8f1;
  --st-pending: #e84b8a;
  --st-confirmed: #16a34a;
  --st-confirmed-bg: #e3f6ea;
  --st-confirmed-fg: #166534;
  --st-completed: #2563eb;
  --st-completed-bg: #e4eeff;
  --st-completed-fg: #1e3a8a;
  --st-cancelled: #dc2626;
  --st-cancelled-bg: #fde8e8;
  --st-cancelled-fg: #991b1b;
  --st-noshow: #6b7280;
  --st-noshow-bg: #eceef1;
  --st-noshow-fg: #374151;
  --shadow: 0 1px 2px rgba(39, 39, 37, .06);
  --radius: 12px;
  --font: "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --sidebar: 248px;
  --chrome-bg: #FFFFFF;
  --chrome-text: #272725;
  --chrome-line: #E4E7EC;
  --chrome-input: #FFFFFF;
  --chrome-active: var(--brand-soft);
  --chrome-active-text: #272725;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; }
html.panel-ui { background: var(--surface); color-scheme: light; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  line-height: 1.5;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; }
a { color: var(--saxe-dark); }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--saxe); outline-offset: 2px; }
[hidden] { display: none !important; }
.skip-link {
  position: absolute; left: -999px; top: 8px; background: #fff; padding: .5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 8px; }

.icon { width: 20px; height: 20px; display: inline-block; vertical-align: -3px; flex-shrink: 0; }
.icon-24 { width: 24px; height: 24px; vertical-align: -4px; }
.icon-lg { width: 1.7rem; height: 1.7rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border: 1px solid transparent; border-radius: 10px;
  padding: .62rem 1rem; background: var(--saxe); color: #fff; cursor: pointer;
  text-decoration: none; font-weight: 600; min-height: 2.6rem;
}
.btn:hover { background: var(--saxe-dark); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-secondary { background: var(--card); color: var(--text); border-color: var(--line); }
.btn-secondary:hover { background: #EEF0F2; color: var(--ink); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #8e1515; }
.btn-ghost { background: transparent; color: inherit; border-color: transparent; }
.btn-block { width: 100%; }
.btn-sm { min-height: 2.1rem; padding: .35rem .7rem; font-size: .9rem; }

.badge {
  display: inline-flex; align-items: center; gap: .25rem;
  border-radius: 999px; padding: .15rem .6rem; font-size: .82rem; font-weight: 600;
  background: var(--saxe-soft); color: var(--saxe-dark);
}
.badge-pending { background: var(--pending-bg); color: var(--pending); }
.badge-confirmed { background: var(--st-confirmed-bg); color: var(--st-confirmed-fg); }
.badge-completed { background: var(--st-completed-bg); color: var(--st-completed-fg); }
.badge-cancelled { background: var(--st-cancelled-bg); color: var(--st-cancelled-fg); }
.badge-no_show, .badge-no-show { background: var(--st-noshow-bg); color: var(--st-noshow-fg); }
.badge .status-dot,
.status-dot {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  background: currentColor;
}
.status-dot-pending, .badge-pending .status-dot { background: var(--st-pending); }
.status-dot-confirmed, .badge-confirmed .status-dot { background: var(--st-confirmed); }
.status-dot-completed, .badge-completed .status-dot { background: var(--st-completed); }
.status-dot-cancelled, .badge-cancelled .status-dot { background: var(--st-cancelled); }
.status-dot-no_show, .status-dot-no-show, .badge-no_show .status-dot, .badge-no-show .status-dot { background: var(--st-noshow); }
.badge-active { background: var(--ok-bg); color: var(--ok); }
.badge-passive { background: #ececec; color: #555; }

.flash { border-radius: var(--radius); padding: .85rem 1rem; margin: 0 0 1rem; }
.flash-ok { background: var(--ok-bg); color: var(--ok); }
.flash-error { background: var(--danger-bg); color: var(--danger); }
.flash-warn { background: var(--warn-bg); color: var(--warn); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.1rem;
}
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: 1rem; }
.stat .label { color: var(--muted); font-size: .9rem; }
.stat .value { font-size: 1.6rem; font-weight: 700; margin-top: .2rem; }
.stat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}
.stat-head .icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--brand);
}
.stat-head .label,
.stat-head .hint {
  margin: 0;
  min-width: 0;
}

.field { margin-bottom: 1rem; }
.field label, .label { display: block; font-weight: 600; margin-bottom: .35rem; }
.field-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 .35rem;
}
.field-head > label { margin: 0; }
.field-info { position: relative; flex: 0 0 auto; }
.field-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.field-info-btn:hover,
.field-info-btn[aria-expanded="true"] {
  background: var(--brand-soft);
  color: var(--brand-strong);
}
.field-info-btn:focus-visible {
  outline: 3px solid var(--brand-strong);
  outline-offset: 2px;
}
.field-info-icon { width: 17px; height: 17px; }
.field-info-pop {
  position: fixed;
  z-index: 70;
  width: min(18rem, calc(100vw - 16px));
  padding: 12px 14px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(39, 39, 37, .12);
  font-size: .88rem;
  font-weight: 500;
  line-height: 1.45;
}
.field-info-pop[hidden] { display: none !important; }
.field input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]),
.field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: .65rem .8rem; background: var(--card); color: var(--text);
}
.field input[type="radio"],
.field input[type="checkbox"] {
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: var(--brand);
}
.field textarea { min-height: 90px; resize: vertical; }
.field-error { color: var(--danger); font-size: .88rem; margin: .3rem 0 0; }
.hint { color: var(--muted); font-size: .88rem; margin-top: .3rem; }
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.float-field { position: relative; margin-bottom: 1rem; }
.float-field input {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 1.15rem .85rem .45rem; background: var(--card); color: var(--text);
}
.float-field label {
  position: absolute; left: .85rem; top: .9rem; color: var(--muted);
  pointer-events: none; transition: transform .15s ease, font-size .15s ease, top .15s ease;
}
.float-field input:focus + label,
.float-field input:not(:placeholder-shown) + label {
  top: .28rem; font-size: .72rem; font-weight: 600; color: var(--saxe-dark);
}

.table-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { text-align: left; padding: .7rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-size: .82rem; letter-spacing: .02em; color: var(--muted); font-weight: 700; }

.empty, .state {
  text-align: center; padding: 2rem 1rem; color: var(--muted);
}
.loading { display: inline-flex; align-items: center; gap: .5rem; color: var(--muted); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* Auth */
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
  background: var(--surface);
}
.auth-card {
  width: min(460px, 100%); background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 1.7rem; box-shadow: var(--shadow);
}
.auth-card h1 { margin: 0 0 .3rem; font-size: 1.5rem; }
.auth-card p.lead { color: var(--muted); margin-top: 0; }
.auth-card .field input, .auth-card .field select {
  background: var(--card); border-color: var(--line); color: var(--text);
}
.auth-card label { color: var(--text); }
.auth-logo,
.app-logo {
  display: block;
  width: 180px;
  max-width: 100%;
  height: auto;
}
.auth-logo { margin: 0 0 1.15rem; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 12px; background: var(--brand-strong);
  display: grid; place-items: center; color: #fff; margin-bottom: 1rem;
}
.steps { display: flex; gap: .4rem; margin: 0 0 1.2rem; }
.steps span {
  flex: 1; height: 4px; border-radius: 4px; background: var(--line);
}
.steps span.on { background: var(--saxe); }
.check-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.check-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.ok-text { color: var(--ok); }
.bad-text { color: var(--danger); }

/* App shell */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.app-chrome {
  position: relative;
  z-index: 40;
  overflow: visible;
  background: var(--chrome-bg, #fff);
  color: var(--chrome-text, var(--text));
  border-bottom: 1px solid var(--chrome-line, var(--line));
}
.app-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  min-width: 0;
  overflow: visible;
}
.app-brand {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  flex: 0 1 auto;
}
.app-brand .app-logo { width: 180px; height: auto; }
.app-end {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
  flex: 0 1 auto;
}
.app-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
.app-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: inherit;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  overflow: visible;
  flex: 0 0 auto;
}
.app-tools .app-icon-btn .icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: block;
}
.app-user {
  font-weight: 600;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-identity {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
  gap: 1px;
}
.app-shop-slug {
  display: block;
  max-width: 12rem;
  font-size: .75rem;
  font-weight: 500;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-remain {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
  flex: 0 0 auto;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid var(--chrome-line, var(--line));
  border-radius: 999px;
  background: var(--chrome-input, var(--card));
  color: inherit;
  line-height: 1.2;
}
.app-remain .icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}
.app-remain-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-bell {
  position: relative;
}
.nav-count {
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #E11D48;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  white-space: nowrap;
  pointer-events: none;
}
.app-bell .nav-count {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 1;
}
.app-nav .nav-count {
  margin-left: 2px;
  flex: 0 0 auto;
}
.app-chrome .btn-secondary {
  color: inherit;
  background: var(--chrome-input, var(--card));
  border-color: var(--chrome-line, var(--line));
}
.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 20px 10px;
}
.app-nav a,
.app-nav .app-nav-logout button {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .7rem .55rem;
  border-radius: 8px;
  min-height: 40px;
  opacity: .88;
  box-shadow: inset 0 -2px 0 transparent;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: inherit;
  cursor: pointer;
  text-align: left;
}
.app-nav a:hover,
.app-nav .app-nav-logout button:hover {
  background: #F2F4F7;
  color: inherit;
  opacity: 1;
}
.app-nav a.active {
  background: var(--brand-soft);
  color: var(--text);
  opacity: 1;
  box-shadow: inset 0 -2px 0 var(--brand);
}
.app-nav a:focus-visible,
.app-nav .app-nav-logout button:focus-visible {
  outline: 3px solid var(--brand-strong);
  outline-offset: 2px;
}
.app-main { flex: 1; min-width: 0; }
.content { padding: 1.2rem; max-width: 1180px; margin: 0 auto; width: 100%; }
.menu-btn { display: none; }

.sidebar { display: none; }
.topbar { display: none; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 1.45rem; display: flex; align-items: center; gap: 8px; }
.page-head h1 .icon { width: 20px; height: 20px; flex: 0 0 auto; color: var(--brand); }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.filters .field { margin: 0; min-width: 160px; }

.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .45rem; }
.cal-head { font-size: .8rem; color: var(--muted); font-weight: 700; text-align: center; }
.cal-day {
  border: 1px solid var(--line); background: var(--card); border-radius: 10px; min-height: 88px;
  padding: .4rem; text-align: left; cursor: pointer; color: inherit;
}
.cal-day[disabled] { opacity: .4; cursor: not-allowed; background: #f0f0f3; }
.cal-day.selected { border-color: var(--saxe); box-shadow: inset 0 0 0 2px var(--saxe); }
.cal-day .n { font-weight: 700; }
.slot-grid { display: flex; flex-wrap: wrap; gap: .45rem; }
.slot {
  min-width: 5.4rem; border: 1px solid var(--line); background: var(--card); border-radius: 10px;
  padding: .55rem .4rem; cursor: pointer; font-weight: 600;
}
.slot:hover { border-color: var(--saxe); }
.slot.selected { background: var(--saxe); color: #fff; border-color: var(--saxe); }
.slot.busy, .slot:disabled {
  background: #f1f1f4; color: #8a8793; cursor: not-allowed; font-weight: 500;
}
.slot.busy .sub { display: block; font-size: .72rem; }

.booking-hero {
  background: var(--ink); color: #fff; padding: 1.6rem 1.2rem 1.3rem;
}
.booking-hero .wrap, .booking-body { width: min(980px, calc(100% - 2rem)); margin: 0 auto; }
.booking-body { padding: 1.2rem 0 3rem; }
.service-card, .staff-card {
  display: flex; justify-content: space-between; gap: 1rem; width: 100%;
  text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 1rem; cursor: pointer; color: inherit;
}
.service-card.selected, .staff-card.selected { border-color: var(--saxe); box-shadow: inset 0 0 0 2px var(--saxe); }
.meta { color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; word-break: break-word; }
.datetime-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.summary-box { background: var(--saxe-soft); border-radius: 12px; padding: 1rem; }

.appt-item { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.week-scroller {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  width: 100%;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(148px, 1fr)); gap: .5rem; min-width: 1036px; }
.week-col { background: var(--card); border: 1px solid var(--line); border-radius: 10px; min-height: 140px; padding: .5rem; }
.week-col h3 { margin: 0 0 .5rem; font-size: .85rem; }
.chip { display: block; width: 100%; text-align: left; border: 0; background: var(--saxe-soft); color: var(--ink); border-radius: 8px; padding: .35rem .45rem; margin: 0 0 .35rem; cursor: pointer; font-size: .8rem; }

.toast {
  position: fixed; right: 1rem; bottom: 1rem; background: var(--ink); color: #fff;
  padding: .85rem 1rem; border-radius: 12px; max-width: 320px; z-index: 50;
}
body.has-save-bar-open .toast {
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 960px) {
  .grid-4, .grid-3 { grid-template-columns: 1fr 1fr; }
  .menu-btn { display: inline-flex; }
  .app-nav {
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
    padding: 8px 16px 16px;
  }
  .app-nav.open {
    display: flex;
    max-height: min(70vh, calc(100dvh - 80px));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .app-nav-logout {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin-top: auto;
    width: 100%;
  }
  .app-nav-logout button { width: 100%; }
  .app-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 12px;
    row-gap: 10px;
    padding: 12px 16px;
  }
  .app-end {
    display: contents;
    margin: 0;
  }
  .app-brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }
  .app-brand .app-logo {
    width: 132px;
  }
  .app-tools {
    grid-column: 2;
    grid-row: 1;
    flex-shrink: 0;
    gap: 4px;
  }
  .account-menu {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
  }
  .app-remain {
    grid-column: 2;
    grid-row: 2;
    flex: 0 0 auto;
    max-width: 12rem;
    overflow: hidden;
    white-space: nowrap;
    justify-self: end;
    align-self: center;
  }
  .app-identity {
    align-items: flex-start;
    min-width: 0;
    max-width: 100%;
  }
  .app-user,
  .app-shop-slug {
    max-width: none;
    width: 100%;
  }
  .datetime-row { grid-template-columns: 1fr; }
}
@media (min-width: 961px) {
  .app-nav-logout {
    display: block;
    margin: 0;
  }
}
@media (max-width: 720px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  table.data thead { display: none; }
  table.data tr { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: .7rem; padding: .4rem .2rem; }
  table.data td { display: flex; justify-content: space-between; gap: 1rem; border: 0; }
  table.data td::before { content: attr(data-label); font-weight: 700; color: var(--muted); }
}
.copy-widget { display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; }
.copy-fallback input { width: min(100%, 28rem); }
.switch-row { margin: 0 0 1rem; }
.switch {
  display: flex; align-items: center; gap: .75rem; cursor: pointer; max-width: 40rem;
  min-height: 44px;
}
.switch input {
  position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0,0,0,0);
}
.switch-ui {
  position: relative; width: 40px; height: 22px; flex: 0 0 40px;
  border-radius: 999px; background: #c5c1cc;
  transition: background .2s ease;
  margin-top: 0;
}
.switch-ui::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(20,15,28,.18);
  transition: transform .2s ease;
}
.switch input:checked + .switch-ui { background: var(--brand, #df7d3b); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { outline: 3px solid var(--brand, #df7d3b); outline-offset: 3px; }
.switch-text { display: flex; flex-direction: column; gap: .2rem; padding-top: 0; min-width: 0; }
.switch-text strong { font-size: .92rem; font-weight: 650; color: var(--ink); overflow-wrap: anywhere; }
.switch-text .hint { margin: 0; }
.field label.switch,
label.switch {
  display: flex;
  align-items: center;
  margin-bottom: 0;
  font-weight: 650;
}
@media (prefers-reduced-motion: reduce) {
  .switch-ui, .switch-ui::after { transition: none !important; }
}

/* Panel spacing and appointment list — scoped to .app, not booking */
.app {
  --space-0: 4px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  min-width: 0;
}
.app .content {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}
.app .flash { margin: 0; }
.app .page-head {
  margin: 0;
  gap: var(--space-3);
  align-items: flex-start;
}
.app .page-head h1 {
  overflow-wrap: anywhere;
}
.app .content > .page-head + p.hint,
.app .content > .page-head + .hint {
  margin: calc(var(--space-1) - var(--space-4)) 0 0;
}
.app .card { padding: var(--space-4); }
.app .card.stat {
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.app .stat { padding: 0; }
.app .stat .value,
.app .stat .value-split {
  margin: 0;
  padding-left: 32px;
  line-height: 1.2;
}
.app .stat .value { font-size: 1.5rem; }
.app .stat > .hint {
  margin: 0;
  padding-left: 32px;
}
.app .card > h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.app .card > h2 .icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: var(--brand);
}
.app .card > h2 + .hint,
.app .card > h2 + p { margin: 0; }
.app .grid { gap: var(--space-4); }
.app form .grid,
.app .form-card .grid,
.app .settings-group .grid,
.app .settings-page-form .grid {
  gap: var(--space-3);
}
.app .field,
.app .float-field {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-1);
  min-width: 0;
}
.app .field > label,
.app .field > .label,
.app .field > legend {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.app .field > label .icon,
.app .filters .field label .icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--muted);
}
.app .field > .hint,
.app .field > .field-error,
.app .float-field > .hint,
.app .float-field > .field-error {
  margin: 0;
}
.app .field input[type="radio"],
.app .field input[type="checkbox"],
.app .field input[type="file"] {
  width: auto;
  max-width: none;
}
.app form.settings-page-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}
.app form.card:not(.report-filters),
.app .form-card,
.app .card > form:not(.dash-toolbar):not(.filters),
.app form.status-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}
.app .status-form {
  margin-top: var(--space-1);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}
.app .filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-3);
  margin: 0;
  align-items: end;
}
.app .filters .field { min-width: 0; }
.app .filters .field-action .btn { min-height: 2.6rem; }
.app .switch-row { margin: 0; }
.app .cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin: 0;
}
.app .control-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  align-items: center;
}
.app .control-row input[type="time"],
.app .break-row input[type="time"] {
  width: auto;
  max-width: none;
}
.app .stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.app .stack > * { margin: 0; }
.app [data-flash-slot]:empty { display: none; }
.app [data-flash-slot] .flash { margin: 0; }

.appt-board { min-width: 0; }
.appt-groups {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.appt-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}
.appt-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}
.appt-group-head h2 {
  margin: 0;
  font-size: 1.05rem;
}
.appt-group-count {
  color: var(--muted);
  font-size: .88rem;
  font-weight: 600;
  white-space: nowrap;
}
.appt-group-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.appt-row {
  display: grid;
  grid-template-columns: 2.25rem 5.5rem minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  min-width: 0;
}
body.appt-selecting .appt-row {
  grid-template-columns: 1.6rem 2.25rem 5.5rem minmax(0, 1.4fr) minmax(0, 1fr) auto;
}
.appt-select {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
}
body.appt-selecting .appt-select { display: flex; }
.appt-select input {
  width: 1.1rem;
  height: 1.1rem;
}
.appt-when {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  flex: 0 0 32px;
}
.appt-when .icon { width: 18px; height: 18px; }
.appt-when[data-when="past"],
.notify-icon.notify-when[data-when="past"] {
  color: #6b7280;
  background: #eef0f2;
}
.appt-when[data-when="today"],
.notify-icon.notify-when[data-when="today"] {
  color: var(--brand, #df7d3b);
  background: var(--brand-soft, #fff4ea);
}
.appt-when[data-when="future"],
.notify-icon.notify-when[data-when="future"] {
  color: #3b82c4;
  background: #e8f2fb;
}
.appt-row.is-next {
  border-left: 3px solid var(--saxe);
  background: var(--saxe-soft);
}
.appt-row-time {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.appt-time {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
  line-height: 1.2;
}
.appt-duration {
  color: var(--muted);
  font-size: .82rem;
}
.appt-row-main,
.appt-row-contact,
.appt-row-actions {
  min-width: 0;
}
.appt-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.appt-sub {
  color: var(--muted);
  font-size: .9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.appt-phone {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  text-decoration: none;
  font-weight: 600;
  color: var(--saxe-dark);
  min-height: 44px;
}
.appt-price {
  color: var(--muted);
  font-size: .9rem;
}
.appt-row-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
}
.appt-row-actions .btn { flex: 0 0 auto; }
.empty-state {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-5) var(--space-3);
  color: var(--muted);
}
.empty-state p { margin: 0; }
.week-col .chip.is-next {
  box-shadow: inset 3px 0 0 var(--saxe);
}

@media (max-width: 960px) {
  .app .content {
    padding: var(--space-3);
    gap: var(--space-3);
  }
  .app .content > .page-head + p.hint,
  .app .content > .page-head + .hint {
    margin-top: calc(var(--space-1) - var(--space-3));
  }
  .app .card,
  .appt-row { padding: var(--space-3); }
  .app .settings-groups { gap: var(--space-3); }
  .app form.settings-page-form { gap: var(--space-3); }
}

@media (max-width: 720px) {
  .appt-row {
    grid-template-columns: 2.25rem minmax(0, 1fr);
    gap: var(--space-2);
  }
  .appt-when { grid-row: 1 / span 4; }
  body.appt-selecting .appt-row {
    grid-template-columns: 1.6rem 2.25rem minmax(0, 1fr);
  }
  body.appt-selecting .appt-select { grid-row: 1 / span 4; }
  body.appt-selecting .appt-when { grid-row: 1 / span 4; }
  .appt-row-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }
  .appt-name,
  .appt-sub { white-space: normal; }
  .app .btn,
  .app .btn-sm,
  .app .btn-icon {
    min-height: 44px;
  }
}

.app .check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.app .svc-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 44px;
}
.app .check-grid .switch {
  max-width: none;
  margin: 0;
  padding: 2px 0;
}
.app .svc-lines {
  margin: 0 0 12px;
  padding-left: 1.15rem;
}
.app .page-head .btn-primary-action {
  flex: 0 0 auto;
}

.app .settings-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
.app .settings-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  margin: 0;
}
.app .settings-group-head {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  margin: 0;
}
.app .settings-group-head h2 { margin: 0; font-size: 1.15rem; }
.app .settings-group-head .hint { margin: .25rem 0 0; }
.app .settings-group-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--saxe-soft);
  color: var(--saxe-dark);
}
.app .settings-group-icon .icon { width: 20px; height: 20px; }
.app .hours-days {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.app .hours-day {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: var(--space-3);
  background: var(--card);
}
.app .hours-day.is-closed {
  padding: 12px 16px;
  gap: 0;
  background: #FAFBFC;
}
.app .hours-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
}
.app .hours-day-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}
.app .hours-switch,
.app .hours-day .switch-row {
  margin: 0;
}
.app .hours-open-switch {
  align-items: center;
  max-width: none;
  gap: 8px;
}
.app .hours-open-switch .switch-ui {
  margin-top: 0;
  flex: 0 0 40px;
}
.app .hours-switch-label {
  font-size: .85rem;
  font-weight: 700;
  white-space: nowrap;
}
.app .hours-switch-on { color: var(--ok); }
.app .hours-switch-off { color: var(--muted); }
.app .hours-open-switch:has(input:checked) .hours-switch-on { color: var(--muted); font-weight: 600; }
.app .hours-open-switch input:checked ~ .hours-switch-off { color: var(--ink); }
.app .hours-day-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}
.app .hours-day-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.app .hours-day:has(.hours-open-switch input:checked) .hours-day-body {
  display: none;
}
.app .hours-times,
.app .break-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: end;
  margin: 0;
}
.app .hours-times {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.app .hours-time-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.app .hours-time-field span {
  font-size: .8rem;
  font-weight: 700;
  color: var(--muted);
}
.app .hours-time-field input[type="time"],
.app .hours-times input[type="time"],
.app .break-row input[type="time"] {
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 .8rem;
  background: var(--card);
  color: var(--text);
  color-scheme: light;
}
.app .hours-day-breaks {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.app .hours-breaks-title {
  margin: 0;
  font-size: .92rem;
  font-weight: 700;
}
.app .break-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.app .hours-break-empty { display: none; margin: 0; }
.app .hours-day-breaks:not(:has([data-break-row])) .hours-break-empty { display: block; }
.app .break-actions,
.app .hours-day-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0;
}
.app .hours-day .btn-sm,
.app .hours-day .btn-icon {
  min-height: 44px;
  height: 44px;
}
.app .hours-day .btn-icon {
  width: 44px;
  padding: 0;
  align-self: end;
}
.app .hours-day .btn .icon,
.app .hours-day .btn-icon .icon {
  width: 18px;
  height: 18px;
}
.hours-copy-dialog {
  width: min(100%, 480px);
}
.hours-copy-dialog .hours-copy-fields,
.hours-copy-dialog .hours-copy-days {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.hours-copy-dialog fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin: 0;
}
.hours-copy-dialog legend {
  font-weight: 700;
  padding: 0 6px;
}
.hours-copy-warn {
  margin: 16px 0 0;
  color: var(--warn);
  font-weight: 600;
}
@media (min-width: 960px) {
  .app .settings-groups {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  .app .settings-group {
    padding: var(--space-4);
  }
  .app .settings-group--wide {
    grid-column: 1 / -1;
  }
}
@media (max-width: 720px) {
  .app .hours-day-head { grid-template-columns: 1fr; }
  .app .check-grid { grid-template-columns: 1fr; }
}

.app-bell:hover,
.app-icon-btn:hover {
  background: #F2F4F7;
  border-radius: 8px;
}
.app-bell:focus-visible,
.app-icon-btn:focus-visible,
.password-toggle:focus-visible,
.app-brand:focus-visible {
  outline: 3px solid var(--brand-strong);
  outline-offset: 2px;
  border-radius: 8px;
}
.field input:disabled,
.field select:disabled,
.field textarea:disabled,
.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.btn-primary-action { background: var(--saxe); color: #fff; }
.btn-primary-action:hover { background: var(--saxe-dark); color: #fff; }
.btn .icon { flex: 0 0 auto; }
.app .btn {
  gap: var(--space-1);
}
.app .btn .icon {
  width: 18px;
  height: 18px;
}
.app .btn-icon {
  width: 2.75rem;
  min-height: 2.75rem;
}

.entity-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.entity-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 220px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: var(--card);
}
.entity-search input {
  border: 0;
  flex: 1;
  min-width: 0;
  min-height: 2.6rem;
  background: transparent;
  color: inherit;
}
.entity-search input:focus { outline: none; }
.entity-search:focus-within { outline: 3px solid var(--saxe); outline-offset: 2px; }
.entity-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.entity-filters .btn[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.entity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.entity-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.entity-card-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}
.entity-card-head .entity-title { flex: 1 1 auto; min-width: 0; }
.entity-card-head .badge { flex: 0 0 auto; margin-left: auto; }
.entity-title {
  margin: 0;
  font-size: 1.15rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.entity-desc {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.entity-card .meta { overflow-wrap: anywhere; word-break: break-word; }
.entity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: auto;
}
.entity-actions .btn { min-height: 2.6rem; }
.entity-actions form { display: inline-flex; margin: 0; }
.entity-actions-compact {
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
  width: 100%;
}
.entity-actions-compact .btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 6px 8px;
  font-size: 12.5px;
  gap: 6px;
  justify-content: center;
}
.entity-actions-compact .icon {
  width: 16px;
  height: 16px;
}
.entity-actions-compact form {
  display: flex;
  min-width: 0;
  flex: 1 1 0;
}
.entity-actions-compact form .btn { width: 100%; }
.entity-actions-compact .btn-short { display: none; }
.entity-actions-compact .btn-soft-danger {
  background: #fdecec;
  color: #b42318;
  border: 1px solid #f5c2c0;
}
.entity-actions-compact .btn-soft-danger:hover {
  background: #fad4d4;
  color: #912018;
}
@media (max-width: 380px) {
  .entity-actions-compact .btn-full { display: none; }
  .entity-actions-compact .btn-short { display: inline; }
  .entity-actions-compact .btn-delete {
    flex: 0 0 44px;
    padding: 6px;
  }
}
.entity-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 48px;
  background: var(--brand-soft);
}
.entity-avatar-fallback {
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--brand-strong);
}
.form-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}
.form-section:first-of-type { border-top: 0; padding-top: 0; }
.form-section h2 { margin: 0; font-size: 1.1rem; }
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin-top: var(--space-4);
}
.app .form-actions {
  margin-top: 0;
  padding-top: var(--space-1);
  gap: var(--space-1);
}
.app .form-actions:has([data-save-bar-ui]) {
  padding-top: 0;
  gap: 0;
}
.form-actions .btn { min-height: 2.6rem; }
.empty-state .btn { margin-top: 16px; }
.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.chart-card { min-width: 0; }
.chart-card h2, .card h2 { margin: 0 0 .4rem; font-size: 1.1rem; }
.chart-card canvas { width: 100% !important; height: 220px !important; }
.range-links { margin: 0; }
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
}
.heat { overflow-x: auto; padding-bottom: 4px; }
.heat-row {
  display: grid;
  grid-template-columns: 2.6rem repeat(13, minmax(1.7rem, 1fr));
  gap: 4px;
  align-items: center;
  margin-bottom: 4px;
  min-width: 520px;
}
.heat-head { color: var(--muted); font-size: .75rem; font-weight: 600; }
.heat-day { font-size: .8rem; font-weight: 600; }
.heat-cell {
  min-height: 1.8rem;
  display: grid;
  place-items: center;
  border-radius: 4px;
  font-size: .72rem;
  background: #f2f4f7;
  color: var(--text);
}
.heat-1 { background: #F6E4D4; }
.heat-2 { background: #E8B48A; }
.heat-3 { background: #DF7D3B; color: #fff; }
.heat-4 { background: #933F0F; color: #fff; }
@media (max-width: 960px) {
  .entity-grid,
  .chart-grid { gap: 16px; }
  .chart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .entity-grid { grid-template-columns: 1fr; gap: 16px; }
  .entity-actions { width: 100%; }
  .entity-actions .btn { flex: 1 1 calc(50% - 8px); }
  .entity-actions-compact {
    width: 100%;
    flex-wrap: nowrap;
  }
  .entity-actions-compact .btn { flex: 1 1 0; }
  .form-actions .btn { flex: 1 1 100%; }
}

.dash,
.report-page {
  display: flex;
  flex-direction: column;
  gap: inherit;
  min-width: 0;
  max-width: 100%;
}
.dash-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.dash-card-head h2 { margin: 0; }
.dash-card-head .hint { margin: .25rem 0 0; }
.dash-empty {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}
.dash-upcoming-list { min-width: 0; }
.dash-upcoming-row {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1.1fr) minmax(0, 1.4fr) minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.dash-upcoming-row:last-child { border-bottom: 0; }
.dash-upcoming-head {
  padding-bottom: 6px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}
.dash-upcoming-when { font-weight: 700; white-space: nowrap; }
.dash-upcoming-name,
.dash-upcoming-svc,
.dash-upcoming-staff {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.dash-upcoming-svc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}
.app form.dash-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 16px;
  align-items: end;
  margin: 12px 0 8px;
  height: auto;
  min-height: 0;
}
.app form.dash-toolbar .field { min-width: 0; margin: 0; }
.app form.dash-toolbar input,
.app form.dash-toolbar select {
  width: 100%;
  min-height: 46px;
}
.dash-toolbar-actions {
  display: flex;
  align-items: end;
  padding-bottom: 0;
}
.dash-toolbar-actions .btn { min-height: 46px; }
.dash-days-plot {
  height: 320px;
  position: relative;
  min-width: 0;
}
.dash-days-plot canvas,
.dash-bar-plot canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.dash-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.dash-pair > * { min-width: 0; }
.dash-chart-card,
.dash-heat-card,
.dash-days,
.dash-upcoming {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dash-bar-plot {
  height: 260px;
  position: relative;
  min-width: 0;
}
.dash-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  min-width: 0;
}
.dash-doughnut-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: min(260px, 100%);
  max-width: 100%;
  min-width: 0;
  aspect-ratio: 1 / 1;
}
.dash-doughnut {
  width: 100%;
  height: 100%;
  max-width: 100%;
  position: relative;
  flex: 0 0 auto;
  box-sizing: border-box;
  overflow: hidden;
}
.dash-doughnut canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
}
.dash-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.dash-legend li {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.dash-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.dash-legend-name { min-width: 0; overflow-wrap: anywhere; }
.dash-legend-count { font-weight: 700; }
.app form.card.report-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
  height: auto;
  min-height: 0;
  justify-items: stretch;
}
.app form.card.report-filters .field {
  min-width: 0;
  margin: 0;
  text-align: left;
}
.app form.card.report-filters label {
  text-align: left;
}
.app form.card.report-filters input,
.app form.card.report-filters select {
  width: 100%;
  min-height: 46px;
  max-width: 100%;
}
.report-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.report-filter-actions .btn { min-height: 46px; }
.report-page .table-wrap,
.dash .heat { max-width: 100%; }
@media (max-width: 1100px) {
  .dash-pair--heat { grid-template-columns: 1fr; }
  .app form.card.report-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app form.dash-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-toolbar-actions { grid-column: 1 / -1; }
  .report-filter-actions { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .dash-pair { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 768px) {
  .dash-status {
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 16px;
  }
  .dash-doughnut-wrap {
    width: min(260px, 100%);
    margin: 0 auto;
  }
  .dash-legend {
    width: 100%;
  }
}
.app [data-flash-slot] .flash { margin: 0; }
@media (max-width: 720px) {
  .dash-days-plot { height: 244px; }
  .dash-upcoming-head { display: none; }
  .dash-upcoming-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding: 12px 0;
  }
  .dash-upcoming-when { grid-column: 1 / -1; }
  .dash-upcoming-name { font-weight: 700; }
  .dash-upcoming-svc,
  .dash-upcoming-staff { grid-column: 1 / -1; color: var(--muted); }
  .app form.card.report-filters { grid-template-columns: 1fr; }
  .app form.dash-toolbar { grid-template-columns: 1fr; }
}

.password-wrap {
  position: relative;
  display: block;
}
.password-wrap input,
.field .password-wrap input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]) {
  width: 100%;
  padding-right: 48px;
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.password-toggle .icon {
  width: 20px;
  height: 20px;
}
.password-change {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 12px 12px;
  background: var(--card);
}
.password-change > summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  display: flex;
  align-items: center;
  list-style: none;
}
.password-change > summary::-webkit-details-marker { display: none; }
.password-change .btn { margin-top: 8px; }
.account-menu { position: relative; min-width: 0; }
.account-menu .app-identity {
  pointer-events: none;
}
.account-menu .app-user {
  cursor: default;
}
.account-menu .app-shop-slug {
  pointer-events: auto;
}
a.app-shop-slug {
  color: var(--muted);
  text-decoration: none;
}
a.app-shop-slug:hover {
  text-decoration: underline;
  color: inherit;
}
a.app-shop-slug:focus-visible {
  outline: 3px solid var(--brand-strong);
  outline-offset: 2px;
  border-radius: 4px;
}
.app-nav-logout {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.social-help { margin: 0 0 12px; }
.btn-icon {
  width: 2.4rem;
  padding: .35rem;
  min-height: 2.4rem;
}
.invite-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.invite-card > * { margin: 0; }
.invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  align-items: center;
  margin-top: 0;
}
.invite-mail-confirm {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: 0;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.setup-shell {
  max-width: 42rem;
  margin: 0 auto;
}
.setup-shell.setup-wide { max-width: 52rem; }
.setup-head { margin-bottom: .5rem; }
.setup-mobile-step { display: none; }
.setup-steps {
  display: flex;
  align-items: flex-start;
  list-style: none;
  padding: 0;
  margin: 0 0 .65rem;
  gap: 0;
}
.setup-steps li {
  flex: 1;
  min-width: 0;
  position: relative;
  color: var(--muted);
  font-size: 13px;
}
.setup-steps li + li::before {
  content: "";
  position: absolute;
  left: -50%;
  right: 50%;
  top: 18px;
  height: 2px;
  background: var(--line);
  z-index: 0;
  transition: background .35s ease;
}
.setup-steps li.is-done + li::before,
.setup-steps li.is-current + li::before { background: var(--brand); }
.setup-steps a {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  text-align: center;
}
.setup-step-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 2px solid var(--line);
  color: var(--muted);
}
.setup-steps li.is-current { color: var(--ink); font-weight: 600; }
.setup-steps li.is-current .setup-step-icon {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
  box-shadow: 0 0 0 4px rgba(223, 125, 59, .12);
}
.setup-steps li.is-done { color: var(--ok); }
.setup-steps li.is-done .setup-step-icon {
  border-color: var(--ok);
  background: var(--ok-bg);
  color: var(--ok);
}
.setup-progress {
  height: 4px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin: 0 0 1.1rem;
}
.setup-progress span {
  display: block;
  height: 100%;
  background: var(--brand);
  border-radius: inherit;
  transition: width .45s ease;
}
.setup-panel {
  animation: setup-in .28s ease;
}
.app .setup-panel > form,
.app .setup-add-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.setup-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  justify-content: flex-end;
  align-items: center;
  margin-top: 0;
  position: sticky;
  bottom: 0;
  padding: var(--space-2) 0 calc(var(--space-2) + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, transparent, var(--card) 18%);
}
.setup-nav .btn { min-width: auto; }
.setup-entity-list {
  display: grid;
  gap: 8px;
  margin: 0;
}
.setup-entity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.setup-entity.is-just-saved {
  animation: setup-flash .7s ease;
}
.setup-entity-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.setup-entity-main img,
.setup-entity-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.setup-entity-main strong { display: block; }
.setup-entity-actions {
  display: flex;
  gap: 6px;
  flex: none;
}
.setup-add-form {
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fff;
}
.setup-advanced { margin: 0 0 1rem; }
.setup-advanced summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: .6rem;
}
.setup-summary {
  display: grid;
  gap: 10px;
  margin: 0 0 1rem;
}
.setup-summary article {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.setup-summary h3 { margin: 0 0 .2rem; font-size: 1rem; }
.setup-summary p { margin: 0; }
.setup-gaps {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  color: var(--danger);
}
.setup-done { text-align: center; padding: 2rem 1.2rem; }
.setup-tick {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--ok-bg);
  color: var(--ok);
  display: grid;
  place-items: center;
  animation: setup-tick .45s ease;
}
.setup-done .setup-nav { justify-content: center; }
@keyframes setup-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes setup-flash {
  from { box-shadow: 0 0 0 0 rgba(223, 125, 59, .35); }
  to { box-shadow: 0 0 0 8px transparent; }
}
@keyframes setup-tick {
  from { transform: scale(.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.guide-search { margin: 0 0 1rem; max-width: 28rem; }
.guide-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1.5rem;
}
.guide-toc a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
}
.guide-figure {
  margin: 12px 0 16px;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.guide-figure img { display: block; width: 100%; height: auto; }
.guide-figure figcaption { padding: 6px 10px; color: var(--muted); font-size: 12px; }
.guide-steps { padding-left: 1.2rem; }
.guide-topic + .guide-topic { margin-top: 16px; }
@media (max-width: 720px) {
  .setup-nav { justify-content: stretch; }
  .setup-nav .btn { min-height: 2.7rem; }
  .setup-steps { display: none; }
  .setup-progress { display: none; }
  .setup-mobile-step { display: block; }
  .setup-summary article { flex-direction: column; }
  .btn-icon { width: 2.7rem; min-height: 2.7rem; }
}
@media (prefers-reduced-motion: reduce) {
  .setup-panel,
  .setup-tick,
  .setup-entity.is-just-saved,
  .setup-progress span,
  .setup-steps li + li::before {
    animation: none !important;
    transition: none !important;
  }
}

.save-bar-spacer { display: none; height: 0; }
.form-actions .save-bar-spacer { flex: 1 1 100%; }
body.has-save-bar-open .save-bar-spacer {
  display: block;
  height: calc(96px + env(safe-area-inset-bottom, 0px));
}
.save-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 18px rgba(39, 39, 37, .08);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
}
.settings-main .save-bar {
  max-width: 100%;
}
.save-bar[hidden] { display: none !important; }
.save-bar .btn {
  min-height: 2.4rem;
  padding: .45rem .9rem;
}
.save-bar .btn .icon {
  width: 1.1rem;
  height: 1.1rem;
  vertical-align: middle;
}
.save-bar-note {
  margin: 0;
  flex: 1;
  text-align: center;
  color: var(--muted);
  font-size: .88rem;
}
.app-nav .nav-group {
  display: contents;
}
.app-nav .nav-parent {
  font-weight: 700;
}
.app-nav .nav-sub {
  display: none;
}
.settings-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.settings-side {
  position: sticky;
  top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
.settings-side-label {
  margin: 0 0 8px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.settings-side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settings-side-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: .92rem;
}
.settings-side-link .icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  flex-shrink: 0;
  color: var(--muted);
}
.settings-side-link:hover {
  background: #F2F4F7;
}
.settings-side-link.active {
  background: var(--brand-soft);
  box-shadow: inset 3px 0 0 var(--brand);
  font-weight: 700;
}
.settings-side-link.active .icon {
  color: var(--brand);
}
.settings-side-link:focus-visible {
  outline: 3px solid var(--brand-strong);
  outline-offset: 2px;
}
.settings-mobile {
  display: none;
  grid-column: 1 / -1;
}
.settings-mobile-label {
  display: block;
  font-weight: 700;
  margin: 0 0 6px;
}
.settings-mobile-nav {
  position: relative;
}
.settings-mobile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .65rem .8rem;
  background: #fff;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.settings-mobile-btn > span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-mobile-btn .icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: var(--muted);
}
.settings-mobile-btn .icon[data-icon="chevron-down"] {
  margin-left: auto;
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}
.settings-mobile-btn[aria-expanded="true"] .icon[data-icon="chevron-down"] {
  transform: rotate(180deg);
}
.settings-mobile-btn:focus-visible {
  outline: 3px solid var(--brand-strong);
  outline-offset: 2px;
}
.settings-mobile-list {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(39, 39, 37, .12);
  max-height: min(60vh, calc(100dvh - 8rem), 360px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.settings-mobile-list[hidden] {
  display: none !important;
}
.settings-mobile-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: .92rem;
}
.settings-mobile-link .icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: var(--muted);
}
.settings-mobile-link.is-active {
  background: var(--brand-soft);
  box-shadow: inset 3px 0 0 var(--brand);
  font-weight: 700;
}
.settings-mobile-link.is-active .icon {
  color: var(--brand);
}
.settings-mobile-link:hover {
  background: #F2F4F7;
}
.settings-mobile-link.is-active:hover {
  background: var(--brand-soft);
}
.settings-mobile-link:focus-visible {
  outline: 3px solid var(--brand-strong);
  outline-offset: 2px;
}
.settings-main {
  min-width: 0;
}
.settings-main > .page-head {
  margin-top: 0;
}
.settings-main .settings-page-form:not(.settings-page-form--wide) {
  max-width: 40rem;
}
.settings-page-form--wide {
  max-width: none;
}
.settings-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.settings-option-list {
  display: flex;
  flex-direction: column;
}
.settings-option-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.settings-option-row:first-child { padding-top: 0; }
.settings-option-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.settings-option-row .switch-row { margin: 0; }
.header-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 0 0;
  margin-top: 8px;
  border-top: 1px solid var(--line);
}
.header-block h3 {
  margin: 0;
  font-size: 1rem;
}
.header-block .switch-row { margin: 0; }
.logo-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}
.logo-preview-box {
  width: 96px;
  height: 96px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #FAFBFC;
  flex: 0 0 auto;
}
.logo-preview-box img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.logo-preview-empty {
  color: var(--muted);
}
.logo-preview-empty .icon {
  width: 28px;
  height: 28px;
}
.logo-picker-meta {
  min-width: 0;
  flex: 1 1 12rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.logo-picker-meta .btn { min-height: 44px; }
.social-list {
  display: flex;
  flex-direction: column;
}
.social-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px 16px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.social-row:first-child { padding-top: 0; }
.social-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.social-row-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
}
.social-row-icon .brand-logo,
.social-row-icon .icon {
  width: 22px;
  height: 22px;
  display: block;
}
.social-row[data-social-key="instagram"] .social-row-icon { color: #E4405F; }
.social-row[data-social-key="facebook"] .social-row-icon { color: #1877F2; }
.social-row[data-social-key="tiktok"] .social-row-icon { color: #000; }
.social-row[data-social-key="youtube"] .social-row-icon { color: #FF0000; }
.social-row[data-social-key="x"] .social-row-icon { color: #000; }
.social-row[data-social-key="whatsapp"] .social-row-icon { color: #25D366; }
.social-row-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.social-row-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 8px;
  align-items: end;
  min-width: 0;
}
.social-row-input .field {
  margin: 0;
  min-width: 0;
}
.social-row-input .field input {
  min-height: 48px;
}
.social-row-open {
  flex: 0 0 auto;
  width: 48px;
  min-width: 48px;
  min-height: 48px;
}
.social-row-open[hidden] { display: none !important; }
.dock-opacity-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dock-opacity-row input[type="range"] { flex: 1; }
.dock-opacity-row input[type="number"] { width: 5.5rem; }
.account-current {
  padding-bottom: 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.account-current-name {
  margin: 0;
  font-weight: 700;
}
.live-status {
  margin: 0 0 12px;
  min-height: 1.2em;
}
.live-status.is-error { color: var(--danger, #b42318); font-weight: 600; }
[data-live-root].is-live-loading {
  opacity: .78;
}
.dash-card-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-card-head h2 .icon {
  width: 20px;
  height: 20px;
  color: var(--brand);
}
.settings-main > .page-head {
  margin-top: 0;
}
.settings-side[hidden],
.settings-mobile[hidden] {
  display: none !important;
}
.settings-switcher,
.settings-tabs {
  display: none !important;
}
.ui-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(39, 39, 37, .38);
  display: grid;
  place-items: center;
  padding: 16px;
}
.ui-dialog-overlay[hidden] { display: none !important; }
.ui-dialog {
  position: relative;
  width: min(100%, 420px);
  background: #fff;
  color: #1c1c1a;
  border-radius: 16px;
  padding: 22px 20px 18px;
  box-shadow: 0 18px 40px rgba(39, 39, 37, .18);
}
.ui-dialog-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 12px;
}
.ui-dialog h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: #1c1c1a;
}
.ui-dialog p {
  margin: 0;
  color: #3f3f3c;
  line-height: 1.45;
}
.ui-dialog-extra {
  margin-top: 10px;
  color: #5b5b57;
  font-size: .92rem;
  white-space: pre-line;
}
.ui-dialog-x {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  background: transparent;
  color: #3f3f3c;
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.ui-dialog-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.toast.toast-ok {
  background: #1c1c1a;
  color: #fff;
}
@media (max-width: 960px) {
  .app-nav .nav-group { display: contents; }
  .app-nav .nav-sub { display: none; }
  .app-remain { font-size: .72rem; max-width: 100%; }
  .settings-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .settings-side { display: none; }
  .settings-mobile { display: block; }
  .settings-side[hidden],
  .settings-mobile[hidden] { display: none !important; }
  .ui-dialog { width: min(100%, 100%); }
}

@media (max-width: 640px) {
  .save-bar {
    gap: 8px;
  }
  .save-bar-note {
    order: -1;
    flex: 1 1 100%;
    text-align: left;
  }
}

button.app-bell {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}
.notify-wrap {
  position: relative;
  overflow: visible;
  flex: 0 0 auto;
}
.notify-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  z-index: 80;
  display: flex;
  flex-direction: column;
  width: min(360px, calc(100vw - 24px));
  max-height: min(70vh, 420px);
  overflow: hidden;
  background: #fff;
  color: #1c1c1a;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(39, 39, 37, .12);
}
.notify-panel[hidden] { display: none !important; }
.notify-head {
  flex: 0 0 auto;
  padding: 12px 14px 8px;
  border-bottom: 1px solid var(--line);
}
.notify-list {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.notify-item {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--line);
}
.notify-item.is-unread {
  background: var(--brand-soft);
  box-shadow: inset 3px 0 0 var(--brand);
}
.notify-icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
}
.notify-icon .icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.notify-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.notify-copy strong,
.notify-body,
.notify-meta,
.notify-time {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.notify-copy strong { font-size: .92rem; }
.notify-body, .notify-meta, .notify-time {
  font-size: .82rem;
  color: #5b5b57;
}
.notify-empty {
  margin: 0;
  padding: 16px 14px;
  color: #5b5b57;
}
.notify-more {
  flex: 0 0 auto;
  display: block;
  padding: 10px 14px 12px;
  text-align: center;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
}
.notify-page-list {
  display: flex;
  flex-direction: column;
}
.notify-page-list .notify-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 12px;
}
.home-notices {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.notice-card h2 { margin-top: 0; }
.notice-banner {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.notice-banner-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.notice-banner-link { display: block; }
.card.stat .value-split {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 1.15rem;
  font-weight: 700;
}
.btn-compact {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 44px;
  padding: .45rem .8rem;
}
.btn-compact .icon {
  width: 18px;
  height: 18px;
}
@media (max-width: 960px) {
  .notify-panel {
    position: fixed;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    max-height: min(70vh, calc(100dvh - 24px));
  }
}
@media (max-width: 720px) {
  .home-notices { gap: var(--space-3); }
}
@media (max-width: 390px) {
  .app-top { padding: 12px; }
  .app-brand .app-logo { width: 124px; }
}

.ref-banner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(120px, 180px);
  gap: 16px 24px;
  align-items: center;
  padding: 18px 20px;
  background: linear-gradient(135deg, #FFF7F0 0%, #F6E4D4 58%, #FBE8D8 100%);
  border: 1px solid #F0D3B8;
  border-radius: 16px;
  color: #272725;
  overflow: hidden;
}
.ref-banner-copy { min-width: 0; }
.ref-banner-kicker {
  display: inline-block;
  margin: 0 0 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #fff;
  color: #B45316;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.ref-banner h2,
.ref-banner #ref-banner-title {
  margin: 0 0 8px;
  font-size: 1.28rem;
  line-height: 1.25;
  color: #272725;
}
.ref-banner-lead {
  margin: 0 0 14px;
  color: #3a3a37;
  line-height: 1.45;
}
.ref-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.ref-banner-art {
  justify-self: end;
  pointer-events: none;
}
.ref-banner-svg {
  display: block;
  width: 100%;
  max-width: 160px;
  height: auto;
}
.ref-page .ref-code,
.ref-admin-code {
  margin: 0 0 16px;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: .08em;
  font-family: var(--mono);
  color: #B45316;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.ref-page .ref-code .icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--brand);
}
#ref-kod { scroll-margin-top: 88px; }
.ref-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.ref-page .copy-widget { margin: 0; }
.ref-page .copy-widget .btn { min-height: 44px; }
.ref-page-lead { margin: 0; max-width: 40rem; }
.ref-stats { margin: 0; }
.ref-page .ref-stats .card.stat { margin: 0; }
.ref-preview {
  white-space: pre-wrap;
  background: #FFF7F0;
  border: 1px solid #F0D3B8;
  border-radius: 12px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: .92rem;
  line-height: 1.5;
}
.ref-admin-label {
  margin: 0 0 6px;
  font-weight: 700;
}
.ref-admin-block { margin-top: 8px; }
.ref-admin-block h2 { margin: 0 0 12px; font-size: 1.05rem; }
@media (max-width: 720px) {
  .ref-banner {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 12px;
  }
  .ref-banner h2,
  .ref-banner #ref-banner-title { font-size: 1.12rem; }
  .ref-banner-art { justify-self: start; max-width: 120px; }
  .ref-page .ref-code { font-size: 1.35rem; }
  .ref-stats { grid-template-columns: 1fr; }
}

.html-banner-frame-wrap {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: visible;
  line-height: 0;
}
.html-banner-frame {
  display: block;
  width: 100%;
  min-height: 48px;
  height: 48px;
  border: 0;
  background: transparent;
  overflow: hidden;
}
.html-banner-frame.is-capped {
  overflow: auto;
}
.hb-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.hb-step {
  border: 1px solid var(--line);
  background: #fff;
  color: inherit;
  border-radius: 999px;
  padding: .4rem .85rem;
  font: inherit;
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
}
.hb-step.is-on {
  background: var(--brand-soft);
  border-color: #F0D3B8;
  color: var(--brand-strong);
}
.hb-code {
  font-family: var(--mono);
  font-size: .85rem;
  line-height: 1.45;
  min-height: 16rem;
  white-space: pre-wrap;
}
.hb-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.hb-preview-tools { margin-bottom: 8px; }
.hb-preview-tools .btn.is-on,
.hb-preview-tools .btn-secondary.is-on {
  background: var(--brand-soft);
  border-color: #F0D3B8;
  color: var(--brand-strong);
}
.hb-preview-shell {
  width: 100%;
  max-width: 100%;
  margin: 12px 0;
  background: #fff;
  border: 1px dashed #F0D3B8;
  border-radius: 12px;
  overflow: visible;
}
.hb-preview-shell.is-mobile {
  width: 360px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.hb-shop-list {
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
}
.hb-dl {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 6px 12px;
  margin: 0 0 16px;
}
.hb-dl dt { color: var(--muted); font-weight: 600; }
.hb-dl dd { margin: 0; }
@media (max-width: 720px) {
  .hb-dl { grid-template-columns: 1fr; }
  .hb-code { min-height: 12rem; }
}

.app .appt-list-page {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-x: hidden;
}
.app .appt-list-page > .page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 24px;
}
.app .appt-list-page > .page-head .btn {
  flex: 0 0 auto;
  min-height: 44px;
}
.app .appt-list-page > .appt-filters-block {
  margin: 0 0 24px;
  min-width: 0;
}
.app .appt-list-page .filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 0;
  align-items: end;
}
.app .appt-list-page .filters .field {
  margin: 0;
  min-width: 0;
  gap: 8px;
}
.app .appt-list-page .filters .field > label {
  margin: 0;
}
.app .appt-list-page .filter-scope {
  margin: 16px 0 0;
  overflow-wrap: anywhere;
}
.stat-grid {
  align-items: stretch;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4, 16px);
}
.stat-grid .card.stat {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: var(--space-3, 12px);
}
.app .stat-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 24px;
}
.app .stat .value,
.app .stat .value-split {
  margin: 0;
  padding-left: 32px;
  line-height: 1.2;
}
.stat-help {
  margin-left: auto;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--muted);
  cursor: help;
  min-width: 32px;
  min-height: 32px;
  display: grid;
  place-items: center;
}
.stat-help .icon { width: 16px; height: 16px; }
.stat-help-text {
  margin: 0;
  padding-left: 32px;
  font-size: .8rem;
}
.visit-note { margin-top: 12px; }
.visit-note summary { cursor: pointer; font-weight: 600; }
.visit-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 960px) {
  .app .report-page .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .app .report-page .stat-grid,
  .visit-stat-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .app .appt-list-page > .page-head {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .app .appt-list-page > .page-head .btn {
    width: 100%;
    justify-content: center;
  }
  .app .appt-list-page .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 419px) {
  .app .appt-list-page .filters {
    grid-template-columns: 1fr;
  }
}

.app .header-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  border: 0;
  margin: 0;
  padding: 0;
}
.app .header-mode-row legend { font-weight: 700; margin-bottom: 8px; }
.app .header-mode-row label { display: flex; align-items: center; gap: 8px; min-height: 44px; }

.dock-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.dock-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fafbfc;
}
.dock-item-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.dock-item-handle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--muted);
  cursor: grab;
}
.dock-item-head strong { flex: 1 1 auto; }
.dock-item-move { display: flex; gap: 6px; }
.dock-preview {
  max-width: 280px;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: #eef1f5;
}
.dock-preview-frame {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.dock-preview-fill {
  flex: 1;
  padding: 16px;
  font-size: .85rem;
  color: var(--muted);
}
.dock-preview-empty { margin: 8px 12px 12px; }

@media (max-width: 720px) {
  .social-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }
  .social-row-input {
    grid-template-columns: minmax(0, 1fr) 44px;
  }
}

.staff-avatar,
.entity-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  background: #E6E8EB;
}
.staff-avatar-lg {
  width: 96px;
  height: 96px;
  flex-basis: 96px;
}
.staff-avatar img,
.entity-avatar img,
.staff-avatar-svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.staff-photo-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.staff-photo-preview {
  width: 96px;
  height: 96px;
}
.staff-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.appt-row {
  cursor: pointer;
}
.appt-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(39, 39, 37, .42);
  display: grid;
  place-items: center;
  padding: 16px;
}
.appt-dialog-overlay[hidden] { display: none; }
.appt-dialog {
  width: min(560px, 100%);
  max-height: min(92vh, 760px);
  overflow: visible;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(15, 18, 24, .18);
}
.page-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.appt-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 12px 14px;
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 4;
}
.appt-bulk-bar[hidden] { display: none !important; }
.appt-bulk-count {
  margin: 0;
  font-weight: 650;
}
.appt-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.week-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.week-item .chip { flex: 1; min-width: 0; }
.appt-status-select { position: relative; }
.appt-status-label {
  display: block;
  font-weight: 650;
  margin-bottom: 8px;
}
.appt-status-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-align: left;
}
.appt-status-trigger:disabled { opacity: .6; cursor: not-allowed; }
.appt-status-trigger .status-dot { width: 10px; height: 10px; }
.appt-status-caret { margin-left: auto; color: var(--muted); display: grid; place-items: center; }
.appt-status-caret .icon { width: 16px; height: 16px; }
.appt-status-list {
  margin: 6px 0 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 18, 24, .12);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.appt-status-option {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) 20px;
  align-items: center;
  column-gap: 10px;
  min-height: 44px;
  height: 44px;
  padding: 8px 10px;
  box-sizing: border-box;
  border-radius: 10px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 600;
  background: transparent;
}
.appt-status-option .status-dot {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}
.appt-status-option.is-selected {
  font-weight: 700;
  background: #f4f5f7;
}
.appt-status-option:focus,
.appt-status-option:hover {
  outline: none;
  background: #f7f8fa;
}
.appt-status-option.is-selected:hover,
.appt-status-option.is-selected:focus { background: #eef0f3; }
.appt-status-tick {
  width: 20px;
  min-width: 20px;
  margin-left: 0;
  text-align: center;
  line-height: 1;
  justify-self: end;
  color: var(--ink);
  display: grid;
  place-items: center;
}
.appt-status-tick .icon { width: 16px; height: 16px; }
.appt-status-select.is-busy .appt-status-trigger {
  position: relative;
}
.appt-status-select.is-busy .appt-status-trigger::after {
  content: "";
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border: 2px solid var(--line);
  border-top-color: var(--brand, #3b7ca8);
  border-radius: 50%;
  animation: appt-status-spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes appt-status-spin {
  to { transform: rotate(360deg); }
}
.appt-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 16px 8px;
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--card);
}
.appt-dialog-head h2 {
  margin: 0;
  font-size: 1.2rem;
  overflow-wrap: anywhere;
}
.appt-dialog-close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f2f4f7;
  color: var(--ink);
  cursor: pointer;
}
.appt-dialog-close .icon { width: 20px; height: 20px; }
.appt-dialog-close:hover { background: #e8eaee; }
.appt-dialog-tabs {
  display: flex;
  gap: 4px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}
.appt-tab {
  border: 0;
  background: transparent;
  min-height: 44px;
  padding: 0 12px;
  font-weight: 650;
  cursor: pointer;
  color: var(--muted);
}
.appt-tab.is-active {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--brand);
}
.appt-dialog-body {
  overflow: auto;
  padding: 16px;
  flex: 1;
  min-height: 0;
}
.appt-status-now { margin-bottom: 12px; }
.appt-status-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.appt-status-btn {
  justify-content: flex-start;
  min-height: 44px;
}
.appt-status-btn.is-current {
  box-shadow: inset 0 0 0 2px var(--brand);
}
.appt-dialog-danger {
  border-top: 1px solid var(--line);
  padding: 12px 16px 16px;
}
body.appt-dialog-open { overflow: hidden; }
.week-col .chip {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  text-align: left;
  min-width: 0;
}
.week-chip {
  gap: 2px;
  padding: .4rem .45rem;
}
.week-chip-time {
  font-weight: 700;
  font-size: .78rem;
  line-height: 1.2;
}
.week-chip-name {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: .78rem;
  line-height: 1.25;
  color: var(--ink);
}
.week-chip-status {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: .72rem;
  font-weight: 650;
  color: var(--ink);
  margin-top: 2px;
}
.week-chip-status .status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
}

.app .appearance-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4, 24px);
}
.app .surface-fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 16px);
}
.app .surface-fields .btn {
  align-self: flex-start;
  min-height: 44px;
}
.app input[type="color"] {
  width: 4rem;
  height: 44px;
  padding: 4px;
  border-radius: 10px;
  cursor: pointer;
}
.app-nav-logout button .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.admin-home-stats {
  align-items: stretch;
}
.admin-home-stats .card.stat {
  min-height: 132px;
  height: 100%;
  justify-content: space-between;
}
.admin-shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 12px;
}
.admin-shop-toolbar .field {
  margin: 0;
  min-width: 160px;
  flex: 1 1 160px;
}
.admin-shop-toolbar .field-search {
  flex: 2 1 220px;
}
.admin-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 12px;
  min-height: 44px;
}
.admin-bulk-bar[hidden] { display: none; }
.shop-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.shop-row-actions .btn {
  min-height: 44px;
}
.shop-check {
  width: 18px;
  height: 18px;
}
.admin-shop-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
}
.admin-empty,
.admin-error {
  padding: 20px 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--muted);
  text-align: center;
}
.admin-error { color: var(--danger); border-color: var(--danger-bg); background: var(--danger-bg); }
@media (max-width: 720px) {
  table.shop-table thead { display: none; }
  table.shop-table tbody { display: flex; flex-direction: column; gap: 12px; }
  table.shop-table tr {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 12px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    margin: 0;
  }
  table.shop-table td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    padding: 0;
    grid-column: 1 / -1;
  }
  table.shop-table td.shop-select-cell {
    grid-column: 1;
    grid-row: 1;
    display: block;
  }
  table.shop-table td.shop-name-cell {
    grid-column: 2;
    grid-row: 1;
    display: block;
  }
  table.shop-table td.shop-actions-cell {
    grid-column: 1 / -1;
  }
  table.shop-table td.shop-actions-cell .shop-row-actions {
    justify-content: stretch;
  }
  table.shop-table td.shop-actions-cell .btn {
    flex: 1;
  }
}







