/* Pitbay Center App — components.css */

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: var(--font-base);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  white-space: nowrap;
}
.btn:active { opacity: .85; transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary   { background: var(--navy);  color: #fff; }
.btn-green     { background: var(--green); color: #fff; }
.btn-red       { background: var(--red);   color: #fff; }
.btn-orange    { background: var(--orange);color: #fff; }
.btn-outline   { background: transparent; border: 1.5px solid var(--border-medium); color: var(--text-primary); }
.btn-ghost     { background: var(--bg-tertiary); color: var(--text-primary); }
.btn-full      { width: 100%; border-radius: var(--radius-md); }
.btn-sm        { padding: 6px 14px; font-size: var(--font-sm); }

/* ── CARDS ── */
.card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: .5px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-pad { padding: 14px; }

/* ── STAT CARD ── */
.stat-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: .5px solid var(--border-light);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-icon  { font-size: 22px; line-height: 1; }
.stat-value { font-size: 24px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; }

/* ── STATUS BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-new       { background: #e3f2fd; color: #1565c0; }
.badge-confirmed { background: #e8f5e9; color: #2e7d32; }
.badge-arrived   { background: #fff3e0; color: #e65100; }
.badge-washing   { background: #e8eaf6; color: #3949ab; }
.badge-done      { background: #e8f5e9; color: #1b5e20; }
.badge-cancelled { background: #fce4ec; color: #b71c1c; }

/* ── BOOKING CARD ── */
.booking-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: .5px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
}
.booking-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}
.booking-customer  { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.booking-ref       { font-size: 12px; color: var(--text-tertiary); margin-top: 1px; }
.booking-info-row  {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.booking-info-row .ico { font-size: 15px; }
/* Car size / bike badge on bookings */
.car-size-pill {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 12.5px; font-weight: 800; letter-spacing: .01em;
  padding: 2px 8px; border-radius: 20px; margin-left: 6px;
  background: var(--teal-tint, #EAF1FC); color: var(--navy);
  border: 1px solid var(--teal-tint-border, #D6E4FB);
}
.car-size-pill.bike { background: #fff4e5; color: #b45309; border-color: #fed7aa; }
.booking-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.booking-actions .btn { flex: 1; padding: 8px 10px; font-size: 14px; }

/* ── QUEUE CARD ── */
.queue-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--navy);
  box-shadow: var(--shadow-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.queue-card.washing { border-left-color: #3949ab; }
.queue-card.arrived { border-left-color: var(--orange); }
.queue-num  {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800;
  flex-shrink: 0;
}
.queue-info { flex: 1; min-width: 0; }
.queue-name  { font-size: 15px; font-weight: 700; }
.queue-sub   { font-size: 13px; color: var(--text-secondary); }
.queue-time  { font-size: 13px; color: var(--text-tertiary); white-space: nowrap; }

/* ── SLOT GRID V2 (with capacity) ── */
.slot-grid-v2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.slot-chip-v2 {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-medium);
  padding: 8px 6px 6px;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
  user-select: none;
  overflow: hidden;
}
.slot-chip-v2:active { transform: scale(.94); }

/* States */
.sc-free    { background: #f1f8e9; border-color: #a5d6a7; }
.sc-partial { background: #fff8e1; border-color: #ffe082; }
.sc-full    { background: #fce4ec; border-color: #f48fb1; }
.sc-blocked { background: #f3e5f5; border-color: #ce93d8; }

.sc-time {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 3px;
}
.sc-cap {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sc-cap-free    { color: #2e7d32; }
.sc-cap-partial { color: #e65100; }
.sc-cap-full    { color: #c62828; }
.sc-cap-blocked { color: #6a1b9a; }

/* Mini progress bar */
.sc-bar {
  height: 3px;
  background: rgba(0,0,0,.08);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 2px;
}
.sc-bar-fill    { height: 100%; border-radius: 2px; transition: width .3s; }
.sc-bar-free    { background: #66bb6a; }
.sc-bar-partial { background: #ffa726; }
.sc-bar-full    { background: #ef5350; }

/* ── SLOT EDIT SHEET ── */
.slot-edit-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 50;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s;
}
.slot-edit-overlay.show { opacity: 1; pointer-events: all; }

.slot-edit-sheet {
  width: 100%;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding-bottom: 24px;
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.32,0,.24,1);
}
.slot-edit-overlay.show .slot-edit-sheet { transform: translateY(0); }

.slot-edit-handle-bar { padding: 10px 0 4px; text-align: center; }
.slot-edit-handle {
  width: 36px; height: 4px;
  border-radius: 2px;
  background: var(--border-medium);
  display: inline-block;
}
.slot-edit-header { padding: 4px 18px 12px; border-bottom: .5px solid var(--border-light); }
.slot-edit-title  { font-size: 19px; font-weight: 800; color: var(--text-primary); }
.slot-edit-sub    { font-size: 14px; color: var(--text-secondary); margin-top: 2px; }

.slot-edit-info {
  margin: 10px 16px 0;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.5;
}
.info-blue { background: #e3f2fd; color: #1565c0; }
.info-red  { background: #fce4ec; color: #c62828; }

.slot-edit-section {
  padding: 14px 18px;
  border-bottom: .5px solid var(--border-light);
}
.slot-edit-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

/* ── CAPACITY STEPPER ── */
.capacity-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: var(--bg-tertiary);
  border-radius: var(--radius-pill);
  padding: 4px;
  width: fit-content;
  margin: 0 auto;
}
.cap-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: #fff;
  font-size: 24px;
  font-weight: 300;
  color: var(--navy);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: background .12s, transform .1s;
  flex-shrink: 0;
}
.cap-btn:active  { background: #e8eaf6; transform: scale(.92); }
.cap-btn:disabled { color: var(--text-tertiary); cursor: default; box-shadow: none; }

.cap-value {
  font-size: 30px;
  font-weight: 900;
  color: var(--navy);
  min-width: 60px;
  text-align: center;
  line-height: 1;
}

.slot-edit-actions {
  display: flex;
  gap: 10px;
  padding: 14px 18px 0;
}
.slot-edit-actions .btn { flex: 1; }

/* ── COPY-DAY BUTTON (slots header) ── */
.slots-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.copy-day-btn {
  background: rgba(255,255,255,.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
  font-size: 14px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background .15s;
}
.copy-day-btn:active { background: rgba(255,255,255,.32); }

/* ── PER-SLOT COPY LINK (inside slot edit sheet) ── */
.copy-slot-link {
  display: block;
  width: 100%;
  margin: 12px 0 0;
  padding: 10px;
  background: transparent;
  border: none;
  color: var(--navy, #0b3f8a);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.copy-slot-link:active { opacity: .6; }

/* ── COPY SHEET (calendar picker) ── */
.copy-body {
  padding: 4px 14px 8px;
  max-height: 70vh;
  overflow-y: auto;
}
.copy-body::-webkit-scrollbar { display: none; }
.copy-section { margin-top: 12px; }
.copy-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary, #6b7280);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}

/* Wash-type scope toggle (segmented control) */
.copy-scope-toggle {
  display: flex;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.copy-scope-btn {
  flex: 1;
  padding: 7px 10px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary, #6b7280);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.copy-scope-btn.on {
  background: #fff;
  color: var(--navy, #0b3f8a);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* Quick-select chips (This week / Weekdays / etc.) */
.copy-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.copy-chip {
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #111827);
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.copy-chip:active { transform: scale(0.97); }
.copy-chip:hover { background: #f9fafb; }
.copy-chip-clear {
  color: #ef4444;
  border-color: #fecaca;
}
.copy-chip-clear:hover { background: #fef2f2; }

/* Calendar grid */
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 8px;
}
.cal-nav {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary, #111827);
  cursor: pointer;
  line-height: 1;
}
.cal-nav:active { background: #e2e8f0; }
.cal-head-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary, #111827);
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-tertiary, #9ca3af);
  text-align: center;
  padding: 4px 0 6px;
  letter-spacing: 0.04em;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-cell {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid transparent;
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: inherit;
  transition: background .12s, border-color .12s, transform .05s;
}
.cal-cell:not(:disabled):active { transform: scale(0.94); }
.cal-cell.cal-empty {
  background: transparent;
  cursor: default;
  border: none;
}
.cal-num {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary, #111827);
}
.cal-cell:hover:not(:disabled):not(.cal-src):not(.cal-sel) { background: #f1f5f9; }

.cal-past { opacity: 0.32; cursor: not-allowed; }
.cal-past .cal-num { color: var(--text-tertiary, #9ca3af); }

.cal-today { border-color: var(--navy, #0b3f8a); }
.cal-today .cal-num { color: var(--navy, #0b3f8a); font-weight: 800; }

.cal-src {
  background: #fef3c7;
  border-color: #f59e0b;
  cursor: default;
}
.cal-src .cal-num { color: #92400e; font-weight: 800; }
.cal-src::after {
  content: 'FROM';
  position: absolute;
  bottom: 2px;
  font-size: 9px;
  font-weight: 800;
  color: #92400e;
  letter-spacing: 0.08em;
}

.cal-sel {
  background: var(--navy, #0b3f8a);
  border-color: var(--navy, #0b3f8a);
  box-shadow: 0 3px 8px rgba(30, 64, 175, 0.28);
}
.cal-sel .cal-num { color: #fff; }
.cal-sel::after {
  content: '✓';
  position: absolute;
  bottom: 1px;
  right: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
}

.cal-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 1.5px #fff;
}

.cal-legend {
  display: flex;
  justify-content: space-around;
  margin-top: 10px;
  padding: 8px;
  background: #f9fafb;
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-secondary, #6b7280);
  font-weight: 600;
}
.cal-legend span { display: inline-flex; align-items: center; gap: 4px; }
.cal-legend-src {
  width: 10px; height: 10px; border-radius: 3px;
  background: #fef3c7; border: 1px solid #f59e0b;
  display: inline-block;
}
.cal-legend-sel {
  width: 10px; height: 10px; border-radius: 3px;
  background: var(--navy, #0b3f8a);
  display: inline-block;
}
.cal-legend-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444;
  display: inline-block;
}

/* Selected-dates chip strip */
.sel-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 100px;
  overflow-y: auto;
}
.sel-strip::-webkit-scrollbar { display: none; }
.sel-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy, #0b3f8a);
  cursor: pointer;
}
.sel-chip-conflict {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.sel-x { font-size: 14px; opacity: 0.7; }
.sel-chip:hover .sel-x { opacity: 1; }

/* Summary */
.copy-summary {
  margin-top: 12px;
  padding: 10px 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  font-size: 14px;
  color: #0b3f8a;
  text-align: center;
}
.copy-summary-empty {
  background: #f9fafb;
  border-color: #e5e7eb;
  color: var(--text-tertiary, #9ca3af);
}
.copy-summary-warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

/* ── CONFLICT CONFIRMATION POPUP ── */
.copy-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 18px;
  pointer-events: none;
  transition: background .22s ease;
}
.copy-confirm-overlay.show {
  background: rgba(15, 23, 42, 0.55);
  pointer-events: auto;
}
.copy-confirm-card {
  width: 100%;
  max-width: 340px;
  background: #fff;
  border-radius: 20px;
  padding: 22px 18px 12px;
  box-shadow: 0 20px 48px rgba(0,0,0,.28);
  transform: scale(0.92) translateY(8px);
  opacity: 0;
  transition: transform .26s cubic-bezier(.18,.89,.32,1.18), opacity .2s;
}
.copy-confirm-overlay.show .copy-confirm-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.copy-confirm-hero {
  font-size: 40px;
  text-align: center;
  line-height: 1;
  margin-bottom: 10px;
}
.copy-confirm-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary, #111827);
  text-align: center;
  margin-bottom: 10px;
}
.copy-confirm-body {
  font-size: 15px;
  color: var(--text-secondary, #6b7280);
  line-height: 1.5;
}
.cc-list {
  list-style: none;
  padding: 0;
  margin: 10px 0;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  max-height: 180px;
  overflow-y: auto;
}
.cc-list li {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #fee2e2;
  font-size: 14px;
  color: var(--text-primary, #111827);
}
.cc-list li:last-child { border-bottom: none; }
.cc-count {
  color: #b91c1c;
  font-weight: 700;
  font-size: 13px;
}
.cc-more {
  justify-content: center !important;
  color: var(--text-tertiary, #9ca3af) !important;
  font-style: italic;
}
.cc-note {
  font-size: 13px;
  color: var(--text-tertiary, #9ca3af);
  font-style: italic;
  text-align: center;
  margin-top: 6px;
  line-height: 1.45;
}
.copy-confirm-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.copy-confirm-actions .btn { flex: 1; }

/* ── SLOT DATE STRIP (horizontally scrolling day picker) ── */
.slot-date-strip {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
  border-bottom: 1px solid var(--border-light, #f1f5f9);
  padding: 8px 0 10px;
  flex-shrink: 0;
}
.slot-date-strip-scroll {
  display: flex;
  gap: 6px;
  padding: 0 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.slot-date-strip-scroll::-webkit-scrollbar { display: none; }

.sds-pill {
  flex-shrink: 0;
  width: 56px;
  padding: 8px 4px 9px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  text-align: center;
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .05s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: inherit;
}
.sds-pill:active { transform: scale(0.96); }

.sds-day {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-tertiary, #9ca3af);
  letter-spacing: 0.04em;
  line-height: 1;
}
.sds-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary, #111827);
  line-height: 1.1;
}
.sds-mon {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary, #9ca3af);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
}

/* Weekend tinting */
.sds-pill.wk .sds-num { color: #ef4444; }

/* Today indicator (when NOT selected) */
.sds-pill.today { border-color: var(--navy, #0b3f8a); }
.sds-pill.today .sds-day {
  color: var(--navy, #0b3f8a);
  font-weight: 800;
}

/* Selected state — always wins */
.sds-pill.on {
  background: var(--navy, #0b3f8a);
  border-color: var(--navy, #0b3f8a);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.28);
}
.sds-pill.on .sds-day,
.sds-pill.on .sds-num,
.sds-pill.on .sds-mon { color: #fff; }
.sds-pill.on.wk .sds-num { color: #fff; }

/* ── WASH TYPE TABS ── */
.wash-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  overflow-x: auto;
  flex-shrink: 0;
}
.wash-tabs::-webkit-scrollbar { display: none; }
.wash-tab {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  border: 1.5px solid var(--border-medium);
  background: var(--bg-primary);
  color: var(--text-secondary);
  transition: all .15s;
  flex-shrink: 0;
}
.wash-tab.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* ── FILTER TABS ── */
.filter-tabs {
  display: flex;
  gap: 0;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 3px;
}
.filter-tab {
  flex: 1;
  padding: 7px 6px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all .15s;
  white-space: nowrap;
}
.filter-tab.active {
  background: var(--bg-primary);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

/* ── OTP INPUT ── */
.otp-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 16px 0;
}
.otp-box {
  width: 44px; height: 50px;
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-secondary);
  transition: border-color .15s;
  outline: none;
}
.otp-box:focus { border-color: var(--navy); background: #fff; }

/* ── TEXT INPUT ── */
.input-group { margin-bottom: 14px; }
.input-label { font-size: 13px; font-weight: 700; color: var(--text-secondary); margin-bottom: 5px; }
.input-field {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: var(--font-base);
  color: var(--text-primary);
  background: var(--bg-secondary);
  outline: none;
  transition: border-color .15s;
}
.input-field:focus { border-color: var(--navy); background: #fff; }
.input-with-icon { position: relative; }
.input-with-icon .input-field { padding-left: 36px; }
.input-with-icon .input-ico {
  position: absolute; left: 11px; top: 50%;
  transform: translateY(-50%);
  font-size: 18px; color: var(--text-tertiary);
  pointer-events: none;
}

/* ── TOGGLE SWITCH ── */
.toggle-wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0;
}
.toggle-label { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.toggle-sub   { font-size: 13px; color: var(--text-secondary); margin-top: 1px; }
.toggle {
  position: relative;
  width: 42px; height: 24px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--border-medium);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background .2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.toggle input:checked + .toggle-slider { background: var(--green); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ── EMPTY STATE ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
  gap: 8px;
}
.empty-state .empty-ico  { font-size: 44px; }
.empty-state .empty-title { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.empty-state .empty-sub   { font-size: 14px; color: var(--text-secondary); }

/* ── MENU ROW ── */
.menu-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  cursor: pointer;
  border-bottom: .5px solid var(--border-light);
}
.menu-row:last-child { border-bottom: none; }
.menu-row:active { background: var(--bg-tertiary); }
.menu-ico  { font-size: 20px; width: 24px; text-align: center; flex-shrink: 0; }
.menu-text { flex: 1; }
.menu-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.menu-sub   { font-size: 13px; color: var(--text-secondary); margin-top: 1px; }
.menu-arrow { font-size: 14px; color: var(--text-tertiary); }

/* ── OPEN STATUS BANNER ── */
.open-banner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}
.open-banner.open   { background: #e8f5e9; color: #2e7d32; }
.open-banner.closed { background: #fce4ec; color: #c62828; }

/* ── CUSTOMER CHAT ── */
.chat-empty { padding: 28px 18px; text-align: center; color: var(--muted); font-size: 15px; }

/* Thread list rows */
.chat-thread-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border-light); cursor: pointer; }
.chat-thread-row:active { background: var(--bg-secondary); }
.chat-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; flex-shrink: 0; }
.ctr-mid { flex: 1; min-width: 0; }
.ctr-top { display: flex; justify-content: space-between; gap: 8px; }
.ctr-name { font-weight: 700; font-size: 15px; color: var(--text-primary, #202124); }
.ctr-time { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.ctr-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.ctr-badge { background: #dc2626; color: #fff; font-size: 12px; font-weight: 800; min-width: 20px; height: 20px; border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 0 5px; }

/* Conversation view */
.cchat-messages { flex: 1; overflow-y: auto; padding: 14px 12px; background: var(--bg-secondary); display: flex; flex-direction: column; }
.chat-row { display: flex; margin-bottom: 8px; }
.chat-row-user  { justify-content: flex-end; }
.chat-row-admin { justify-content: flex-start; }
.chat-bubble { max-width: 78%; padding: 8px 12px; border-radius: 14px; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.chat-bubble-user  { background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.chat-bubble-admin { background: #fff; color: #202124; border-bottom-left-radius: 4px; }
.chat-bubble-text { font-size: 15px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.chat-bubble-meta { font-size: 11px; opacity: .8; margin-top: 3px; text-align: right; }
.chat-system { align-self: center; text-align: center; font-size: 12.5px; color: var(--muted); background: #fff; border-radius: 10px; padding: 5px 12px; margin: 8px auto; max-width: 88%; }
.chat-ticks { font-size: 11px; }

.cchat-composer { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border-light); background: #fff; }
.cchat-input { flex: 1; border: 1px solid var(--border-medium); border-radius: 22px; padding: 11px 16px; font-size: 15px; outline: none; }
.cchat-input:focus { border-color: var(--blue); }
.cchat-send { width: 44px; height: 44px; border: none; border-radius: 50%; background: var(--blue); color: #fff; font-size: 18px; cursor: pointer; flex-shrink: 0; }
.cchat-send:active { background: var(--navy); }
