:root {
  color-scheme: light;
  --ink: #111816;
  --muted: #64716d;
  --line: #d7e0dc;
  --panel: #ffffff;
  --soft: #f4f6f5;
  --sidebar: rgba(255, 255, 255, 0.92);
  --green: #0f766e;
  --green-dark: #0b4f4a;
  --sage: #e7f1ee;
  --clay: #b9634f;
  --amber: #c78620;
  --blue: #2563a8;
  --shadow: 0 14px 34px rgba(17, 24, 22, 0.07);
  --calendar-row-height: 38px;
  --login-background-image: none;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #fbfcfb 0%, #f3f6f5 48%, #eef3f1 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  min-height: 28px;
}

input,
select,
textarea {
  min-height: 30px;
}

.app-shell {
  height: 100vh;
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  overflow: hidden;
}

.sidebar {
  background: rgba(255, 255, 255, 0.88);
  border-right: 1px solid var(--line);
  color: var(--ink);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 0;
  height: 100vh;
  backdrop-filter: blur(18px);
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background:
    linear-gradient(120deg, rgba(12, 45, 39, 0.46), rgba(248, 250, 249, 0.78)),
    var(--login-background-image),
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.95), rgba(232, 242, 238, 0.92));
  background-size: cover;
  background-position: center;
  backdrop-filter: blur(12px);
}

.login-card {
  width: min(420px, calc(100vw - 32px));
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 28px 70px rgba(24, 39, 35, 0.16);
}

.login-card h1 {
  margin: 0;
  font-size: 22px;
}

.login-error {
  min-height: 16px;
  color: #b42318;
  font-weight: 800;
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.password-field input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.password-toggle {
  min-width: 58px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: #f5faf8;
  color: var(--green-dark);
  font-weight: 850;
  padding: 0 10px;
}

.password-toggle:hover {
  background: #eaf5f1;
}

.large-brand .brand-mark {
  width: clamp(96px, 30vw, 150px);
  height: 72px;
  border-radius: 12px;
  font-size: 20px;
  background: #ffffff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px;
  border: 1px solid #e4ece8;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px rgba(21, 50, 43, 0.05);
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--green), #0f5f55);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0;
  overflow: hidden;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-logo.large {
  max-width: 100%;
  max-height: 100%;
  padding: 4px;
}

.brand strong {
  display: block;
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
}

.brand span {
  display: block;
  font-size: 10px;
  line-height: 1.1;
  white-space: nowrap;
}

.brand span,
.eyebrow,
small {
  color: var(--muted);
}

.signed-in-card {
  display: grid;
  gap: 2px;
  padding: 7px 9px;
  border: 1px solid #d8e9e3;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f2faf7 100%);
  color: #163f37;
  box-shadow: 0 10px 22px rgba(21, 50, 43, 0.04);
}

.signed-in-card[hidden] {
  display: none;
}

.signed-in-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.signed-in-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.15;
}

.signed-in-card span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #59716a;
  font-size: 10px;
  line-height: 1.15;
}

.logout-button {
  border: 1px solid #d9e6e1;
  border-radius: 10px;
  background: #ffffff;
  color: var(--green-dark);
  font-weight: 850;
  min-height: 30px;
  text-align: center;
}

.logout-button:hover {
  background: #eef6f3;
  border-color: #bad8cf;
}

.nav {
  display: grid;
  gap: 5px;
  overflow: auto;
  padding: 2px 2px 4px 0;
  scrollbar-width: thin;
}

.nav-module {
  display: grid;
  gap: 2px;
  padding: 4px;
  border: 1px solid #edf2f0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.66);
}

.nav-module-title {
  color: #6d7b77;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
  padding: 0 4px 3px;
  text-transform: uppercase;
}

.nav-button {
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  padding: 6px 8px;
  text-align: left;
  font-weight: 750;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.nav-button::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #c5d4cf;
  flex: 0 0 auto;
}

.nav-button.active {
  background: #101817;
  border-color: #101817;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(17, 24, 22, 0.16);
  transform: translateX(1px);
}

.nav-button.active::before {
  background: #ffffff;
}

.nav-button:hover {
  background: #eef6f3;
  border-color: #d8e6e1;
}

.quick-stats {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding-top: 7px;
  border-top: 1px solid #e4ece8;
}

.quick-stats div {
  background: #ffffff;
  border: 1px solid #dce8e3;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 10px 24px rgba(21, 50, 43, 0.05);
}

.quick-stats span {
  display: block;
  font-size: 17px;
  font-weight: 850;
}

.app-version-info {
  color: #71807b;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.35;
  padding: 1px 4px 0;
  text-align: center;
}

.login-version-info {
  border-top: 1px solid #e4ece8;
  margin-top: 2px;
  padding-top: 10px;
}

.workspace {
  min-width: 0;
  min-height: 0;
  padding: 10px 12px 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.topbar,
.calendar-tools,
.dialog-header,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.topbar {
  margin-bottom: 6px;
  flex: 0 0 auto;
  gap: 12px;
}

.topbar > div:first-child {
  flex: 0 0 auto;
}

.top-alert-strip {
  flex: 1 1 auto;
  min-height: 38px;
  border: 1px solid #f0c7c7;
  border-left: 4px solid #d62828;
  border-radius: 10px;
  background: #fff6f6;
  color: #611414;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(180, 35, 24, 0.08);
}

.top-alert-strip[hidden] {
  display: none !important;
}

.top-alert-strip strong {
  flex: 0 0 auto;
  font-size: 11px;
  text-transform: uppercase;
}

.top-alert-strip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h2 {
  font-size: 16px;
}

h1 {
  font-size: 22px;
  line-height: 1.05;
}

h2 {
  font-size: 13px;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
}

.topbar-actions,
.date-controls,
.segmented,
.form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.primary,
.secondary,
.icon-button,
.segmented button {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 28px;
  padding: 0 9px;
  background: var(--panel);
  color: var(--ink);
}

.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
  font-weight: 780;
}

.primary:hover {
  background: var(--green-dark);
}

.secondary:hover,
.icon-button:hover,
.segmented button:hover {
  border-color: var(--green);
}

.danger {
  color: #8d3d29;
  border-color: #e0a28e;
}

.icon-button {
  width: 30px;
  padding: 0;
}

.small-button {
  min-height: 28px;
  padding: 0 8px;
  align-self: start;
}

.form-actions {
  justify-content: flex-end;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 6px;
  background: white;
  color: var(--ink);
  width: 100%;
}

select[multiple] {
  min-height: 112px;
  padding: 6px;
}

select[multiple] option {
  border-radius: 6px;
  padding: 7px 8px;
}

label {
  display: grid;
  gap: 6px;
  color: #3f4744;
  font-weight: 740;
  font-size: 11px;
}

.segmented {
  background: #e9eeec;
  border-radius: 8px;
  padding: 4px;
}

.segmented button {
  border: 0;
  min-height: 30px;
  background: transparent;
  font-weight: 750;
  padding: 0 12px;
}

.segmented button.active {
  background: white;
  box-shadow: 0 4px 14px rgba(31, 40, 38, 0.12);
  color: var(--green-dark);
}

.section {
  display: none;
  min-height: 0;
}

.license-banner {
  flex: 0 0 auto;
  border: 1px solid #ead9b2;
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: #fffaf0;
  color: #5a3d04;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  padding: 8px 10px;
}

.license-banner.blocked {
  border-color: #efc2ba;
  border-left-color: #d62828;
  background: #fff4f2;
  color: #611414;
}

.license-banner span {
  color: inherit;
}

.license-card {
  border: 1px solid #cde6d7;
  border-radius: 10px;
  background: #f3fbf6;
  display: grid;
  gap: 5px;
  padding: 12px;
}

.license-card.blocked {
  border-color: #efc2ba;
  background: #fff4f2;
}

.license-card span,
.license-card small {
  color: var(--muted);
}

body.license-readonly .requires-license,
body.license-readonly button:disabled {
  cursor: not-allowed;
}

.section.active {
  display: block;
  min-height: 0;
}

#calendarSection.section.active,
#classesSection.section.active {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

#cashierSection.section.active,
#checksSection.section.active,
#dictionariesSection.section.active,
#dashboardSection.section.active {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.manager-dashboard {
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow: auto;
}

.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-height: 0;
}

.dashboard-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  box-shadow: var(--shadow);
  min-height: 220px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
  margin: 0;
  font-size: 13px;
  color: var(--green-dark);
}

.dashboard-list,
.close-day-list {
  padding: 10px;
  display: grid;
  gap: 8px;
  align-content: start;
  overflow: auto;
}

.manager-flow-row,
.manager-exception-row {
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: #fbfdfc;
  padding: 8px 10px;
  text-align: left;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 2px 8px;
}

.manager-flow-row small,
.manager-exception-row span,
.manager-resource-row span,
.close-day-item span {
  color: var(--muted);
}

.manager-flow-row small {
  grid-column: 2;
}

.manager-exception-row {
  grid-template-columns: 92px minmax(0, 1fr);
}

.manager-exception-row.no-show,
.manager-exception-row.unpaid,
.manager-exception-row.alert {
  border-left-color: #d62828;
  background: #fff6f4;
}

.manager-exception-row.cancelled {
  border-left-color: #7b8b86;
  background: #f6f7f7;
}

.manager-resource-row,
.close-day-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.close-day-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  justify-content: initial;
  justify-items: start;
  text-align: left;
}

.close-day-item input {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  justify-self: center;
  margin: 0;
}

.close-day-item span {
  justify-self: start;
}

.close-day-item.attention {
  border-color: #ead9b2;
  background: #fffaf0;
}

.close-day-item.done {
  border-color: #cde6d7;
  background: #f3fbf6;
}

.calendar-tools {
  margin-bottom: 6px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 8px 20px rgba(24, 39, 35, 0.05);
  flex: 0 0 auto;
}

.calendar-exception-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(96px, 1fr));
  gap: 8px;
  margin: 0 0 6px;
}

.exception-chip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  text-align: left;
}

.exception-chip strong {
  font-size: 14px;
}

.exception-chip.ok {
  background: #f3fbf6;
  border-color: #cde6d7;
}

.exception-chip.warn,
.exception-chip.alert {
  background: #fffaf0;
  border-color: #ead9b2;
}

.exception-chip.active {
  background: #eef7ff;
  border-color: #b8d7ef;
}

.exception-chip.danger {
  background: #fff4f2;
  border-color: #efc2ba;
}

.exception-chip.muted {
  background: #f6f7f7;
}

.calendar-grid {
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}

#calendarGrid,
#classCalendarGrid,
#guestCalendar {
  overscroll-behavior: contain;
}

.calendar-with-tray {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) 148px;
  gap: 6px;
  align-items: stretch;
  min-height: 100%;
  height: 100%;
}

.class-calendar-with-tray {
  grid-template-columns: 132px minmax(0, 1fr) 0;
}

.empty-tray {
  border: 0;
  padding: 0;
  box-shadow: none;
  overflow: hidden;
}

.daily-notes-tray {
  position: sticky;
  top: 6px;
  max-height: calc(100vh - 132px);
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  margin: 6px 0;
  box-shadow: 0 10px 26px rgba(24, 39, 35, 0.06);
}

.daily-notes-tray h2 {
  font-size: 11px;
  color: var(--green-dark);
  margin: 0;
}

.daily-note-card {
  width: 100%;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 7px;
  background: #f8fbff;
  display: grid;
  gap: 3px;
  text-align: left;
  padding: 7px;
  margin-top: 7px;
}

.daily-note-card span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-note-card.alert {
  border-left-color: #d62828;
  background: #fff1f1;
  animation: alertPulse 1.4s ease-in-out infinite;
}

.daily-note-card.completed {
  opacity: 0.62;
  background: #f1f5f3;
  border-left-color: #7b8b86;
  animation: none;
}

.daily-note-card.completed strong {
  text-decoration: line-through;
}

.daily-note-dialog {
  width: min(720px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 28px 70px rgba(24, 39, 35, 0.18);
}

.daily-note-dialog::backdrop {
  background: rgba(24, 39, 35, 0.36);
  backdrop-filter: blur(3px);
}

.daily-note-dialog form {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #fff;
}

.daily-note-dialog label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 850;
}

.daily-note-dialog input,
.daily-note-dialog select,
.daily-note-dialog textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
}

.daily-note-dialog .inline-check {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.daily-note-dialog .inline-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  padding: 0;
}

.daily-note-scope-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 4px 0;
}

.daily-note-scope-panel[hidden] {
  display: none;
}

@keyframes alertPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(214, 40, 40, 0); }
  50% { box-shadow: 0 0 0 3px rgba(214, 40, 40, 0.14); }
}

.detached-tray {
  position: sticky;
  top: 6px;
  max-height: calc(100vh - 132px);
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  margin: 6px 0;
  box-shadow: 0 10px 26px rgba(24, 39, 35, 0.06);
}

.detached-tray h2 {
  font-size: 11px;
  color: var(--green-dark);
  margin-bottom: 6px;
}

.detached-card {
  width: 100%;
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: 7px;
  background: #fffdf8;
  display: grid;
  gap: 3px;
  text-align: left;
  padding: 7px;
  margin-bottom: 6px;
}

.detached-card strong,
.detached-card span,
.detached-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detached-card span,
.detached-card small {
  color: var(--muted);
  font-size: 11px;
}

.tray-empty {
  color: var(--muted);
  font-size: 12px;
  padding: 12px 4px;
}

.calendar-table,
.week-table {
  display: grid;
  min-width: 700px;
}

.calendar-with-tray > .calendar-table {
  grid-column: 2;
  height: 100%;
  grid-template-rows: auto repeat(var(--slot-count, 24), minmax(var(--calendar-row-height), 1fr));
}

.elastic-calendar-table {
  height: 100%;
  grid-template-rows: auto repeat(var(--slot-count, 24), minmax(var(--calendar-row-height), 1fr));
}

.calendar-head,
.calendar-row {
  display: grid;
  grid-template-columns: 78px repeat(var(--lane-count), minmax(132px, 1fr));
  min-height: 0;
}

.week-head,
.week-row {
  display: grid;
  grid-template-columns: 78px repeat(7, minmax(112px, 1fr));
}

.calendar-head,
.week-head {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fbfdfc;
  border-bottom: 1px solid var(--line);
}

.time-cell,
.lane-head,
.slot-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.time-cell,
.lane-head {
  padding: 5px 7px;
  font-weight: 820;
  line-height: 1.15;
}

.lane-head {
  color: #16221f;
  font-size: 12px;
}

.time-cell {
  color: var(--muted);
  font-size: 10.5px;
  background: #fbfdfc;
}

.calendar-head > .time-cell,
.week-head > .time-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.slot-cell {
  min-height: var(--calendar-row-height);
  padding: 2px;
  background: #fff;
  position: relative;
}

.calendar-with-tray > .calendar-table .slot-cell {
  min-height: 0;
}

.elastic-calendar-table .slot-cell {
  min-height: 0;
}

.occupied-continuation {
  background: #fbfdfc;
}

.unavailable-slot {
  background: repeating-linear-gradient(
    -45deg,
    #f0f5f2,
    #f0f5f2 8px,
    #e8efeb 8px,
    #e8efeb 16px
  );
  position: relative;
}

.unavailable-slot::after {
  content: "Unavailable";
  color: #8a938f;
  font-size: 10px;
  font-weight: 780;
  position: absolute;
  left: 5px;
  top: 5px;
}

.unavailable-slot.booked-slot::after {
  content: "";
}

.unavailable-slot .appointment {
  position: relative;
  z-index: 1;
}

.unavailable-slot .appointment + * {
  display: none;
}

.week-slot {
  min-height: var(--calendar-row-height);
}

.elastic-calendar-table .week-slot,
.elastic-calendar-table .class-slot,
.elastic-calendar-table .guest-calendar-slot {
  min-height: 0;
}

.week-booking-stack {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 0;
}

.week-appointment {
  border: 1px solid rgba(23, 113, 101, 0.18);
  border-left: 3px solid var(--tile-color, var(--green));
  border-radius: 6px;
  background: var(--tile-color, var(--green));
  color: var(--tile-ink, white);
  min-height: 28px;
  padding: 0;
  display: grid;
  gap: 1px;
  text-align: left;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(24, 39, 35, 0.06);
}

.week-class-appointment {
  background: var(--tile-color, #4caf50);
}

.week-appointment:hover {
  outline: 2px solid color-mix(in srgb, var(--tile-color, var(--green)) 28%, transparent);
}

.week-appointment strong,
.week-appointment span,
.week-appointment small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-appointment span,
.week-appointment small {
  color: var(--tile-muted, rgba(255, 255, 255, 0.88));
  font-size: 10px;
}

.week-body {
  display: grid;
  gap: 1px;
  padding: 3px 6px;
}

.week-band {
  min-height: 7px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  background: #d9ca83;
  color: #66513e;
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
}

.compact-week .week-appointment {
  min-height: 24px;
}

.compact-week .week-appointment span,
.compact-week .week-appointment small {
  display: none;
}

.compact-week .week-body {
  padding: 4px 6px;
}

.compact-toggle {
  white-space: nowrap;
}

.slot-cell button {
  width: 100%;
  height: 100%;
  min-height: 20px;
  border: 1px dashed transparent;
  border-radius: 4px;
  background: transparent;
}

.slot-cell button:hover,
.drop-hover {
  border-color: #88b9aa;
  background: #eff7f3;
}

.slot-cell .week-appointment {
  width: 100%;
  height: auto;
  min-height: 28px;
  border: 1px solid rgba(23, 113, 101, 0.18);
  border-left: 3px solid var(--tile-color, var(--green));
  border-radius: 6px;
  background: var(--tile-color, var(--green));
  box-shadow: 0 1px 2px rgba(24, 39, 35, 0.06);
}

.slot-cell .week-class-appointment {
  background: var(--tile-color, #4caf50);
}

.appointment {
  border-left: 3px solid var(--green);
  background: var(--tile-color, #246b5f);
  border-radius: 6px;
  padding: 0;
  min-height: 24px;
  color: var(--tile-ink, white);
  box-shadow: inset 0 0 0 1px rgba(23, 113, 101, 0.13), 0 1px 2px rgba(24, 39, 35, 0.06);
  overflow: hidden;
}

.block-span {
  position: absolute;
  left: 3px;
  right: 3px;
  z-index: 2;
}

.appointment:hover {
  outline: 2px solid rgba(36, 107, 95, 0.22);
}

.appointment strong,
.appointment span,
.appointment small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-body {
  padding: 3px 7px;
  min-height: 18px;
  overflow: hidden;
  position: relative;
}

.payment-indicator {
  position: absolute;
  top: 2px;
  right: 4px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 900;
  padding: 0 4px;
  line-height: 1.3;
  background: #ffffffd9;
}

.payment-indicator.paid {
  color: #1a7f4b;
}

.payment-indicator.in-check {
  color: #b36a05;
}

.payment-indicator.pending {
  color: #64727c;
}

.appointment-band {
  display: flex;
  align-items: center;
  padding: 0 7px;
  font-size: 8px;
  line-height: 1;
  font-weight: 850;
  color: #66513e;
  background: #d9ca83;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 0;
}

.appointment-band.small-band {
  font-size: 8.5px;
  padding: 0 5px;
}

.appointment-band.tiny-band {
  font-size: 8px;
  padding: 0 5px;
}

.prep-band {
  border-bottom: 1px solid rgba(102, 81, 62, 0.18);
}

.clean-band {
  border-top: 1px solid rgba(102, 81, 62, 0.18);
}

.appointment strong {
  font-size: 10.5px;
}

.appointment span,
.appointment small {
  color: var(--tile-muted, rgba(255, 255, 255, 0.88));
  font-size: 9px;
}

.appointment.tentative {
  background: var(--tile-color, #246b5f);
}

.appointment.completed {
  background: var(--tile-color, #246b5f);
}

.appointment.checked-in {
  background: var(--tile-color, #246b5f);
}

.break-appointment {
  border-left-color: #64727c;
  background: #f0f4f7;
  color: var(--ink);
}

.break-appointment span,
.break-appointment small {
  color: var(--muted);
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: 16px;
}

#dictionariesSection {
  gap: 12px;
}

#dictionariesSection .config-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.cashier-layout {
  display: grid;
  grid-template-columns: minmax(440px, 0.34fr) minmax(0, 1fr) 124px;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
}

.cashier-left,
.cashier-center,
.cashier-actions {
  min-height: 0;
}

.cashier-left {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.cashier-guest-lookup {
  border: 0px solid #d84444;
  border-radius: 8px;
  background: white;
  padding: 6px;
  display: grid;
  gap: 6px;
}

.cashier-search-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  gap: 6px;
}

.cashier-guest-lookup input {
  min-height: 32px;
}

.cashier-guest-results {
  max-height: 150px;
  overflow: auto;
  display: grid;
  gap: 4px;
}

.cashier-guest-results button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbfa;
  min-height: 34px;
  text-align: left;
  padding: 6px 8px;
  display: grid;
  gap: 2px;
}

.cashier-guest-results button.active {
  border-color: #2d57c8;
  background: #ecf2ff;
}

.cashier-guest-results span {
  color: var(--muted);
  font-size: 11px;
}

.cashier-check-panel {
  border: 2px solid #3ea05a;
  border-radius: 10px;
  background: white;
  padding: 8px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 0;
}

.cashier-check-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cashier-check-head h2 {
  font-size: 14px;
}

.cashier-check-list {
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
}

.cashier-open-checks {
  display: grid;
  gap: 6px;
}

.cashier-open-checks-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  border: 1px solid #cde6d7;
  border-radius: 8px;
  background: #f3fbf6;
  padding: 7px 9px;
}

.cashier-open-checks-head.empty {
  border-color: var(--line);
  background: #fbfcfc;
}

.cashier-open-checks-head span {
  color: var(--muted);
}

.cashier-open-check-card {
  border: 1px solid var(--line);
  border-left: 4px solid #3ea05a;
  border-radius: 8px;
  background: #ffffff;
  padding: 7px 9px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 8px;
  text-align: left;
}

.cashier-open-check-card small {
  grid-column: 2;
  color: var(--muted);
}

.cashier-open-check-card.active {
  border-color: #3ea05a;
  background: #f2fbf5;
}

.cashier-check-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafcfb;
  min-height: 48px;
  text-align: left;
  padding: 7px 8px;
  display: grid;
  gap: 2px;
}

.cashier-check-row.active {
  border-color: #3ea05a;
  box-shadow: inset 3px 0 0 #3ea05a;
}

.cashier-check-row span,
.cashier-check-row small {
  color: var(--muted);
}

.cashier-selected-check-card {
  border: 1px solid #3ea05a;
  border-radius: 8px;
  background: #f2fbf5;
  padding: 8px 9px;
  display: grid;
  gap: 5px;
  box-shadow: inset 3px 0 0 #3ea05a;
}

.cashier-selected-check-card div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.cashier-selected-check-card span,
.cashier-selected-check-card small {
  color: var(--muted);
}

.cashier-check-items {
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.cashier-check-items .booking-row {
  grid-template-columns: minmax(112px, 1.25fr) 62px minmax(72px, 0.8fr) 34px 66px 30px;
  min-width: 0;
  width: 100%;
}

.cashier-check-items .booking-row span {
  min-height: 30px;
  padding: 0 6px;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cashier-check-items .remove-line-button {
  width: 24px;
  height: 24px;
  border-color: #e9bab3;
  color: #a23528;
  font-weight: 900;
  justify-self: center;
}

.cashier-check-items .remove-line-button:hover {
  background: #fff1ef;
}

.cashier-check-footer {
  display: grid;
  gap: 8px;
}

.cashier-check-footer label {
  font-size: 12px;
}

.cashier-total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #f3f9f6;
  font-size: 13px;
}

.cashier-total-line.balance {
  background: #fffaf0;
  border-color: #ead9b2;
}

.cashier-payment-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 105px;
  gap: 8px;
}

.cashier-payments-list {
  display: grid;
  gap: 4px;
}

.cashier-payment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfc;
  padding: 5px 7px;
  font-size: 11px;
}

.cashier-payment-row strong {
  color: var(--green-dark);
}

.cashier-payment-row.reversal {
  background: #fff5f3;
  border-color: #efc3bd;
}

.cashier-payment-row.reversal strong {
  color: #b42318;
}

.cashier-payment-row span {
  min-width: 0;
}

.payment-voided-label {
  display: inline-flex;
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #fff5f3;
  color: #b42318;
  border: 1px solid #efc3bd;
}

.data-panel-actions {
  border-top: 1px solid var(--line);
  padding: 8px;
  display: flex;
  justify-content: flex-start;
}

.cashier-center {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 8px;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.cashier-sales-groups {
  border: 0px solid #f2ca36;
  border-radius: 8px;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 4px;
}

.cashier-sales-groups button {
  min-height: 52px;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--cashier-group-color, #a8d5ba) 72%, #4f615b);
  background: var(--cashier-group-color, #a8d5ba);
  color: #13231f;
  font-weight: 800;
}

.cashier-sales-groups button.active {
  background: color-mix(in srgb, var(--cashier-group-color, #a8d5ba) 78%, white);
  color: #21373a;
  border-color: var(--green);
  box-shadow: inset 0 0 0 2px var(--green);
}

.cashier-menu-area {
  min-height: 0;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 8px;
}

.cashier-family-groups {
  border: 0px solid #7f5a3f;
  border-radius: 8px;
  padding: 4px;
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-auto-rows: minmax(54px, auto);
  gap: 4px;
}

.cashier-family-groups button {
  border: 1px solid color-mix(in srgb, var(--cashier-family-color, #c9e4ff) 70%, #63716d);
  border-radius: 6px;
  background: var(--cashier-family-color, #c9e4ff);
  min-height: 52px;
  font-weight: 800;
  color: #13231f;
}

.cashier-family-groups button.active {
  background: color-mix(in srgb, var(--cashier-family-color, #c9e4ff) 78%, white);
  border-color: var(--green);
  box-shadow: inset 0 0 0 2px var(--green);
}

.cashier-items-area {
  border: 0px solid #2f70d5;
  border-radius: 8px;
  padding: 6px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 6px;
  min-height: 0;
}

.cashier-items-grid {
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px;
  align-content: start;
}

.cashier-item-tile {
  border: 1px solid var(--line);
  border-left: 4px solid var(--tile-color, #2d57c8);
  border-radius: 8px;
  background: color-mix(in srgb, var(--tile-color, #2d57c8) 16%, white);
  min-height: 56px;
  text-align: left;
  padding: 7px 8px;
  display: grid;
  gap: 2px;
  margin-top: 10px;
  margin-left: 5px;
}

.cashier-item-tile strong,
.cashier-item-tile span,
.cashier-item-tile small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cashier-item-tile small {
  color: var(--muted);
}

.cashier-item-tile.active {
  outline: 0px solid #2d57c8;
}

.cashier-actions {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 8px;
  display: grid;
  gap: 8px;
  align-content: start;
  overflow: auto;
}

.cashier-actions button {
  min-height: 38px;
  font-weight: 800;
}

.check-action-dialog {
  width: min(620px, calc(100vw - 28px));
}

.check-action-dialog form {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.dialog-hint {
  color: var(--muted);
  font-size: 13px;
}

.pickup-check-list,
.merge-check-list {
  display: grid;
  gap: 8px;
  max-height: min(520px, 58vh);
  overflow: auto;
}

.pickup-check-row,
.merge-check-row {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfb;
  padding: 10px;
  display: grid;
  gap: 4px;
  text-align: left;
}

.pickup-check-row.active {
  border-color: #2d57c8;
  background: #edf3ff;
}

.pickup-check-row span,
.pickup-check-row small,
.merge-check-row small {
  color: var(--muted);
}

.merge-check-row {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  cursor: pointer;
}

.merge-check-row input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.data-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.data-panel h2 {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfaf7;
}

.data-table {
  display: grid;
  overflow: auto;
}

.data-row {
  display: grid;
  grid-template-columns: var(--data-cols);
  min-width: 640px;
  align-items: center;
  gap: 0;
}

.data-row span,
.data-row input {
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  min-height: 34px;
}

.data-row span {
  display: flex;
  align-items: center;
  padding: 0 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.data-head span {
  background: #e8edf1;
  color: #34413d;
}

.data-row input {
  padding: 6px 8px;
}

.data-row input.color-cell {
  width: 52px;
  min-width: 52px;
  height: 28px;
  padding: 2px;
  border-radius: 6px;
  justify-self: start;
}

.data-row:focus-within .row-id {
  background: #2857bd;
  color: white;
}

.data-delete {
  border-radius: 0;
  border-top: 0;
  border-left: 0;
  border-bottom: 1px solid var(--line);
  border-right: 0;
  width: 100%;
  color: #8d3d29;
}

.group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
}

.employee-layout,
.facility-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 14px;
  min-height: calc(100vh - 122px);
  height: calc(100vh - 122px);
  overflow: hidden;
}

.employee-master,
.facility-master,
.employee-detail {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.employee-master,
.facility-master {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

.employee-master-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfaf7;
}

.search-label {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.employee-list {
  overflow: auto;
  padding: 6px;
}

.employee-row {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: #fff;
  display: grid;
  gap: 3px;
  text-align: left;
  padding: 9px 12px;
}

.employee-row:nth-child(even) {
  background: #f7f7f5;
}

.employee-row.active {
  background: #2857bd;
  color: white;
}

.employee-row span {
  color: var(--muted);
  font-size: 12px;
}

.employee-row.active span {
  color: #eaf0ff;
}

.employee-detail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  min-height: 0;
  max-height: calc(100vh - 122px);
}

.detail-tabs {
  display: flex;
  gap: 12px;
  padding: 12px 16px 0;
  border-bottom: 1px solid var(--line);
}

.detail-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 0 0 10px;
  color: var(--muted);
}

.detail-tabs button.active {
  border-bottom-color: #2857bd;
  color: #2857bd;
  font-weight: 800;
}

.employee-tab {
  display: none;
  overflow: auto;
  padding: 18px;
  min-height: 0;
}

.employee-tab.active {
  display: block;
}

.detail-section {
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  margin-bottom: 6px;
}

.detail-section h2 {
  color: #2857bd;
  font-size: 11px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.detail-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px 18px;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-check input {
  width: auto;
}

.inline-check input[type="checkbox"] {
  inline-size: 16px;
  block-size: 16px;
  min-width: 16px;
  min-height: 16px;
  flex: 0 0 auto;
  padding: 0;
}

.skill-transfer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.skill-transfer section {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.skill-transfer h2 {
  padding: 10px 12px;
  background: #fbfaf7;
  border-bottom: 1px solid var(--line);
}

.transfer-table {
  min-height: 420px;
  max-height: 620px;
  overflow: auto;
}

.transfer-row {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: white;
  display: grid;
  grid-template-columns: 54px 1fr;
  text-align: left;
  align-items: center;
  min-height: 34px;
}

.transfer-row:nth-child(even) {
  background: #f7f7f5;
}

.transfer-row:hover {
  background: #eaf0ff;
}

.transfer-row span {
  color: var(--muted);
  padding-left: 12px;
}

.transfer-empty {
  padding: 14px;
  color: var(--muted);
}

.sticky-actions {
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fbfaf7;
  position: sticky;
  bottom: 0;
  z-index: 4;
}

.shift-grid,
.schedule-list {
  display: grid;
  gap: 8px;
}

.shift-row {
  display: grid;
  grid-template-columns: 130px 130px 130px;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
}

.schedule-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.schedule-item {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) 38px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fffefa;
}

.schedule-item span {
  color: var(--muted);
}

.shift-planner {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 330px;
  gap: 14px;
  min-height: calc(100vh - 122px);
}

.settings-layout {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  height: calc(100vh - 122px);
  overflow: hidden;
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  box-shadow: 0 10px 24px rgba(21, 50, 43, 0.05);
}

.settings-tabs button {
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  padding: 0 12px;
  min-height: 32px;
  font-weight: 850;
  color: var(--muted);
}

.settings-tabs button.active {
  background: var(--green);
  border-color: #0f5f55;
  color: white;
}

.settings-tab-panel {
  display: none;
  overflow: auto;
  padding: 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.settings-tab-panel.active {
  display: block;
}

.wide-field {
  grid-column: 1 / -1;
}

.form-inline-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.settings-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.settings-card h2 {
  margin: 0 0 12px;
  color: var(--green-dark);
  font-size: 13px;
  text-transform: uppercase;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.settings-grid label:has(textarea),
.settings-grid label:has(#settingLogoUpload) {
  grid-column: span 2;
}

.settings-logo-preview {
  min-height: 86px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #fbfcfb;
}

.settings-logo-preview img {
  max-width: 220px;
  max-height: 82px;
  object-fit: contain;
}

.settings-login-preview {
  min-height: 120px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #fbfcfb;
  overflow: hidden;
}

.settings-login-preview img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
}

.smtp-log-panel {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
  overflow: hidden;
}

.smtp-log-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.smtp-log-head h3 {
  margin: 0;
  color: var(--teal);
  font-size: 13px;
  text-transform: uppercase;
}

.smtp-log-head small {
  color: var(--muted);
}

.smtp-log-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

#smtpLogOutput {
  margin: 0;
  min-height: 180px;
  max-height: 360px;
  overflow: auto;
  padding: 12px 14px;
  background: #17211f;
  color: #e8f4f0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.menu-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 14px;
  min-height: calc(100vh - 122px);
}

.menu-tree-panel,
.menu-detail {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.menu-tree-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.menu-tree {
  overflow: auto;
  padding: 8px;
}

.tree-group {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

.tree-group > strong {
  background: #eef2f5;
  padding: 8px 10px;
  color: #20354d;
}

.tree-family {
  display: grid;
  gap: 2px;
  padding-left: 14px;
}

.tree-family > span {
  color: var(--muted);
  font-weight: 800;
  padding: 6px 8px;
}

.tree-item {
  border: 0;
  background: #fff;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  text-align: left;
  min-height: 20px;
  padding: 0 8px;
}

.tree-item:nth-child(even) {
  background: #f7f7f5;
}

.tree-item.active {
  background: #2857bd;
  color: white;
}

.menu-detail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 122px);
  overflow: auto;
}

.menu-general-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
}

.image-placeholder {
  border: 1px solid var(--line);
  min-height: 180px;
  display: grid;
  place-items: center;
  color: #a0a6a3;
  background: #f5f5f3;
  overflow: hidden;
}

.image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-uploader {
  display: grid;
  gap: 8px;
  align-self: start;
}

.upload-button {
  display: grid;
  place-items: center;
}

.price-table {
  display: grid;
  overflow: auto;
  border: 1px solid var(--line);
}

.price-row {
  display: grid;
  grid-template-columns: 42px repeat(7, minmax(120px, 1fr)) 42px;
  min-width: 1040px;
}

.price-row span,
.price-row input {
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  min-height: 34px;
}

.price-row span {
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: var(--muted);
  background: #fbfaf7;
}

.price-head span {
  background: #e8edf1;
  color: #34413d;
  font-weight: 800;
}

.simple-data-table {
  max-height: 260px;
  overflow: auto;
}

.stock-entry {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.stock-row {
  grid-template-columns: repeat(6, minmax(120px, 1fr)) 42px !important;
}

.bookings-panel {
  display: grid;
  gap: 14px;
}

.checks-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
}

.guest-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 14px;
  height: calc(100vh - 118px);
  min-height: 0;
}

.guest-master,
.guest-detail {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.guest-master {
  padding: 12px;
  align-self: start;
}

.guest-list {
  display: grid;
  max-height: calc(100vh - 250px);
  overflow: auto;
}

.guest-row,
.booking-guest-result {
  border: 0;
  background: white;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 58px;
  padding: 8px;
  text-align: left;
}

.booking-guest-result {
  grid-template-columns: 1fr;
  min-height: 46px;
}

.guest-row:nth-child(even),
.booking-guest-result:nth-child(even) {
  background: #f7f7f5;
}

.guest-row.active,
.guest-row:hover,
.booking-guest-result.active,
.booking-guest-result:hover {
  background: #dfe8ff;
}

.guest-row span,
.booking-guest-result span,
.booking-profile-summary span,
.booking-profile-summary small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.guest-list-avatar,
.guest-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #d8dedb;
  display: grid;
  place-items: center;
  font-weight: 850;
  color: var(--green-dark);
}

.guest-detail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
}

.guest-detail .detail-tabs {
  padding: 12px 16px 0;
}

.guest-detail .employee-tab {
  padding: 16px;
  overflow: auto;
  min-height: 0;
}

.guest-hero {
  min-height: 118px;
  background: #18294f;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  margin: -16px -16px 18px;
}

.guest-hero h2 {
  color: #ffdf35;
  font-size: 24px;
}

.guest-hero span {
  font-size: 17px;
}

.guest-hero .guest-avatar {
  width: 86px;
  height: 86px;
  background: white;
  color: var(--green-dark);
  font-size: 28px;
}

.guest-empty-panel {
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
  padding: 18px;
  color: var(--muted);
}

.guest-calendar {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  overflow: auto;
}

.guest-note-history {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.guest-note-history h3 {
  margin: 0;
  color: var(--green-dark);
  font-size: 13px;
}

.guest-note-history button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
  padding: 9px 10px;
  text-align: left;
  display: grid;
  gap: 4px;
}

.guest-note-history span,
.booking-profile-notes span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.booking-profile-notes {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  display: grid;
  gap: 4px;
}

.booking-profile-notes b {
  color: var(--green-dark);
  font-size: 11px;
}

#guestScheduleTab.active {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.compact-table {
  box-shadow: none;
}

.booking-filters {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.booking-table {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: auto;
}

.booking-row {
  display: grid;
  grid-template-columns: 120px 80px minmax(150px, 1fr) minmax(190px, 1fr) minmax(160px, 1fr) minmax(120px, 1fr) 120px 80px;
  min-width: 1050px;
  align-items: center;
}

.booking-row span {
  min-height: 38px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 10px;
}

.booking-head span {
  background: #e8edf1;
  color: #34413d;
  font-weight: 800;
}

.check-row {
  grid-template-columns: 110px minmax(170px, 1fr) 100px minmax(260px, 2fr) 120px 120px 150px 170px;
  min-width: 1230px;
}

.check-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}

.check-status.open {
  background: #fff4d7;
  color: #7a4d00;
}

.check-status.paid {
  background: #ddf5e6;
  color: #126b38;
}

.check-status.void,
.check-status.storno {
  background: #f5e5e0;
  color: #8d2d1e;
}

.check-status.merged {
  background: #edf0f4;
  color: #59656f;
}

.check-row-actions {
  gap: 6px;
}

.check-dialog {
  width: min(1120px, calc(100vw - 64px));
  max-height: calc(100vh - 64px);
  border-radius: 14px;
  overflow: hidden;
}

.check-dialog form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 64px);
  background: #fbfcfb;
}

.check-dialog .dialog-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.check-dialog .dialog-actions {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

#checkDetailContent {
  overflow: auto;
  padding: 22px;
}

.check-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: stretch;
}

.check-detail-panel,
.receipt-preview {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(24, 39, 35, 0.05);
}

.receipt-logo {
  display: block;
  max-width: 150px;
  max-height: 62px;
  object-fit: contain;
  margin: 0 auto 8px;
}

.check-detail-panel h3 {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-size: 13px;
  text-transform: uppercase;
}

.check-meta-grid {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px 12px;
  margin-bottom: 16px;
}

.check-meta-grid span {
  color: var(--muted);
  font-weight: 800;
}

.check-meta-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.check-item-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.check-item-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(130px, 0.8fr) minmax(160px, 1fr) 60px 110px;
}

.check-item-row span {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.check-item-row.head span {
  background: #e8edf1;
  font-weight: 850;
}

.receipt-preview {
  background: #f7f2e8;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 22px;
}

.receipt-paper {
  width: 260px;
  min-height: 420px;
  margin: 0 auto;
  background: white;
  color: #111;
  padding: 18px 14px;
  box-shadow: 0 16px 36px rgba(24, 39, 35, 0.18);
  font-family: "Courier New", monospace;
}

.receipt-paper h3,
.receipt-paper p {
  text-align: center;
  margin: 0 0 7px;
}

.receipt-paper div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 0;
}

.receipt-paper hr {
  border: 0;
  border-top: 1px dashed #333;
  margin: 10px 0;
}

.receipt-total {
  font-weight: 900;
  font-size: 15px;
}

.class-week-table .week-row {
  min-height: 0;
}

.class-slot {
  min-height: 0;
}

.class-stack {
  display: grid;
  gap: 4px;
  align-content: start;
}

.class-tile {
  min-height: 30px;
  border: 1px solid rgba(24, 39, 35, 0.16);
  border-radius: 7px;
  background: var(--tile-color, #4caf50);
  color: var(--tile-ink, white);
  padding: 6px 7px;
  text-align: left;
  display: grid;
  gap: 2px;
  align-content: start;
  box-shadow: 0 2px 6px rgba(24, 39, 35, 0.12);
}

.class-tile strong,
.class-tile span,
.class-tile small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-class-tile {
  z-index: 2;
  width: auto;
  left: 3px;
  right: 3px;
  overflow: hidden;
}

.daily-class-tile strong,
.daily-class-tile span,
.daily-class-tile small {
  display: block;
  line-height: 1.15;
}

.weekday-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfaf7;
}

.weekday-picker label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.weekday-picker input {
  width: auto;
}

.class-booked-line {
  margin-bottom: 12px;
  color: var(--muted);
}

.class-client-list {
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  margin-bottom: 14px;
}

.class-client-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 220px) auto auto 34px;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}

.class-client-row div {
  display: grid;
  gap: 2px;
}

.class-client-row span {
  color: var(--muted);
}

.class-client-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px 78px auto;
  gap: 10px;
  align-items: center;
  position: relative;
}

.class-participant-results {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: white;
  box-shadow: 0 16px 34px rgba(24, 39, 35, 0.12);
  max-height: 220px;
  overflow-y: auto;
}

.class-participant-results button {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: white;
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 10px 12px;
}

.class-participant-results button:nth-child(even) {
  background: #f7f9f8;
}

.class-participant-results button:hover {
  background: #e7f2ef;
}

.class-participant-results span {
  color: var(--muted);
}

#classSessionForm .dialog-actions {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
}

#classSessionForm .dialog-actions #saveClassSessionSettings {
  justify-self: center;
}

#classSessionForm .dialog-actions #closeClassSessionFooter {
  justify-self: end;
}

.template-panel,
.planner-panel,
.employee-picker {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.planner-panel {
  padding: 18px;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
}

.template-list,
.employee-picker .employee-list {
  padding: 8px;
}

.template-row,
.employee-check {
  width: 100%;
  min-height: 36px;
  border: 0;
  background: white;
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 9px 10px;
}

.employee-check {
  grid-template-columns: 24px 1fr;
  align-items: center;
}

.template-row:nth-child(even),
.employee-check:nth-child(even) {
  background: #f7f7f5;
}

.template-row:hover,
.employee-check:hover {
  background: #eaf0ff;
}

.template-row span {
  color: var(--muted);
  font-size: 12px;
}

.editor-panel,
.list-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.editor-panel,
.compact-form {
  display: grid;
  gap: 13px;
  align-self: start;
}

.compact-form + .compact-form {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.record-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.record {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: #fffefa;
}

.record p {
  color: var(--muted);
  margin-top: 4px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #edf4f1;
  color: #27584f;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 740;
}

.chip.label {
  background: #efe7dc;
  color: #66513e;
}

.chip.muted {
  background: #f0f1ee;
  color: #58615e;
}

dialog {
  width: min(760px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 24px 70px rgba(31, 40, 38, 0.26);
}

dialog.wide-dialog {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
}

dialog.reservation-dialog {
  width: min(640px, calc(100vw - 24px));
  max-height: min(720px, calc(100vh - 24px));
  overflow: hidden;
  border-radius: 12px;
}

dialog.reservation-dialog #bookingForm {
  background: #f6f8f7;
  color: var(--ink);
  height: min(720px, calc(100vh - 24px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

dialog.reservation-dialog #bookingForm .dialog-header {
  background: #ffffff;
  border-bottom-color: var(--line);
  color: var(--ink);
  padding: 16px 18px 14px;
}

dialog.reservation-dialog #bookingForm .eyebrow {
  display: none;
}

dialog.reservation-dialog #bookingDialogTitle {
  display: grid;
  gap: 4px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.15;
}

dialog.reservation-dialog #bookingDialogTitle span {
  color: var(--amber);
  font-size: 13px;
  letter-spacing: 0.03em;
}

dialog.reservation-dialog #bookingDialogTitle small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

dialog.reservation-dialog .icon-button {
  background: white;
  color: var(--ink);
  border-color: var(--line);
  border-radius: 999px;
}

#classDialog {
  width: min(820px, calc(100vw - 40px));
}

#classSessionDialog {
  width: min(760px, calc(100vw - 40px));
}

#classDialog,
#classSessionDialog {
  margin: auto;
  max-height: calc(100vh - 48px);
  overflow: hidden;
}

#classForm,
#classSessionForm {
  padding: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 48px);
}

#classForm .dialog-header,
#classSessionForm .dialog-header {
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

#classForm .form-grid,
#classForm .weekday-picker,
#classSessionForm .employee-tab {
  margin: 18px 22px;
}

#classForm .form-grid {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 16px 18px;
}

#classForm .dialog-actions,
#classSessionForm .dialog-actions {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: #fbfaf7;
}

#classSessionForm .detail-tabs {
  padding: 14px 22px 0;
}

#classSessionForm .employee-tab {
  min-height: 360px;
  overflow: auto;
}

#classSessionSettingsTab .detail-form-grid {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 16px 18px;
}

#classSessionSettingsTab label:has(textarea) {
  grid-column: span 2;
}

dialog::backdrop {
  background: rgba(20, 27, 25, 0.46);
}

.quick-guest-dialog {
  width: min(560px, calc(100vw - 32px));
}

.quick-guest-dialog form {
  padding: 18px;
}

.payment-dialog {
  width: min(620px, calc(100vw - 28px));
}

.payment-dialog form {
  padding: 18px;
}

.payment-form-grid {
  grid-template-columns: minmax(220px, 1.2fr) minmax(150px, 0.8fr) minmax(190px, 0.9fr);
  align-items: end;
}

.payment-method-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 850;
}

.payment-method-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 6px;
}

.payment-method-buttons button {
  min-height: 38px;
  border: 1px solid color-mix(in srgb, var(--payment-method-color, #edf0f4) 68%, #5a6863);
  border-radius: 9px;
  background: var(--payment-method-color, #edf0f4);
  color: var(--ink);
  font-weight: 850;
}

.payment-method-buttons button.active {
  border-color: var(--green);
  box-shadow: inset 0 0 0 2px var(--green);
  background: color-mix(in srgb, var(--payment-method-color, #edf0f4) 80%, white);
}

.payment-dialog-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}

.payment-progress {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.payment-progress div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}

.payment-progress span,
.payment-guidance {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.payment-progress strong {
  color: var(--green-dark);
  font-size: 16px;
}

.payment-guidance {
  margin: 0 0 12px;
  line-height: 1.35;
}

.payment-dialog-payments {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 8px 10px;
  display: grid;
  gap: 5px;
  font-size: 12px;
}

.payment-dialog-payments[hidden] {
  display: none;
}

.payment-dialog-payment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.payment-dialog-payment-row strong {
  color: var(--ink);
}

.payment-dialog-payment-row.reversal strong {
  color: #b42318;
}

#paymentDialogAmount {
  min-height: 56px;
  font-size: 22px;
  font-weight: 850;
  text-align: right;
}

.payment-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.payment-keypad button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-weight: 800;
}

.payment-keypad button[data-keypad="clear"],
.payment-keypad button[data-keypad="full"] {
  grid-column: span 3;
}

.cashier-vat-breakdown {
  display: grid;
  gap: 3px;
  margin-top: 4px;
  font-size: 12px;
}

.cashier-vat-breakdown div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
}

.cashier-vat-breakdown strong {
  color: var(--ink);
}

.gdpr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.gdpr-actions h2 {
  flex-basis: 100%;
}

#bookingForm {
  padding: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  max-height: 100vh;
}

#bookingForm .dialog-header {
  padding: 16px 18px 10px;
  border-bottom: 1px solid var(--line);
}

.booking-workbench {
  display: grid;
  grid-template-columns: minmax(320px, 24vw) minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  overflow: hidden;
  min-height: 0;
}

.reservation-detail-view {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px;
  min-height: 0;
  overflow: auto;
}

.reservation-status-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  border-bottom: 0;
}

.reservation-status-rail p {
  display: none;
}

.reservation-status-rail button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  padding: 0 10px;
  font-size: 12px;
  box-shadow: 0 1px 2px rgba(28, 36, 34, 0.05);
}

.reservation-status-rail button:nth-of-type(4) {
  background: #eaf5ea;
  border-color: #bfe0bf;
  color: #15581b;
}

.reservation-status-rail button:nth-of-type(n + 7) {
  border-radius: 8px;
  background: #eef3f6;
}

.reservation-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-content: start;
  border-bottom: 0;
  overflow: visible;
}

.reservation-card-section {
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(35, 42, 38, 0.06);
}

.resources-card {
  border-right: 1px solid var(--line);
}

.reservation-kicker {
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.reservation-card-section label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.reservation-resource-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d3ddd8;
  border-radius: 8px;
  padding: 8px;
  background: #fbfdfc;
}

.reservation-resource-row strong {
  flex: 1;
  color: var(--ink);
  line-height: 1.1;
}

.resource-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.reservation-resource-row button,
.questionnaire-pill-row button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 0 12px;
  font-weight: 800;
}

.duration-card,
.price-card {
  border: 1px solid #d3ddd8;
  border-radius: 8px;
  padding: 12px;
  background: #f9fbfa;
}

.duration-card strong,
.price-card strong {
  display: inline-block;
  color: #173783;
  font-size: 22px;
  margin: 0 5px 8px 0;
}

.duration-card span,
.price-card small {
  color: var(--ink);
  font-size: 12px;
  margin-right: 8px;
}

.price-card {
  display: grid;
  gap: 2px;
}

.price-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.price-card small {
  color: var(--green);
  font-weight: 800;
}

.duration-segments {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-top: 1px solid var(--line);
  margin: 2px -12px -12px;
}

.duration-segments div {
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 8px 4px;
  border-right: 1px solid var(--line);
}

.duration-segments div:last-child {
  border-right: 0;
}

.duration-segments small {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 850;
}

.duration-segments b {
  color: var(--ink);
}

.prep-dot,
.treatment-dot,
.clean-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 999px;
  margin-right: 4px;
}

.prep-dot { background: #ffd34b; }
.treatment-dot { background: #8ad61f; }
.clean-dot { background: #e6e6e6; }

.reservation-switch {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 0;
  min-height: 34px;
  padding: 0 2px;
}

.reservation-switch input {
  width: auto;
}

.guest-name-link {
  color: #123e9f;
}

.reservation-guest-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfdfc;
}

.guest-initials {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #e6eef4;
  color: var(--green-dark);
  font-weight: 900;
}

.reservation-contact {
  margin: 0;
  line-height: 1.35;
}

.guest-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.guest-badges span,
.answered-pill {
  border-radius: 999px;
  background: #fff6d8;
  color: #7d5100;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
}

.answered-pill {
  background: #e8ffc0;
  color: #376100;
}

.questionnaire-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.reservation-tabs-card {
  grid-column: 1 / -1;
  display: flex;
  gap: 4px;
  padding: 0 4px;
  border-top: 0;
  background: transparent;
}

.reservation-tabs-card button {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 14px;
}

.reservation-tabs-card button.active {
  color: #123e9f;
  border-bottom: 2px solid #123e9f;
}

dialog.reservation-dialog .reservation-options,
dialog.reservation-dialog .questionnaire-actions {
  display: none;
}

dialog.reservation-dialog #bookingForm > .dialog-actions {
  background: #ffffff;
  border-top: 1px solid var(--line);
  justify-content: flex-start;
  padding: 8px 12px;
  position: sticky;
  bottom: 0;
  gap: 7px;
}

dialog.reservation-dialog #bookingForm > .dialog-actions .secondary {
  background: white;
  border-color: var(--line);
  color: var(--ink);
  min-height: 34px;
}

dialog.reservation-dialog #bookingForm > .dialog-actions .primary {
  margin-left: auto;
}

dialog.reservation-dialog #clearBookingsButton {
  display: none;
}

dialog.reservation-dialog {
  width: min(980px, calc(100vw - 24px));
  max-height: min(660px, calc(100vh - 24px));
}

dialog.reservation-dialog #bookingForm {
  height: min(660px, calc(100vh - 24px));
  background: #f5f7f6;
}

dialog.reservation-dialog #bookingForm .dialog-header {
  padding: 10px 14px;
}

dialog.reservation-dialog #bookingDialogTitle {
  font-size: 18px;
}

dialog.reservation-dialog .reservation-status-rail {
  display: none;
}

dialog.reservation-dialog .reservation-detail-view {
  padding: 0;
  overflow: hidden;
}

dialog.reservation-dialog .reservation-summary {
  display: block;
  border: 0;
  overflow: visible;
}

.reservation-sheet {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px 12px;
  height: 100%;
}

.reservation-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.reservation-number {
  color: var(--amber);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.reservation-topline h3 {
  margin-top: 3px;
  font-size: 17px;
}

dialog.reservation-dialog .reservation-topline,
dialog.reservation-dialog .reservation-status-strip,
dialog.reservation-dialog .reservation-main-grid,
dialog.reservation-dialog .reservation-tabline {
  flex-shrink: 0;
}

.reservation-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.reservation-meta strong {
  color: var(--green-dark);
}

.reservation-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reservation-status-strip button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 800;
}

.reservation-status-strip button.active {
  background: #e7f2ef;
  border-color: #bdd9d0;
  color: var(--green-dark);
}

.reservation-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.reservation-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 7px;
  align-content: start;
}

.reservation-notes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.reservation-notes-card {
  border-top: 1px solid var(--line);
  padding-top: 8px;
  margin-top: 2px;
  display: grid;
  gap: 8px;
}

.reservation-notes-card .reservation-notes-grid {
  grid-template-columns: 1fr;
}

.reservation-notes-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.reservation-notes-grid textarea {
  resize: vertical;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  font: inherit;
}

.reservation-edit-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.reservation-edit-grid label,
.reservation-info-list label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.reservation-edit-grid input,
.reservation-resource-card select,
.reservation-info-list input {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 8px;
  background: white;
  color: var(--ink);
  min-width: 0;
}

.reservation-resource-card button.locked {
  background: #e7f2ef;
  border-color: #bdd9d0;
  color: var(--green-dark);
}

.panel-title-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.panel-title-row h4 {
  margin: 0;
  color: var(--green-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}

.panel-title-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.reservation-resource-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fbfcfb;
}

.reservation-resource-card small {
  color: var(--muted);
  font-weight: 800;
  font-size: 11px;
}

.reservation-resource-card strong {
  font-size: 14px;
}

.reservation-resource-card div {
  grid-row: 1 / span 2;
  grid-column: 2;
  display: flex;
  gap: 6px;
  align-items: center;
}

.reservation-resource-card button,
.reservation-questionnaire button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.reservation-duration-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.reservation-duration-grid div {
  display: grid;
  gap: 3px;
  place-items: center;
  padding: 8px 4px;
  border-right: 1px solid var(--line);
  background: #fbfaf7;
}

.reservation-duration-grid div:last-child {
  border-right: 0;
}

.reservation-duration-grid span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.reservation-duration-grid strong {
  font-size: 15px;
}

.reservation-check {
  min-height: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.reservation-check input {
  width: auto;
}

.reservation-guest-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fbfcfb;
}

.reservation-guest-card strong {
  color: #123e9f;
  display: block;
}

.reservation-guest-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.reservation-guest-lookup {
  display: grid;
  gap: 5px;
}

.reservation-guest-results {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  max-height: 150px;
  overflow: auto;
  display: grid;
  gap: 4px;
  padding: 6px;
}

.reservation-guest-results button {
  border: 1px solid var(--line);
  border-radius: 7px;
  min-height: 34px;
  background: white;
  text-align: left;
  padding: 6px 8px;
  display: grid;
  gap: 2px;
}

.reservation-guest-results button:hover {
  border-color: #2d57c8;
  background: #eff4ff;
}

.reservation-guest-results span {
  color: var(--muted);
  font-size: 11px;
}

.reservation-info-list {
  display: grid;
  gap: 8px;
}

.reservation-info-list div {
  display: grid;
  gap: 2px;
}

.reservation-info-list span,
.reservation-payment-card span,
.reservation-questionnaire span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.reservation-info-list strong {
  font-size: 12px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.reservation-payment-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fbfaf7;
  display: grid;
  gap: 4px;
}

.reservation-payment-card strong {
  color: var(--green-dark);
  font-size: 18px;
}

.reservation-payment-card small {
  font-size: 11px;
  color: var(--green);
  font-weight: 850;
}

.reservation-payment-card.pending {
  background: #fff7e8;
  border-color: #efcc8e;
}

.reservation-payment-card.pending small {
  color: #8e5b04;
}

.reservation-payment-card.in-check {
  background: #fff2df;
  border-color: #ebb877;
}

.reservation-payment-card.in-check small {
  color: #9b5600;
}

.reservation-payment-card.paid {
  background: #eef9f2;
  border-color: #99d0ad;
}

.reservation-payment-card.paid small {
  color: #1e7a4a;
}

.reservation-payment-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.reservation-payment-actions select {
  min-width: 112px;
  max-width: 160px;
  min-height: 28px;
  padding: 4px 8px;
}

.reservation-payment-actions button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.reservation-questionnaire {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.reservation-questionnaire strong {
  border-radius: 999px;
  background: #e8ffc0;
  color: #376100;
  padding: 5px 9px;
  font-size: 11px;
}

.reservation-tabline {
  display: flex;
  gap: 6px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
}

.reservation-tabline button {
  min-height: 30px;
  border: 0;
  background: transparent;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
}

.reservation-tabline button.active {
  color: #123e9f;
  border-bottom: 2px solid #123e9f;
}

.reservation-history-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

.history-list {
  display: grid;
  gap: 8px;
  align-content: start;
}

.history-entry {
  display: grid;
  grid-template-columns: 170px 220px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 9px 10px;
  font-size: 12px;
}

.history-entry time {
  color: var(--muted);
  font-weight: 800;
}

.history-entry strong {
  color: var(--green-dark);
}

.history-entry span {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.history-empty {
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-weight: 800;
  padding: 24px;
  text-align: center;
}

@media (max-width: 1180px) {
  .history-entry {
    grid-template-columns: 1fr;
  }
}

/* Full-screen reservation workspace. Existing booking edit carries resources,
   guest, payment, notes, and actions, so it needs app-level working space. */
dialog.reservation-dialog {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  border-radius: 0;
}

dialog.reservation-dialog #bookingForm {
  height: 100vh;
  max-height: none;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

dialog.reservation-dialog .reservation-detail-view,
dialog.reservation-dialog .reservation-summary,
dialog.reservation-dialog #bookingExistingSummary {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

dialog.reservation-dialog .reservation-sheet {
  height: 100%;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px 14px;
}

dialog.reservation-dialog .reservation-main-grid {
  grid-template-columns: minmax(360px, 0.82fr) minmax(560px, 1.18fr);
  min-height: 0;
  overflow: hidden;
}

dialog.reservation-dialog .reservation-panel {
  min-height: 0;
  overflow: auto;
}

dialog.reservation-dialog .reservation-notes-card {
  margin-top: 6px;
  padding-top: 10px;
}

dialog.reservation-dialog .reservation-notes-card .reservation-notes-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

dialog.reservation-dialog .reservation-notes-grid textarea {
  min-height: 92px;
}

dialog.reservation-dialog .reservation-info-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

dialog.reservation-dialog .reservation-payment-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

dialog.reservation-dialog .reservation-payment-card span,
dialog.reservation-dialog .reservation-payment-card small,
dialog.reservation-dialog .reservation-payment-actions {
  grid-column: 1 / -1;
}

@media (max-width: 1180px) {
  dialog.reservation-dialog .reservation-main-grid,
  dialog.reservation-dialog .reservation-notes-card .reservation-notes-grid,
  dialog.reservation-dialog .reservation-info-list {
    grid-template-columns: 1fr;
  }

  dialog.reservation-dialog .reservation-main-grid {
    overflow: auto;
  }
}

.booking-modal-layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px;
}

.booking-services-panel,
.booking-profile-panel,
.booking-settings-panel {
  border: 1px solid var(--line);
  background: #fff;
}

.booking-services-panel {
  padding: 10px;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

.booking-services-panel h3,
.booking-profile-panel h3 {
  margin: 0;
  color: var(--green-dark);
}

.compact-tabs {
  padding: 0;
}

.booking-service-tree {
  overflow: auto;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.booking-service-item {
  width: 100%;
  min-height: 28px;
  border: 0;
  background: #fff;
  text-align: left;
  padding: 5px 10px 5px 26px;
}

.booking-service-item:nth-child(even) {
  background: #f7f7f5;
}

.booking-service-item.active,
.booking-service-item:hover {
  background: #2d57c8;
  color: white;
}

.booking-builder {
  display: grid;
  grid-template-rows: auto minmax(0, auto) auto minmax(0, 1fr) auto auto auto;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

.booking-profile-panel {
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(260px, 0.32fr);
  gap: 10px 16px;
  align-items: start;
  position: relative;
}

.booking-profile-panel h3 {
  grid-column: 1 / -1;
}

.booking-profile-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px 34px;
  gap: 6px;
}

.booking-profile-results {
  position: absolute;
  z-index: 10;
  left: 10px;
  top: 82px;
  width: min(620px, calc(100% - 292px));
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 18px 42px rgba(24, 39, 35, 0.16);
}

.booking-profile-results[hidden] {
  display: none;
}

.booking-profile-summary {
  border: 1px solid var(--line);
  background: #fbfaf7;
  min-height: 58px;
  padding: 10px;
  grid-column: 1;
}

.profile-codes {
  display: grid;
  gap: 10px;
  grid-column: 2;
  grid-row: 2 / span 2;
}

.booking-settings-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  min-height: 0;
  overflow: hidden;
}

.booking-status-rail {
  display: grid;
  align-content: start;
  gap: 8px;
}

.booking-status-rail p {
  color: var(--muted);
  font-weight: 800;
  margin-top: 6px;
}

.booking-status-rail button {
  border: 0;
  border-radius: 0;
  background: #eef2f5;
  min-height: 38px;
  padding: 0 12px;
  text-align: left;
  font-weight: 800;
}

.booking-main-fields {
  display: grid;
  gap: 8px;
  min-height: 0;
}

.booking-settings-header {
  min-height: 28px;
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto auto auto;
  gap: 18px;
  align-items: center;
  color: var(--green-dark);
  border-bottom: 1px solid var(--line);
}

.booking-selected-line {
  display: grid;
  grid-template-columns: 170px minmax(220px, 1fr) 110px 170px 170px;
  min-height: 34px;
  align-items: center;
  gap: 10px;
  background: #2d57c8;
  color: white;
  padding: 0 12px;
}

.booking-selected-line strong,
.booking-selected-line span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.booking-line-list {
  display: grid;
  gap: 6px;
  max-height: 86px;
  overflow: auto;
}

.booking-line-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  border: 1px solid var(--line);
  background: #fbfaf7;
}

.booking-line-card.active {
  border-color: #2d57c8;
  box-shadow: inset 4px 0 0 #2d57c8;
}

.booking-line-card > button:first-child {
  border: 0;
  background: transparent;
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1fr) 100px;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 7px 10px;
}

.booking-line-card span,
.booking-line-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-line-card span {
  color: var(--muted);
  font-size: 12px;
}

#bookingDialog.wide-dialog .booking-main-fields > .form-grid {
  grid-template-columns: minmax(220px, 1.5fr) minmax(130px, 0.8fr) minmax(130px, 0.8fr) minmax(115px, 0.7fr) minmax(105px, 0.72fr) minmax(105px, 0.72fr) minmax(105px, 0.72fr) minmax(105px, 0.72fr);
  align-items: end;
  gap: 8px;
}

#bookingDialog.wide-dialog .booking-main-fields > .form-grid label {
  margin: 0;
}

#bookingDialog.wide-dialog label:has(#guestName),
#bookingDialog.wide-dialog label:has(#customerType),
#bookingDialog.wide-dialog label:has(#guestEmail),
#bookingDialog.wide-dialog label:has(#guestPhone),
#bookingDialog.wide-dialog label:has(#guestAge),
#bookingDialog.wide-dialog label:has(#guestCardType),
#bookingDialog.wide-dialog label:has(#bookingStatus),
#bookingDialog.wide-dialog label:has(#bookingUpsellItem),
#bookingDialog.wide-dialog label:has(#bookingUpsellMinutes),
#bookingDialog.wide-dialog label:has(#bookingUpsellPrice),
#bookingDialog.wide-dialog .booking-main-fields > label {
  display: none;
}

#bookingDialog.wide-dialog label:has(#bookingTreatment) {
  grid-column: span 1;
}

#bookingDialog.wide-dialog label:has(#bookingTherapist),
#bookingDialog.wide-dialog label:has(#bookingCabin) {
  grid-column: span 1;
}

#bookingDialog.wide-dialog label:has(#bookingDate),
#bookingDialog.wide-dialog label:has(#bookingTime),
#bookingDialog.wide-dialog label:has(#bookingDurationOverride),
#bookingDialog.wide-dialog label:has(#bookingPrepOverride),
#bookingDialog.wide-dialog label:has(#bookingCleanOverride) {
  grid-column: span 1;
}

.booking-time-strip {
  display: grid;
  grid-template-columns: repeat(15, minmax(62px, 1fr));
  border: 1px solid var(--line);
  overflow: auto;
  background: #f3f5f7;
  min-height: 30px;
}

.booking-time-strip button {
  min-height: 30px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  font-weight: 800;
}

.booking-time-strip button:hover {
  background: #dfe8ff;
}

.booking-resource-calendar {
  border: 1px solid var(--line);
  min-height: 0;
  height: 100%;
  overflow: auto;
  background: white;
}

.availability-header,
.availability-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
}

.availability-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f2f4f7;
  border-bottom: 1px solid var(--line);
}

.availability-header strong {
  padding: 8px;
  border-right: 1px solid var(--line);
}

.availability-hours {
  display: grid;
  grid-template-columns: repeat(15, minmax(56px, 1fr));
  min-width: 0;
}

.availability-hours span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 32px;
  font-weight: 850;
}

.availability-resource {
  min-height: 28px;
  padding: 5px 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid #edf0ed;
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
}

.availability-resource span {
  color: var(--blue);
  font-size: 11px;
}

.availability-slots {
  display: grid;
  grid-template-columns: repeat(28, minmax(30px, 1fr));
  min-width: 0;
}

.availability-cell {
  --availability-base: #f4f6f7;
  --busy-start: 0%;
  --busy-end: 0%;
  --candidate-start: 0%;
  --candidate-end: 0%;
  min-height: 28px;
  border: 0;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #edf0ed;
  background:
    linear-gradient(
      90deg,
      transparent 0 var(--candidate-start),
      #00c51a var(--candidate-start) var(--candidate-end),
      transparent var(--candidate-end) 100%
    ),
    linear-gradient(
      90deg,
      transparent 0 var(--busy-start),
      #aab2b5 var(--busy-start) var(--busy-end),
      transparent var(--busy-end) 100%
    ),
    var(--availability-base);
  color: white;
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 0 4px;
}

.availability-cell:nth-child(2n) {
  --availability-base: #eef1f3;
}

.availability-cell.unavailable {
  background: #b9b9b9;
}

.availability-cell.muted {
  display: block;
  background: #f7f8f8;
}

#bookingForm > .dialog-actions {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #fbfaf7;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.booked-dot { background: #eef3f8; }
.confirmed-dot { background: #ffb22b; }
.progress-dot { background: #9bc5ff; }
.done-dot { background: #19d828; }
.cancel-dot,
.noshow-dot { background: #f20d16; }

.last-email-line {
  color: var(--muted);
  font-size: 12px;
  min-height: 18px;
}

.last-email-line.email-sending {
  color: #0a4f8f;
  font-weight: 800;
}

.last-email-line.email-sent {
  color: var(--green-dark);
  font-weight: 800;
}

.last-email-line.email-error {
  color: #8d3d29;
  font-weight: 800;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.conflict-box {
  border: 1px solid #e0a28e;
  background: #fff1ec;
  color: #8d3d29;
  border-radius: 8px;
  padding: 12px;
  font-weight: 760;
  align-self: end;
}

.booking-total {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
  padding: 10px 12px;
  font-weight: 800;
  color: var(--green-dark);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  background: var(--green-dark);
  color: white;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: #8d3d29;
}

.action-dialog {
  width: min(560px, calc(100vw - 32px));
  border: 0;
  border-radius: 18px;
  padding: 0;
  box-shadow: 0 28px 80px rgba(21, 50, 43, 0.28);
}

.action-dialog form {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.feedback-rating-grid {
  display: grid;
  gap: 10px;
}

.star-rating-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfaf7;
}

.star-rating-row > span {
  color: var(--green-dark);
  font-weight: 850;
}

.star-buttons {
  display: flex;
  gap: 5px;
}

.star-button {
  width: 36px;
  height: 34px;
  min-height: 34px;
  border: 1px solid #d9c77f;
  border-radius: 10px;
  background: #fffdf2;
  color: #b48a00;
  font-size: 21px;
  line-height: 1;
  padding: 0;
}

.star-button.active {
  background: #f4c542;
  border-color: #d7a300;
  color: #6e4f00;
  box-shadow: 0 6px 14px rgba(180, 138, 0, 0.16);
}

.rebook-summary {
  border: 1px solid #d8e9e3;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f2faf7 100%);
  padding: 12px;
  color: #163f37;
}

.rebook-summary strong {
  display: block;
  font-size: 14px;
}

.rebook-summary span {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.rebook-picker {
  display: grid;
  gap: 12px;
}

.rebook-date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(54px, 1fr));
  gap: 7px;
}

.rebook-date-button {
  border: 1px solid #d8e9e3;
  border-radius: 12px;
  background: #ffffff;
  color: var(--green-dark);
  display: grid;
  gap: 2px;
  justify-items: center;
  min-height: 58px;
  padding: 7px 4px;
}

.rebook-date-button span {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 850;
}

.rebook-date-button strong {
  font-size: 18px;
}

.rebook-date-button small {
  font-size: 10px;
  color: var(--muted);
}

.rebook-date-button.active {
  border-color: var(--green);
  background: #e9f7f1;
  box-shadow: inset 0 0 0 1px var(--green);
}

.rebook-date-button:hover {
  border-color: var(--green);
}

.reports-panel {
  display: grid;
  gap: 12px;
}

.report-filters {
  align-items: end;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.report-card {
  border: 1px solid #dbe7e2;
  border-radius: 14px;
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 10px 24px rgba(21, 50, 43, 0.04);
}

.report-card span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.report-card strong {
  color: var(--green-dark);
  display: block;
  font-size: 22px;
  margin-top: 4px;
}

.report-row {
  grid-template-columns: 1.15fr 1.25fr 1.25fr 1fr 1fr 1fr;
}

.report-row.feedback {
  grid-template-columns: 1fr 1.25fr 1.25fr 0.9fr 0.9fr 1.7fr;
}

.report-row.vat {
  grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr;
}

.report-row.cashier {
  grid-template-columns: 1fr 1.3fr 1fr 1fr 1fr 1.4fr;
}

.context-menu {
  position: fixed;
  z-index: 50;
  width: 220px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 18px 42px rgba(31, 40, 38, 0.22);
  padding: 8px 0;
}

.context-menu button {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  min-height: 28px;
  padding: 0 22px;
  text-align: left;
}

.context-menu button:hover:not(:disabled) {
  background: #eaf0ff;
}

.context-menu button:disabled {
  color: #a5aaa7;
  cursor: default;
}

.context-menu hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 7px 0;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    padding: 16px;
  }

  .nav,
  .quick-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .topbar,
  .calendar-tools,
  .panel-grid,
  .config-grid,
  .employee-layout,
  .facility-layout,
  .shift-planner,
  .menu-layout,
  .cashier-layout,
  .cashier-menu-area,
  .guest-layout,
  .menu-general-grid,
  .booking-filters,
  .booking-workbench,
  .booking-profile-panel,
  .booking-settings-panel,
  .stock-entry,
  .skill-transfer,
  .detail-form-grid,
  .schedule-form,
  .shift-row,
  .schedule-item,
  .booking-modal-layout,
  .form-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .booking-time-strip {
    grid-template-columns: repeat(5, minmax(70px, 1fr));
  }

  .topbar-actions,
  .date-controls,
  .segmented {
    width: 100%;
  }

  .primary,
  .secondary {
    width: 100%;
  }
}

@media (max-width: 1180px) {
  dialog.wide-dialog {
    width: 100vw;
    height: 100vh;
  }

  .booking-workbench {
    grid-template-columns: 1fr;
    align-content: start;
  }

  .booking-services-panel {
    min-height: 240px;
    max-height: 320px;
  }

  .booking-profile-panel {
    grid-template-columns: 1fr;
  }

  .profile-codes {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .booking-settings-header {
    grid-template-columns: 1fr 1fr;
  }

  .booking-selected-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px 12px;
  }

  #bookingDialog.wide-dialog .booking-main-fields > .form-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .booking-line-card > button:first-child {
    grid-template-columns: 1fr;
  }

  .cashier-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .cashier-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  html,
  body {
    overflow: auto;
  }

  .app-shell {
    min-height: 100vh;
    display: block;
  }

  .sidebar {
    height: auto;
    position: sticky;
    top: 0;
    z-index: 30;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px;
    box-shadow: 0 12px 28px rgba(17, 24, 22, 0.08);
  }

  .brand {
    max-width: 100%;
  }

  .signed-in-card,
  .logout-button,
  .app-version-info {
    display: none !important;
  }

  .nav {
    grid-column: 1 / -1;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    padding-bottom: 0;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav-module {
    display: contents;
  }

  .nav-module-title {
    display: none;
  }

  .nav-button {
    flex: 0 0 auto;
    min-width: 94px;
    justify-content: center;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  .nav-button.active {
    transform: none;
  }

  .nav-button,
  button,
  input,
  select,
  textarea {
    min-height: 42px;
  }

  .quick-stats {
    display: none;
  }

  .workspace {
    min-height: auto;
    overflow: visible;
    padding: 10px 8px 8px;
  }

  .topbar {
    gap: 10px;
    align-items: stretch;
  }

  .topbar-actions {
    display: grid;
  }

  .manager-dashboard,
  .dashboard-panel {
    min-height: 0;
  }

  .dashboard-summary,
  .dashboard-grid,
  .calendar-exception-strip {
    grid-template-columns: 1fr;
  }

  .dashboard-panel {
    min-height: 180px;
  }

  .manager-flow-row,
  .manager-exception-row,
  .cashier-open-check-card {
    grid-template-columns: 1fr;
  }

  .manager-flow-row small,
  .cashier-open-check-card small {
    grid-column: auto;
  }

  .calendar-tools {
    display: grid;
    gap: 8px;
  }

  .calendar-tools-right {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .calendar-tools-right .icon-only,
  .calendar-tools-right .ghost-button {
    width: 100%;
  }

  .section.active {
    overflow: visible;
  }

  .calendar-grid,
  .class-calendar-shell,
  .guest-layout,
  .cashier-layout,
  .employee-layout,
  .facility-layout,
  .menu-layout,
  .shift-planner,
  .settings-layout {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .calendar-table,
  .class-calendar-table,
  .guest-schedule {
    min-width: 920px;
  }

  .calendar-with-tray {
    grid-template-columns: minmax(132px, 0.32fr) minmax(760px, 1fr) 148px;
  }

  .daily-notes-tray {
    max-height: 320px;
  }

  .booking-table {
    overflow: visible;
  }

  .booking-table .booking-row:not(.booking-head) {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px;
    border-bottom: 1px solid var(--line);
    min-width: 0;
  }

  .booking-table .booking-head {
    display: none;
  }

  .booking-table .booking-row > span,
  .booking-table .booking-row > button {
    width: 100%;
    min-width: 0;
  }

  .calendar-grid,
  .class-calendar-shell,
  .guest-schedule-wrap {
    overflow-x: auto;
  }

  #bookingForm .dialog-header {
    padding: 12px;
  }

  .booking-workbench {
    padding: 8px;
  }

  .booking-profile-search {
    grid-template-columns: minmax(0, 1fr) 36px 36px;
  }

  .profile-codes,
  .booking-settings-header,
  .booking-selected-line,
  #bookingDialog.wide-dialog .booking-main-fields > .form-grid {
    grid-template-columns: 1fr;
  }

  .booking-resource-calendar {
    max-height: 360px;
  }

  .availability-header,
  .availability-row {
    grid-template-columns: 150px minmax(840px, 1fr);
  }

  #bookingForm > .dialog-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  dialog.reservation-dialog {
    width: 100vw;
    height: 100vh;
    max-height: none;
    border-radius: 0;
  }

  dialog.reservation-dialog #bookingForm {
    height: 100%;
  }

  dialog.reservation-dialog .reservation-summary {
    grid-template-columns: 1fr;
  }

  dialog.reservation-dialog .reservation-main-grid {
    grid-template-columns: 1fr;
  }

  .calendar-with-tray {
    display: flex;
    flex-direction: column;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
    padding-right: 0;
  }

  .daily-notes-tray,
  .detached-tray {
    position: static;
    max-height: none;
    min-width: 0;
    width: auto;
    margin: 10px;
  }

  .calendar-with-tray > .calendar-table {
    grid-column: auto;
    order: -1;
  }

  dialog.reservation-dialog .resources-card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  dialog.reservation-dialog #bookingForm > .dialog-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  dialog.reservation-dialog #bookingForm > .dialog-actions .primary {
    margin-left: 0;
  }

  .payment-form-grid,
  .payment-method-buttons,
  .payment-progress,
  .class-client-add {
    grid-template-columns: 1fr;
  }

  .payment-dialog {
    width: min(100vw - 16px, 520px);
  }

  .employee-detail,
  .facility-layout .employee-detail {
    max-height: none;
  }
}

/* =========================================================================
   Calendar UX excellence â€” additions
   ========================================================================= */

/* --- Toolbar polish ---------------------------------------------------- */
.calendar-tools-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.ghost-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 7px;
  padding: 4px 10px;
  font-weight: 700;
  font-size: 12px;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.ghost-button:hover {
  background: var(--sage);
  border-color: var(--green);
  color: var(--green-dark);
}

@media (max-width: 720px) {
  .calendar-tools,
  .date-controls,
  .segmented,
  .calendar-tools-right {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .date-controls,
  .segmented {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .date-controls input[type="date"] {
    grid-column: span 2;
    min-width: 0;
  }

  .segmented {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .calendar-tools-right {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-left: 0;
  }

  .calendar-tools-right label,
  .calendar-tools-right button {
    width: 100%;
    min-width: 0;
  }

  .calendar-tools-right .icon-only {
    padding-inline: 0;
  }
}

@media (max-width: 720px) {
  #calendarSection .calendar-tools {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  #calendarSection .date-controls,
  #calendarSection .segmented,
  #calendarSection .calendar-tools-right,
  #calendarSection .calendar-exception-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  #calendarSection .date-controls::-webkit-scrollbar,
  #calendarSection .segmented::-webkit-scrollbar,
  #calendarSection .calendar-tools-right::-webkit-scrollbar,
  #calendarSection .calendar-exception-strip::-webkit-scrollbar {
    display: none;
  }

  #calendarSection .date-controls button,
  #calendarSection .segmented button,
  #calendarSection .calendar-tools-right button,
  #calendarSection .calendar-tools-right label {
    flex: 0 0 auto;
    width: auto;
    min-width: 48px;
    white-space: nowrap;
  }

  #calendarSection .date-controls input[type="date"] {
    flex: 0 0 142px;
    min-width: 142px;
  }

  #calendarSection .segmented button {
    min-width: 92px;
  }

  #calendarSection .calendar-tools-right label {
    min-width: 108px;
  }

  #calendarSection .calendar-tools-right .icon-only {
    width: 44px;
  }

  #calendarSection .exception-chip {
    flex: 0 0 126px;
    min-height: 38px;
    padding: 6px 8px;
  }

  #calendarSection .exception-chip strong {
    font-size: 13px;
  }

  .workspace:has(#calendarSection.section.active) {
    height: calc(100dvh - 115px);
    overflow: hidden;
  }

  .workspace:has(#calendarSection.section.active) .topbar {
    margin-bottom: 4px;
  }

  .workspace:has(#calendarSection.section.active) .topbar h1 {
    font-size: 20px;
  }

  #calendarSection.section.active {
    min-height: 0;
    height: calc(100dvh - 202px);
    overflow: hidden;
  }

  #calendarSection .calendar-grid {
    flex: 1 1 auto;
    min-height: 240px;
    height: auto;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }

  #calendarSection .calendar-with-tray {
    min-height: auto;
    height: auto;
  }
}

.ghost-button.icon-only {
  width: 28px;
  padding: 0;
  text-align: center;
  font-weight: 800;
}

/* --- Now-indicator ------------------------------------------------------ */
.calendar-table,
.elastic-calendar-table {
  position: relative;
}

.now-indicator {
  position: absolute;
  left: 52px;          /* line begins after the time column */
  right: 0;
  height: 0;
  border-top: 2px solid #e0413f;
  z-index: 4;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(224, 65, 63, 0.18);
}

.now-indicator::before {
  content: "";
  position: absolute;
  left: -7px;
  top: -6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e0413f;
  box-shadow: 0 0 0 2px #fff;
}

.now-indicator::after {
  content: attr(data-now-label);
  position: absolute;
  left: -52px;
  top: -8px;
  width: 46px;
  text-align: right;
  font-size: 9.5px;
  font-weight: 850;
  color: #e0413f;
  background: #fff;
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: 0.3px;
}

/* --- Click-to-create hover affordance ----------------------------------- */
.slot-cell button[data-new-booking] {
  position: absolute;
  inset: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  border-radius: 5px;
  transition: background 120ms ease, box-shadow 120ms ease;
}

.slot-cell button[data-new-booking]::after {
  content: "+ " attr(data-time);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--green-dark);
  opacity: 0;
  transition: opacity 120ms ease;
  letter-spacing: 0.3px;
}

.slot-cell button[data-new-booking]:hover {
  background: var(--sage);
  box-shadow: inset 0 0 0 1px rgba(23, 113, 101, 0.35);
}

.slot-cell button[data-new-booking]:hover::after {
  opacity: 1;
}

/* --- Drag-to-resize ----------------------------------------------------- */
.appointment {
  cursor: grab;
}

.appointment.is-resizing {
  cursor: ns-resize;
  box-shadow: 0 0 0 2px rgba(23, 113, 101, 0.35), 0 12px 26px rgba(23, 113, 101, 0.18);
}

.resize-handle {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 0;
  height: 7px;
  cursor: ns-resize;
  border-radius: 0 0 6px 6px;
  background: transparent;
  z-index: 5;
}

.appointment:hover .resize-handle {
  background: linear-gradient(to bottom, transparent, rgba(23, 113, 101, 0.25));
}

.appointment:hover .resize-handle::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 22px;
  height: 2px;
  background: rgba(23, 113, 101, 0.6);
  border-radius: 2px;
  transform: translateX(-50%);
}

.resize-ghost {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 2px dashed #177165;
  z-index: 10;
  pointer-events: none;
}

.resize-ghost::after {
  content: attr(data-label);
  position: absolute;
  right: 6px;
  top: 4px;
  background: #177165;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.calendar-range-selection {
  position: absolute;
  left: 3px;
  right: 3px;
  z-index: 9;
  border: 1px dashed #177165;
  border-radius: 6px;
  background: rgba(23, 113, 101, 0.13);
  pointer-events: none;
}

.calendar-range-selection::after {
  content: attr(data-label);
  position: absolute;
  right: 6px;
  top: 4px;
  background: #177165;
  color: #fff;
  font-size: 10px;
  font-weight: 850;
  padding: 2px 6px;
  border-radius: 4px;
}

/* --- Tile status accent ------------------------------------------------- */
.appointment {
  border-left-width: 4px;
  transition: box-shadow 120ms ease, transform 120ms ease;
}

.appointment:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(24, 39, 35, 0.12);
}

/* Booking status changes only the left border; the service color remains the tile fill. */
.appointment.in-treatment,
.appointment.no-show { background: var(--tile-color, #246b5f); }

.appointment.no-show {
  box-shadow: inset 0 0 0 2px rgba(214, 40, 40, 0.85), 0 6px 18px rgba(214, 40, 40, 0.16);
}

.appointment.no-show .appointment-body::after {
  content: "NO-SHOW";
  position: absolute;
  right: 5px;
  bottom: 3px;
  border-radius: 999px;
  background: #fff;
  color: #b42318;
  font-size: 8px;
  font-weight: 900;
  padding: 1px 5px;
}

.appointment.cancelled {
  background: var(--tile-color, #246b5f);
  opacity: 0.7;
  text-decoration: line-through;
  text-decoration-color: rgba(24, 39, 35, 0.25);
}

.booking-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 2px 8px;
  background: #eef4f2;
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 900;
}

.booking-status-pill.no-show {
  background: #fff0ed;
  color: #b42318;
}

.booking-status-pill.cancelled {
  background: #edf0f1;
  color: #5f6b67;
}

.booking-status-pill.checked-in {
  background: #edf4ff;
  color: #245ba7;
}

.booking-status-pill.completed {
  background: #eef9f1;
  color: #1a7f4b;
}

.status-row.status-no-show {
  box-shadow: inset 4px 0 0 #d62828;
}

.status-row.status-cancelled {
  opacity: 0.78;
  box-shadow: inset 4px 0 0 #7b8b86;
}

/* --- Run sheet dialog --------------------------------------------------- */
.run-sheet-dialog {
  border: 0;
  border-radius: 12px;
  padding: 0;
  max-width: 1100px;
  width: calc(100vw - 60px);
  max-height: calc(100vh - 60px);
  box-shadow: 0 30px 80px rgba(24, 39, 35, 0.25);
}

.run-sheet-dialog::backdrop {
  background: rgba(24, 39, 35, 0.45);
  backdrop-filter: blur(2px);
}

.run-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfdfc;
}

.run-sheet-header h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.2px;
}

.run-sheet-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.run-sheet-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.run-sheet-body {
  padding: 18px 22px 24px;
  overflow: auto;
  max-height: calc(100vh - 200px);
}

.run-sheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.run-sheet-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  break-inside: avoid;
}

.run-sheet-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 11px 14px;
  background: var(--sage);
  border-bottom: 1px solid var(--line);
}

.run-sheet-card-head strong {
  font-size: 13px;
  color: var(--green-dark);
  letter-spacing: -0.1px;
}

.run-sheet-card-head span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}

.run-sheet-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #eef2f0;
  font-size: 12px;
}

.run-sheet-item:last-child {
  border-bottom: 0;
}

.run-sheet-item-time {
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.run-sheet-item-meta {
  display: grid;
  gap: 2px;
}

.run-sheet-item-meta strong {
  font-size: 12.5px;
  font-weight: 750;
}

.run-sheet-item-meta span {
  color: var(--muted);
  font-size: 11px;
}

.run-sheet-item-meta .run-sheet-status {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 3px;
  align-self: start;
}

.run-sheet-empty {
  padding: 20px 14px;
  color: var(--muted);
  text-align: center;
  font-style: italic;
  font-size: 12px;
}

.run-sheet-timeline {
  display: grid;
  gap: 8px;
}

.run-sheet-timeline .run-sheet-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-template-columns: 60px 1fr 140px 120px;
}

@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }

  body:not(.printing-report) * { visibility: hidden; }
  .run-sheet-dialog,
  .run-sheet-dialog * { visibility: visible; }
  .run-sheet-dialog {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: 100%;
    max-height: none;
    box-shadow: none;
    border: 0;
  }
  .run-sheet-actions,
  .run-sheet-mode { display: none !important; }
  .run-sheet-body { max-height: none; overflow: visible; padding: 6mm; }
  .run-sheet-card { break-inside: avoid; page-break-inside: avoid; }

  body.printing-report {
    background: #fff;
    color: #111;
  }

  body.printing-report * {
    visibility: hidden;
  }

  body.printing-report #reportsSection,
  body.printing-report #reportsSection * {
    visibility: visible;
  }

  body.printing-report .sidebar,
  body.printing-report .topbar,
  body.printing-report .report-filters,
  body.printing-report .toast {
    display: none !important;
  }

  body.printing-report .app-shell,
  body.printing-report .workspace,
  body.printing-report #reportsSection {
    display: block !important;
    position: static !important;
    width: auto !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
  }

  body.printing-report #reportsSection {
    position: absolute !important;
    inset: 0 !important;
  }

  body.printing-report .reports-panel {
    display: block !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: #fff !important;
  }

  body.printing-report .report-summary-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 4mm;
    margin-bottom: 5mm;
  }

  body.printing-report .report-card {
    border: 1px solid #bbb !important;
    background: #fff !important;
    color: #111 !important;
    box-shadow: none !important;
    break-inside: avoid;
    border-radius: 2mm !important;
    padding: 3mm !important;
  }

  body.printing-report .report-card span {
    font-size: 8pt !important;
  }

  body.printing-report .report-card strong {
    font-size: 14pt !important;
  }

  body.printing-report .report-table,
  body.printing-report .booking-table {
    display: block !important;
    overflow: visible !important;
    border: 1px solid #bbb !important;
    background: #fff !important;
  }

  body.printing-report .booking-row,
  body.printing-report .report-row {
    display: grid !important;
    color: #111 !important;
    background: #fff !important;
    border-bottom: 1px solid #ddd !important;
    break-inside: avoid;
    page-break-inside: avoid;
    min-width: 0 !important;
    width: 100% !important;
    padding: 0 !important;
    gap: 0 !important;
  }

  body.printing-report .report-row {
    grid-template-columns: 1.2fr 1.25fr 1.25fr 1fr 0.9fr 0.9fr !important;
  }

  body.printing-report .report-row.feedback {
    grid-template-columns: 0.95fr 1.1fr 1.15fr 0.55fr 0.55fr 1.7fr !important;
  }

  body.printing-report .report-row.cashier {
    grid-template-columns: 0.75fr 1.15fr 0.65fr 0.7fr 0.7fr 1.5fr !important;
  }

  body.printing-report .report-row.vat {
    grid-template-columns: 1.3fr 0.8fr 0.8fr 0.8fr 0.7fr !important;
  }

  body.printing-report .booking-row > span,
  body.printing-report .report-row > span {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 2.3mm 2.5mm !important;
    border-right: 1px solid #ddd !important;
    font-size: 8.5pt !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }

  body.printing-report .booking-row > span:last-child,
  body.printing-report .report-row > span:last-child {
    border-right: 0 !important;
  }

  body.printing-report .booking-head {
    background: #f1f1f1 !important;
    color: #111 !important;
    font-weight: 800 !important;
  }

  body.printing-report .transfer-empty {
    color: #333 !important;
    background: #fff !important;
  }
}

/* --- Keyboard shortcuts overlay ---------------------------------------- */
.shortcut-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 39, 35, 0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.shortcut-overlay[hidden] { display: none; }

.shortcut-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px 22px 16px;
  width: min(420px, calc(100vw - 40px));
  box-shadow: 0 30px 80px rgba(24, 39, 35, 0.3);
}

.shortcut-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.shortcut-card-head strong {
  font-size: 14px;
}

.shortcut-list {
  margin: 0;
  display: grid;
  gap: 6px;
}

.shortcut-list > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  gap: 10px;
}

.shortcut-list dt {
  display: flex;
  gap: 4px;
  margin: 0;
}

.shortcut-list dd {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

kbd {
  display: inline-block;
  min-width: 18px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #fbfdfc;
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 700;
  text-align: center;
  color: var(--ink);
}

.shortcut-hint {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
}

/* --- Guided new appointment dialog ------------------------------------- */
#bookingDialog.wide-dialog {
  width: min(1080px, calc(100vw - 18px));
  height: min(960px, calc(100vh - 18px));
  max-width: none;
  max-height: none;
  margin: auto;
  border-radius: 10px;
  overflow: hidden;
}

#bookingDialog.wide-dialog #bookingForm {
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #ffffff;
}

#bookingDialog.wide-dialog #bookingForm > .dialog-header {
  padding: 20px 18px 10px;
  border-bottom: 0;
  align-items: start;
}

#bookingDialog.wide-dialog #bookingForm > .dialog-header .eyebrow {
  display: none;
}

#bookingDialog.wide-dialog #bookingDialogTitle {
  font-size: 20px;
  color: #101828;
}

#bookingDialog.wide-dialog #bookingDialogTitle::after {
  content: "Solo appointment";
  display: block;
  color: #64748b;
  font-size: 13px;
  font-weight: 650;
  margin-top: 3px;
}

#bookingDialog.wide-dialog .booking-workbench {
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.booking-appointment-main {
  min-width: 0;
  min-height: 0;
  padding: 8px 22px 22px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 16px;
}

#bookingDialog.wide-dialog .booking-times-panel {
  border-left: 1px solid var(--line);
  background: #f8fafc;
  padding: 16px 18px;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
}

.booking-times-panel label {
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
  font-size: 10px;
}

.booking-times-panel input,
.booking-times-panel select {
  min-height: 44px;
  border-color: var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}

.booking-times-divider {
  height: 1px;
  background: var(--line);
}

.booking-times-panel h3 {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

#bookingDialog.wide-dialog .booking-profile-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.booking-profile-heading {
  display: none;
}

#bookingDialog.wide-dialog .booking-profile-search {
  grid-template-columns: minmax(0, 1fr) 34px 34px;
}

#bookingDialog.wide-dialog .booking-profile-search input {
  min-height: 48px;
  border: 2px solid #bad8cf;
  border-radius: 10px;
  font-size: 14px;
  padding-left: 16px;
  box-shadow: 0 0 0 2px rgba(23, 113, 101, 0.06);
}

#bookingDialog.wide-dialog .booking-profile-search .icon-button {
  min-height: 48px;
  border-radius: 10px;
}

#bookingDialog.wide-dialog .booking-profile-results {
  top: 58px;
  left: 0;
  width: 100%;
}

#bookingDialog.wide-dialog .booking-profile-summary:empty {
  display: none;
}

#bookingDialog.wide-dialog .booking-profile-summary {
  grid-column: auto;
  border: 0;
  background: transparent;
  min-height: 0;
  padding: 0;
}

.booking-selected-guest {
  min-height: 66px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid #bad8cf;
  border-radius: 10px;
  background: var(--sage);
}

.booking-guest-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #d7eee8;
  color: var(--green-dark);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 15px;
}

.booking-selected-guest strong,
.booking-selected-guest span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-selected-guest span {
  color: #8aa0ba;
  font-size: 12px;
}

.booking-recent-visits {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.booking-recent-visits > div,
.booking-recent-visits article {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.booking-recent-visits b {
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 10px;
}

.booking-recent-visits > div span {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #e6edf5;
  color: #8aa0ba;
  display: grid;
  place-items: center;
  font-weight: 850;
}

.booking-recent-visits article strong,
.booking-recent-visits article small {
  display: block;
}

.booking-recent-visits article small {
  color: #8aa0ba;
}

.booking-start-panel {
  display: grid;
  gap: 12px;
}

.booking-start-panel h3 {
  color: #475569;
  font-size: 15px;
  font-weight: 750;
}

.booking-start-panel h3::before,
.booking-selection-title h3::before {
  content: "*";
  color: var(--green);
  margin-right: 8px;
  font-weight: 900;
}

.booking-start-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.booking-start-card {
  min-height: 144px;
  border: 2px dashed #d8e6f4;
  border-radius: 10px;
  background: #ffffff;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 18px;
  text-align: center;
  color: #334155;
}

.booking-start-card span {
  color: var(--green);
  font-weight: 900;
}

.booking-start-card strong {
  font-size: 15px;
}

.booking-start-card small {
  max-width: 170px;
  line-height: 1.35;
}

.booking-start-card.active,
.booking-start-card:hover {
  border-color: #bad8cf;
  background: #f3faf7;
}

#bookingDialog.wide-dialog .booking-services-panel {
  border: 0;
  box-shadow: none;
  padding: 0;
  gap: 10px;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

.booking-selection-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.booking-selection-title h3 {
  color: #334155;
  font-size: 15px;
}

.booking-selection-title span {
  color: #64748b;
  font-size: 11px;
}

#bookingDialog.wide-dialog #bookingServiceSearch {
  min-height: 42px;
  border-color: var(--line);
  border-radius: 8px;
  font-size: 14px;
}

.booking-category-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.booking-category-chips button {
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: #8aa0ba;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 800;
}

.booking-category-chips button.active {
  color: var(--green-dark);
  border-color: #bad8cf;
  background: var(--sage);
}

#bookingDialog.wide-dialog .booking-service-tree {
  border: 0;
  padding: 8px 0 0;
  max-height: 470px;
  display: grid;
  gap: 2px;
}

#bookingDialog.wide-dialog .booking-service-item {
  min-height: 58px;
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  padding: 9px 12px;
  color: #1e293b;
}

#bookingDialog.wide-dialog .booking-service-item:nth-child(even) {
  background: #ffffff;
}

#bookingDialog.wide-dialog .booking-service-item:hover,
#bookingDialog.wide-dialog .booking-service-item.active {
  background: #eff7f3;
  color: #0f172a;
}

#bookingDialog.wide-dialog .any-therapist-choice {
  border: 1px dashed #bad8cf;
  background: #f3faf7;
}

.booking-service-name,
#bookingDialog.wide-dialog .booking-service-item > strong:first-child {
  font-size: 14px;
  font-weight: 820;
}

.booking-service-meta,
#bookingDialog.wide-dialog .booking-service-item > span {
  grid-column: 1;
  color: #7890ad;
  font-size: 11px;
}

#bookingDialog.wide-dialog .booking-service-item > strong:last-child {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  color: var(--green-dark);
  font-size: 16px;
}

#bookingDialog.wide-dialog .booking-builder {
  display: grid;
  gap: 12px;
  overflow: visible;
}

#bookingDialog.wide-dialog.has-booking-lines .booking-start-panel {
  display: none;
}

#bookingDialog.wide-dialog.has-booking-lines .booking-appointment-main {
  gap: 12px;
}

#bookingDialog.wide-dialog.has-booking-lines .booking-service-tree {
  max-height: 250px;
}

#bookingDialog.wide-dialog .booking-selected-line {
  display: none;
}

#bookingDialog.wide-dialog.has-booking-lines .booking-selected-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 16px;
  min-height: 0;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  padding: 12px 14px;
  box-shadow: 0 8px 18px rgba(24, 39, 35, 0.05);
}

#bookingDialog.wide-dialog.has-booking-lines .booking-selected-line::before {
  content: none;
}

.booking-summary-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.booking-summary-title span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.booking-summary-title strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-summary-facts {
  grid-column: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  min-width: 0;
}

.booking-summary-facts span,
.booking-summary-price span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: none;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-summary-price {
  grid-row: 1 / span 2;
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  white-space: nowrap;
}

.booking-summary-price strong {
  color: var(--green-dark);
  font-size: 15px;
  font-weight: 950;
}

#bookingDialog.wide-dialog .booking-settings-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 16px;
  overflow: visible;
}

#bookingDialog.wide-dialog.has-booking-lines .booking-settings-panel {
  min-height: 300px;
}

#bookingDialog.wide-dialog .booking-main-fields {
  gap: 14px;
  overflow: visible;
}

#bookingDialog.wide-dialog .booking-settings-header,
#bookingDialog.wide-dialog .booking-line-list,
#bookingDialog.wide-dialog .booking-resource-calendar,
#bookingDialog.wide-dialog .last-email-line,
#bookingDialog.wide-dialog .profile-codes,
#bookingDialog.wide-dialog .booking-hidden-control {
  display: none;
}

#bookingDialog.wide-dialog .booking-main-fields > .form-grid {
  display: none;
}

#bookingDialog.wide-dialog .booking-main-fields > label {
  display: grid;
}

#bookingDialog.wide-dialog #bookingNotes {
  min-height: 58px;
  border-color: var(--line);
  border-radius: 8px;
  background: #ffffff;
}

#bookingDialog.wide-dialog .booking-total {
  display: none;
}

#bookingDialog.wide-dialog .conflict-box {
  margin-top: 0;
}

#bookingDialog.wide-dialog .booking-time-strip {
  min-height: 0;
  border: 0;
  background: transparent;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 7px;
  overflow: auto;
}

#bookingDialog.wide-dialog .booking-time-strip button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  font-weight: 800;
}

#bookingDialog.wide-dialog .booking-time-strip button.active,
#bookingDialog.wide-dialog .booking-time-strip button:hover {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.booking-times-empty {
  min-height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #64748b;
  text-align: center;
}

.booking-times-empty strong {
  color: #d7e0eb;
  font-size: 28px;
}

#bookingDialog.wide-dialog #bookingForm > .dialog-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  background: #ffffff;
  padding: 14px 22px 18px;
}

#bookingDialog.wide-dialog #printBookingButton,
#bookingDialog.wide-dialog #emailBookingButton,
#bookingDialog.wide-dialog #whatsappBookingButton,
#bookingDialog.wide-dialog #feedbackBookingButton,
#bookingDialog.wide-dialog #rebookBookingButton,
#bookingDialog.wide-dialog #deleteBookingButton,
#bookingDialog.wide-dialog #clearBookingsButton {
  display: none;
}

#bookingDialog.wide-dialog #saveBookingButton {
  width: 100%;
  min-height: 46px;
  border-radius: 8px;
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 12px 24px rgba(23, 113, 101, 0.18);
  font-size: 15px;
}

#bookingDialog.wide-dialog #saveBookingButton:disabled {
  background: #98c7bd;
  border-color: #98c7bd;
  box-shadow: none;
  cursor: not-allowed;
  opacity: .82;
}

@media (max-width: 760px) {
  #bookingDialog.wide-dialog {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }

  #bookingDialog.wide-dialog .booking-workbench {
    grid-template-columns: 1fr;
  }

  #bookingDialog.wide-dialog .booking-times-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    max-height: 260px;
  }

  .booking-start-options {
    grid-template-columns: 1fr;
  }
}
