/* Refined Operational Design System · Dispatch (aligned with dispatch-refined-concept.png) */
:root {
  --ink: #172b3a;
  --ink-secondary: #385365;
  --muted: #72808d;
  --bg: #ffffff;
  --surface: #ffffff;
  --sidebar-bg: #f6f8f9;
  --border: #e7ebee;
  --border-light: #e7ebee;
  --border-strong: #d5e1e3;
  --primary: #007c70;
  --primary-hover: #006b61;
  --primary-light: #e3f1ef;
  --primary-soft: #f0f9f7;
  --primary-glow: rgba(0, 124, 112, 0.14);
  --warning: #9b690c;
  --warning-bg: #fff2d6;
  --warning-border: #eed49c;
  --critical: #bc4050;
  --critical-bg: #ffeaed;
  --critical-border: #efc8ce;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: -0.15px;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Typography & Hierarchy */
h1 {
  font-size: 36px;
  font-weight: 680;
  letter-spacing: -1.3px;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 6px;
}

h2 {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.4px;
  color: var(--ink);
  margin: 0 0 10px;
}

h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
}

h4 {
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
  margin: 0 0 8px;
}

p {
  margin-top: 0;
}

.muted {
  color: var(--muted);
}

small, .small {
  font-size: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Controls: Buttons & Inputs */
button {
  border-radius: 6px;
  font-size: 13px;
  font-weight: 550;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--ink);
  min-height: 42px;
  padding: 9px 15px;
  box-shadow: 0 1px 2px rgba(23, 43, 58, 0.03);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

button:hover {
  background: #f5f8f8;
  border-color: #bfcdd0;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.primary {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 3px rgba(0, 124, 112, 0.12);
}

button.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

button.danger {
  color: var(--critical);
  border-color: var(--critical-border);
  background: #ffffff;
}

button.danger:hover {
  background: var(--critical-bg);
  border-color: var(--critical);
}

button:focus-visible,
a:focus-visible,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #008c7a;
  outline-offset: 2px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border-radius: 6px;
  border: 1px solid #dce3e6;
  background: #ffffff;
  color: var(--ink);
  padding: 9px 12px;
  font-size: 15px;
  box-shadow: none;
  transition: border-color 0.14s ease;
}

input::placeholder,
textarea::placeholder {
  color: #8a959f;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #bfcdd0;
}

textarea {
  resize: vertical;
  min-height: 86px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

/* Icons, Monograms & Brand */
.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand {
  font-size: 23px;
  letter-spacing: -0.7px;
  font-weight: 750;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand img {
  border-radius: 6px;
}

.monogram {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: #546777;
  background: #edf1f4;
  letter-spacing: 0.2px;
}

/* ==================== LIGHT ARCHITECTURAL SIDEBAR ==================== */
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 228px;
  background: var(--sidebar-bg);
  color: var(--ink);
  padding: 26px 14px 20px;
  display: flex;
  flex-direction: column;
  z-index: 40;
  border-right: 1px solid var(--border);
  box-shadow: none;
  transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: visible;
}

.sidebar-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.sidebar-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.16s ease;
}

.sidebar-logo-link:hover {
  transform: scale(1.05);
}

.sidebar-logo-img {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  flex-shrink: 0;
}

.sidebar-brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-brand-title {
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.7px;
  color: var(--ink);
  line-height: 1.1;
}

.workspace-caption {
  margin: 4px 0 0;
  font-size: 11.5px;
  font-weight: 450;
  color: var(--muted);
  letter-spacing: 0;
  white-space: nowrap;
}

.sidebar-nav-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nav-section-title {
  font-size: 10.5px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8796a3;
  padding: 4px 12px 2px;
  white-space: nowrap;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav a {
  color: #536575;
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-height: 42px;
  position: relative;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease;
}

.nav a .icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

.nav a:hover {
  background: #eaf0f2;
  color: var(--ink);
}

.nav a.active {
  background: var(--primary-light);
  color: #006b61;
  font-weight: 650;
  box-shadow: none;
}

.nav-badge {
  margin-left: auto;
  background: #d5ece8;
  color: #006b61;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 99px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.nav a.active .nav-badge {
  background: #007c70;
  color: #ffffff;
}

/* Sidebar Account Footer */
.sidebar-account {
  margin-top: auto;
  padding: 16px 8px 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-account-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 2px;
}

.sidebar-account-box .monogram {
  width: 32px;
  height: 32px;
  font-size: 11px;
  background: #e4eaee;
  color: #485b6b;
}

.account-identity {
  min-width: 0;
  flex: 1;
}

.account-identity strong {
  display: block;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-identity .small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-logout-btn {
  width: auto;
  align-self: flex-start;
  background: transparent;
  border: 0;
  color: #586c79;
  font-size: 13px;
  font-weight: 500;
  min-height: 36px;
  padding: 6px 4px;
  box-shadow: none;
  gap: 10px;
}

.sidebar-logout-btn:hover {
  background: transparent;
  color: var(--primary);
  border-color: transparent;
}

/* Collapsed Sidebar State */
.sidebar.collapsed {
  width: 68px;
  padding: 24px 8px 18px;
}

.sidebar.collapsed .sidebar-logo-container {
  justify-content: center;
  padding: 0 0 20px;
}

.sidebar.collapsed .sidebar-brand-copy,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .account-identity,
.sidebar.collapsed .sidebar-logout-btn span {
  display: none !important;
}

.sidebar.collapsed .nav a {
  justify-content: center;
  padding: 10px 0;
}

.sidebar.collapsed .nav-badge {
  position: absolute;
  top: 7px;
  right: 9px;
  width: 7px;
  height: 7px;
  padding: 0;
  font-size: 0;
  border-radius: 50%;
  background: var(--primary);
}

.sidebar.collapsed .sidebar-account-box,
.sidebar.collapsed .sidebar-logout-btn {
  justify-content: center;
  align-self: center;
  padding: 6px;
}

@keyframes tooltipSlideIn {
  from { opacity: 0; transform: translateY(-50%) translateX(-4px); }
  to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

.sidebar.collapsed .nav a:hover::after {
  content: attr(data-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--ink);
  color: #ffffff;
  font-size: 12px;
  font-weight: 550;
  padding: 5px 10px;
  border-radius: 5px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(23, 43, 58, 0.18);
  z-index: 1000;
  pointer-events: none;
  animation: tooltipSlideIn 0.14s ease forwards;
}

/* ==================== WORKSPACE & PAGE HEADER ==================== */
.workspace {
  margin-left: 228px;
  min-height: 100vh;
  padding: 42px 44px 48px;
  max-width: 1720px;
  background: #ffffff;
  transition: margin-left 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.workspace.sidebar-collapsed {
  margin-left: 68px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.page-head-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.sidebar-toggle-btn {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  margin-top: 4px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: #536575;
  border-radius: 6px;
  box-shadow: none;
  flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
  background: #f6f8f9;
  color: var(--ink);
  border-color: #cbd5db;
}

.sidebar-toggle-btn .icon {
  width: 17px;
  height: 17px;
}

.page-head p {
  margin: 0;
  font-size: 14px;
  color: #6e8190;
  letter-spacing: 0;
}

.head-tools {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.head-tools button {
  min-height: 42px;
  padding: 9px 15px;
}

.head-tools .icon {
  width: 16px;
  height: 16px;
}

.status-block {
  text-align: right;
}

.connection {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--ink);
  background: transparent;
  border: 0;
  padding: 0;
}

.connection .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #269d71;
}

.connection.pending {
  color: var(--warning);
}

.connection.pending .dot {
  background: currentColor;
}

.connection.offline {
  color: var(--muted);
}

.connection.offline .dot {
  background: currentColor;
}

.updated {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 2px;
}

.btn-outline-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 15px;
  min-height: 42px;
  font-size: 13px;
  font-weight: 550;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(23, 43, 58, 0.03);
}

.btn-outline-link:hover {
  background: #f5f8f8;
  border-color: #bfcdd0;
}

/* ==================== OPEN SUMMARY METRIC STRIP ==================== */
.metrics {
  display: flex;
  border-top: 1px solid var(--border);
  border-bottom: 0;
  padding: 28px 0 32px;
  margin-bottom: 8px;
  gap: 0;
}

.metric {
  flex: 1;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  background: none;
  box-shadow: none;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  min-height: 68px;
}

.metric:first-child {
  padding-left: 6px;
}

.metric:last-child {
  border-right: 0;
}

.metric strong,
.metric.warning strong,
.metric.critical strong {
  font-size: 46px;
  color: var(--ink);
  font-weight: 620;
  letter-spacing: -1.8px;
  line-height: 1;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.metric strong.metric-money {
  font-size: 32px;
  letter-spacing: -1.2px;
}

.metric span {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.metric small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0;
}

/* ==================== UNDERLINE FILTER TABS ==================== */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

/* ==================== MODERN UNIFIED SEGMENTED TAB STRIPS ==================== */
.filters,
.storefront-mobile-tabs,
.prod-filter-pills,
.log-cat-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #e2e8f0;
  margin-bottom: 12px;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 9px;
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filters::-webkit-scrollbar,
.storefront-mobile-tabs::-webkit-scrollbar,
.prod-filter-pills::-webkit-scrollbar,
.log-cat-chips::-webkit-scrollbar {
  display: none;
}

.filter-bar .filters {
  border: 1px solid #e2e8f0;
}

.filters button,
.storefront-tab-btn,
.prod-filter-pills button,
.log-cat-chip {
  flex: 0 0 auto;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 5px 12px;
  min-height: 30px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  background: #ffffff;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.filters button:hover,
.storefront-tab-btn:hover,
.prod-filter-pills button:hover,
.log-cat-chip:hover {
  color: #0f172a;
  background: #f8fafc;
  border-color: #94a3b8;
}

.filters button.active,
.storefront-tab-btn.active,
.prod-filter-pills button.active,
.log-cat-chip.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 124, 112, 0.28);
}

/* ==================== CONTINUOUS HAIRLINE ROWS ==================== */
.queue-table {
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  overflow: visible;
  margin-bottom: 20px;
}

.queue-row {
  display: grid;
  grid-template-columns: 54px minmax(220px, 1fr) 136px 132px 116px 122px;
  gap: 14px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: #ffffff;
  margin: 0;
  font-size: 13px;
  align-items: center;
  transition: background 0.12s ease;
}

.queue-row:last-child {
  border-bottom: 1px solid var(--border);
}

.queue-row.table-head {
  background: #ffffff;
  padding: 20px 12px 14px;
  color: #687a89;
  font-size: 11.5px;
  font-weight: 550;
  text-transform: none;
  letter-spacing: 0;
  border-bottom: 1px solid var(--border);
}

.queue-row.is-next {
  background: var(--primary-soft);
  border-left: 0;
}

.queue-row:not(.table-head):hover {
  background: #f8fafb;
}

.queue-row.is-next:hover {
  background: #eaf6f3;
}

.queue-row .rank {
  align-self: center;
  font-variant-numeric: tabular-nums;
}

.rank strong {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.next-label {
  display: block;
  color: var(--primary);
  font-size: 9.5px;
  font-weight: 550;
  line-height: 1.3;
  max-width: 48px;
  margin-top: 3px;
  background: none;
  padding: 0;
  text-transform: none;
  letter-spacing: 0;
}

.customer-col {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.customer-col > div {
  min-width: 0;
}

.customer-col strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.queue-row .sub {
  display: block;
  font-size: 11.5px;
  color: #788894;
  margin-top: 4px;
}

.separator {
  padding: 0 6px;
  color: #aeb9c1;
}

.order-ref {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1px;
  white-space: nowrap;
  color: #788894;
  font-family: inherit;
  font-weight: 500;
}

.source-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: #e3f1ef;
  color: #006b61;
  font-size: 10px;
  font-weight: 600;
  margin-left: 4px;
}

.queue-row .booked-col {
  display: block;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.queue-row .booked-col .sub {
  margin-top: 3px;
}

.relative-age {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.age-status {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 450;
}

.age-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.age-status.critical .dot {
  background: #cf5663;
}

.age-status.warning .dot {
  background: #ce9b38;
}

.age-status.normal .dot {
  background: #44997a;
}

.amount-col {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.amount-col strong {
  font-weight: 550;
  font-size: 13.5px;
  color: var(--ink);
}

.queue-row .row-action,
.history-side .row-action {
  border: 1px solid var(--border-strong);
  font-size: 12.5px;
  color: #126d65;
  padding: 8px 12px;
  min-height: 38px;
  gap: 12px;
  background: transparent;
  border-radius: 6px;
  box-shadow: none;
  font-weight: 550;
}

.queue-row .row-action:hover,
.history-side .row-action:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.row-action > span:last-child {
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.mobile-label {
  display: none;
}

.footnote {
  font-size: 11.5px;
  margin-top: 18px;
  letter-spacing: 0;
  color: #88959f;
}

.empty {
  border: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 64px 20px;
  background: #fafcfc;
  text-align: center;
  color: var(--muted);
}

.empty h2 {
  color: var(--ink);
  font-size: 18px;
  margin-bottom: 6px;
}

/* ==================== BADGES & MESSAGES ==================== */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1px;
  border-radius: 4px;
  padding: 4px 8px;
  text-transform: capitalize;
  white-space: nowrap;
}

.badge.normal,
.badge.dispatched {
  background: #e8f6ef;
  color: #1f6e4c;
}

.badge.warning,
.badge.pending {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge.critical,
.badge.cancelled {
  background: var(--critical-bg);
  color: var(--critical);
}

.message {
  padding: 12px 16px;
  border-radius: 6px;
  border: 1px solid #b8dbd2;
  background: #e8f6ef;
  color: #276c50;
  margin-bottom: 18px;
  font-size: 13.5px;
}

.message.error {
  background: #fff0f2;
  border-color: #efc8ce;
  color: #a42135;
}

.sync-bar {
  padding: 12px 16px;
  background: #fffcf5;
  color: #80500a;
  border: 0;
  border-left: 3px solid #d3ab59;
  border-radius: 0;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ==================== NEW ORDER BOOKING (OPEN SPLIT) ==================== */
.booking-layout {
  max-width: 1120px;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 295px;
  gap: 52px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
  align-items: start;
}

.booking-form {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.booking-form label {
  font-size: 13px;
  font-weight: 600;
}

.field {
  margin-bottom: 28px;
}

.field-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
}

/* Customer Channel Selector & Compact Booking Controls */
.booking-controls-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 8px 10px;
  margin-bottom: 8px;
}
.booking-channel-segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  background: #e2e8f0;
  border-radius: 7px;
  padding: 2px;
  margin-bottom: 8px;
}
.channel-segment-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 5px !important;
  box-shadow: none !important;
  white-space: nowrap !important;
  cursor: pointer;
  transition: all 0.12s ease;
}
.channel-segment-btn .icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.channel-segment-btn.active {
  background: #ffffff !important;
  color: #007c70 !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08) !important;
}
.channel-segment-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.5) !important;
  color: #0f172a !important;
}

.booking-panel-cust {
  padding-top: 2px;
}
.booking-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}
.booking-section-label {
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #64748b !important;
  margin: 0 !important;
}
.btn-quick-add-link {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #007c70 !important;
  background: #e6f6f3 !important;
  border: 1px solid #9bd3cb !important;
  border-radius: 5px !important;
  padding: 2px 8px !important;
  min-height: 22px !important;
  height: 22px !important;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.btn-quick-add-link:hover {
  background: #d1f0ea !important;
}

.ind-compact-grid {
  gap: 6px !important;
}
.ind-compact-label {
  font-size: 10.5px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  margin-bottom: 2px !important;
  display: block;
}
.compact-input {
  min-height: 32px !important;
  height: 32px !important;
  font-size: 12px !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  width: 100%;
}
.walkin-compact-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: #f0fdf9;
  border: 1px solid #99f6e4;
  border-radius: 7px;
  padding: 6px 10px;
}
.walkin-compact-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #0f766e;
}

/* Catalog Toolbar & Category Pills */
.booking-catalog-toolbar {
  margin-bottom: 6px;
}
.booking-search-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 6px;
}
.booking-search-wrap input#product-search {
  width: 100%;
  min-height: 34px !important;
  height: 34px !important;
  font-size: 12.5px !important;
  padding: 3px 30px 3px 32px !important;
  border-radius: 7px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
}
.booking-search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  color: #94a3b8;
  pointer-events: none;
}
.booking-search-icon .icon {
  width: 15px;
  height: 15px;
}
.btn-clear-search {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}
.btn-clear-search:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.customer-type-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.customer-type-selector::-webkit-scrollbar {
  display: none;
}

.type-pill {
  flex: 1;
  min-width: 135px;
  background: #ffffff;
  border: 1px solid #dce3e6;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 550;
  color: #536575;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  min-height: 42px;
  box-shadow: none;
}

.type-pill:hover {
  background: #f6f8f9;
  border-color: #bfcdd0;
  color: var(--ink);
}

.type-pill.active {
  background: var(--primary-light);
  border-color: #9bd3cb;
  color: #006b61;
  font-weight: 650;
  box-shadow: none;
}

/* Continuous Product Rows */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
  margin-top: 18px;
}

.product-row {
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 20px 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.product-row:hover {
  border-color: var(--border);
  box-shadow: none;
}

.product-row h3 {
  font-size: 14.5px;
  font-weight: 600;
  margin: 0 0 3px;
}

.product-row .price {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 5px;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.stepper button {
  border-radius: 5px;
  width: 40px;
  min-height: 42px;
  padding: 0;
  background: #f5f8f9;
  border: 1px solid #e4e9ec;
  color: var(--ink);
  font-size: 20px;
  font-weight: 400;
  box-shadow: none;
}

.stepper button:hover {
  background: #eaf0f2;
}

.stepper input {
  border: 0;
  background: transparent;
  width: 42px;
  min-height: 42px;
  font-size: 15px;
  font-weight: 650;
  text-align: center;
  padding: 4px 2px;
  -moz-appearance: textfield;
}

.stepper input::-webkit-inner-spin-button {
  appearance: none;
}

.stepper .plus {
  background: #e7f4f0;
  border-color: #e7f4f0;
  color: var(--primary);
}

.stepper .plus:hover {
  background: #d5ece6;
  border-color: #d5ece6;
}

.order-summary {
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0;
  padding: 0 0 0 28px;
  background: none;
  box-shadow: none;
  position: sticky;
  top: 32px;
}

.order-summary h2 {
  font-size: 16px;
  margin-bottom: 24px;
}

.summary-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.summary-total {
  font-size: 34px;
  font-weight: 620;
  letter-spacing: -1.2px;
  color: var(--ink);
  margin: 4px 0 22px;
  font-variant-numeric: tabular-nums;
}

.summary-meta {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
}

/* ==================== ORDER HISTORY (CONTINUOUS ROWS) ==================== */
.order-history {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
}

.history-row {
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 22px 8px;
  background: #ffffff;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.history-row:hover {
  background: #f8fafb;
}

.history-main {
  flex: 1;
  min-width: 0;
}

.history-row h3 {
  margin: 4px 0 2px;
  font-size: 15px;
  font-weight: 600;
}

.history-age {
  font-size: 13px;
  color: var(--ink-secondary);
  margin: 2px 0;
}

.history-side {
  display: flex;
  align-items: center;
  gap: 22px;
}

.history-side strong {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.local-list {
  margin-bottom: 24px;
}

.local-order {
  border: 0;
  border-left: 3px solid #d3ab59;
  background: #fffcf5;
  border-radius: 0;
  padding: 16px 18px;
  margin-bottom: 10px;
}

/* ==================== MANAGEMENT, CRUD & STUDIO PANELS ==================== */
.crud-panel {
  background: #fafcfc;
  border: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 24px 0;
  box-shadow: none;
  margin-bottom: 24px;
}

.crud-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.crud-panel-head h3 {
  font-size: 16px;
  margin: 0;
}

.crud-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.crud-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.crud-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.crud-prod-row {
  grid-template-columns: 130px minmax(200px, 1.8fr) 115px 130px 145px 175px;
}

/* Products & Stock Management Controls (Desktop Base) */
.prod-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 14px 0 10px;
  flex-wrap: wrap;
}
.prod-search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 380px;
  min-width: 220px;
}
.prod-search-box .search-icon {
  position: absolute;
  left: 11px;
  color: #94a3b8;
  width: 16px;
  height: 16px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.prod-search-box input {
  width: 100%;
  padding-left: 34px !important;
  padding-right: 30px !important;
  min-height: 38px !important;
  height: 38px !important;
  font-size: 13.5px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #0f2838 !important;
}
.btn-search-clear {
  position: absolute;
  right: 7px;
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 0;
  background: #e2e8f0;
  color: #475569;
  border-radius: 50%;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease;
}
.btn-search-clear:hover {
  background: #cbd5e1;
}
.prod-filter-pills {
  display: flex;
  gap: 8px;
  align-items: center;
}
.prod-filter-pill {
  min-height: 36px !important;
  padding: 6px 14px !important;
  font-size: 13px !important;
  font-weight: 550 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #475569 !important;
  cursor: pointer;
  transition: all 0.12s ease;
}
.prod-filter-pill:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
}
.prod-filter-pill.active {
  background: #e8f6f3 !important;
  border-color: #007c70 !important;
  color: #007c70 !important;
  font-weight: 700 !important;
  box-shadow: inset 0 0 0 1px #007c70;
}

/* Products Table Columns (Desktop) */
.queue-row.crud-prod-row .prod-col-sku .order-ref {
  display: inline-block;
  background: #eef3f6;
  color: #475866;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.25px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.queue-row.crud-prod-row .prod-title {
  font-size: 14px;
  font-weight: 650;
  color: #0f2838;
}
.queue-row.crud-prod-row .prod-pack-pill {
  font-size: 12.5px;
  color: #475569;
}
.queue-row.crud-prod-row .prod-price-carton {
  font-size: 14.5px;
  color: #007c70;
  font-weight: 700;
}
.queue-row.crud-prod-row .prod-stock-stepper {
  display: flex;
  gap: 6px;
  align-items: center;
}
.queue-row.crud-prod-row .prod-stock-input {
  width: 72px;
  min-height: 32px;
  padding: 4px 8px;
  font-weight: 700;
  text-align: center;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}
.queue-row.crud-prod-row .btn-save-stock {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  cursor: pointer;
}
.queue-row.crud-prod-row .btn-save-stock:hover {
  background: #f1f5f9;
}
.queue-row.crud-prod-row .prod-low-pill {
  margin-top: 4px;
  display: inline-block;
}
.queue-row.crud-prod-row .prod-col-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.queue-row.crud-prod-row .btn-edit-prod {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f2838;
  cursor: pointer;
}
.queue-row.crud-prod-row .btn-del-prod {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #fecdd3;
  background: #fff1f2;
  color: #e11d48;
  cursor: pointer;
}

.crud-cust-row {
  grid-template-columns: 95px minmax(190px, 1.5fr) 150px 135px 75px minmax(180px, 1fr);
}

/* Customers & Outlets Desktop Base Styles */
.cust-controls-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 10px;
}
.cust-search-box {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 420px;
  width: 100%;
}
.cust-search-box .search-icon {
  position: absolute;
  left: 11px;
  color: #94a3b8;
  width: 16px;
  height: 16px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cust-search-box input {
  width: 100%;
  padding-left: 34px !important;
  padding-right: 30px !important;
  min-height: 38px !important;
  height: 38px !important;
  font-size: 13.5px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #0f2838 !important;
}
.cust-city-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cust-city-chips::-webkit-scrollbar { display: none; }
.cust-city-chip {
  min-height: 32px !important;
  padding: 4px 12px !important;
  font-size: 12px !important;
  font-weight: 550 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 99px !important;
  background: #ffffff !important;
  color: #475569 !important;
  cursor: pointer;
  white-space: nowrap !important;
  transition: all 0.12s ease;
}
.cust-city-chip:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
}
.cust-city-chip.active {
  background: #e8f6f3 !important;
  border-color: #007c70 !important;
  color: #007c70 !important;
  font-weight: 700 !important;
  box-shadow: inset 0 0 0 1px #007c70;
}
.cust-results-meta {
  font-size: 12px;
  color: #64748b;
  margin-top: -2px;
}

.crud-user-row {
  grid-template-columns: minmax(190px, 1.3fr) minmax(170px, 1.2fr) 110px 160px minmax(150px, 1fr);
}

.crud-log-row {
  grid-template-columns: 160px 160px 140px minmax(220px, 1.6fr) 130px;
}

.crud-perf-row {
  grid-template-columns: minmax(200px, 1.8fr) 130px 90px 95px 130px 175px 120px;
}
.perf-mobile-stat { display: none; }

/* Personal Rep Summary Strip */
.rep-highlight-strip {
  background: var(--primary-soft);
  border-top: 1px solid #cce8e3;
  border-bottom: 1px solid #cce8e3;
  padding: 18px 20px;
  margin-bottom: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

/* Executive Rep Summary Card on Performance Page */
.rep-exec-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 3.5px solid var(--primary);
  border-radius: 9px;
  padding: 8px 12px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(16, 35, 63, 0.03);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rep-exec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.rep-exec-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.rep-exec-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8f5f3;
  color: #007c70;
  font-weight: 700;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}
.rep-exec-identity {
  min-width: 0;
}
.rep-exec-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
}
.rep-exec-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f2838;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rep-exec-tag {
  background: #e8f5f3;
  color: #007c70;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  line-height: 1.2;
}
.rep-exec-meta {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.rep-exec-revenue-block {
  text-align: right;
  flex-shrink: 0;
}
.rep-exec-revenue {
  font-size: 14.5px;
  font-weight: 750;
  color: #007c70;
  letter-spacing: -0.3px;
  line-height: 1.15;
}
.rep-exec-revenue-label {
  display: block;
  font-size: 9px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.25px;
  font-weight: 600;
}
.rep-exec-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  border-top: 1px solid #f1f5f9;
  padding-top: 6px;
}
.rep-exec-chip {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 3px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  white-space: nowrap;
}
.rep-chip-num {
  font-weight: 700;
  color: #0f2838;
  font-size: 12px;
}
.rep-chip-text {
  font-size: 10px;
  color: #64748b;
}
.rep-chip-amber {
  background: #fffbeb;
  border-color: #fde68a;
}
.rep-chip-amber .rep-chip-num {
  color: #b45309;
}
.rep-chip-emerald {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.rep-chip-emerald .rep-chip-num {
  color: #15803d;
}
.rep-chip-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-amber { background: #f59e0b; }
.dot-emerald { background: #22c55e; }
.dot-gray { background: #cbd5e1; }

.rep-highlight-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.rep-highlight-stats > div strong {
  display: block;
  font-size: 20px;
  font-weight: 650;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* Storefront & QR Studio */
.qr-studio-layout {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) 390px;
  gap: 44px;
  border-top: 1px solid var(--border);
  padding-top: 26px;
  align-items: start;
}

.qr-Studio-main > .crud-panel:first-child {
  border-top: 0;
  padding-top: 0;
  background: transparent;
}

.qr-preview-panel {
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0;
  padding: 0 0 0 28px;
  background: transparent;
  box-shadow: none;
  position: sticky;
  top: 32px;
}

.qr-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}

.qr-preview-frame {
  background: #f6f8f9;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.qr-preview-frame img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(23, 43, 58, 0.08);
}

.toggle-strip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.toggle-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-box:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.toggle-box input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 42px;
  height: 24px;
  min-height: 24px;
  background-color: #cbd5e1;
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
  transition: background-color 0.25s ease;
  margin: 0;
  border: none;
}

.toggle-box input[type="checkbox"]::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.toggle-box input[type="checkbox"]:checked {
  background-color: #007c70;
}

.toggle-box input[type="checkbox"]:checked::after {
  transform: translateX(18px);
}

.toggle-box input[type="checkbox"]:focus-visible {
  outline: 2px solid #8edbd1;
  outline-offset: 2px;
}

.toggle-box strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
}

.toggle-box span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.notif-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
  margin-top: 10px;
}

.notif-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

/* ==================== MODERN COMPACT CUSTOMER ROW ==================== */
.queue-row.crud-cust-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
}
.cust-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.cust-card-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.cust-card-name-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cust-name-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.cust-city-tag {
  font-size: 11px;
  font-weight: 600;
  color: #0d9488;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  padding: 1px 7px;
  border-radius: 99px;
}
.cust-card-sub-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: #64748b;
  flex-wrap: wrap;
}
.cust-tel-link {
  color: #007c70;
  text-decoration: none;
  font-weight: 550;
}
.cust-tel-link:hover {
  text-decoration: underline;
}
.cust-orders-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
}
.cust-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.cust-card-actions button {
  min-height: 32px !important;
  font-size: 12px;
  padding: 4px 10px;
}
.btn-book-cust {
  background: #007c70 !important;
  color: #ffffff !important;
  border-color: #007c70 !important;
  font-weight: 700 !important;
  border-radius: 99px !important;
  padding: 4px 14px !important;
}

/* ==================== MODERN IOS-STYLE TOGGLE SWITCH ==================== */
.ui-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  gap: 10px;
}
.ui-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}
.ui-switch-track {
  width: 44px;
  height: 24px;
  background-color: #cbd5e1;
  border-radius: 999px;
  transition: background-color 0.25s ease;
  position: relative;
  flex-shrink: 0;
}
.ui-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: transform 0.25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.ui-switch input:checked + .ui-switch-track {
  background-color: #007c70;
}
.ui-switch input:checked + .ui-switch-track .ui-switch-thumb {
  transform: translateX(20px);
}
.ui-switch input:focus-visible + .ui-switch-track {
  outline: 2px solid #8edbd1;
  outline-offset: 2px;
}
.ui-switch-label {
  font-size: 13.5px;
  font-weight: 550;
  color: #1e293b;
}

/* ==================== NOTIFICATION BELL & DIALOG ==================== */
.topbar-notif-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.notif-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.notif-count-badge {
  position: absolute;
  top: -5px;
  right: -7px;
  background: #e11d48;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 999px;
  min-width: 15px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  border: 1.5px solid #ffffff;
}
.notif-count-badge:empty,
.notif-count-badge[data-count="0"] {
  display: none !important;
}

#notif-dialog {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 24px;
  width: min(620px, calc(100% - 24px));
  max-height: 88dvh;
  overflow-y: auto;
  background: #ffffff;
  box-shadow: 0 24px 90px rgba(16, 35, 63, 0.18);
}
.notif-tabs {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 8px;
  margin: 14px 0 16px;
}
.notif-tab-btn {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 650;
  color: #64748b;
  border-radius: 6px;
  min-height: 32px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}
.notif-tab-btn.active {
  background: #ffffff;
  color: #007c70;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.notif-feed-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.notif-card {
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #ffffff;
  transition: all 0.15s ease;
}
.notif-card:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.notif-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.notif-card-title {
  font-size: 13.5px;
  font-weight: 650;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 4px;
}
.notif-card-sub {
  font-size: 11.5px;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.notif-preview-toggle {
  font-size: 11px;
  color: #007c70;
  font-weight: 650;
  border: 0;
  background: transparent;
  padding: 2px 4px;
  cursor: pointer;
  text-decoration: underline;
  min-height: 0;
}
.notif-preview-box {
  margin-top: 8px;
  padding: 10px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  line-height: 1.4;
  max-height: 220px;
  overflow-y: auto;
}

/* Overview Compact Notification Summary Bar */
.overview-alert-summary-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}
.ov-notif-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ov-notif-stat:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.ov-notif-stat strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.25;
}
.ov-notif-stat .small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.notif-stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.notif-stat-icon.mail { background: #e0f2fe; color: #0369a1; }
.notif-stat-icon.activity { background: #f0fdf4; color: #15803d; }
.notif-stat-icon .icon { width: 17px; height: 17px; }
.ov-notif-arrow {
  margin-left: auto;
  color: #94a3b8;
  font-size: 15px;
  font-weight: 700;
}

/* Category Filter Chips for Booking */
.booking-cat-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 0 8px;
}
.booking-cat-pills::-webkit-scrollbar {
  display: none;
}
.booking-cat-chip {
  flex: 0 0 auto;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  min-height: 30px !important;
  transition: all 0.12s ease;
}
.booking-cat-chip:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
.booking-cat-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* Storefront Mobile Tabs */
.storefront-mobile-tabs {
  display: none;
  gap: 5px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 3px 4px;
  border-radius: 9px;
  margin-bottom: 12px;
}
.storefront-tab-btn {
  flex: 1;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  border-radius: 7px;
  min-height: 28px;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: all 0.15s ease;
}
.storefront-tab-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}
.storefront-tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 124, 112, 0.28);
}

/* ==================== SEARCH & DATE FILTER BARS ==================== */
.search-filter-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 12px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.02);
}
.search-input-wrap {
  position: relative;
  margin-bottom: 6px;
}
.search-input-wrap input {
  width: 100%;
  min-height: 34px !important;
  padding: 4px 10px 4px 34px !important;
  border-radius: 7px;
  font-size: 13px !important;
}
.search-input-wrap .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  display: inline-flex;
}
.search-input-wrap .btn-clear-search {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
}
.date-chips-bar {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 1px 0 2px;
}
.date-chips-bar::-webkit-scrollbar {
  display: none;
}
.date-chip {
  flex: 0 0 auto;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  min-height: 25px !important;
  white-space: nowrap;
  transition: all 0.12s ease;
  line-height: 1.2;
}
.date-chip:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
.date-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}
.btn-custom-date-pill {
  border-style: dashed;
}
.btn-custom-date-pill.active {
  border-style: solid;
  background: var(--primary);
  color: #ffffff;
}

/* Custom Date Modal & Presets */
#date-dialog {
  width: min(480px, calc(100% - 24px));
  border-radius: 14px;
  padding: 0;
  border: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  color: var(--ink);
}
.date-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
  gap: 6px;
}
.date-modal-preset-btn {
  min-height: 30px !important;
  padding: 3px 6px !important;
  font-size: 11.5px !important;
  font-weight: 550;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  text-align: center;
  transition: all 0.12s ease;
  white-space: nowrap;
}
.date-modal-preset-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.date-modal-preset-btn.active {
  background: #e6f4f2;
  border-color: #007c70;
  color: #007c70;
  font-weight: 700;
}

/* ==================== SEARCHABLE CUSTOMER DROPDOWN ==================== */
.searchable-dropdown-wrap {
  position: relative;
  width: 100%;
}
.searchable-input-box {
  position: relative;
  width: 100%;
}
.searchable-input-box input {
  padding-right: 54px;
  font-size: 14px;
  border-radius: 8px;
}
.btn-clear-combobox {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  z-index: 2;
  transition: all 0.15s ease;
}
.btn-clear-combobox:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.searchable-chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #94a3b8;
  font-size: 12px;
  transition: transform 0.2s ease;
}
.searchable-dropdown-wrap.is-open .searchable-chevron {
  transform: translateY(-50%) rotate(180deg);
}
.searchable-dropdown-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  max-height: 250px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  padding: 4px;
}
.dropdown-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 12px;
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
  border: 0;
  background: transparent;
  width: 100%;
  transition: background 0.12s ease;
  min-height: 44px;
  justify-content: center;
}
.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.is-selected {
  background: #f0fdf9;
  outline: none;
}
.dropdown-item-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  width: 100%;
}
.dropdown-item-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}
.dropdown-item-code {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  background: #eef3f6;
  border-radius: 4px;
  color: #475866;
}
.dropdown-item-sub {
  font-size: 11px;
  color: #64748b;
  display: flex;
  gap: 6px;
  align-items: center;
}
.selected-customer-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f0fdf9;
  border: 1.5px solid #007c70;
  gap: 8px;
}
.selected-cust-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.cust-shop-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #cce8e3;
  color: #007c70;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cust-shop-icon .icon { width: 17px; height: 17px; }
.selected-cust-info strong {
  display: block;
  font-size: 13.5px;
  color: #0f172a;
  line-height: 1.25;
}
.selected-cust-info .small {
  display: block;
  font-size: 11px;
  color: #475569;
}
.btn-clear-customer {
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #64748b;
  min-height: 28px !important;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.12s ease;
}
.btn-clear-customer:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

/* ==================== REVEAL ANIMATIONS & TRANSITIONS ==================== */
@keyframes modalSlideUp {
  0% { transform: translateY(32px) scale(0.97); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes modalFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes cardReveal {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes subtlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ==================== BOOTSTRAP / MOBILE-FRIENDLY CRUD MODAL ==================== */
#crud-dialog {
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  width: min(600px, calc(100% - 24px));
  max-height: 88dvh;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  animation: modalSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  overflow: hidden;
}
#crud-dialog[open] {
  display: flex;
  flex-direction: column;
}
#confirm-dialog[open] {
  display: block;
}
#crud-dialog::backdrop,
#confirm-dialog::backdrop {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: modalFadeIn 0.2s ease forwards;
}
.crud-modal-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 88dvh;
  overflow: hidden;
  width: 100%;
}
.sheet-drag-handle {
  display: none;
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: #cbd5e1;
  margin: 10px auto 4px;
  flex-shrink: 0;
}
.crud-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  flex-shrink: 0;
}
.crud-modal-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}
.crud-modal-head p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #64748b;
}
.crud-modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
}
.crud-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  flex-shrink: 0;
}

/* ==================== ADVANCED AJAX CONFIRMATION DIALOG ==================== */
#confirm-dialog {
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  width: min(440px, calc(100% - 24px));
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  animation: modalSlideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  overflow: hidden;
}
.confirm-modal-wrap {
  padding: 24px;
  text-align: center;
}
.confirm-icon-bubble {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fee2e2;
  color: #dc2626;
  border: 4px solid #fef2f2;
}
.confirm-icon-bubble.warning {
  background: #fef3c7;
  color: #d97706;
  border-color: #fffbeb;
}
.confirm-icon-bubble .icon {
  width: 24px;
  height: 24px;
}
.confirm-title {
  font-size: 17.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px;
}
.confirm-message {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 14px;
}
.confirm-archive-callout {
  text-align: left;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: #166534;
  margin-bottom: 18px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.confirm-actions button {
  flex: 1;
  min-height: 42px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 8px;
}

/* ==================== DIALOG / ORDER DETAIL MODAL ==================== */
dialog {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px;
  width: min(640px, calc(100% - 24px));
  max-height: 90dvh;
  overflow-y: auto;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 24px 90px rgba(16, 35, 63, 0.16);
}

dialog::backdrop {
  background: rgba(23, 43, 58, 0.42);
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
}

.dialog-head h2 {
  font-size: 24px;
  letter-spacing: -0.6px;
  margin: 2px 0;
}

.close {
  padding: 0;
  width: 40px;
  min-height: 40px;
  font-size: 22px;
  border: 0;
  box-shadow: none;
  color: var(--muted);
}

.detail-age {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 16px 0 0;
  font-size: 13.5px;
  color: #426172;
  margin: 0;
}

.detail-age .icon {
  width: 17px;
  height: 17px;
}

.detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin: 18px 0;
}

.detail-meta dt {
  color: var(--muted);
  font-size: 11.5px;
  margin-bottom: 3px;
}

.detail-meta dd {
  margin: 0;
  font-size: 13.5px;
  font-weight: 550;
}

.detail-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding: 13px 0;
}

.detail-total {
  display: flex;
  justify-content: space-between;
  font-size: 22px;
  font-weight: 620;
  border-top: 1px solid var(--border);
  padding: 15px 0;
  font-variant-numeric: tabular-nums;
}

.detail-card-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  margin: 12px 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 14px 0;
}

.timeline li {
  border-left: 2px solid #c5ded9;
  padding: 0 0 16px 15px;
  font-size: 13px;
}

.dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.cancel-form {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

/* ==================== PUBLIC CUSTOMER STOREFRONT ==================== */
.storefront-body {
  background: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.sf-header {
  background: #f6f8f9;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.sf-container {
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: 28px;
  width: 100%;
}

.sf-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 14px;
  gap: 16px;
}

.sf-brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sf-tagline {
  font-size: 12px;
  color: var(--muted);
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.sf-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sf-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 550;
  color: #536575;
  box-shadow: none;
}

.sf-tab-btn.active {
  background: var(--primary-light);
  color: #006b61;
  font-weight: 650;
}

.sf-staff-link {
  background: #ffffff;
  color: var(--ink) !important;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.sf-staff-link:hover {
  background: #f5f8f8;
  border-color: #bfcdd0;
}

.sf-announcement {
  background: var(--primary-soft);
  color: #006b61;
  border-top: 1px solid #d5ece8;
  padding: 7px 0;
  font-size: 12px;
  font-weight: 550;
  text-align: center;
}

.sf-main {
  padding-block: 36px 60px;
  flex: 1;
}

.sf-card {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 0 0 24px;
  box-shadow: none;
  margin-bottom: 24px;
}

.sf-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.sf-mode-switch {
  display: inline-flex;
  gap: 6px;
}

.sf-mode-switch button {
  padding: 6px 12px;
  min-height: 34px;
  font-size: 12px;
}

.sf-mode-switch button.active {
  background: var(--primary-light);
  border-color: #9bd3cb;
  color: #006b61;
  font-weight: 650;
}

.sf-category-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-top: 12px;
}

.sf-chip {
  padding: 6px 13px;
  min-height: 32px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: #ffffff;
  font-size: 12px;
  font-weight: 550;
  color: #536575;
  white-space: nowrap;
  box-shadow: none;
}

.sf-chip.active {
  background: var(--primary-light);
  color: #006b61;
  border-color: #9bd3cb;
  font-weight: 650;
}

.sf-summary-sticky {
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0;
  padding: 0 0 0 28px;
  background: transparent;
  box-shadow: none;
  position: sticky;
  top: 90px;
}

.sf-receipt {
  background: var(--primary-soft);
  border: 1px solid #cce8e3;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 28px;
}

.sf-footer {
  border-top: 1px solid var(--border);
  background: #f6f8f9;
  padding: 20px 0;
  font-size: 12.5px;
  color: var(--muted);
}

.sf-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ==================== REFINED LOGIN PAGE ==================== */
body.login-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: #f5f8f8;
  padding: 24px;
  margin: 0;
}

.login-card,
.login-panel {
  width: min(460px, 100%);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 50px rgba(22, 54, 61, 0.06);
  padding: 38px 36px;
}

.login-brand-header {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 24px;
}

.login-brand-header img {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  margin: 0;
  filter: none;
}

.login-brand-header h2 {
  font-size: 22px;
  font-weight: 750;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.6px;
}

.login-heading {
  font-size: 26px;
  font-weight: 660;
  letter-spacing: -0.8px;
  color: var(--ink);
  margin: 0 0 6px;
}

.login-subtitle {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0 0 24px;
}

.password-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.password-label-row label {
  margin-bottom: 0;
}

.text-btn {
  border: 0;
  background: transparent;
  padding: 2px 4px;
  min-height: auto;
  box-shadow: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

.text-btn:hover {
  background: transparent;
  color: var(--primary-hover);
  text-decoration: underline;
}

.demo-quick-bar {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.demo-quick-title {
  display: block;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 10px;
}

.demo-quick-chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.demo-chip {
  background: #f6f8f9;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 550;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  cursor: pointer;
  min-height: 36px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: none;
}

.demo-chip:hover {
  background: var(--primary-soft);
  border-color: #9bd3cb;
  color: #006b61;
}

.chip-badge {
  font-size: 9.5px;
  font-weight: 650;
  padding: 2px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.chip-badge.sales {
  background: #e3f1ef;
  color: #006b61;
}

.chip-badge.warehouse {
  background: #fff2d6;
  color: #9b690c;
}

.chip-badge.admin {
  background: #e8eef2;
  color: #425869;
}

/* ==================== SCROLLBARS & OVERLAYS ==================== */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(23, 43, 58, 0.18) transparent;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(23, 43, 58, 0.18);
  border-radius: 999px;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(23, 43, 58, 0.35);
  z-index: 35;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

#notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 550;
  box-shadow: 0 8px 28px rgba(23, 43, 58, 0.22);
  z-index: 90;
}

/* ==================== RESPONSIVE BREAKPOINTS ==================== */
@media (min-width: 769px) and (max-width: 1200px) {
  .sidebar {
    width: 196px;
    padding-inline: 12px;
  }
  .workspace {
    margin-left: 196px;
    padding: 34px 26px;
  }
  .workspace.sidebar-collapsed {
    margin-left: 68px;
  }
  h1 {
    font-size: 31px;
  }
  .metric {
    padding: 0 18px;
    gap: 14px;
  }
  .metric strong,
  .metric.warning strong,
  .metric.critical strong {
    font-size: 36px;
  }
  .queue-row {
    grid-template-columns: 40px minmax(170px, 1fr) 114px 108px 98px 44px;
    gap: 10px;
    padding-inline: 8px;
  }
  .queue-row .row-action {
    border: 0;
    padding: 8px;
  }
  .row-action > span:first-child {
    display: none;
  }
  .booking-layout,
  .qr-studio-layout {
    gap: 30px;
    grid-template-columns: 1fr;
  }
  .order-summary,
  .qr-preview-panel,
  .sf-summary-sticky {
    border-left: 0;
    border-top: 1px solid var(--border);
    padding: 22px 0 0;
    position: static;
  }
  .crud-grid-4,
  .crud-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 769px) and (max-width: 1040px) {
  .queue-row {
    grid-template-columns: 36px minmax(160px, 1fr) 105px 95px 44px;
  }
  .queue-row .booked-col {
    display: none;
  }
  .customer-col .monogram {
    display: none;
  }
  .metric {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 820px) {
  body {
    background: #ffffff;
  }
  .sidebar {
    transform: translateX(-100%);
    width: min(82vw, 260px) !important;
    background: #f6f8f9;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 8px 0 32px rgba(23, 43, 58, 0.18);
  }
  .mobile-header {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 30;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--border);
    padding: 13px 18px;
  }
  .mobile-header .brand {
    font-size: 20px;
    gap: 8px;
    color: var(--ink);
  }
  .mobile-header .brand img {
    width: 25px;
    height: 25px;
  }
  .mobile-header button {
    border: 0;
    box-shadow: none;
    color: #586c79;
    padding: 6px 8px;
    min-height: 36px;
    min-width: auto;
    font-size: 12px;
  }
  .mobile-header .header-right {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .connection {
    font-size: 11.5px;
  }
  .workspace {
    margin: 0 !important;
    padding: 22px 18px 104px !important;
  }
  .page-head {
    margin-bottom: 22px;
    align-items: flex-start;
  }
  .page-head-left .sidebar-toggle-btn {
    display: none;
  }
  .workspace h1 {
    font-size: 28px;
    letter-spacing: -0.9px;
  }
  .page-head p {
    font-size: 12.5px;
    line-height: 1.5;
  }
  .head-tools .status-block {
    display: none;
  }
  .head-tools button {
    width: 40px;
    min-height: 40px;
    padding: 9px;
    border: 1px solid var(--border);
    box-shadow: none;
  }
  .head-tools button span {
    display: none;
  }

  /* Mobile Open Metric Strip (3 columns horizontal like dispatch-refined-concept.png) */
  .metrics {
    border-top: 1px solid var(--border);
    padding: 16px 0 22px;
    margin-bottom: 0;
    display: flex;
    flex-wrap: wrap;
  }
  .metric,
  .metric:first-child {
    flex: 1 1 30%;
    padding: 0 10px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-height: 68px;
  }
  .metric:first-child {
    padding-left: 0;
  }
  .metric:last-child {
    padding-right: 0;
  }
  .metric strong,
  .metric.warning strong,
  .metric.critical strong {
    font-size: 30px;
    letter-spacing: -1.2px;
  }
  .metric strong.metric-money {
    font-size: 20px;
  }
  .metric span {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
  }
  .metric small {
    font-size: 9.5px;
    margin-top: 2px;
    white-space: nowrap;
  }

  /* Mobile Segmented Filter Tabs */
  .filters {
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .filters button {
    font-size: 11px;
    padding: 0 9px;
    min-height: 28px;
    white-space: nowrap;
  }

  /* Mobile Continuous Queue Rows (12-column 2-tier layout from dispatch-refined-concept.png) */
  .queue-table {
    margin: 0 -18px;
  }
  .queue-row {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 8px 0;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    margin: 0;
  }
  .queue-row.crud-prod-row,
  .queue-row.crud-cust-row,
  .queue-row.crud-user-row,
  .queue-row.crud-log-row,
  .queue-row.crud-perf-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .queue-row .rank {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    padding-top: 2px;
  }
  .rank strong {
    font-size: 13.5px;
  }
  .next-label {
    font-size: 8.5px;
    max-width: 40px;
  }
  .queue-row .customer-col {
    grid-column: 2 / 12;
    grid-row: 1;
    padding-left: 6px;
    gap: 10px;
  }
  .customer-col .monogram {
    width: 34px;
    height: 34px;
    font-size: 11px;
  }
  .customer-col strong {
    font-size: 13.5px;
    line-height: 1.4;
  }
  .queue-row .customer-col .sub {
    font-size: 10.5px;
    line-height: 1.45;
  }
  .queue-row .order-ref {
    display: inline;
    font-size: 10px;
  }
  .separator {
    padding-inline: 4px;
  }
  .queue-row .row-action {
    grid-column: 12;
    grid-row: 1;
    padding: 0;
    min-width: 32px;
    width: 32px;
    min-height: 38px;
    margin-left: -4px;
    border: 0;
    box-shadow: none;
    color: #426376;
    align-self: start;
    justify-content: flex-end;
  }
  .row-action > span:first-child {
    display: none;
  }
  .queue-row .age-col {
    grid-column: 1 / 5;
    grid-row: 2;
    padding-right: 8px;
    align-self: stretch;
  }
  .queue-row .booked-col {
    display: block;
    grid-column: 5 / 9;
    grid-row: 2;
    padding-left: 12px;
    border-left: 1px solid var(--border);
    font-size: 11px;
    align-self: stretch;
  }
  .queue-row .amount-col {
    grid-column: 9 / 13;
    grid-row: 2;
    padding-left: 12px;
    border-left: 1px solid var(--border);
    font-size: 12.5px;
    align-self: stretch;
  }
  .amount-col strong {
    font-size: 12.5px;
  }
  .queue-row .booked-col .sub {
    font-size: 10.5px;
  }
  .mobile-label {
    display: block;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 450;
    margin-bottom: 3px;
    letter-spacing: 0;
  }
  .relative-age {
    font-size: 12px;
    font-weight: 600;
  }
  .age-status {
    font-size: 10.5px;
    margin-top: 4px;
  }
  .age-status .dot {
    width: 5px;
    height: 5px;
  }
  .queue-row.table-head {
    display: none !important;
  }

  /* Mobile Booking Page & Sticky Summary */
  .booking-layout,
  .qr-studio-layout {
    display: block;
    padding-top: 20px;
  }
  .booking-page .workspace {
    padding-bottom: 190px !important;
  }
  .product-row {
    padding: 18px 0;
  }
  .order-summary {
    position: fixed;
    bottom: 66px;
    left: 0;
    right: 0;
    top: auto;
    border: 0;
    border-top: 1px solid var(--border);
    padding: 13px 18px;
    background: #ffffff;
    box-shadow: 0 -4px 18px rgba(23, 43, 58, 0.04);
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
  }
  .order-summary h2,
  .summary-meta {
    display: none;
  }
  .summary-total {
    font-size: 24px;
    margin: 2px 0 0;
  }
  .order-summary .primary {
    width: auto;
    min-width: 155px;
    min-height: 44px;
    font-size: 13px;
  }

  /* Mobile Bottom Navigation */
  .mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 66px;
    padding-bottom: env(safe-area-inset-bottom);
    display: flex;
    justify-content: space-around;
    background: #ffffff;
    border-top: 1px solid var(--border);
    z-index: 30;
  }
  .mobile-nav a {
    flex: 1;
    text-decoration: none;
    font-size: 10.5px;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    border-bottom: 0;
  }
  .mobile-nav a.active {
    color: var(--primary);
    background: #f4faf8;
    font-weight: 600;
  }
  .mobile-nav .icon {
    width: 19px;
    height: 19px;
  }

  /* Mobile History & Forms */
  .history-row {
    padding: 20px 0;
    gap: 10px;
    align-items: flex-start;
  }
  .history-row > .monogram {
    display: none;
  }
  .history-side {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }
  .crud-grid-4,
  .crud-grid-3,
  .crud-grid-2,
  .toggle-strip-grid {
    grid-template-columns: 1fr;
  }
  .login-card,
  .login-panel {
    padding: 28px 22px;
  }
  .demo-quick-chips {
    grid-template-columns: 1fr;
  }
}

/* ==================== STARTUP SPLASH SCREEN & PRELOADER ==================== */
.app-splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(circle at 50% 30%, #0d2f3c 0%, #061520 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #ffffff;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.app-splash.splash-hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash-card {
  text-align: center;
  max-width: 380px;
  width: 100%;
  animation: splashFadeIn 0.5s ease-out;
}
.splash-icon-pulse {
  width: 82px;
  height: 82px;
  margin: 0 auto 18px;
  background: rgba(0, 124, 112, 0.2);
  border: 2px solid rgba(0, 204, 175, 0.45);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 35px rgba(0, 124, 112, 0.4);
  animation: splashPulse 2s infinite ease-in-out;
}
.splash-logo {
  width: 44px;
  height: 44px;
  color: #2dd4bf;
}
.splash-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px;
  letter-spacing: -0.3px;
}
.splash-subtitle {
  font-size: 13px;
  color: #94a3b8;
  margin: 0 0 24px;
}
.splash-loader-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  margin-bottom: 24px;
}
.splash-loader-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, #007c70, #2dd4bf);
  border-radius: 999px;
  animation: splashProgress 1.4s infinite ease-in-out;
}
.splash-credits {
  font-size: 12.5px;
  color: #94a3b8;
}
.splash-credits a {
  color: #2dd4bf;
  font-weight: 600;
  text-decoration: underline;
}
@keyframes splashPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 12px 35px rgba(0, 124, 112, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 16px 45px rgba(0, 204, 175, 0.6); }
}
@keyframes splashFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes splashProgress {
  0% { left: -40%; width: 30%; }
  50% { left: 30%; width: 50%; }
  100% { left: 100%; width: 40%; }
}

/* ==================== APP INSTALL MODAL ==================== */
#pwa-dialog {
  max-width: 440px;
  width: calc(100% - 24px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  background: #ffffff;
  overflow: hidden;
}

/* ==================== BACKUP & RESTORE DROPZONE ==================== */
.backup-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease;
}
.backup-dropzone:hover {
  border-color: #007c70;
  background: #f0fdfa;
}
.rbac-role-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  background: #ffffff;
}
.rbac-role-card h4 {
  margin: 0 0 4px;
  font-size: 13.5px;
  font-weight: 700;
}
.rbac-role-card p {
  margin: 0;
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.4;
}

/* Color input standard styling to prevent unsightly full-width bar */
input[type="color"] {
  width: 44px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 2px !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  cursor: pointer;
  vertical-align: middle;
}

/* Role Guide Collapsible Component */
.role-guide-collapse {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  overflow: hidden;
  transition: all 0.2s ease;
}
.role-guide-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  user-select: none;
  background: #ffffff;
}
.role-guide-summary:hover {
  background: #f1f5f9;
}
.role-guide-arrow {
  transition: transform 0.2s ease;
  font-size: 12px;
  color: #64748b;
}
.role-guide-collapse[open] .role-guide-arrow {
  transform: rotate(180deg);
}
.role-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid #e2e8f0;
}

/* Custom Date Range Pill & Clear button */
.btn-custom-date-pill {
  border-style: dashed !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  background: #f0fdfa !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}
.btn-custom-date-pill:hover {
  background: #e6f6f3 !important;
  border-color: var(--primary-hover) !important;
}
.btn-custom-date-pill.active {
  border-style: solid !important;
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}
.btn-custom-date-pill .pill-clear {
  margin-left: 3px;
  padding: 0 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  font-size: 10px;
  line-height: 1.3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-custom-date-pill .pill-clear:hover {
  background: rgba(255, 255, 255, 0.7);
  color: #0f172a;
}


