:root {
  color-scheme: light;
  --canvas: #f7f5f1;
  --surface: #ffffff;
  --surface-soft: #f1eee9;
  --ink: #252a2b;
  --ink-soft: #4c5252;
  --muted: #706b65;
  --greige: #b0a69a;
  --greige-dark: #756b60;
  --line: #e5e0d9;
  --line-strong: #d3ccc3;
  --success: #356149;
  --success-soft: #edf5f0;
  --warning: #805b24;
  --warning-soft: #faf2e4;
  --danger: #934947;
  --danger-soft: #faeeee;
  --info: #49626c;
  --info-soft: #edf3f5;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 8px 30px rgba(37, 42, 43, 0.055);
  --font-sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  --font-display: "Yu Mincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", serif;
}

* { box-sizing: border-box; }

html {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(90deg, transparent 0, transparent calc(50% - 1px), rgba(176, 166, 154, 0.08) 50%, transparent calc(50% + 1px)),
    var(--canvas);
  color: var(--ink);
  overflow-x: clip;
}

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

button,
a,
input,
select,
textarea { -webkit-tap-highlight-color: transparent; }

button,
[role="button"] { touch-action: manipulation; }

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

h1,
h2,
h3 { color: var(--ink); line-height: 1.35; }

h1 { margin-bottom: 8px; font-size: clamp(28px, 5vw, 42px); font-weight: 600; letter-spacing: 0.015em; }
h2 { margin-bottom: 18px; font-size: clamp(20px, 3vw, 25px); font-weight: 650; }
h3 { margin-bottom: 12px; font-size: 17px; font-weight: 650; }

a { color: inherit; text-underline-offset: 3px; }

:focus-visible {
  outline: 3px solid rgba(117, 107, 96, 0.35);
  outline-offset: 3px;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 72px;
}

.card,
.manage-card,
.completion-card {
  margin: 0 0 18px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hidden,
.page-hidden { display: none !important; }

.muted { color: var(--muted); }

.eyebrow,
.manage-kicker {
  display: block;
  margin: 0 0 8px;
  color: var(--greige-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.4;
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  padding: 11px 13px;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

textarea { min-height: 110px; resize: vertical; }

input:hover,
select:hover,
textarea:hover { border-color: var(--greige); }

input:focus,
select:focus,
textarea:focus {
  border-color: var(--greige-dark);
  box-shadow: 0 0 0 3px rgba(176, 166, 154, 0.16);
  outline: none;
}

input[type="checkbox"] {
  width: 20px;
  min-height: 20px;
  accent-color: var(--ink);
}

button,
.button {
  min-height: 46px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  padding: 10px 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 100ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

button:hover,
.button:hover { background: #3b4142; border-color: #3b4142; }
button:active,
.button:active { transform: translateY(1px); }
button:disabled,
.button:disabled { cursor: not-allowed; opacity: 0.5; }

button.secondary,
.button.secondary,
.secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

button.secondary:hover,
.button.secondary:hover,
.secondary:hover { background: var(--surface-soft); border-color: var(--greige); }

button.danger,
.danger {
  border-color: #d8b1ae;
  background: var(--surface);
  color: var(--danger);
}

button.danger:hover,
.danger:hover { border-color: var(--danger); background: var(--danger-soft); }

.notice {
  margin: 14px 0;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--greige-dark);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 14px;
}

.notice.success { border-left-color: var(--success); background: var(--success-soft); color: var(--success); }
.notice.error { border-left-color: var(--danger); background: var(--danger-soft); color: var(--danger); }

.required-label,
.optional-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 20px;
  margin-left: 4px;
  border-radius: 99px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
}

.required-label { background: var(--ink); color: #fff; }
.optional-label { background: var(--surface-soft); color: var(--muted); }

/* Customer booking */
.booking-shell { width: min(980px, calc(100% - 32px)); padding-top: 24px; }

.booking-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  padding: clamp(28px, 6vw, 54px);
  box-shadow: var(--shadow);
}

.booking-hero::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -65px;
  top: -75px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.brand-mark {
  position: absolute;
  right: 34px;
  top: 28px;
  color: rgba(176, 166, 154, 0.18);
  font-family: var(--font-display);
  font-size: clamp(50px, 12vw, 96px);
  letter-spacing: 0.05em;
  line-height: 1;
  user-select: none;
}

.booking-hero h1 { position: relative; max-width: 700px; font-family: var(--font-display); font-weight: 500; }
.hero-copy { position: relative; margin-bottom: 26px; color: var(--muted); }

.request-flow {
  position: relative;
  display: grid;
  grid-template-columns: max-content max-content 28px max-content 28px max-content;
  align-items: center;
  gap: 10px;
  max-width: 720px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  color: var(--ink-soft);
  font-size: 13px;
}

.request-flow b { color: var(--ink); margin-right: 6px; }
.request-flow span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.request-flow em {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--greige-dark);
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}
.request-flow i { height: 1px; background: var(--line-strong); }
.request-flow small { grid-column: 2 / -1; color: var(--muted); }

.booking-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.booking-step { margin: 0; }
.customer-step { grid-column: 1 / -1; }

.step-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 22px; }
.step-heading > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--greige-dark);
  font-size: 13px;
  font-weight: 800;
}
.step-heading p { margin: 0 0 2px; color: var(--greige-dark); font-size: 10px; font-weight: 750; letter-spacing: 0.18em; }
.step-heading h2 { margin: 0; font-size: 20px; }
.field-label { margin-bottom: 7px; }
.name-help { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; }
.phone-field { max-width: calc(50% - 7px); margin-top: 16px; }
.note-field { margin-top: 16px; }
.selection-summary { margin: 10px 0 0; color: var(--muted); font-size: 13px; }

.slots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.slot {
  min-width: 68px;
  min-height: 44px;
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  padding: 8px 12px;
  font-variant-numeric: tabular-nums;
}
.slot:hover { border-color: var(--ink); background: var(--surface-soft); }
.slot.active,
.slot.selected { border-color: var(--ink); background: var(--ink); color: #fff; }
.slot-message { min-height: 24px; margin: 10px 0 0; font-size: 13px; }

.booking-submit { width: 100%; min-height: 54px; margin-top: 20px; font-size: 15px; }
.form-result:empty { display: none; }
.manage-link { display: inline-flex; margin-top: 7px; font-weight: 700; }

#bookingConfirm { backdrop-filter: blur(3px); }
#bookingConfirm > section { border-radius: var(--radius-lg) !important; }
#bookingConfirm dl { display: grid; grid-template-columns: 100px 1fr; gap: 0; margin: 18px 0; }
#bookingConfirm dt,
#bookingConfirm dd { margin: 0; border-bottom: 1px solid var(--line); padding: 10px 4px; }
#bookingConfirm dt { color: var(--muted); font-size: 13px; }
#bookingConfirm dd { font-weight: 650; }

/* Admin shell and navigation */
.admin-shell { padding-top: 24px; }
.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 150px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: clamp(24px, 4vw, 38px);
  box-shadow: var(--shadow);
}
.admin-hero h1 { margin-bottom: 6px; font-family: var(--font-display); font-weight: 500; }
.admin-hero p:last-child { margin: 0; color: var(--muted); }
.admin-hero-mark {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--greige);
  font-family: var(--font-display);
  font-size: 38px;
}

.login-card { width: min(520px, 100%); margin: 32px auto; }
.login-card label + label { margin-top: 14px; }
.login-button { width: 100%; margin-top: 20px; }

.admin-nav {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  padding: 6px;
  box-shadow: 0 8px 25px rgba(37, 42, 43, 0.07);
  backdrop-filter: blur(10px);
}
.admin-nav a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 9px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.admin-nav a:hover { background: var(--surface-soft); color: var(--ink); }
.admin-nav a.active { background: var(--ink); color: #fff; }
.notification-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  min-height: 20px;
  margin-left: 5px;
  border-radius: 99px;
  background: var(--danger);
  color: #fff;
  padding: 1px 6px;
  font-size: 10px;
}

#app > .card { padding: clamp(18px, 3vw, 30px); }
.section-heading,
.booking-title-row,
.booking-add-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.section-heading h2,
.booking-title-row h2,
.booking-add-head h3 { margin-bottom: 4px; }
.section-heading p,
.booking-add-head p { margin-bottom: 0; }

.form-actions,
.booking-add-footer,
.admin-booking-actions,
.booking-actions,
.request-actions,
.customer-hero-actions,
.modal-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.form-actions,
.booking-add-footer { margin-top: 18px; }
.booking-add-footer { justify-content: space-between; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Calendar */
.view-switch {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 3px;
}
.view-btn {
  min-width: 58px;
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 6px 12px;
}
.view-btn:hover { border: 0; background: #fff; color: var(--ink); }
.view-btn.active { border: 0; background: var(--ink); color: #fff; }

.calendar-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  border-block: 1px solid var(--line);
  padding: 14px 0;
}
.calendar-nav { display: flex; gap: 7px; }
.calendar-nav button { min-width: 44px; padding-inline: 12px; }
.calendar-title { margin: 0; text-align: center; }
.calendar-date-input { justify-self: end; max-width: 170px; }
.admin-booking-actions { justify-content: flex-end; margin-bottom: 14px; }

.booking-add-panel,
.add-customer-panel {
  margin: 0 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: clamp(18px, 3vw, 24px);
}
.customer-pick { margin: 16px 0; border-block: 1px solid var(--line); padding: 16px 0; }
.customer-match-list { display: grid; gap: 6px; margin-top: 8px; }
.customer-match {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}
.customer-match span { color: var(--muted); font-size: 12px; }

.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.month-head { border: 0; }
.month-head > div { padding: 8px 4px; color: var(--muted); font-size: 12px; font-weight: 700; text-align: center; }
.month-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  min-height: 116px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 7px;
  overflow: hidden;
}
.month-cell.outside { background: #faf9f7; color: #aaa39a; }
.month-cell.outside .month-cell-head,
.month-cell.outside .month-items { opacity: 0.48; }
.month-cell.today { background: #faf8f4; box-shadow: inset 0 0 0 1px var(--greige-dark); }
.month-cell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 100%;
  min-height: 27px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  padding: 0;
  text-align: left;
}
.month-cell-head:hover { background: var(--surface-soft); color: var(--ink); }
.month-daynum {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
}
.today .month-daynum { border-color: var(--greige); background: #eee9e2; color: var(--ink); }
.month-count { overflow: hidden; color: var(--muted); font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.month-items { display: grid; gap: 4px; }
.calendar-event,
.week-event {
  overflow: hidden;
  min-height: 31px;
  border: 1px solid #cad8ce;
  border-left: 3px solid var(--success);
  border-radius: 6px;
  background: var(--success-soft);
  color: #294b38;
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-event { display: grid; gap: 1px; width: 100%; }
.calendar-event-main { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
.calendar-event-main b { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.calendar-event-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event small,
.calendar-block small { overflow: hidden; font-size: 9px; font-weight: 600; opacity: 0.78; text-overflow: ellipsis; white-space: nowrap; }
.calendar-status { font-weight: 800; }
.calendar-event.status-confirmed,
.week-event.status-confirmed { border-color: #d6d0c8; border-left-color: var(--ink-soft); background: #f4f1ed; color: var(--ink); }
.calendar-event.status-pending,
.week-event.status-pending { border-color: #dfcfaf; border-left-color: #9a763d; background: #f8f1e5; color: #684e26; }
.calendar-event.status-completed,
.week-event.status-completed { border-color: var(--line); border-left-color: var(--greige); background: #f3f2f0; color: var(--muted); }
.calendar-block {
  display: grid;
  gap: 1px;
  width: 100%;
  min-height: 31px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 3px solid #aaa39a;
  border-radius: 6px;
  background: repeating-linear-gradient(135deg, #f3f1ee 0, #f3f1ee 5px, #ebe8e4 5px, #ebe8e4 10px);
  color: var(--muted);
  padding: 4px 6px;
  font-size: 11px;
  line-height: 1.35;
  text-align: left;
}
.more-count {
  justify-self: end;
  min-height: 24px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 1px 3px;
  font-size: 10px;
  font-weight: 700;
  text-align: right;
}
.more-count:hover { background: var(--surface-soft); color: var(--ink); }

.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.week-day { min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 9px; }
.week-day.today { border-color: var(--greige-dark); background: #faf7f2; }
.week-date { margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 750; text-align: center; }
.week-events { display: grid; gap: 6px; }
.week-event { min-height: 40px; white-space: normal; }
.empty-mini,
.day-empty { color: var(--muted); font-size: 12px; text-align: center; }

.day-timeline {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  grid-auto-rows: minmax(50px, auto);
  border-top: 1px solid var(--line);
}
.day-timeline-time,
.day-timeline-empty,
.day-timeline-booking,
.day-timeline-request,
.day-timeline-block { min-width: 0; border-bottom: 1px solid var(--line); }
.day-timeline-time {
  min-height: 50px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 15px 12px 15px 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.day-timeline-time:hover { border-color: var(--line); background: var(--surface-soft); color: var(--ink); }
.day-timeline-empty { min-height: 50px; border: 0; border-radius: 0; background: transparent; padding: 10px; }
.day-timeline-empty:hover { border: 0; background: var(--surface-soft); }
.day-timeline-empty.blocked,
.day-timeline-time.blocked { background: repeating-linear-gradient(-45deg, #f7f3ef, #f7f3ef 8px, #f0ebe5 8px, #f0ebe5 16px); }
.day-timeline-booking,
.day-timeline-request,
.day-timeline-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 6px 0;
  border: 1px solid #cbd9cf;
  border-left: 4px solid var(--success);
  border-radius: 10px;
  background: var(--success-soft);
  padding: 12px;
}
.day-timeline-request { border-color: #dfcfaf; border-left-color: #9a763d; background: #f8f1e5; }
.day-timeline-block { border-color: var(--line-strong); border-left-color: var(--greige-dark); background: var(--surface-soft); }
.day-timeline-booking-info { min-width: 0; }
.day-slot-menu { margin: 8px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); padding: 12px; }

/* Approval queue and notifications */
.request-card,
.notification-card,
.staff-row,
.delivery-row,
.visit-row,
.chart-record {
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 17px;
}
.request-card { border-left: 4px solid var(--warning); }
.request-card.status-approved { border-left-color: var(--success); }
.request-card.status-rejected,
.request-card.status-cancelled,
.request-card.status-expired { border-left-color: var(--muted); }
.request-card-head,
.notification-main,
.customer-list-head,
.chart-record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.request-card-head h3,
.notification-main h3 { margin-bottom: 4px; }
.request-remaining { display: inline-flex; border-radius: 99px; background: var(--warning-soft); color: var(--warning); padding: 4px 9px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.request-facts,
.notification-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.request-facts > *,
.notification-facts > * { border-radius: 8px; background: var(--surface-soft); padding: 9px 10px; font-size: 12px; }
.request-facts small,
.request-facts b,
.notification-facts small,
.notification-facts b { display: block; }
.request-facts small,
.notification-facts small { color: var(--muted); font-weight: 500; }
.request-actions button:first-of-type:not(.secondary):not(.danger) { background: var(--success); border-color: var(--success); }

.status-label,
.pill,
.notification-type,
.unread-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}
.status-label.status-pending { border-color: #e5c994; background: var(--warning-soft); color: var(--warning); }
.status-label.status-approved,
.status-label.completed { border-color: #bad1c1; background: var(--success-soft); color: var(--success); }
.status-label.status-rejected,
.status-label.status-cancelled,
.status-label.status-expired { color: var(--muted); }

.notification-list { display: grid; gap: 10px; }
.notification-card { margin: 0; }
.notification-card.unread { border-left: 4px solid var(--info); background: var(--info-soft); }
.notification-card.read { color: var(--ink-soft); }
.notification-labels { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.notification-type { border-color: #bfced4; background: #fff; color: var(--info); }
.type-new .notification-type { border-color: #bad1c1; color: var(--success); }
.type-change .notification-type { border-color: #d9c697; color: var(--warning); }
.type-cancel .notification-type { border-color: #d8b1ae; color: var(--danger); }
.type-admin .notification-type { border-color: #bfced4; color: var(--info); }
.unread-badge { border: 0; background: var(--info); color: #fff; }
.notification-time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.notification-read { min-height: 38px; }

/* Customer list and chart */
.customer-search { margin-bottom: 18px; }
.customer-list-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.customer-list-card {
  min-width: 0;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 16px;
  text-align: left;
}
.customer-list-card:hover { border-color: var(--greige-dark); background: #fcfbf9; }
.customer-list-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.customer-chart { margin-top: 20px; }
.customer-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}
.customer-hero h2 { margin-bottom: 4px; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 14px 0; }
.summary-item { border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); padding: 13px; }
.summary-item span { display: block; color: var(--muted); font-size: 11px; }
.summary-item strong { display: block; margin-top: 3px; font-size: 18px; }
.chart-priority-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.priority-card { border: 1px solid var(--line); border-left: 4px solid var(--greige-dark); border-radius: 10px; padding: 15px; }
.priority-card.danger-note { border-left-color: var(--danger); background: var(--danger-soft); }
.priority-card.next-card { border-left-color: var(--success); background: var(--success-soft); }
.next-booking-display { font-size: 14px; }
.chart-profile,
.chart-section,
.new-record { margin-top: 14px; padding: 18px; border-radius: var(--radius); box-shadow: none; }
.chart-section { border: 1px solid var(--line); background: var(--surface); }
.record-timeline,
.visit-history { display: grid; gap: 9px; }
.visit-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.visit-row > div { display: grid; gap: 3px; }
.visit-row > div:last-child { justify-items: end; }
.chart-record { position: relative; margin: 0; }
.record-date { color: var(--greige-dark); font-size: 12px; font-weight: 750; }
.record-summary-text { color: var(--ink-soft); }
.record-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.record-detail-grid > * { border-radius: 8px; background: var(--surface-soft); padding: 10px; font-size: 13px; }
.next-highlight { border-left: 3px solid var(--success); background: var(--success-soft); padding-left: 10px; }
.record-edit { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }

/* Settings, staff and delivery */
#businessHours { display: grid; gap: 8px; }
#businessHours > div,
#blockList > div,
#serviceList > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.staff-checks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 15px; }
.staff-checks label { display: flex; align-items: center; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 8px 10px; }
.staff-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.delivery-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; }
.staff-row > div,
.delivery-row > div { display: grid; gap: 3px; }
.staff-row span,
.delivery-row small { color: var(--muted); font-size: 12px; }
.status-label.status-sent { border-color: #bad1c1; background: var(--success-soft); color: var(--success); }
.status-label.status-failed { border-color: #d8b1ae; background: var(--danger-soft); color: var(--danger); }

/* Reservation management page */
.manage-page { background: var(--canvas); }
.manage-shell { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 70px; }
.manage-header {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  padding: clamp(27px, 6vw, 45px);
  box-shadow: var(--shadow);
}
.manage-header::after { content: "M"; position: absolute; right: 25px; top: 9px; color: rgba(176, 166, 154, 0.15); font-family: var(--font-display); font-size: 100px; line-height: 1; }
.manage-brand { position: relative; z-index: 1; display: block; margin-bottom: 12px; color: var(--greige-dark); font-family: var(--font-display); font-size: 14px; letter-spacing: 0.12em; }
.manage-header h1 { position: relative; z-index: 1; font-family: var(--font-display); font-size: clamp(25px, 5vw, 36px); font-weight: 500; }
.manage-header p { position: relative; z-index: 1; margin: 0; color: var(--muted); }
.manage-message { margin-bottom: 18px; }
.completion-card { display: flex; align-items: flex-start; gap: 14px; border-left: 4px solid var(--success); background: var(--success-soft); }
.completion-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; background: var(--success); color: #fff; font-weight: 800; }
.completion-card h2 { margin-bottom: 4px; }
.completion-card p { margin: 0; color: var(--ink-soft); }
.manage-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; color: var(--muted); font-size: 12px; font-weight: 750; letter-spacing: 0.08em; }
.status-chip { display: inline-flex; align-items: center; min-height: 30px; border-radius: 99px; background: var(--success-soft); color: var(--success); padding: 4px 11px; font-size: 11px; font-weight: 800; }
.status-chip.status-pending { background: var(--warning-soft); color: var(--warning); }
.status-chip.status-rejected,
.status-chip.status-expired,
.status-chip.status-cancelled { background: var(--surface-soft); color: var(--muted); }
.current-booking > h2 { font-size: 24px; }
.booking-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; margin: 0; border: 1px solid var(--line); border-radius: 11px; background: var(--line); }
.booking-facts > div { min-width: 0; background: var(--surface-soft); padding: 13px; }
.booking-facts .booking-customer { grid-column: 1 / -1; }
.booking-facts dt { color: var(--muted); font-size: 11px; }
.booking-facts dd { margin: 2px 0 0; font-weight: 700; }
.change-card { border-top: 4px solid var(--greige-dark); }
.change-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; }
.change-steps li { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); color: var(--muted); padding: 9px 5px; font-size: 11px; text-align: center; }
.change-steps li b { display: grid; place-items: center; width: 21px; height: 21px; flex: 0 0 21px; border-radius: 50%; background: #fff; font-size: 10px; }
.change-steps li.active { border-color: var(--ink); background: var(--ink); color: #fff; }
.change-steps li.active b { color: var(--ink); }
.change-arrow { color: var(--greige-dark); }
.manage-field { margin-bottom: 14px; }
.manage-slots { margin-bottom: 10px; }
.change-preview { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 16px 0; border-left: 4px solid var(--success); border-radius: 8px; background: var(--success-soft); padding: 13px; }
.change-preview > div { display: grid; gap: 3px; }
.change-preview > div > span { color: var(--muted); font-size: 11px; }
.manage-primary { width: 100%; margin-top: 12px; }
.manage-help { color: var(--muted); font-size: 12px; }
.cancel-zone { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-color: #ead1cf; background: #fffafa; }
.cancel-zone h2 { margin-bottom: 4px; font-size: 18px; }
.cancel-zone p { margin: 0; color: var(--muted); font-size: 13px; }
.manage-danger { width: min(240px, 100%); flex: 0 0 auto; }
.manage-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(37, 42, 43, 0.52); padding: 20px; backdrop-filter: blur(3px); }
.manage-modal-card { width: min(450px, 100%); margin: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; padding: clamp(20px, 4vw, 28px); box-shadow: var(--shadow); }
.modal-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 12px; border-radius: 50%; background: var(--warning-soft); color: var(--warning); font-size: 21px; font-weight: 800; }
.modal-details { margin: 14px 0; border-radius: 9px; background: var(--surface-soft); padding: 12px; }
.modal-details > div { display: grid; grid-template-columns: 82px 1fr; gap: 10px; border-bottom: 1px solid var(--line); padding: 8px 0; }
.modal-details > div:last-child { border-bottom: 0; }
.modal-details dt { color: var(--muted); font-size: 12px; }
.modal-details dd { margin: 0; font-weight: 700; }
.modal-details .new { color: var(--success); }
.modal-actions { justify-content: flex-end; }
.slot-empty { color: var(--muted); font-size: 13px; }

@media (max-width: 820px) {
  .shell { width: min(100% - 24px, 760px); padding-top: 18px; }
  .booking-grid { grid-template-columns: 1fr; }
  .customer-step { grid-column: auto; }
  .admin-nav { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .week-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .staff-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .request-facts,
  .notification-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .shell,
  .booking-shell,
  .manage-shell { width: min(100% - 20px, 560px); padding-top: 10px; padding-bottom: 44px; }
  .card,
  .manage-card,
  .completion-card { border-radius: 16px; padding: 18px; }
  .booking-hero,
  .admin-hero,
  .manage-header { border-radius: 18px; padding: 23px 19px; }
  .brand-mark { right: 12px; top: 18px; font-size: 56px; }
  .booking-hero h1 { max-width: 82%; font-size: 29px; }
  .request-flow { grid-template-columns: 1fr; gap: 7px; }
  .request-flow b { margin-bottom: 4px; }
  .request-flow i { display: none; }
  .request-flow span { min-height: 32px; }
  .request-flow small { grid-column: 1; margin-top: 4px; }
  .grid2,
  .grid3 { grid-template-columns: 1fr; }
  .phone-field { max-width: none; }
  .booking-title-row,
  .section-heading,
  .booking-add-head,
  .customer-hero { flex-direction: column; align-items: stretch; }
  .section-heading > button,
  .booking-add-head > button,
  .customer-hero-actions button { width: 100%; }
  .view-switch { width: 100%; }
  .calendar-toolbar { grid-template-columns: 1fr; }
  .calendar-title { grid-row: 1; }
  .calendar-nav { justify-content: center; }
  .calendar-date-input { justify-self: stretch; max-width: none; }
  .admin-booking-actions button { width: 100%; }
  .month-head > div { padding-inline: 1px; font-size: 10px; }
  .month-cell { min-height: 72px; gap: 3px; padding: 4px; }
  .month-cell-head { gap: 1px; min-height: 23px; }
  .month-daynum { width: 19px; height: 23px; font-size: 11px; }
  .month-count { font-size: 8px; letter-spacing: -0.05em; }
  .month-items { gap: 3px; }
  .calendar-event,
  .calendar-block { min-height: 6px; height: 6px; border: 0; border-radius: 99px; padding: 0; color: transparent; }
  .calendar-event > *,
  .calendar-block > * { display: none; }
  .calendar-event.status-confirmed { background: var(--ink-soft); }
  .calendar-event.status-pending { background: #9a763d; }
  .calendar-event.status-completed { background: var(--greige); }
  .calendar-block { background: #c8c2ba; }
  .more-count { display: none; }
  .week-grid { grid-template-columns: 1fr; }
  .week-day { display: grid; grid-template-columns: 76px 1fr; align-items: start; }
  .week-date { text-align: left; }
  .request-card-head,
  .notification-main,
  .customer-list-head,
  .chart-record-head { flex-direction: column; }
  .request-facts,
  .notification-facts,
  .customer-list-grid,
  .summary-grid,
  .chart-priority-grid,
  .record-detail-grid { grid-template-columns: 1fr; }
  .request-actions,
  .booking-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .request-actions button,
  .booking-actions button { width: 100%; min-width: 0; padding-inline: 8px; }
  .staff-checks { grid-template-columns: 1fr; }
  .staff-row,
  .delivery-row { grid-template-columns: 1fr; }
  .visit-row { align-items: flex-start; flex-direction: column; }
  .visit-row > div:last-child { justify-items: start; }
  .booking-add-footer { align-items: stretch; flex-direction: column; }
  .booking-add-footer button { width: 100%; }
  .booking-facts { grid-template-columns: 1fr; }
  .booking-facts .booking-customer { grid-column: auto; }
  .change-steps { grid-template-columns: 1fr; }
  .change-preview { grid-template-columns: 1fr; }
  .change-arrow { text-align: center; transform: rotate(90deg); }
  .cancel-zone { align-items: stretch; flex-direction: column; }
  .manage-danger { width: 100%; }
  #bookingConfirm { padding: 10px !important; }
  #bookingConfirm > section { padding: 18px !important; }
  #bookingConfirm dl { grid-template-columns: 84px 1fr; }
}

@media (max-width: 390px) {
  .admin-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-hero-mark { width: 56px; height: 56px; font-size: 28px; }
  .admin-hero { gap: 12px; }
  .slots { gap: 6px; }
  .slot { min-width: calc(25% - 5px); padding-inline: 6px; }
  .request-actions,
  .booking-actions { grid-template-columns: 1fr; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

@media print {
  body { background: #fff; }
  .admin-nav,
  button { display: none !important; }
  .shell { width: 100%; padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
}
