/* raph-plus-design-language */

:root {
  /* ── Backgrounds ── */
  --color-bg:             #F0F0F0;
  --color-bg-elevated:    #FAFAFA;
  --color-bg-card:        #FFFFFF;
  --color-bg-hover:       #F5F5F5;
  --color-surface:        #F8F8F8;

  /* ── Borders ── */
  --color-border:         #D0D0D0;
  --color-border-subtle:  #E0E0E0;
  --color-border-strong:  #C0C0C0;

  /* ── Title-bar gradient ── */
  --color-titlebar-from:  #E8E8E8;
  --color-titlebar-to:    #D8D8D8;

  /* ── Text ── */
  --color-text-primary:   #1a1a1a;
  --color-text-secondary: #4a4a4a;
  --color-text-muted:     #666666;
  --color-text-faint:     #999999;

  /* ── Accent (interactive) ── */
  --color-accent:             #0088CC;
  --color-accent-light:       #0095DD;
  --color-accent-hover-from:  #00A8F0;
  --color-accent-hover-to:    #0095DD;

  /* ── Error & Special ── */
  --color-error: #d4183d;
  --color-red-from: #f04a4a;
  --color-red-to: #d4183d;
  --color-orange-from: #f9a03c;
  --color-orange-to: #e67e22;
  --color-green-from: #4cd137;
  --color-green-to: #27ae60;

  /* ── Typography ── */
  --font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'Menlo', 'Monaco', monospace;

  /* ── Radii — ZERO by default ── */
  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;

  /* ── Shadows ── */
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:     0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:     0 8px 24px rgba(0,0,0,0.1);
  --shadow-window: 0 2px 8px rgba(0,0,0,0.12), 0 0 1px rgba(0,0,0,0.08);

  /* ── Transitions ── */
  --transition-fast:   150ms ease;
  --transition-normal: 250ms ease;
}

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

body {
  background-color: var(--color-bg);
  color: var(--color-text-secondary);
  font-family: var(--font-family);
  font-size: 0.875rem;
  line-height: 1.6;
  height: 100vh;
  overflow: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-faint);
}

/* Layout */
.app-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.topbar {
  height: 38px;
  flex-shrink: 0;
  background: linear-gradient(to bottom, #FAFAFA, #E8E8E8);
  border-bottom: 1px solid var(--color-border-strong);
  box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset;
  display: flex;
  align-items: center;
  padding: 0 16px;
  position: relative;
}

.topbar__logo {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-primary);
  flex: 1;
}

.topbar__title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.topbar__status {
  flex: 1;
  text-align: right;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.status-dot {
  width: 8px;
  height: 8px;
  background: var(--color-error);
}
.status-dot.connected {
  background: var(--color-green-from);
}

.topbar__separator {
  color: var(--color-border);
  margin: 0 2px;
}
.topbar__mode-btn {
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.topbar__mode-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.topbar__mode-btn--prod {
  background: var(--color-error);
  color: #fff;
  border-color: var(--color-error);
}
.topbar__mode-btn--prod:hover {
  background: #b8152f;
  border-color: #b8152f;
  color: #fff;
}

.app-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.sidebar {
  width: 180px;
  flex-shrink: 0;
  background: linear-gradient(to bottom, #F6F6F6, #EFEFEF);
  border-right: 1px solid var(--color-border);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding-top: 8px;
}

.sidebar-nav__item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 6px 12px;
  background: transparent;
  border: none;
  text-align: left;
  font-family: inherit;
  font-size: 0.8125rem;
  color: var(--color-text-primary);
  cursor: pointer;
}

.sidebar-nav__indicator {
  width: 3px;
  height: 14px;
  background: transparent;
  margin-right: 8px;
}

.sidebar-nav__item--active {
  background: var(--color-accent);
  color: #fff;
}
.sidebar-nav__item--active .sidebar-nav__indicator {
  background: rgba(255,255,255,0.8);
}

.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px;
  position: relative;
}

.view {
  display: none;
  max-width: 960px;
  margin: 0 auto;
  animation: fadeIn 0.35s ease-out;
}
.view--active {
  display: block;
}

/* Typography & Badges */
.badge {
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-faint);
  background: rgba(0,0,0,0.05);
  padding: 2px 6px;
  font-variant-numeric: tabular-nums;
}

.text-faint {
  color: var(--color-text-faint);
  font-size: 0.8125rem;
}

h2 {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

/* Cards */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-window);
  margin-bottom: 24px;
}

.card__titlebar {
  background: linear-gradient(to bottom, var(--color-titlebar-from), var(--color-titlebar-to));
  border-bottom: 1px solid var(--color-border-strong);
  height: 30px;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-weight: 500;
}

.card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ── Mobile ────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  body {
    overflow: auto;
    height: 100%;
    -webkit-text-size-adjust: 100%;
  }

  .app-layout {
    height: auto;
    min-height: 100dvh;
  }

  /* Topbar: compact */
  .topbar {
    height: 44px;
    padding: 0 12px;
    position: sticky;
    top: 0;
    z-index: 100;
  }
  .topbar__title {
    display: none;
  }
  .topbar__mode-btn {
    padding: 4px 10px;
    font-size: 0.6875rem;
  }

  /* Sidebar → Bottom tab bar */
  .app-body {
    flex-direction: column;
    overflow: visible;
  }
  .sidebar {
    order: 2;
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-right: none;
    border-top: 1px solid var(--color-border-strong);
    background: linear-gradient(to top, #EFEFEF, #F6F6F6);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .sidebar-nav {
    flex-direction: row;
    padding-top: 0;
  }
  .sidebar-nav__item {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8px 4px 6px;
    font-size: 0.625rem;
    gap: 2px;
    min-height: 50px;
  }
  .sidebar-nav__indicator {
    display: none;
  }
  .sidebar-nav__icon {
    font-size: 1.25rem;
    display: block;
  }
  .sidebar-nav__item--active {
    background: transparent;
    color: var(--color-accent);
  }
  .sidebar-nav__item--active .sidebar-nav__icon {
    transform: scale(1.1);
  }

  /* Content area */
  .content-area {
    padding: 16px 12px;
    padding-bottom: 70px; /* space for bottom nav */
    overflow: visible;
  }
  .view {
    max-width: 100%;
  }

  /* Dashboard grid: single column */
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Cards */
  .card {
    margin-bottom: 16px;
  }
  .card__body {
    padding: 12px;
  }

  /* Add item row: wrap into grid */
  .add-item-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .add-item-row .input {
    font-size: 0.8125rem;
    padding: 8px 8px;
    min-height: 36px;
  }
  .add-item-drink {
    flex: 1 1 100%;
  }
  .add-item-size {
    width: auto;
    flex: 1;
  }
  .add-item-milk {
    flex: 1;
  }
  .add-item-row .btn-primary {
    padding: 8px 16px;
    font-size: 0.8125rem;
    min-height: 36px;
  }

  /* Buttons: larger touch targets */
  .btn-primary,
  .btn-secondary {
    padding: 10px 18px;
    font-size: 0.875rem;
    min-height: 44px;
  }
  .order-actions {
    gap: 10px;
  }
  .order-actions .btn-primary,
  .order-actions .btn-secondary {
    flex: 1;
  }

  /* Form inputs: touch-friendly */
  .input {
    padding: 10px 12px;
    font-size: 1rem; /* prevents iOS zoom on focus */
    min-height: 44px;
  }

  /* Keypad: stack vertically */
  .keypad-layout {
    flex-direction: column;
    gap: 20px;
  }
  .keypad-sidebar {
    width: 100%;
    gap: 16px;
  }
  .keypad-grid {
    max-width: 100%;
    gap: 10px;
  }
  .kp-btn {
    aspect-ratio: auto;
    padding: 12px 4px;
    min-height: 64px;
  }
  .kp-num {
    font-size: 1.25rem;
  }
  .kp-desc {
    font-size: 0.625rem;
  }

  /* Mode toggle: taller */
  .mode-toggle__btn {
    padding: 10px 0;
    min-height: 44px;
  }

  /* Keypad actions: taller */
  .keypad-actions .btn-secondary,
  .keypad-actions .btn-primary {
    min-height: 44px;
  }

  /* Timeline: compact on mobile */
  .timeline {
    flex-wrap: wrap;
    gap: 4px;
  }
  .timeline::before {
    display: none;
  }
  .timeline-step {
    font-size: 0.625rem;
    padding: 2px 6px;
    border: 1px solid var(--color-border-subtle);
    background: var(--color-bg-card);
  }
  .timeline-step.active {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
  }
  .timeline-step.completed {
    background: var(--color-bg-hover);
  }

  /* Live order items */
  .live-order-item {
    padding: 10px;
  }
  .live-order-desc {
    font-size: 0.75rem;
  }

  /* Toast: above bottom nav */
  #toast-container {
    bottom: 70px;
    right: 12px;
    left: 12px;
  }
  .toast {
    text-align: center;
  }

  /* Password gate: edge-to-edge on small screens */
  .password-gate__card {
    width: calc(100% - 32px);
    max-width: 320px;
    padding: 36px 24px 28px;
  }
  .password-gate__input {
    padding: 12px 14px;
    font-size: 1rem;
    min-height: 44px;
  }
  .password-gate__btn {
    padding: 12px 16px;
    min-height: 44px;
  }
}

/* ── Small phones (< 380px) ─────────────────────────────────────────────── */
@media (max-width: 380px) {
  .content-area {
    padding: 12px 8px;
    padding-bottom: 70px;
  }
  .keypad-grid {
    gap: 6px;
  }
  .kp-btn {
    min-height: 56px;
  }
  .kp-num {
    font-size: 1.125rem;
  }
}


/* Lists */
.item-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.order-item {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-subtle);
}
.order-item:last-child {
  border-bottom: none;
}
.item-icon {
  margin-right: 12px;
  font-size: 1.25rem;
}
.item-details {
  flex: 1;
}
.item-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-primary);
}
.item-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}
.item-qty {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
  padding: 0 8px;
}

.item-remove {
  background: none;
  border: none;
  color: var(--color-text-faint);
  cursor: pointer;
  font-size: 0.875rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.item-remove:hover {
  background: hsla(0, 70%, 50%, 0.15);
  color: hsl(0, 70%, 60%);
}

.toggle-pill {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-faint);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  white-space: nowrap;
}
.toggle-pill:hover {
  border-color: var(--color-accent);
}
.toggle-pill.active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.add-item-row {
  display: flex;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-subtle);
  margin-top: 8px;
}
.add-item-row .input {
  font-size: 0.75rem;
  padding: 4px 6px;
}
.add-item-drink {
  flex: 2;
}
.add-item-size {
  width: 50px;
  flex-shrink: 0;
}
.add-item-milk {
  flex: 1;
}
.add-item-row .btn-primary {
  padding: 4px 10px;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.order-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border-subtle);
}

.order-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

/* Live Orders */
.order-status-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.live-order-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  padding: 12px;
}
.live-order-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.live-order-id {
  font-weight: 500;
  color: var(--color-text-primary);
  font-size: 0.875rem;
}
.live-order-time {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.live-order-desc {
  font-size: 0.8125rem;
  margin-bottom: 12px;
}
.status-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.status-btn {
  flex: 1;
  padding: 6px 12px;
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  background: var(--color-surface-raised);
  color: var(--color-text);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.status-btn.ready-btn:hover {
  background: hsl(30, 80%, 50%);
  color: #fff;
  border-color: hsl(30, 80%, 50%);
}
.status-btn.served-btn:hover {
  background: hsl(140, 60%, 40%);
  color: #fff;
  border-color: hsl(140, 60%, 40%);
}
.timeline {
  display: flex;
  justify-content: space-between;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--color-border);
  z-index: 1;
}
.timeline-step {
  position: relative;
  z-index: 2;
  font-size: 0.6875rem;
  background: var(--color-surface);
  color: var(--color-text-faint);
  padding: 0 4px;
}
.timeline-step.active {
  color: var(--color-text-primary);
  font-weight: 500;
}
.timeline-step.completed {
  color: var(--color-text-secondary);
}

/* Keypad */
.keypad-layout {
  display: flex;
  gap: 32px;
}
.keypad-grid-container {
  flex: 1;
}
.keypad-sidebar {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 400px;
  margin: 0 auto;
}
.kp-btn {
  background: linear-gradient(to bottom, #fff, #f4f4f4);
  border: 1px solid var(--color-border-strong);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--color-text-primary);
}
.kp-btn:hover {
  background: linear-gradient(to bottom, #fff, #eaeaea);
}
.kp-btn:active {
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
  background: #eaeaea;
}
.kp-btn.editing {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(0,136,204,0.3);
}
.kp-num {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1;
}
.kp-desc {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  margin-top: 4px;
  text-align: center;
  padding: 0 4px;
}

.keypad-actions {
  display: flex;
  gap: 8px;
  padding: 0;
}
.keypad-actions .btn-secondary,
.keypad-actions .btn-primary {
  flex: 1;
}

.mode-toggle {
  display: flex;
  border: 1px solid var(--color-border);
  margin-bottom: 16px;
}
.mode-toggle__btn {
  flex: 1;
  padding: 8px 0;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  border: none;
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.mode-toggle__btn:first-child {
  border-right: 1px solid var(--color-border);
}
.mode-toggle__btn--active {
  background: var(--color-accent);
  color: #fff;
}
.mode-toggle__btn:hover:not(.mode-toggle__btn--active) {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

/* Forms */
.form-body {
  gap: 12px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-group label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}
.input {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  padding: 6px 10px;
  font-size: 0.8125rem;
  font-family: inherit;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
  color: var(--color-text-primary);
}
.input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.06), 0 0 0 2px rgba(0, 136, 204, 0.15);
}
.checkbox-group {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(to bottom, var(--color-accent-light), var(--color-accent));
  color: #fff;
  border: none;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 6px 16px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-primary:hover {
  background: linear-gradient(to bottom, var(--color-accent-hover-from), var(--color-accent-hover-to));
}
.btn-primary:active {
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.btn-secondary {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 5px 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-secondary:hover {
  border-color: var(--color-border);
  color: var(--color-text-primary);
  background: var(--color-bg-card);
}

/* Utilities */
.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Toast */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}
.toast {
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 10px 16px;
  font-size: 0.8125rem;
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.2s ease-out;
}

/* Password Gate */
.password-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}
.password-gate__card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-window);
  padding: 48px 40px 40px;
  width: 320px;
  text-align: center;
}
.password-gate__emoji {
  font-size: 3rem;
  margin-bottom: 8px;
}
.password-gate__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}
.password-gate__subtitle {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}
.password-gate__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.password-gate__input {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  padding: 10px 14px;
  font-size: 0.875rem;
  font-family: inherit;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
  color: var(--color-text-primary);
  text-align: center;
  letter-spacing: 0.15em;
}
.password-gate__input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.06), 0 0 0 2px rgba(0, 136, 204, 0.15);
}
.password-gate__btn {
  background: linear-gradient(to bottom, var(--color-accent-light), var(--color-accent));
  color: #fff;
  border: none;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  padding: 10px 16px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.password-gate__btn:hover {
  background: linear-gradient(to bottom, var(--color-accent-hover-from), var(--color-accent-hover-to));
}
.password-gate__error {
  font-size: 0.75rem;
  color: var(--color-error);
  margin-top: 8px;
  min-height: 1.2em;
}

@keyframes gateShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.password-gate__card--shake {
  animation: gateShake 0.4s ease-out;
}

/* ── Order Name Row ── */
.order-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 4px;
  border-top: 1px solid var(--color-border-subtle);
  margin-top: 8px;
}
.order-name-row label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  font-weight: 500;
}
.order-name-row .input {
  flex: 1;
  font-size: 0.8rem;
  padding: 5px 8px;
  border-radius: 4px;
}

/* ── Clear All button in titlebar ── */
.btn-text {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.65rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
  transition: all 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.btn-text:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-error);
}

/* ── Favourites Grid ── */
.favourites-card .card__body {
  padding: 10px;
}
.favourites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px;
}
.fav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  border: 1px solid var(--color-border-subtle);
  border-radius: 6px;
  background: var(--color-bg-elevated);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 56px;
}
.fav-btn:hover {
  border-color: var(--color-accent);
  background: #f0f8ff;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.fav-btn:active {
  transform: translateY(0);
}
.fav-btn__name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-primary);
  text-align: center;
  line-height: 1.2;
}
.fav-btn__meta {
  font-size: 0.6rem;
  color: var(--color-text-muted);
  margin-top: 2px;
  text-align: center;
}
.favourites-empty {
  font-size: 0.75rem;
  color: var(--color-text-faint);
  text-align: center;
  padding: 12px;
}

/* ── Mobile favourites ── */
@media (max-width: 768px) {
  .favourites-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .order-name-row {
    padding: 6px 0 2px;
  }
}
