:root {
  --bg: #f8f8f7;
  --panel: #ffffff;
  --panel-soft: #fbfbfa;
  --ink: #20242a;
  --muted: #7b818a;
  --line: #e9eaec;
  --brand: #24282e;
  --brand-deep: #181b20;
  --brand-soft: #eaf0f8;
  --accent: #dc6348;
  --gold: #e9a84a;
  --danger: #b43b3b;
  --warning: #9a6413;
  --shadow: 0 10px 28px rgba(32, 36, 42, 0.06);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 0;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 320px);
  color: var(--ink);
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100%, 1180px);
  min-height: 100vh;
  margin: 0 auto;
}

.app-header {
  position: relative;
  padding: 12px clamp(14px, 4vw, 28px) 10px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.brand-row,
.brand,
.shop-panel,
.topbar,
.section-heading,
.service-title,
.appointment-title,
.service-bottom,
.status-filter {
  display: flex;
  align-items: center;
}

.brand-row {
  justify-content: space-between;
  gap: 12px;
}

.brand {
  gap: 10px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 7px 16px rgba(220, 99, 72, 0.18);
  font-size: 19px;
  font-weight: 900;
}

.brand strong,
.brand span {
  display: block;
}

.merchant-store {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.customer-mode {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.merchant-header {
  padding-bottom: 12px;
}

.login-page {
  background: #f8f8f7;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(100%, 380px);
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.brand strong {
  font-size: 17px;
}

.brand span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.icon-button,
.ghost-button,
.nav-tab,
.category-pill,
.date-button,
.slot-button,
.filter-button,
.primary-button,
.action-button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
}

.icon-button {
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 800;
}

.shop-panel {
  margin-top: 10px;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.shop-panel .eyebrow {
  color: var(--accent);
}

.shop-panel h1,
.topbar h2,
.section-heading h3 {
  margin: 0;
}

.section-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shop-panel h1 {
  font-size: clamp(18px, 5vw, 23px);
  line-height: 1.2;
}

.shop-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.shop-badge {
  flex: 0 0 auto;
  padding: 9px 11px;
  border-radius: 999px;
  color: #9a482f;
  background: #fff0ea;
  font-size: 12px;
  font-weight: 900;
}

.nav-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 10px;
  padding: 3px;
  border-radius: 999px;
  background: #f1f2f3;
}

.nav-tab {
  min-height: 32px;
  font-size: 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.nav-tab.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 3px 10px rgba(32, 36, 42, 0.08);
}

main {
  min-width: 0;
  padding: 18px clamp(14px, 4vw, 28px) 28px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.topbar {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.topbar h2 {
  font-size: clamp(20px, 5vw, 28px);
  line-height: 1.12;
}

.booking-titlebar {
  margin-bottom: 10px;
}

.booking-notice {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.booking-notice-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 5px;
  background: #245b9a;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.booking-notice-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.booking-notice-copy strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

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

.booking-notice .muted {
  margin-left: auto;
  white-space: nowrap;
  font-size: 12px;
}

.flow-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 14px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.flow-progress-item {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.flow-progress-item b {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f1f2f3;
  color: var(--muted);
  font-size: 11px;
}

.flow-progress-item.active {
  color: var(--ink);
}

.flow-progress-item.active b {
  background: var(--ink);
  color: #fff;
}

.flow-progress-item.completed {
  color: var(--muted);
}

.flow-progress-item.completed b {
  border: 1px solid #fff;
  background: #fff;
  color: var(--muted);
}

.booking-flow {
  display: grid;
}

.flow-step {
  display: none;
}

.flow-step.active {
  display: block;
}

.flow-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

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

.flow-actions.start {
  justify-content: flex-start;
  margin-top: 10px;
}

.reschedule-control {
  display: flex;
  justify-content: flex-end;
  min-height: 18px;
  margin-top: 6px;
}

.reschedule-cancel {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.reschedule-cancel:hover {
  color: var(--ink);
}

.flow-actions .primary-button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 5px 12px rgba(32, 36, 42, 0.12);
}

.promo-card {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff5de, #fffaf0);
  color: #5c3a13;
  box-shadow: inset 0 0 0 1px rgba(242, 179, 95, 0.35);
}

.promo-card strong {
  font-size: 16px;
}

.promo-card span {
  color: #8a612a;
  font-size: 13px;
  line-height: 1.5;
}

.workspace {
  display: grid;
  gap: 14px;
}

.customer-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.78fr);
  align-items: start;
}

.customer-grid .menu-board {
  grid-row: span 2;
}

.merchant-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
}

.merchant-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.merchant-summary-item {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 12px 16px;
  border-right: 1px solid var(--line);
}

.merchant-summary-item:last-child {
  border-right: 0;
}

.merchant-summary-item span {
  color: var(--muted);
  font-size: 12px;
}

.merchant-summary-item strong {
  color: var(--ink);
  font-size: 21px;
  line-height: 1;
}

.analytics-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.analytics-metrics > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
}

.analytics-metrics > div:last-child {
  border-right: 0;
}

.analytics-metrics span, .analytics-label, .analytics-empty {
  color: var(--muted);
  font-size: 12px;
}

.analytics-metrics strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.analytics-ranking {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.analytics-rank-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
}

.analytics-rank-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-rank-row strong {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.analytics-secondary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.analytics-secondary span, .analytics-secondary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.analytics-secondary strong {
  color: var(--ink);
  font-size: 16px;
}

.analytics-secondary em {
  margin-left: auto;
  text-align: right;
}

.merchant-grid .section-block:first-child {
  grid-row: span 2;
}

.section-block {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.section-heading {
  min-height: 30px;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.section-heading.compact {
  margin-top: 16px;
}

.section-heading h3 {
  font-size: 16px;
}

.section-heading span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.menu-layout {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 10px;
}

.category-rail {
  display: grid;
  align-self: start;
  align-content: start;
  gap: 5px;
  padding: 4px;
  border-radius: 12px;
  background: #f5f5f5;
}

.category-pill {
  width: 100%;
  min-height: 32px;
  padding: 0 5px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.category-pill.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 7px rgba(32, 36, 42, 0.08);
}

.service-list,
.appointment-list,
.service-admin,
.staff-list,
.staff-admin,
.booking-form,
.hours-grid {
  display: grid;
  gap: 12px;
}

.staff-list {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.staff-card,
.staff-admin-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.staff-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 10px;
  color: var(--ink);
  text-align: left;
}

.staff-card.active {
  border-color: rgba(220, 99, 72, 0.62);
  box-shadow: 0 5px 14px rgba(220, 99, 72, 0.07);
}

.staff-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f3f4f6;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.staff-card strong,
.staff-card span,
.staff-admin-card strong,
.staff-admin-card span {
  display: block;
}

.staff-card strong,
.staff-admin-card strong {
  font-size: 14px;
}

.staff-card span,
.staff-admin-card span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.staff-admin-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
}

.service-card,
.appointment-card,
.service-admin-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.service-card {
  display: grid;
  width: 100%;
  padding: 13px 14px;
  color: var(--ink);
  text-align: left;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.service-card.active {
  border-color: rgba(220, 99, 72, 0.62);
  box-shadow: 0 6px 16px rgba(220, 99, 72, 0.07);
}

.service-visual,
.mini-visual {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  isolation: isolate;
}

.service-visual {
  min-height: 94px;
  display: grid;
  align-items: end;
  padding: 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.service-visual::before,
.service-visual::after,
.mini-visual::before {
  content: "";
  position: absolute;
  border-radius: 999px;
  z-index: -1;
}

.admin-image,
.admin-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
}

.admin-avatar {
  display: grid;
  place-items: center;
  background: #f1f2f3;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.staff-image {
  border-radius: 50%;
}

.image-picker {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.image-preview {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #f3f4f6;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

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

.image-picker > div:last-child {
  display: grid;
  gap: 7px;
}

.image-select {
  display: inline-flex !important;
  width: fit-content;
  box-sizing: border-box;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink) !important;
  cursor: pointer;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.image-select input {
  display: none;
}

.image-picker small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
}

.guide-image-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-height: 20px;
}

.guide-image-preview {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: #f3f4f6;
}

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

.guide-image-preview button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(32, 36, 43, 0.82);
  color: #fff;
  font-size: 16px;
  line-height: 18px;
}

.service-visual::before {
  width: 72px;
  height: 72px;
  right: -22px;
  top: -18px;
  background: rgba(255, 255, 255, 0.38);
}

.service-visual::after {
  width: 44px;
  height: 44px;
  left: -14px;
  bottom: 18px;
  background: rgba(255, 255, 255, 0.24);
}

.visual-lilac {
  background: linear-gradient(145deg, #6c6db4, #b3b4e4);
}

.visual-rose {
  background: linear-gradient(145deg, #c75c6b, #f0a7b3);
}

.visual-blue {
  background: linear-gradient(145deg, #3776a8, #98c7ef);
}

.visual-amber {
  background: linear-gradient(145deg, #c98328, #f4ca75);
}

.service-copy {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.service-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.service-title {
  justify-content: flex-start;
  gap: 7px;
}

.service-title strong,
.appointment-title strong {
  font-size: 15px;
}

.service-tag {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: #fff1df;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
}

.service-bottom {
  display: grid;
  justify-items: end;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.price {
  color: var(--accent);
  font-size: 17px;
  font-weight: 950;
  white-space: nowrap;
}

.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.date-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(56px, 1fr);
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.date-list::-webkit-scrollbar {
  display: none;
}

.date-button {
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 5px;
  border-radius: 10px;
  background: #f7f7f7;
  color: var(--ink);
  font-size: 14px;
}

.date-button strong,
.date-button span {
  display: block;
}

.date-button span {
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
}

.date-button.active,
.slot-button.active,
.filter-button.active {
  background: var(--brand);
  color: #fff;
}

.date-button.active span {
  color: rgba(255, 255, 255, 0.76);
}

.slot-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  justify-items: stretch;
}

.slot-button {
  width: 100%;
  min-height: 52px;
  padding: 0 8px;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
  font-size: 15px;
}

.slot-button:disabled {
  color: #a1a9a2;
  background: #f4f5f5;
  box-shadow: none;
  cursor: not-allowed;
}

.booking-panel {
  position: sticky;
  top: 190px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: #f9faf7;
  color: var(--ink);
  padding: 12px 13px;
}

input:focus,
textarea:focus {
  border-color: rgba(220, 99, 72, 0.58);
  box-shadow: 0 0 0 4px rgba(220, 99, 72, 0.1);
}

.primary-button {
  min-height: 42px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 10px 20px rgba(32, 36, 42, 0.16);
  font-size: 15px;
  font-weight: 950;
}

.ghost-button {
  padding: 0 14px;
  background: #fff;
  color: var(--brand-deep);
}

.toast {
  min-height: 24px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.appointments-strip {
  margin-top: 14px;
}

.horizontal {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.appointment-card {
  display: grid;
  gap: 9px;
  padding: 14px;
}

.appointment-title {
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #edf0eb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.status.pending {
  background: #fff2d6;
  color: var(--warning);
}

.status.confirmed {
  background: var(--brand-soft);
  color: #356490;
}

.status.rejected,
.status.cancelled {
  background: #fae2e2;
  color: var(--danger);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-button {
  min-height: 36px;
  padding: 0 12px;
  background: #f7f8f5;
  color: var(--ink);
}

.action-button.primary {
  background: var(--brand-soft);
  color: #356490;
}

.action-button.danger {
  background: #fff2f2;
  color: var(--danger);
}

.status-filter {
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.appointment-filter {
  justify-content: flex-start;
  margin: -2px 0 12px;
}

.appointment-search {
  margin: 12px 0 4px;
}

.appointment-search input {
  box-sizing: border-box;
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.appointment-search input:focus {
  outline: 2px solid #d8e5ef;
  outline-offset: 1px;
}

.appointment-date-filter {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
  margin: 8px 0 4px;
  color: var(--muted);
  font-size: 12px;
}

.appointment-date-filter input {
  box-sizing: border-box;
  width: 100%;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.clear-date-button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f2f3;
  color: var(--muted);
  font-size: 18px;
  line-height: 26px;
}

.clear-date-button:hover {
  background: #e6e8ea;
  color: var(--ink);
}

.filter-button {
  padding: 0 13px;
  background: #fff;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
}

.filter-button.active {
  box-shadow: none;
}

.service-admin-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
}

.service-admin-card strong {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.service-admin-card .muted {
  display: block;
  margin-top: 5px;
}

.admin-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-card-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.admin-card-actions .action-button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.editor-dialog {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 20px 56px rgba(24, 32, 42, 0.2);
}

.editor-dialog::backdrop {
  background: rgba(24, 32, 42, 0.28);
}

.editor-form {
  display: grid;
  gap: 13px;
  padding: 20px;
}

.editor-heading,
.editor-columns {
  display: grid;
  gap: 10px;
}

.editor-heading {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.editor-heading h3 {
  margin: 0;
  font-size: 17px;
}

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

.editor-form label,
.editor-form fieldset {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.editor-form input,
.editor-form textarea,
.editor-form select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

.dialog-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.editor-form fieldset {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.editor-form legend {
  padding: 0 4px;
}

.service-choices,
.weekday-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.service-choices label,
.weekday-choices label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 400;
}

.service-choices input,
.weekday-choices input {
  width: 15px;
  height: 15px;
  margin: 0;
  padding: 0;
}

.exception-date-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.exception-date-editor .action-button {
  min-height: 36px;
}

.exception-date-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.exception-date-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 8px;
  background: #f1f2f3;
  color: var(--ink);
  font-size: 12px;
  font-weight: 400;
}

.exception-date-chip button {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: 14px;
  line-height: 14px;
}

.exception-date-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.mini-visual {
  width: 42px;
  height: 42px;
  background: #f2f4f7 !important;
}

.mini-visual::before {
  width: 26px;
  height: 26px;
  right: -6px;
  top: -5px;
  background: rgba(255, 255, 255, 0.42);
}

.hours-grid {
  gap: 10px;
}

.hours-grid div {
  min-height: 58px;
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 16px;
  background: #f8faf6;
}

.hours-grid strong {
  font-size: 14px;
}

.hours-grid span {
  color: var(--muted);
  font-size: 13px;
}

.staff-schedule {
  display: grid;
  gap: 10px;
}

.schedule-card {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.schedule-closed-day {
  padding: 18px;
  border: 1px solid #f3d3d3;
  border-radius: 10px;
  background: #fff8f8;
  color: #c84646;
  font-size: 13px;
  text-align: center;
}

.schedule-card-heading,
.schedule-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.schedule-card-heading strong,
.schedule-card-heading small {
  display: block;
}

.schedule-card-heading strong {
  font-size: 14px;
}

.schedule-card-heading small,
.schedule-empty {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.schedule-count {
  color: var(--muted);
  font-size: 12px;
}

.schedule-count.resting {
  color: #c84646;
}

.schedule-items {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.schedule-item {
  min-width: 0;
  padding-top: 7px;
  border-top: 1px solid #f0f1f2;
  color: var(--ink);
  font-size: 12px;
}

.schedule-item time {
  flex: 0 0 38px;
  color: var(--muted);
}

.schedule-item span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-status {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.schedule-status.pending {
  color: #c98328;
}

.schedule-status.confirmed,
.schedule-status.completed {
  color: #4b697e;
}

.schedule-status.rejected,
.schedule-status.cancelled {
  color: #c84646;
}

.check-in-state,
.check-in-meta {
  color: #4b697e;
  font-size: 12px;
  font-weight: 700;
}

.check-in-meta {
  display: block;
}

.appointment-history {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.privacy-action {
  margin-top: 8px;
}

.text-button {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.text-button.danger {
  color: #c95a48;
}

.privacy-cleared {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.appointment-history summary {
  cursor: pointer;
}

.appointment-history div {
  display: grid;
  gap: 5px;
  margin-top: 7px;
}

.appointment-history p {
  margin: 0;
}

.appointment-history time {
  margin-right: 7px;
  color: var(--muted);
}

.empty-state {
  min-height: 112px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 900px) {
  .customer-grid,
  .merchant-grid,
  .horizontal {
    grid-template-columns: 1fr;
  }

  .customer-grid .menu-board,
  .merchant-grid .section-block:first-child {
    grid-row: auto;
  }

  .booking-panel {
    position: static;
  }
}

@media (max-width: 520px) {
  .app-header {
    padding: 10px 12px 9px;
  }

  main {
    padding: 14px 12px 22px;
  }

  .shop-panel {
    align-items: flex-start;
    border-radius: 12px;
    padding: 11px 13px;
  }

  .shop-badge {
    display: none;
  }

  .topbar {
    align-items: flex-start;
  }

  .menu-layout {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 8px;
  }

  .section-block {
    padding: 14px;
    border-radius: 18px;
  }

  .service-card {
    padding: 12px;
  }

  .slot-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .status-filter {
    width: 100%;
    justify-content: flex-start;
  }
}
