/* ============================================
   Bao Bao's Cafe — Shared Styles
   Warm, mobile-first coffee shop aesthetic
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #FBF7F4;
  --bg-card: #FFFFFF;
  --primary: #6F4E37;
  --primary-dark: #5A3E2B;
  --primary-light: #8B7355;
  --secondary: #D4A574;
  --secondary-light: #E8CDB0;
  --accent: #C8553D;
  --accent-hover: #B5452F;
  --text: #2C1810;
  --text-secondary: #7A6B63;
  --text-light: #A89890;
  --border: rgba(111, 78, 55, 0.10);
  --border-strong: rgba(111, 78, 55, 0.22);
  --success: #5B8C5A;
  --success-light: #E8F5E8;
  --danger: #C8553D;
  --danger-light: #FFF0ED;
  --shadow-sm: 0 1px 3px rgba(44, 24, 16, 0.05);
  --shadow: 0 2px 12px rgba(44, 24, 16, 0.08);
  --shadow-lg: 0 8px 30px rgba(44, 24, 16, 0.12);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition: 0.2s ease;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'DM Serif Display', Georgia, 'Times New Roman', serif;
}

[data-theme="dark"] {
  --bg: #1A1412;
  --bg-card: #2A2220;
  --primary: #C8A882;
  --primary-dark: #D4B896;
  --primary-light: #A8896E;
  --secondary: #8B6E4E;
  --secondary-light: #3D3028;
  --accent: #E07060;
  --accent-hover: #C8553D;
  --text: #E8E0DA;
  --text-secondary: #A89890;
  --text-light: #7A6B63;
  --border: rgba(200, 168, 130, 0.12);
  --border-strong: rgba(200, 168, 130, 0.25);
  --success: #6BA36A;
  --success-light: #1E2E1E;
  --danger: #E07060;
  --danger-light: #2E1A18;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .switch .slider { background: #4A4240; }
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="url"],
[data-theme="dark"] input[type="password"] { background: var(--bg); color: var(--text); }
[data-theme="dark"] .config-select { background: var(--bg); color: var(--text); }
[data-theme="dark"] .category-edit-input:focus { background: var(--bg); }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Typography ---- */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 400; line-height: 1.2; }
h1 { font-size: 1.75rem; color: var(--primary); }
h2 { font-size: 1.3rem; color: var(--primary); margin-bottom: 0.75rem; }
h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }

/* ---- Layout ---- */
.container {
  max-width: 540px;
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
}
.container--wide { max-width: 780px; }

/* ---- Header ---- */
.header {
  text-align: center;
  padding: 1.25rem 1rem 1rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.4rem;
}

.header h1 { margin-bottom: 0.1rem; }

.header .subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ---- Compact Header (Barista) ---- */
.header--compact {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-align: left;
  padding: 0.6rem 1rem;
}
.header--compact .logo {
  width: 36px;
  height: 36px;
  margin: 0;
  flex-shrink: 0;
}
.header--compact h1 {
  font-size: 1.35rem;
  margin: 0;
}

/* ---- Sections ---- */
.section {
  padding: 1.25rem 0;
}
.section + .section {
  border-top: 1px solid var(--border);
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---- Menu List ---- */
.menu-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.menu-section-label {
  padding: 0.5rem 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.8rem 1rem;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  text-align: left;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  outline: none;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: rgba(111, 78, 55, 0.04); }
.menu-item--selected {
  background: rgba(111, 78, 55, 0.06);
  color: var(--primary);
}

.menu-item-orders {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  color: var(--text-light);
  flex-shrink: 0;
  margin-right: 0.4rem;
}

.menu-check {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
}

/* ---- Modifier Groups ---- */
.modifier-group {
  margin-bottom: 1.15rem;
}
.modifier-group:last-child { margin-bottom: 0; }

.modifier-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---- Toggle Buttons (single-select) ---- */
.toggle-group {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.toggle-btn {
  flex: 1 1 0;
  min-width: 64px;
  padding: 0.55rem 0.6rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  font-size: 0.82rem;
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  outline: none;
}
.toggle-btn:active { transform: scale(0.96); }
.toggle-btn--active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ---- Chips (multi-select) ---- */
.chip-group {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.chip {
  padding: 0.45rem 0.85rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  font-size: 0.82rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  outline: none;
}
.chip:active { transform: scale(0.96); }
.chip--active {
  background: var(--secondary);
  border-color: var(--secondary);
  color: var(--text);
}

/* ---- Form Inputs ---- */
input[type="text"],
input[type="number"],
input[type="url"] {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-sans);
  background: var(--bg-card);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  -webkit-appearance: none;
}
input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(111, 78, 55, 0.10);
}
input::placeholder { color: var(--text-light); }
input:focus::placeholder { color: transparent; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  width: 100%;
  padding: 0.9rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-secondary:hover { background: rgba(111, 78, 55, 0.05); }

.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #4e7a4d; }

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1.5px solid var(--danger);
}
.btn-danger:hover { background: var(--danger-light); }

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.btn-icon:hover { background: var(--danger-light); color: var(--danger); border-color: var(--danger); }

/* ---- Order Confirmation ---- */
.confirmation {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 65vh;
  padding: 2rem 1rem;
  text-align: center;
}

.check-circle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--success-light);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin-bottom: 1.25rem;
  animation: popIn 0.4s ease;
}

.confirmation h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.order-details {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

.queue-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 2rem;
  margin-bottom: 1.75rem;
  min-width: 200px;
}

.queue-badge .number {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  color: var(--primary);
  line-height: 1;
}

.queue-badge .label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

.queue-wait {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.35rem;
}

/* ---- Tabs (Barista) ---- */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  background: var(--bg-card);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: sticky;
  top: 93px; /* below header */
  z-index: 90;
}
.header--compact + .tabs,
.header--compact ~ .tabs { top: 53px; }

.tab {
  flex: 1;
  padding: 0.75rem 0.4rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font-sans);
  outline: none;
}
.tab--active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tabs--compact .tab {
  padding: 0.6rem 0.25rem;
  font-size: 0.75rem;
}

.tab-content { display: none; }
.tab-content--active { display: block; }

/* ---- Order Card (Barista) ---- */
.order-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.65rem;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.25s ease;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.35rem;
}

.order-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.order-time {
  font-size: 0.75rem;
  color: var(--text-light);
  white-space: nowrap;
  margin-left: 0.5rem;
}

.order-drink {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 0.45rem;
}

.order-mods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.7rem;
}

.mod-tag {
  padding: 0.15rem 0.55rem;
  background: var(--bg);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.order-actions {
  display: flex;
  gap: 0.4rem;
}

/* ---- List Management ---- */
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  gap: 0.5rem;
}
.list-item:last-child { border-bottom: none; }

.item-name {
  flex: 1;
  font-size: 0.92rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.add-item-row {
  display: flex;
  gap: 0.5rem;
}
.add-item-row input { flex: 1; }
.add-item-row .btn { white-space: nowrap; flex-shrink: 0; }

/* ---- Toggle Switch ---- */
.switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
  display: inline-block;
}
.switch input { display: none; }
.switch .slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 24px;
  transition: background var(--transition);
}
.switch .slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.switch input:checked + .slider { background: var(--success); }
.switch input:checked + .slider::before { transform: translateX(18px); }

/* ---- QR Section ---- */
.qr-section {
  text-align: center;
  padding: 1.5rem 0;
}
.btn-print-qr {
  max-width: 220px;
  margin: 1rem auto 0;
  display: flex;
}

.qr-section canvas,
.qr-section img {
  display: block;
  margin: 1rem auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}
.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  margin-left: 0.3rem;
  vertical-align: middle;
}

/* ---- Section Header Row ---- */
.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.section-header-row h2 { margin-bottom: 0; }
.section-header-row .actions {
  display: flex;
  gap: 0.4rem;
}

/* ---- Animations ---- */
@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.25s ease; }

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .header { padding: 1rem 0.75rem 0.75rem; }
  .header h1 { font-size: 1.45rem; }
  .logo { width: 48px; height: 48px; }
  .container { padding: 0 1rem 2rem; }
  .tabs { top: 82px; }
  .header--compact { padding: 0.5rem 0.75rem; }
  .header--compact .logo { width: 32px; height: 32px; }
  .header--compact h1 { font-size: 1.2rem; }
  .header--compact + .tabs,
  .header--compact ~ .tabs { top: 45px; }
}

@media (min-width: 768px) {
  .container { padding: 0 2rem 2rem; }
}

/* ---- Login Gate ---- */
.login-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 2rem 1rem;
}

.login-box {
  text-align: center;
  max-width: 320px;
  width: 100%;
}

.login-box .logo {
  width: 72px;
  height: 72px;
  margin-bottom: 0.75rem;
}

.login-box h1 {
  margin-bottom: 0.25rem;
}

.login-box .subtitle {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.login-form input {
  text-align: center;
  font-size: 1.25rem;
  letter-spacing: 0.3em;
  padding: 0.85rem;
}

.login-error {
  color: var(--danger);
  font-size: 0.82rem;
  min-height: 1.2em;
}

/* ---- Session Bar ---- */
.session-bar {
  border-radius: var(--radius);
  padding: 0.5rem 0.85rem;
  margin-top: 0.75rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  animation: fadeIn 0.25s ease;
}

.session-closed {
  background: var(--bg);
  border: 1.5px dashed var(--border-strong);
}

.session-open {
  background: var(--success-light);
  border: 1.5px solid var(--success);
}

.session-status {
  font-size: 0.88rem;
  font-weight: 500;
  flex: 1;
  min-width: 0;
}

.session-status .session-name {
  font-weight: 600;
  color: var(--success);
}

.session-closed .session-status {
  color: var(--text-secondary);
}

/* ---- Session Cards (History) ---- */
.session-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.65rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.session-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.session-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.35rem;
}

.session-card-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--primary);
}

.session-card-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.session-card-meta {
  font-size: 0.78rem;
  color: var(--text-light);
}

/* ---- History Stats ---- */
.history-stats {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.history-stat {
  flex: 1;
  min-width: 80px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  text-align: center;
}

.history-stat .stat-num {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--primary);
  line-height: 1;
}

.history-stat .stat-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---- Closed Screen (Customer) ---- */
.closed-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 2rem 1rem;
  animation: fadeIn 0.3s ease;
}

.closed-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.closed-screen h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.closed-screen p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 280px;
}

/* ---- Menu Config Panel (Barista) ---- */
.menu-config-panel {
  border-left: 3px solid var(--secondary);
  background: var(--bg);
  padding: 0.75rem 1rem;
  margin: 0.35rem 0 0.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  animation: fadeIn 0.2s ease;
}

.menu-config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0;
}

.menu-config-row + .menu-config-row {
  border-top: 1px solid var(--border);
}

.menu-config-row .config-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
}

.item-name-group {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.category-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  background: var(--secondary-light);
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.config-select {
  padding: 0.35rem 0.5rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-family: var(--font-sans);
  background: var(--bg-card);
  color: var(--text);
  outline: none;
  cursor: pointer;
}
.config-select:focus {
  border-color: var(--primary);
}

.category-edit-input {
  flex: 1;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.5rem;
  font-size: 0.92rem;
  font-family: var(--font-sans);
  background: transparent;
  color: var(--text);
  outline: none;
  transition: all var(--transition);
}
.category-edit-input:hover {
  border-color: var(--border-strong);
}
.category-edit-input:focus {
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(111, 78, 55, 0.10);
}

.btn-configure {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.8rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.btn-configure:hover { background: rgba(111, 78, 55, 0.06); color: var(--primary); border-color: var(--primary); }
.btn-configure--active { background: rgba(111, 78, 55, 0.08); color: var(--primary); border-color: var(--primary); }

.btn-move {
  width: 24px;
  height: 24px;
  font-size: 0.6rem;
  color: var(--text-light);
  border-color: var(--border);
}
.btn-move:hover { background: rgba(111, 78, 55, 0.06); color: var(--primary); border-color: var(--primary); }

.config-input {
  flex: 1;
  padding: 0.3rem 0.5rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: var(--font-sans);
  background: var(--bg-card);
  color: var(--text);
  outline: none;
  margin-left: 0.5rem;
  max-width: 60%;
}
.config-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(111, 78, 55, 0.10);
}
[data-theme="dark"] .config-input { background: var(--bg); color: var(--text); }

/* ---- Menu Item Images ---- */
.menu-item-img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  margin-right: 0.75rem;
}

.menu-item-name {
  flex: 1;
}

.menu-item-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.menu-config-image-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
}

.menu-config-image-actions {
  display: flex;
  gap: 0.4rem;
}

/* ---- Dark Mode Toggle ---- */
.theme-toggle {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  z-index: 200;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ---- Modifier Group Card (Barista Admin) ---- */
.mod-group-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.mod-group-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--primary);
  padding: 0.25rem 0.4rem;
}

.mod-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.mod-group-header .actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-shrink: 0;
}

/* ---- Compact Add Button (admin rows) ---- */
.btn-add {
  width: auto !important;
  padding: 0.7rem 1.1rem !important;
}

/* ---- Unavailable Menu Item ---- */
.item-name-group--off {
  opacity: 0.45;
}
.item-name-group--off .item-name {
  text-decoration: line-through;
}

/* ---- Centered Mod Tags (confirmation) ---- */
.order-mods--centered {
  justify-content: center;
  margin: 0.5rem 0;
}

/* ---- New Order Button (confirmation) ---- */
.btn-new-order {
  width: 100%;
  max-width: 320px;
}

/* ---- Status Labels ---- */
.status--completed { color: var(--success); }
.status--cancelled { color: var(--danger); }

/* ---- Utilities ---- */
.hidden { display: none !important; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.text-sm { font-size: 0.82rem; }
.w-full { width: 100%; }
