/* Berberce panel 2026-09-16 kurulum-gorsel-davet-sifre */
: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: #6b4f00;
  --pending-bg: #fff3d6;
  --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: 1.25rem; height: 1.25rem; display: inline-block; vertical-align: -3px; }
.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(--saxe-soft); color: var(--saxe-dark); }
.badge-completed { background: var(--ok-bg); color: var(--ok); }
.badge-cancelled { background: #eee; color: #555; }
.badge-no_show, .badge-no-show { background: var(--danger-bg); color: var(--danger); }
.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; }

.field { margin-bottom: 1rem; }
.field label, .label { display: block; font-weight: 600; margin-bottom: .35rem; }
.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; }
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;
  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;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
}
.app-brand {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.app-brand .app-logo { width: 180px; }
.app-account {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.app-user {
  font-weight: 600;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}
.app-bell .nav-count {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--saxe);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.app-chrome .btn-secondary,
.app-chrome .app-logout {
  color: inherit;
}
.app-chrome .btn-secondary {
  background: var(--chrome-input, var(--card));
  border-color: var(--chrome-line, var(--line));
}
.app-logout {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 36px;
  padding: 0 .45rem;
}
.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 20px 10px;
}
.app-nav a {
  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;
}
.app-nav a: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 {
  outline: 3px solid var(--brand-strong);
  outline-offset: 2px;
}
.app-nav .nav-count {
  margin-left: 2px;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--saxe);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.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; }
.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; }
.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-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: .5rem; }
.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;
}

@media (max-width: 960px) {
  .grid-4, .grid-3 { grid-template-columns: 1fr 1fr; }
  .week-grid { grid-template-columns: 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; }
  .app-logo, .auth-logo, .app-brand .app-logo { width: 140px; }
  .datetime-row { grid-template-columns: 1fr; }
}
@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: flex-start; gap: .85rem; cursor: pointer; max-width: 40rem;
}
.switch input {
  position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0,0,0,0);
}
.switch-ui {
  position: relative; width: 52px; height: 32px; flex: 0 0 52px;
  border-radius: 999px; background: #c5c1cc;
  transition: background .2s ease;
  margin-top: .15rem;
}
.switch-ui::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 26px; height: 26px; 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(--saxe); }
.switch input:checked + .switch-ui::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-ui { outline: 3px solid var(--saxe); outline-offset: 3px; }
.switch-text { display: flex; flex-direction: column; gap: .2rem; padding-top: .15rem; }
.switch-text .hint { margin: 0; }
@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-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
}
.app .content {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.app .flash { margin: 0; }
.app .page-head {
  margin: 0;
  gap: var(--space-3);
  align-items: center;
}
.app .card { padding: 24px; }
.app .card.stat { padding: 24px; }
.app .stat { padding: 0; }
.app .grid { gap: var(--space-4); }
.app .field,
.app .float-field { margin: 0; }
.app form.card,
.app .form-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.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;
}
.app .control-row {
  display: flex;
  gap: var(--space-1);
  align-items: center;
}
.app .stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.app .stack > * { 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: 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;
}
.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: 16px;
    gap: 16px;
  }
  .app .card,
  .appt-row { padding: var(--space-3); }
}

@media (max-width: 720px) {
  .appt-row {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-2);
  }
  .appt-row-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }
  .appt-name,
  .appt-sub { white-space: normal; }
}

.app .check-grid {
  display: grid;
  gap: 8px;
}
.app .svc-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 44px;
}
.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: 16px;
}
.app .settings-group {
  padding: 16px;
  margin: 0;
}
.app .settings-group-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0 0 16px;
}
.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: 16px;
}
.app .hours-day {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.app .hours-day-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}
.app .break-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.app .break-row input[type="time"] {
  width: auto;
  min-width: 8rem;
  flex: 1 1 8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .65rem .8rem;
  min-height: 2.6rem;
}
.app .break-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
@media (min-width: 960px) {
  .app .settings-groups {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .app .settings-group {
    padding: 24px;
  }
  .app .settings-group--wide {
    grid-column: 1 / -1;
  }
}
@media (max-width: 720px) {
  .app .hours-day-head { grid-template-columns: 1fr; }
}

.app-logout:hover,
.app-bell:hover {
  background: #F2F4F7;
  border-radius: 8px;
}
.app-logout:focus-visible,
.app-bell: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; }

.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-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: 16px;
  padding-top: 8px;
  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: 12px;
  align-items: center;
}
.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); }
  .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(6, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  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 {
  grid-column: 1 / -1;
  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(3, minmax(0, 1fr)); }
  .app form.dash-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-toolbar-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 0 12px; }
@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 {
  display: flex;
  gap: 8px;
  align-items: center;
}
.password-wrap input { flex: 1; min-width: 0; }
.setup-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}
.setup-steps li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}
.setup-steps li span {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 700;
}
.setup-steps li.is-current { background: var(--brand-soft); color: var(--ink); font-weight: 600; }
.setup-steps li.is-done { color: var(--ok); }
.setup-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  margin-top: 1.25rem;
}
.setup-list { margin: 0 0 1rem; padding-left: 1.2rem; }
.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 { flex-direction: column; }
  .setup-nav .btn { width: 100%; }
}




