/* MyBiz Waiting V1 — Staff pad: Apple surfaces + 5 theme primaries
 * seoryong #D32F2F · scarlet #DC2626 · orange #EA580C · navy #1E40AF · black #52525B
 * 포인트/테두리는 data-theme + --theme-primary 만 사용 (클래스 충돌 방지)
 */

/* ── Shared Apple surfaces (all themes) ───────────────────────── */
body.staff-body {
  --mb-text-main: #1d1d1f;
  --mb-bg-main: #f2f2f7;
  --mb-card-bg: #ffffff;
  --banner-bg: #ffffff;
  --banner-text: #1d1d1f;
  --bg-main: #f2f2f7;
  --panel: #ffffff;
  --panel-elevated: #f2f2f7;
  --border: rgba(0, 0, 0, 0.06);
  --text: #1d1d1f;
  --text-muted: #6b7280;
  --ok: #34c759;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
  --modal-bg: #ffffff;
  --overlay: rgba(0, 0, 0, 0.4);
  --dash-label: #6b7280;
  --dash-value: #1d1d1f;
  --dash-fill: #ffffff;
  --card-ink: #1d1d1f;
  --card-muted: #6b7280;
  --primary: var(--theme-primary);
  --primary-hover: var(--theme-hover);
  --special-border: var(--theme-primary);
  --dash-border: var(--theme-primary);
}

/* ── 1. 서룡 시그니처 레드 ───────────────────────────────────── */
body.staff-body.theme-default,
body.staff-body.brand-seoryong.theme-default,
body.staff-body[data-theme='seoryong'] {
  --theme-primary: #d32f2f;
  --theme-color: #d32f2f;
  --theme-hover: #e53935;
  --theme-active: #b71c1c;
  --theme-accent: #d32f2f;
  --primary: #d32f2f;
  --mb-primary: #d32f2f;
  --mb-danger: #d32f2f;
  --mb-primary-hover: #e53935;
  --theme-primary-soft: rgba(211, 47, 47, 0.12);
  --theme-primary-ring: rgba(211, 47, 47, 0.24);
  --primary-color: #d32f2f;
  --danger: #d32f2f;
}

/* ── 2. Scarlet ───────────────────────────────────────────────── */
body.staff-body[data-theme='scarlet'] {
  --theme-primary: #dc2626;
  --theme-color: #dc2626;
  --theme-hover: #ef4444;
  --theme-active: #b91c1c;
  --theme-accent: #dc2626;
  --primary: #dc2626;
  --mb-primary: #dc2626;
  --mb-danger: #dc2626;
  --mb-primary-hover: #ef4444;
  --theme-primary-soft: rgba(220, 38, 38, 0.12);
  --theme-primary-ring: rgba(220, 38, 38, 0.24);
  --primary-color: #dc2626;
  --danger: #dc2626;
}

/* ── 3. Warm Orange ───────────────────────────────────────────── */
body.staff-body[data-theme='orange'],
body.staff-body[data-theme='warm'] {
  --theme-primary: #ea580c;
  --theme-color: #ea580c;
  --theme-hover: #f97316;
  --theme-active: #c2410c;
  --theme-accent: #ea580c;
  --primary: #ea580c;
  --mb-primary: #ea580c;
  --mb-primary-hover: #f97316;
  --theme-primary-soft: rgba(234, 88, 12, 0.12);
  --theme-primary-ring: rgba(234, 88, 12, 0.24);
  --primary-color: #ea580c;
  --danger: #dc2626;
}

/* ── 4. Deep Navy ─────────────────────────────────────────────── */
body.staff-body[data-theme='navy'],
body.staff-body[data-theme='cool'] {
  --theme-primary: #1e40af;
  --theme-color: #1e40af;
  --theme-hover: #2563eb;
  --theme-active: #1e3a8a;
  --theme-accent: #1e40af;
  --primary: #1e40af;
  --mb-primary: #1e40af;
  --mb-primary-hover: #2563eb;
  --theme-primary-soft: rgba(30, 64, 175, 0.12);
  --theme-primary-ring: rgba(30, 64, 175, 0.24);
  --primary-color: #1e40af;
  --danger: #dc2626;
}

/* ── 5. Minimal Black / Zinc ──────────────────────────────────── */
body.staff-body[data-theme='black'],
body.staff-body[data-theme='purple'] {
  --theme-primary: #52525b;
  --theme-color: #52525b;
  --theme-hover: #71717a;
  --theme-active: #3f3f46;
  --theme-accent: #52525b;
  --primary: #52525b;
  --mb-primary: #52525b;
  --mb-primary-hover: #71717a;
  --theme-primary-soft: rgba(82, 82, 91, 0.12);
  --theme-primary-ring: rgba(82, 82, 91, 0.24);
  --primary-color: #52525b;
  --danger: #dc2626;
}

html,
body.staff-body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  min-height: 100%;
  color: var(--text);
  background-color: #f2f2f7 !important;
}

body.staff-body .page.staff-page {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 8px 10px 20px;
  box-sizing: border-box;
}

/* ── Top rolling notice banner (5s) ───────────────────────────── */
.staff-rolling-banner {
  position: relative;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  background: var(--banner-bg);
  color: var(--banner-text);
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

body.staff-body.theme-default .staff-rolling-banner,
body.staff-body.theme-option1 .staff-rolling-banner,
body.staff-body.theme-option2 .staff-rolling-banner,
body.staff-body[data-theme='seoryong'] .staff-rolling-banner,
body.staff-body[data-theme='warm'] .staff-rolling-banner,
body.staff-body[data-theme='cool'] .staff-rolling-banner {
  box-shadow: var(--shadow);
  font-weight: 700;
}

.staff-rolling-text {
  margin: 0;
  width: 100%;
  max-width: 960px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.staff-rolling-text.is-active {
  opacity: 1;
  transform: translateY(0);
}

.staff-rolling-text.is-exit {
  opacity: 0;
  transform: translateY(-6px);
}

body.staff-body .staff-header.mybiz-header {
  padding: 4px 6px;
  gap: 4px;
  flex-wrap: nowrap;
  align-items: center;
  overflow-x: hidden;
  overflow-y: visible;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  backdrop-filter: none;
  color: var(--text);
}

body.staff-body .staff-header .brand-lockup {
  flex: 0 1 auto;
  min-width: 0;
  position: static;
  margin: 0;
}

body.staff-body .staff-header .brand-name {
  font-size: 15px;
  font-weight: 800;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

body.staff-body .staff-header .brand-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* 4버튼 단권 — 스와이프 금지, 한 화면 칼각 노출 */
body.staff-body .staff-header .header-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: hidden;
  white-space: nowrap;
  padding: 0 2px;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  margin-left: 0;
  position: static;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

body.staff-body .staff-header .header-tools::-webkit-scrollbar {
  display: none;
}

/* 6개 버튼 공통 컴팩트 알약 규격 */
body.staff-body .staff-header .tool-btn,
body.staff-body .staff-header .tool-toggle,
body.staff-body .staff-header .status-badge {
  height: 30px !important;
  min-height: 30px !important;
  padding: 2px 8px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  border-radius: 15px !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  line-height: 1;
}

body.staff-body .staff-header .tool-btn,
body.staff-body .staff-header .tool-toggle {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  color: var(--text);
}

body.staff-body .staff-header .tool-toggle[aria-pressed='true'] {
  background: var(--theme-primary);
  border-color: var(--theme-primary);
  color: #fff;
}

/* ── PWA 툴바 설치 버튼 (카지노/콜 V2 동일 클릭 방식, 자동 팝업 없음) ── */
body.staff-body .staff-header #pwa-install-btn.pwa-install-btn {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}
body.staff-body .staff-header #pwa-install-btn.pwa-install-btn:hover {
  background: #ffffff;
}
body.staff-body .staff-header #pwa-install-btn.pwa-install-btn:active {
  transform: scale(0.96);
}
body.staff-body .staff-header #pwa-install-btn.pwa-install-btn.is-installed {
  border: 1px solid #d32f2f;
  background: #fff5f5;
  color: #d32f2f;
  opacity: 1;
  font-weight: 600;
}

.pwa-guide-modal[hidden] {
  display: none !important;
}
.pwa-guide-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(62, 58, 57, 0.55);
  backdrop-filter: blur(6px);
}
.pwa-guide-modal.show {
  display: flex;
}
.pwa-guide-card {
  width: min(420px, 100%);
  background: #ffffff;
  border: 1px solid var(--border, rgba(62, 58, 57, 0.08));
  border-radius: 20px;
  padding: 22px 20px;
  box-shadow: 0 20px 50px rgba(62, 58, 57, 0.18);
}
.pwa-guide-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.pwa-guide-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--mb-primary, #d32f2f) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--mb-primary, #d32f2f) 28%, transparent);
  flex-shrink: 0;
}
.pwa-guide-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text, #3e3a39);
}
.pwa-guide-header p {
  margin: 6px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted, #8a8580);
}
.pwa-guide-steps {
  margin: 0 0 12px;
  padding: 0 0 0 4px;
  list-style: none;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text, #3e3a39);
}
.pwa-guide-steps strong {
  color: var(--mb-primary, #d32f2f);
}
.pwa-guide-hint {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f5f5f7;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-muted, #8a8580);
}
.pwa-guide-ok {
  width: 100%;
  min-height: 44px;
  border: none;
  border-radius: 14px;
  background: var(--mb-primary, #d32f2f);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

body.staff-body .staff-title.hero-title {
  font-size: 1.15rem;
  margin: 0 0 8px;
  color: var(--text);
}

body.staff-body .hero-copy {
  display: none;
}

/* ── Dashboard: customer [13명 이상]과 동일 테마 실선 ─────────── */
.dash-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 8px;
  width: 100%;
}

.dash-card {
  position: relative;
  padding: 10px 10px 9px;
  border-radius: 16px;
  min-width: 0;
  overflow: hidden;
  border: 1.5px solid var(--theme-primary) !important;
  border-color: var(--theme-primary) !important;
  background-color: #ffffff !important;
  box-shadow: var(--shadow);
  filter: none;
  outline: none;
  color: var(--dash-value);
}

.dash-card::before,
.dash-card::after {
  display: none !important;
  content: none !important;
  box-shadow: none !important;
}

.dash-card-teams,
.dash-card-people,
.dash-card-today,
.dash-card-accent {
  background-color: #ffffff !important;
  border: 1.5px solid var(--theme-primary) !important;
  border-color: var(--theme-primary) !important;
  border-radius: 16px;
  box-shadow: none;
}

.dash-label {
  position: relative;
  display: block;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: calc(0.72rem * 1.1);
  font-weight: 700;
  color: var(--dash-label);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

.dash-value {
  position: relative;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: calc(1.42rem * 1.1);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--dash-value);
  text-shadow: none;
}

.dash-card-accent .dash-value,
.dash-card-today .dash-value {
  color: var(--dash-value);
  text-shadow: none;
  font-family: 'Noto Sans KR', sans-serif;
}

/* ── Tabs ────────────────────────────────────────────────────── */
.queue-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin-bottom: 8px;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.queue-tabs::-webkit-scrollbar {
  display: none;
}

.queue-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 1 1 0;
  justify-content: center;
  padding: 7px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  background-color: #e5e5ea;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 700;
  font-size: calc(0.78rem * 1.1);
  color: #6b7280;
  cursor: pointer;
  white-space: nowrap;
  min-width: 0;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.queue-tab:active,
.queue-tab.is-active {
  background-color: var(--theme-primary) !important;
  color: #ffffff !important;
  border-color: var(--theme-primary) !important;
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  color: inherit;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 1.1em;
  font-weight: 700;
  line-height: 1;
}

.queue-tab.is-active .tab-count {
  background: transparent;
  border: none;
  color: inherit;
}

/* ── Slim queue cards (mobile-first 1-col) ────────────────────── */
.queue-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  width: 100%;
  max-width: 100%;
}

.queue-card,
.queue-card-slim {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 14px;
  background-color: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: var(--shadow);
  box-sizing: border-box;
  animation: rise-in 0.2s ease both;
  color: var(--card-ink);
}

/* 1순위(첫 카드) — 테마 포인트 실선 (2번째부터는 기본 슬레이트 유지) */
.queue-list > .queue-card:first-child,
.queue-list > .queue-card-slim:first-child {
  border: 2px solid var(--theme-primary) !important;
  border-color: var(--theme-primary) !important;
  border-radius: 14px;
  box-shadow: none;
}

.queue-list > .queue-card:first-child.is-new,
.queue-list > .queue-card:first-child.is-called,
.queue-list > .queue-card-slim:first-child.is-new,
.queue-list > .queue-card-slim:first-child.is-called {
  border: 2px solid var(--theme-primary) !important;
  border-color: var(--theme-primary) !important;
  border-radius: 14px;
}

.queue-card.is-new {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 28%, transparent);
  animation: new-pulse 2s ease;
}

@keyframes new-pulse {
  0% {
    background: color-mix(in srgb, var(--primary) 18%, var(--panel));
  }
  100% {
    background: var(--panel);
  }
}

.queue-card.is-called {
  border-color: color-mix(in srgb, var(--special-border) 55%, var(--border));
  background: color-mix(in srgb, var(--special-border) 12%, var(--panel));
}

/* Top line: 001. 11명. 18분 (12:30) — 특이사항 공간 우선 */
.queue-card-top {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.slim-headline {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  flex: 1 1 auto;
  gap: 4px;
  min-width: 0;
  max-width: none;
  overflow: hidden;
  white-space: nowrap;
  font-family: 'Noto Sans KR', var(--font-display, 'Outfit', sans-serif);
  line-height: 1.15;
}

.dot-sep,
.slim-dot {
  display: none;
}

.slim-no {
  flex: 0 0 auto;
  font-family: inherit;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--card-ink);
  margin: 0;
}

.slim-party {
  flex: 0 0 auto;
  font-family: inherit;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
  margin: 0;
}

/* 2명 이하: 고정 초록 / 3명+: 테마 메인 포인트(--primary-color) 연동 */
.slim-party.is-party-soft {
  color: #22c55e;
}

.slim-party.is-party-hot,
.theme-primary-text {
  color: var(--primary-color);
}

.slim-wait {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 4px;
  min-width: 0;
  margin: 0;
  white-space: nowrap;
  /* 경과+접수시각 블록 전체 = 번호/인원 대비 80% */
  font-size: calc(1.35rem * 0.8);
}

.slim-elapsed {
  font-family: inherit;
  font-size: 0.95em;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--card-ink);
  white-space: nowrap;
}

.slim-clock,
.receipt-time,
.registered-time {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-family: inherit;
  font-size: calc(0.58em * 1.3);
  font-weight: 600;
  line-height: 1;
  color: #6b7280;
  opacity: 1;
  white-space: nowrap;
}

/* 10자 닉네임 — 한 줄 고정, 넘치면 말줄임 (미입력 시 DOM 자체 미출력) */
.slim-guest {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 120px;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--card-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  text-align: left;
  line-height: 1.2;
}

.slim-guest:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.btn-edit-name {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--panel-elevated);
  font-size: 0.72rem;
  line-height: 1;
  cursor: pointer;
  color: var(--card-muted);
}

.btn-edit-name:hover {
  border-color: var(--primary);
  color: var(--primary-hover);
  background: color-mix(in srgb, var(--primary) 16%, var(--panel-elevated));
}

.name-edit-input {
  min-height: 44px !important;
  resize: none;
  font-size: 1.05rem !important;
  font-weight: 700;
}

.slim-tags {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 3px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.mini-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 4px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}

.mini-tag-vip {
  background: #ea580c;
}
.mini-tag-regular {
  background: #2563eb;
}
.mini-tag-room {
  background: #27272a;
}
.mini-tag-care {
  background: #7c3aed;
}
.mini-tag-chair,
.mini-tag-utensil {
  background: #65a30d;
}
.mini-tag-table {
  background: #0f766e;
}
.mini-tag-memo {
  background: #71717a;
}

.btn-add-tag {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px dashed color-mix(in srgb, var(--text) 28%, transparent);
  background: var(--panel-elevated);
  color: var(--card-muted);
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
  flex-shrink: 0;
}

.btn-add-tag:hover {
  background: color-mix(in srgb, var(--primary) 16%, var(--panel-elevated));
  border-color: var(--primary);
  color: var(--primary-hover);
}

/* Bottom line: customer party-btn 메커니즘 이식 (슬레이트 → theme-primary) */
.queue-card-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  width: 100%;
}

body.staff-body .queue-card-actions .btn,
body.staff-body .queue-card-actions .btn-call,
body.staff-body .queue-card-actions .btn-enter,
body.staff-body .queue-card-actions .btn-cancel,
body.staff-body .queue-card-actions .btn-electron {
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 4px;
  border-radius: 9px;
  font-family: 'Noto Sans KR', 'IBM Plex Sans KR', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-align: center;
  color: #374151;
  background-color: #ececee;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: none;
  text-shadow: none;
  filter: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

body.staff-body .queue-card-actions .btn:hover,
body.staff-body .queue-card-actions .btn:active,
body.staff-body .queue-card-actions .btn-call:hover,
body.staff-body .queue-card-actions .btn-call:active,
body.staff-body .queue-card-actions .btn-enter:hover,
body.staff-body .queue-card-actions .btn-enter:active,
body.staff-body .queue-card-actions .btn-cancel:hover,
body.staff-body .queue-card-actions .btn-cancel:active,
body.staff-body .queue-card-actions .btn-electron:hover,
body.staff-body .queue-card-actions .btn-electron:active {
  background: var(--theme-primary);
  border-color: var(--theme-primary);
  color: #ffffff;
  filter: none;
  box-shadow: none;
  text-shadow: none;
}

/* 모달 푸터 — 테마 --mb-primary */
body.staff-body .admin-modal .btn-call,
body.staff-body .admin-modal #adminSaveBtn,
body.staff-body .admin-modal #tagSaveBtn {
  background: var(--mb-primary, var(--theme-primary)) !important;
  border: none !important;
  border-radius: 16px;
  color: #fff !important;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--mb-primary, var(--theme-primary)) 22%, transparent);
  text-shadow: none;
}

body.staff-body .admin-modal .btn-call:hover,
body.staff-body .admin-modal #adminSaveBtn:hover,
body.staff-body .admin-modal #tagSaveBtn:hover {
  background: var(--mb-primary-hover, var(--theme-hover)) !important;
  border: none !important;
}

body.staff-body .admin-modal .btn-cancel {
  background: #f5f5f7 !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  border-radius: 16px;
  color: #1d1d1f !important;
  box-shadow: none;
  text-shadow: none;
  backdrop-filter: none;
}

.queue-card-actions .badge {
  font-size: 0.72rem;
  padding: 3px 8px;
}

.slim-reason {
  font-size: 0.7rem;
  color: #991b1b;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge.status-waiting {
  background: #efe7da;
  color: #3d4635;
}

.badge.status-called {
  background: #ffe8c8;
  color: #b45309;
}

.badge.status-entered {
  background: #dcfce7;
  color: #166534;
}

.badge.status-cancelled {
  background: #fee2e2;
  color: #991b1b;
}

.badge.badge-separate {
  display: none;
}

/* 태블릿: 2열 */
@media (min-width: 720px) {
  body.staff-body .page.staff-page {
    padding: 14px 16px 28px;
    max-width: 1100px;
  }

  .dash-value {
    font-size: calc(1.7rem * 1.1);
    font-family: 'Noto Sans KR', sans-serif;
  }

  .queue-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .slim-no,
  .slim-party {
    font-size: 1.5rem;
  }

  .dot-sep,
  .slim-dot {
    font-size: 1.05rem;
  }

  .slim-wait {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: calc(1.5rem * 0.8);
  }

  .slim-guest {
    max-width: 120px;
  }
}

/* PC/와이드: 3열 */
@media (min-width: 1100px) {
  body.staff-body .page.staff-page {
    max-width: 1400px;
  }

  .queue-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 모바일: 대기 카드 한 줄 유지 · 찌그러짐 방지 */
@media (max-width: 600px) {
  .queue-card-top {
    flex-wrap: nowrap;
    gap: 4px;
    align-items: center;
  }

  .slim-headline {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: clip;
  }

  .slim-no,
  .slim-party {
    font-size: 1.05rem;
  }

  .slim-wait {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: calc(1.05rem * 0.78);
    flex-shrink: 0;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
  }

  .slim-guest {
    display: none;
  }

  .slim-tags {
    flex: 0 1 auto;
    max-width: 72px;
  }

  .btn-edit-name {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  .btn-add-tag {
    padding: 2px 6px;
    font-size: 0.62rem;
    flex-shrink: 0;
  }
}

/* 초소형 폰: 카드 패딩만 더 압축 (닉네임은 120px ellipsis 유지) */
@media (max-width: 380px) {
  .queue-card,
  .queue-card-slim {
    padding: 5px 6px;
  }

  .queue-list {
    gap: 5px;
  }

  .slim-guest {
    max-width: 96px;
  }

  .slim-no,
  .slim-party {
    font-size: 0.95rem;
  }
}

.btn-cancel-confirm {
  background: #a11d2b;
  color: #fff;
  border: none;
}

.history-reason {
  font-size: 0.8rem;
  color: #991b1b;
  font-weight: 600;
}

/* ── Tag modal chips — 2×3 Apple pill grid ───────────────────── */
.tag-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.tag-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(62, 58, 57, 0.1);
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(62, 58, 57, 0.05);
  font-size: 0.95rem;
  font-weight: 800;
  color: #3e3a39;
  cursor: pointer;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.tag-chip.is-on {
  border-color: var(--theme-primary);
  background: var(--theme-primary-soft);
  color: var(--theme-primary);
  box-shadow: 0 0 0 2px var(--theme-primary-ring);
}

.tag-chip[data-tag='vip'].is-on {
  border-color: #ea580c;
  background: #fff7ed;
  color: #c2410c;
}

.tag-chip[data-tag='regular'].is-on {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.tag-chip[data-tag='care'].is-on {
  border-color: #7c3aed;
  background: #f5f3ff;
  color: #6d28d9;
}

.tag-chip[data-tag='room'].is-on {
  border-color: #27272a;
  background: #27272a;
  color: #fff;
}

.tag-chip[data-tag='tableSeparate'].is-on {
  border-color: #0f766e;
  background: #ccfbf1;
  color: #115e59;
}

.tag-chip-stepper {
  flex-direction: column;
  justify-content: center;
  cursor: default;
  opacity: 0.55;
}

.tag-chip-stepper.is-on {
  opacity: 1;
  border-color: #65a30d;
  background: #ecfccb;
  color: #3f6212;
  box-shadow: 0 0 0 2px rgba(101, 163, 13, 0.2);
}

.tag-chip-title {
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.2;
}

.mini-stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mini-step {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(26, 31, 22, 0.16);
  background: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
  color: #1a1f16;
}

.mini-step:active {
  transform: scale(0.96);
}

.mini-step-val {
  min-width: 1.4rem;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
}

.qtag-table {
  background: #0f766e;
}

@media (max-width: 520px) {
  .tag-chip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .tag-chip {
    min-height: 52px;
    font-size: 0.88rem;
    border-radius: 16px;
  }
}

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
}

/* ── Admin / cancel modals (shared shell) ────────────────────── */
.admin-modal[hidden] {
  display: none !important;
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 16px;
}

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 31, 22, 0.5);
}

.admin-modal-sheet {
  position: relative;
  width: min(520px, 100%);
  max-height: min(90vh, 760px);
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  animation: admin-rise 0.22s ease both;
  color: #1d1d1f;
}

@keyframes admin-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: #ffffff;
  color: #1d1d1f;
}

.admin-modal-header h2 {
  flex: 1 1 auto;
  min-width: 0;
}

.admin-modal-quick {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.settings-quick-btn {
  height: 28px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 14px;
  border: 1px solid #e0e0e0;
  background: #fafafa;
  color: #1d1d1f;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  box-sizing: border-box;
}

.settings-quick-btn[aria-pressed='true'] {
  background: var(--mb-primary, var(--theme-primary));
  border-color: var(--mb-primary, var(--theme-primary));
  color: #ffffff;
}

.admin-modal-header h2 {
  margin: 0;
  font-family: 'Noto Sans KR', 'IBM Plex Sans KR', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #1d1d1f !important;
  letter-spacing: -0.02em;
}

.admin-close-x {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #f5f5f7;
  font-size: 1.4rem;
  line-height: 1;
  color: #1d1d1f;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.admin-close-x:hover,
.admin-close-x:active {
  border-color: color-mix(in srgb, var(--mb-primary, var(--theme-primary)) 35%, transparent);
  color: var(--mb-primary, var(--theme-primary));
  background: color-mix(in srgb, var(--mb-primary, var(--theme-primary)) 10%, transparent);
}

.admin-modal-body {
  padding: 16px 18px 8px;
  overflow-y: auto;
  color: #1d1d1f;
  background: #ffffff;
}

.admin-section {
  margin-bottom: 18px;
  color: #111827;
}

.admin-section-title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #111827 !important;
}

.admin-hint {
  margin: -4px 0 8px;
  font-size: 0.82rem;
  color: #1f2937 !important;
  font-weight: 500;
}

.admin-radio-group,
.cancel-reasons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #f5f5f7 !important;
  cursor: pointer;
  font-weight: 600;
  color: #1d1d1f !important;
}

.admin-radio span,
.admin-radio strong {
  color: #111827 !important;
}

.admin-radio:has(input:checked) {
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 2px var(--theme-primary-ring);
  background: var(--theme-primary-soft) !important;
  color: #111827 !important;
}

.admin-radio input {
  width: 18px;
  height: 18px;
  accent-color: var(--theme-primary);
  flex-shrink: 0;
}

.admin-section-nickname .admin-radio span {
  font-size: 0.84rem;
  line-height: 1.35;
  color: #111827 !important;
}

.admin-subsection-title {
  margin: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 800;
  color: #1f2937 !important;
}

.nickname-schedule-panel {
  margin-top: 12px;
  padding: 12px 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #f5f5f7;
  color: #1d1d1f;
  transition: opacity 0.15s ease, filter 0.15s ease;
}

.nickname-schedule-panel.is-disabled {
  opacity: 0.45;
  filter: grayscale(0.25);
  pointer-events: none;
}

.admin-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  color: #111827 !important;
}

.admin-check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--theme-primary);
}

.admin-text-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(26, 31, 22, 0.14);
  background: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
}

.admin-text-input:focus {
  outline: 2px solid var(--theme-primary-ring);
  border-color: var(--theme-primary);
}

.admin-text-input:disabled,
.admin-check-row input:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.admin-label {
  display: block;
  margin: 12px 0 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #111827 !important;
}

.admin-textarea {
  width: 100%;
  resize: vertical;
  min-height: 72px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #f5f5f7;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #1d1d1f;
}

.admin-textarea:focus {
  outline: none;
  border-color: var(--mb-primary, var(--theme-primary));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mb-primary, var(--theme-primary)) 18%, transparent);
  background: #ffffff;
}

.admin-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #f5f5f7;
  font-weight: 700;
  color: #1d1d1f !important;
}

.admin-toggle {
  flex-shrink: 0;
  min-width: 56px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: none;
  font-weight: 800;
  font-size: 0.72rem;
  cursor: pointer;
  background: #e5e5ea;
  color: #8e8e93;
  transition: background 0.2s ease, color 0.2s ease;
}

.admin-toggle[aria-pressed='true'],
.admin-toggle.is-on,
.admin-toggle.active,
.admin-toggle.checked {
  background: var(--mb-primary, var(--theme-primary));
  color: #ffffff;
}

.admin-toggle[aria-pressed='false'] {
  background: #e5e5ea;
  color: #8e8e93;
}

/* Apple light slider switch (admin 완료 알림창과 동일) */
#adminModal .admin-toggle.admin-switch,
.admin-modal-sheet .admin-toggle.admin-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  width: 72px;
  min-width: 72px;
  height: 34px;
  padding: 0 10px 0 28px;
  overflow: hidden;
  background: #e5e5ea !important;
  color: #8e8e93 !important;
}

#adminModal .admin-toggle.admin-switch .admin-switch-label,
.admin-modal-sheet .admin-toggle.admin-switch .admin-switch-label {
  position: relative;
  z-index: 1;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  pointer-events: none;
}

#adminModal .admin-toggle.admin-switch .admin-switch-knob,
.admin-modal-sheet .admin-toggle.admin-switch .admin-switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
  z-index: 2;
}

#adminModal .admin-toggle.admin-switch[aria-pressed='true'],
#adminModal .admin-toggle.admin-switch.is-on,
#adminModal .admin-toggle.admin-switch.active,
#adminModal .admin-toggle.admin-switch.checked,
.admin-modal-sheet .admin-toggle.admin-switch[aria-pressed='true'],
.admin-modal-sheet .admin-toggle.admin-switch.is-on,
.admin-modal-sheet .admin-toggle.admin-switch.active,
.admin-modal-sheet .admin-toggle.admin-switch.checked {
  justify-content: flex-start;
  padding: 0 28px 0 10px;
  background: #34c759 !important;
  color: #ffffff !important;
}

#adminModal .admin-toggle.admin-switch[aria-pressed='true'] .admin-switch-knob,
#adminModal .admin-toggle.admin-switch.is-on .admin-switch-knob,
#adminModal .admin-toggle.admin-switch.active .admin-switch-knob,
#adminModal .admin-toggle.admin-switch.checked .admin-switch-knob,
.admin-modal-sheet .admin-toggle.admin-switch[aria-pressed='true'] .admin-switch-knob,
.admin-modal-sheet .admin-toggle.admin-switch.is-on .admin-switch-knob,
.admin-modal-sheet .admin-toggle.admin-switch.active .admin-switch-knob,
.admin-modal-sheet .admin-toggle.admin-switch.checked .admin-switch-knob {
  transform: translateX(38px);
}

#adminModal .admin-toggle.admin-switch[aria-pressed='false'] .admin-switch-knob,
#adminModal .admin-toggle.admin-switch:not(.is-on):not([aria-pressed='true']) .admin-switch-knob,
.admin-modal-sheet .admin-toggle.admin-switch[aria-pressed='false'] .admin-switch-knob,
.admin-modal-sheet .admin-toggle.admin-switch:not(.is-on):not([aria-pressed='true']) .admin-switch-knob {
  transform: translateX(0);
}

/* 테마 프리셋 Apple Select — common.css !important 덮어쓰기 */
#adminModal .theme-select-wrap,
.admin-modal-sheet .theme-select-wrap {
  position: relative;
  width: 100%;
}

#adminModal .theme-select-wrap::after,
.admin-modal-sheet .theme-select-wrap::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2.5px solid #8e8e93;
  border-bottom: 2.5px solid #8e8e93;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
  z-index: 2;
}

#adminModal #kioskThemeSelect,
#adminModal .admin-select.theme-preset-select,
.admin-modal-sheet #kioskThemeSelect,
.admin-modal-sheet .admin-select.apple-select.theme-preset-select {
  width: 100%;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background: #ffffff !important;
  background-image: none !important;
  border: 1px solid #d1d1d6 !important;
  border-radius: 14px !important;
  padding: 14px 44px 14px 16px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #1d1d1f !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#adminModal #kioskThemeSelect:hover,
.admin-modal-sheet #kioskThemeSelect:hover {
  border-color: #c7c7cc !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
  background: #ffffff !important;
}

#adminModal #kioskThemeSelect:focus,
.admin-modal-sheet #kioskThemeSelect:focus {
  border-color: var(--mb-primary, var(--theme-primary)) !important;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.06),
    0 0 0 3px color-mix(in srgb, var(--mb-primary, var(--theme-primary)) 22%, transparent) !important;
  outline: none;
  background: #ffffff !important;
}

.admin-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 18px 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: #ffffff;
  color: #1d1d1f;
}

.admin-modal-footer .btn {
  min-width: 96px;
  padding: 12px 14px;
  border-radius: 16px;
  font-family: 'Noto Sans KR', 'IBM Plex Sans KR', sans-serif;
  font-weight: 700;
}

/* admin modal mobile tweak only — queue cards use slim layout above */
@media (max-width: 520px) {
  .admin-modal-header h2 {
    font-size: 1rem;
  }

  .admin-modal-sheet {
    max-height: 92vh;
  }
}

/* ── 특이사항 모달 — Apple Preset 1 Warm White ───────────────── */
#tagModal .apple-white-sheet.tag-sheet,
#tagModal .tag-sheet.apple-white-sheet {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 24px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
  color: #1d1d1f;
}

#tagModal .apple-white-sheet .admin-modal-header {
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  color: #1d1d1f;
  padding: 18px 20px;
}

#tagModal .apple-white-sheet .admin-modal-header h2 {
  color: #1d1d1f !important;
  font-weight: 800;
  letter-spacing: -0.02em;
}

#tagModal .apple-white-sheet .admin-close-x {
  background: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  color: #1d1d1f;
}

#tagModal .apple-white-sheet .admin-close-x:hover {
  background: color-mix(in srgb, var(--mb-primary, var(--theme-primary)) 10%, transparent);
  border-color: color-mix(in srgb, var(--mb-primary, var(--theme-primary)) 35%, transparent);
  color: var(--mb-primary, var(--theme-primary));
}

#tagModal .apple-white-sheet .admin-modal-body {
  background: #ffffff;
  color: #1d1d1f;
  padding: 16px 20px 10px;
}

#tagModal .apple-white-sheet .admin-hint,
#tagModal .apple-white-sheet .admin-label {
  color: #86868b !important;
}

#tagModal .apple-white-sheet .tag-chip {
  background: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  color: #1d1d1f;
  box-shadow: none;
}

#tagModal .apple-white-sheet .tag-chip.is-on {
  border-color: var(--mb-primary, var(--theme-primary));
  background: color-mix(in srgb, var(--mb-primary, var(--theme-primary)) 10%, transparent);
  color: var(--mb-primary, var(--theme-primary));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--mb-primary, var(--theme-primary)) 18%, transparent);
}

#tagModal .apple-white-sheet .admin-textarea {
  background: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  color: #1d1d1f;
}

#tagModal .apple-white-sheet .admin-textarea:focus {
  outline: none;
  border-color: var(--mb-primary, var(--theme-primary));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mb-primary, var(--theme-primary)) 15%, transparent);
  background: #ffffff;
}

#tagModal .apple-white-sheet .admin-modal-footer {
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 14px 20px 18px;
}

#tagModal .apple-white-sheet .admin-modal-footer .btn-cancel {
  background: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  color: #1d1d1f;
}

#tagModal .apple-white-sheet .admin-modal-footer .btn-call,
#tagModal .apple-white-sheet #tagSaveBtn {
  background: var(--mb-primary, var(--theme-primary)) !important;
  border: none !important;
  border-radius: 14px;
  color: #ffffff !important;
  font-weight: 800;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--mb-primary, var(--theme-primary)) 22%, transparent);
}

#tagModal .apple-white-sheet .admin-modal-footer .btn-call:hover,
#tagModal .apple-white-sheet #tagSaveBtn:hover {
  background: var(--mb-primary-hover, var(--theme-hover)) !important;
  color: #ffffff !important;
}

/* 스태프 헤더 — 6버튼 단권 규격 (연결됨 뱃지 포함) */
body.staff-body .staff-header .status-badge {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  color: var(--text);
}

body.staff-body .staff-header .status-badge.connected {
  border: 1px solid #4caf50;
  background: #f1f8e9;
  color: #2e7d32;
}

body.staff-body .staff-header .status-dot,
body.staff-body .staff-header .status-signal,
body.staff-body .staff-header .status-signal-svg,
body.staff-body .staff-header .status-signal-slash {
  width: 12px;
  height: 12px;
}

@media (max-width: 600px) {
  body.staff-body .staff-header.mybiz-header {
    padding: 3px 6px;
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: hidden;
  }
  body.staff-body .staff-header .brand-name {
    font-size: 15px;
    font-weight: 800;
    max-width: 120px;
  }
  body.staff-body .staff-header .brand-sub {
    display: none;
  }
  body.staff-body .staff-header .header-tools {
    display: flex;
    align-items: center;
    gap: 3px;
    overflow-x: hidden;
    white-space: nowrap;
    padding: 0 2px;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    margin-left: 0;
    position: static;
    justify-content: flex-end;
    flex-wrap: nowrap;
  }
  .admin-modal-header {
    flex-wrap: wrap;
  }
  .admin-modal-quick {
    order: 3;
    width: 100%;
    justify-content: flex-end;
  }
  body.staff-body .staff-header .tool-btn,
  body.staff-body .staff-header .tool-toggle,
  body.staff-body .staff-header .status-badge {
    height: 30px !important;
    min-height: 30px !important;
    padding: 2px 8px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    border-radius: 15px !important;
    gap: 3px !important;
    flex-shrink: 0 !important;
  }
  body.staff-body .staff-title.hero-title {
    font-size: 1rem;
    margin: 0 0 6px;
  }
  body.staff-body .page.staff-page {
    padding: 6px 6px 14px;
  }
}

/* ── iOS snackbar toast (overrides pill / 50% circle) ─────────── */
body.staff-body .status-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(16px);
  min-width: 240px;
  max-width: 90%;
  padding: 12px 20px;
  border: none;
  border-radius: 12px !important;
  background-color: rgba(30, 30, 32, 0.88) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  line-height: 1.4;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  z-index: 120;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

body.staff-body .status-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

body.staff-body .status-toast.is-hiding {
  opacity: 0;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.35s ease;
}
