@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&display=swap');

:root {
  --brand: #c2410c;
  --on-brand: #ffffff;
  --brand-dark: #9a3412;
  --brand-light: rgba(234, 88, 12, 0.1);
  --brand-border: rgba(234, 88, 12, 0.35);
  --brand-text: #c2410c;
  --brand-hero: #ea580c;
  --secondary: #0f172a;
  --bg-page: #eef2f6;
  --bg-surface: #f8fafc;
  --bg-card: #ffffff;
  --surface: #ffffff;
  --bg-muted: #f1f5f9;
  --brand-color: var(--brand);
  --text-main: #0f172a;
  --text: #0f172a;
  --text-muted: #475569;
  --border-color: #e2e8f0;
  --border: #e2e8f0;
  --topbar-bg: rgba(255, 255, 255, 0.94);
  --ghost-bg: #f1f5f9;
  --ghost-text: #334155;
  --pill-bg: #e2e8f0;
  --danger: #dc2626;
  --warning: #b45309;
  --info: #1d4ed8;
  --ok-text: #047857;
  --info-text: #0369a1;
  --warn-text: #b45309;
  --danger-text: #b91c1c;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.09);
  --shadow-lg: 0 14px 36px rgba(15, 23, 42, 0.14);
}

body.theme-dark {
  --bg-page: #090e1a;
  --bg-surface: #111827;
  --bg-card: #1e293b;
  --surface: #1e293b;
  --bg-muted: #111827;
  --brand-color: var(--brand);
  --text-main: #f8fafc;
  --text: #f8fafc;
  --text-muted: #b6c2d3;
  --border-color: #334155;
  --border: #334155;
  --topbar-bg: rgba(15, 23, 42, 0.94);
  --ghost-bg: #334155;
  --ghost-text: #f1f5f9;
  --pill-bg: #2b3a52;
  --warning: #b45309;
  --info: #2563eb;
  --ok-text: #34d399;
  --info-text: #7dd3fc;
  --warn-text: #fbbf24;
  --danger-text: #fca5a5;
}

/* a11y-placeholder-light */
.form-control::placeholder, input::placeholder, textarea::placeholder { color: #5b6678; opacity: 1; }

body.theme-dark .form-control::placeholder,
body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
  color: #9aa8bc;
  opacity: 1;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

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

html, body {
  font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg-page);
  color: var(--text-main);
  direction: rtl;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@supports (overflow: clip) {
  html, body { overflow-x: clip; }
}

a { color: inherit; text-decoration: none; touch-action: manipulation; }
button, input, select, textarea { font-family: inherit; touch-action: manipulation; }
img { max-width: 100%; display: block; }

.container { max-width: 1440px; margin: 0 auto; padding: 18px 18px 48px; }

/* Sticky Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--topbar-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.topbar-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand-chip { display: flex; align-items: center; gap: 10px; }
.brand-chip img {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid var(--brand);
}

/* Executive RTL Sidebar App Shell */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: 284px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #0a1222 0%, #0f172a 58%, #09101f 100%);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.25) transparent;
  border-left: 1px solid rgba(148, 163, 184, 0.16);
  z-index: 120;
  transition: transform 0.22s ease;
}

.sidebar-brand {
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 11px;
  background: rgba(15, 23, 42, 0.55);
}
.sidebar-brand img {
  width: 58px;
  height: 58px;
  border-radius: 15px;
  object-fit: cover;
  border: 2px solid var(--brand);
  background: #fff;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
.sb-role-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 5px;
}
.sb-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(56, 189, 248, 0.14);
  color: #e0f2fe;
  border: 1px solid rgba(56, 189, 248, 0.3);
  line-height: 1.45;
  white-space: nowrap;
}
.sb-branch-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.22);
  line-height: 1.45;
  white-space: nowrap;
}
.sb-tools-bar {
  padding: 10px 10px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(9, 16, 31, 0.55);
}
.sb-search-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}
.sb-search-ico {
  position: absolute;
  top: 50%;
  right: 9px;
  transform: translateY(-50%);
  font-size: 12px;
  opacity: 0.78;
  pointer-events: none;
}
html[dir="ltr"] .sb-search-ico {
  right: auto;
  left: 9px;
}
.sb-search-input {
  width: 100%;
  background: #132038;
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  padding: 7px 28px 7px 10px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
html[dir="ltr"] .sb-search-input {
  padding: 7px 10px 7px 28px;
}
.sb-search-input::placeholder {
  color: #94a3b8;
}
.sb-search-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}
.sb-collapse-all-btn {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #132038;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.sb-collapse-all-btn:hover {
  background: rgba(56, 189, 248, 0.18);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.4);
}
.show-sm-only { display: none !important; }
@media (max-width: 900px) {
  .show-sm-only { display: inline-flex !important; }
}

.sidebar-nav {
  padding: 10px 9px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sb-module {
  background: rgba(255, 255, 255, 0.032);
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 13px;
  overflow: hidden;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.sb-module.has-active {
  background: rgba(255, 255, 255, 0.052);
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.25);
}
.sb-module-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border: none;
  background: transparent;
  color: #f1f5f9;
  cursor: pointer;
  text-align: right;
  font-family: inherit;
  transition: background 0.15s ease;
}
html[dir="ltr"] .sb-module-head {
  text-align: left;
}
.sb-module-head:hover {
  background: rgba(255, 255, 255, 0.05);
}
.sb-module-head-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.sb-mod-accent {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.sb-mod-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}
.sb-mod-name {
  font-size: 12px;
  font-weight: 900;
  color: #f1f5f9;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sb-mod-sub {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sb-mod-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.sb-mod-alert {
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sb-mod-alert.is-soft {
  background: rgba(56, 189, 248, 0.22);
  color: #bae6fd;
  border: 1px solid rgba(56, 189, 248, 0.35);
}
.sb-mod-chev {
  font-size: 11px;
  color: #94a3b8;
  transition: transform 0.18s ease;
  display: inline-block;
  line-height: 1;
}
.sb-module.is-collapsed .sb-mod-chev {
  transform: rotate(90deg);
}
html[dir="ltr"] .sb-module.is-collapsed .sb-mod-chev {
  transform: rotate(-90deg);
}
.sb-module-body {
  padding: 2px 6px 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sb-module.is-collapsed .sb-module-body {
  display: none;
}

.sidebar-group-title {
  font-size: 11px;
  font-weight: 800;
  color: #a5b4c8;
  padding: 10px 10px 5px;
  letter-spacing: 0.2px;
}

.sidebar-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-size: 12.6px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 0;
  text-align: right;
  position: relative;
  transition: background 0.14s ease, color 0.14s ease, transform 0.12s ease;
}
.sb-link-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.sb-link-ico {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.sb-link-lbl {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.35;
}
.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}
.sidebar-link:hover .sb-link-ico {
  background: rgba(255, 255, 255, 0.12);
}
.sidebar-link.active {
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 900;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.26);
}
.sidebar-link.active .sb-link-ico {
  background: rgba(255, 255, 255, 0.22);
}
.sb-empty-search {
  padding: 18px 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(148, 163, 184, 0.24);
  border-radius: 12px;
}

.app-content-col {
  flex: 1;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-sticky-top-stack {
  position: sticky;
  top: 0;
  z-index: 90;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  position: relative;
  z-index: 80;
  background: var(--topbar-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.app-topbar-actions {
  gap: 5px !important;
}
.app-topbar-actions .badge {
  font-size: 11px;
  padding: 3px 7px;
}
.app-topbar-actions .btn-sm {
  padding: 5px 8px;
  font-size: 11.5px;
}
#topbar-store-status {
  padding: 4px 7px !important;
  font-size: 11.5px !important;
  max-width: 175px;
}

.app-main-pad {
  flex: 1 0 auto;
  padding: 18px 20px 32px;
  max-width: 1380px;
  width: 100%;
  margin: 0 auto;
}

.mobile-menu-btn {
  display: none;
  padding: 7px 11px;
  border-radius: 9px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-weight: 800;
  cursor: pointer;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 110;
}
.sidebar-backdrop.open { display: block; }

.nav-links { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  background: var(--pill-bg);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.nav-pill:hover { opacity: 0.9; }
.nav-pill.active { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: #dc2626;
  color: #ffffff;
}
.sidebar-link.active .nav-badge, .nav-pill.active .nav-badge { background: var(--on-brand); color: var(--brand); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}
.card code {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}
.card-title { font-size: 15.5px; font-weight: 800; display: flex; align-items: center; gap: 7px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.split-main-aside { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 16px; align-items: start; }
.split-aside-main { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.col-span-2 { grid-column: span 2; }
.grid-2 > *, .grid-3 > *, .grid-4 > *, .split-main-aside > *, .split-aside-main > *, .sup-desk > *, .pos-split > *, .live-chats-layout > * {
  min-width: 0;
}

.subnav-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  overflow-x: visible;
  padding: 2px 0 8px;
  margin-bottom: 12px;
}
.subnav-strip .nav-pill { flex-shrink: 0; }
@media (max-width: 768px) {
  .subnav-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .subnav-strip::-webkit-scrollbar { display: none; }
}

.avail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 13px;
  background: var(--bg-card);
  transition: border-color 0.15s;
}
.avail-row:hover { border-color: var(--brand-border); }

.item-edit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
}

.faq-edit-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 6px;
  margin-bottom: 8px;
  align-items: center;
}

.oos-edit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 15px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.kpi-label { font-size: 12px; color: var(--text-muted); font-weight: 700; }
.kpi-value { font-size: 22px; font-weight: 900; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn-secondary { background: var(--bg-card); color: var(--text-main); border-color: var(--border-color); }
.btn-secondary:hover:not(:disabled) { border-color: #94a3b8; }
.btn-danger { background: var(--danger); color: #ffffff; }
.btn-warning { background: var(--warning); color: #ffffff; }
.btn-info { background: var(--info); color: #ffffff; }
.btn-ghost { background: var(--ghost-bg); color: var(--ghost-text); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 12px 20px; font-size: 14.5px; border-radius: 12px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-neutral { background: var(--pill-bg); color: var(--text-muted); }
.badge-brand { background: var(--brand-light); color: var(--brand-text); border: 1px solid var(--brand-border); }

.form-group { margin-bottom: 12px; }
.form-label { display: block; font-size: 12px; font-weight: 800; color: var(--text-main); margin-bottom: 5px; }
.form-control {
  width: 100%;
  padding: 9px 11px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 13px;
  background: var(--bg-card);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
body.theme-dark .form-control {
  border-color: #475569;
  background: #0f172a;
}
.form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light); }
.studio-preview-card {
  position: sticky;
  top: 84px;
}
.studio-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
@media (max-width: 720px) {
  .studio-media-grid {
    grid-template-columns: 1fr;
  }
}
.studio-media-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 13px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface, #f8fafc);
}
.studio-color-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px 8px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  background: var(--bg-card);
  min-height: 41px;
}
body.theme-dark .studio-color-row {
  border-color: #475569;
  background: #0f172a;
}
.studio-color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.12s;
}
.studio-color-swatch:hover { transform: scale(1.12); }

.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap > table.data-table { min-width: 600px; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table th {
  text-align: right;
  padding: 10px;
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-muted);
  font-weight: 800;
  font-size: 12px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}
table.data-table td { padding: 10px; border-bottom: 1px solid var(--border-color); vertical-align: middle; }
table.data-table tr.row-selected td { background: var(--brand-light); }

.switch { position: relative; display: inline-block; width: 42px; height: 23px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; inset: 0; background: #cbd5e1; border-radius: 999px; transition: 0.2s;
}
.slider::before {
  position: absolute; content: ""; height: 17px; width: 17px; right: 3px; bottom: 3px;
  background: #ffffff; border-radius: 50%; transition: 0.2s;
}
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(-19px); }

.alert-box {
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Responsive Users Permissions, Modifier Rows, Chat Composer, Presets & Side Pairings */
.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr));
  gap: 10px;
}
.perm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-card);
}
.perm-row span {
  font-size: 12.5px;
  font-weight: 700;
  min-width: 0;
  line-height: 1.35;
}
.mod-edit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px auto auto;
  gap: 7px;
  align-items: center;
  margin-bottom: 8px;
}
.denom-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-color);
}
.chat-compose-row, .url-action-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.chat-compose-row .form-control, .url-action-row .form-control {
  flex: 1;
  min-width: 150px;
}
.chat-img-thumb {
  margin-top: 6px;
  max-width: 210px;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid rgba(15, 23, 42, 0.14);
  cursor: pointer;
  display: block;
  background: #ffffff;
}
.preset-msg-card {
  width: 100%;
  text-align: right;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.14s;
  font-family: inherit;
}
.preset-msg-card:hover { border-color: var(--brand-border); }
.preset-msg-card.active {
  border-color: var(--brand);
  background: var(--brand-light);
}
.side-pair-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  max-height: 175px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 11px;
  background: rgba(148, 163, 184, 0.06);
}
.side-pair-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  font-size: 12px;
  cursor: pointer;
}
.btn-new-badge-on {
  background: #dc2626;
  color: #ffffff;
  border: 1px solid #be123c;
  border-radius: 999px;
  padding: 5px 12px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}
.btn-new-badge-on:hover { filter: brightness(1.05); }
.btn-new-badge-off {
  background: rgba(239, 68, 68, 0.06);
  color: var(--danger-text);
  border: 1px dashed rgba(220, 38, 38, 0.45);
  border-radius: 999px;
  padding: 5px 12px;
  font-weight: 800;
}
.btn-new-badge-off:hover {
  background: rgba(239, 68, 68, 0.14);
  border-style: solid;
}
body.theme-dark .btn-new-badge-off {
  background: rgba(244, 63, 94, 0.12);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.45);
}
.adm-new-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}
.badge-new-red {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #dc2626;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}
.item-new-check-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #be123c;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}
body.theme-dark .item-new-check-pill {
  color: #fda4af;
  background: rgba(225, 29, 72, 0.16);
  border-color: rgba(244, 63, 94, 0.4);
}
.alert-warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 250; background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; padding: 16px;
  overscroll-behavior: contain;
}
.modal-backdrop.open { display: flex; }
.modal-box {
  width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh; overflow-y: auto;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: var(--bg-card); border-radius: 18px; padding: 20px; box-shadow: var(--shadow-lg);
}
.modal-box.wide { max-width: 860px; }

.toast-container { position: fixed; bottom: 18px; left: 18px; z-index: 400; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #0f172a; color: #ffffff; padding: 11px 15px; border-radius: 11px;
  font-size: 13px; font-weight: 700; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 8px; border-right: 4px solid var(--brand);
}
.toast.toast-warn { border-right-color: #f59e0b; }
.toast.toast-danger { border-right-color: #ef4444; }

.sup-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; margin-bottom: 14px; }
.pos-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.pos-tab {
  background: var(--bg-card); border: 1.5px solid var(--border-color); border-radius: 12px;
  padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 6px;
  font-weight: 800; font-size: 13px; color: var(--text-main); cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
}
.pos-tab:hover { border-color: var(--brand-border); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.pos-tab.active {
  border-color: var(--brand); background: var(--brand-light); color: var(--brand-text);
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.12);
}

.sup-desk { display: grid; grid-template-columns: 300px minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.pos-split { display: grid; grid-template-columns: 330px 1fr; gap: 16px; align-items: start; }
.order-card-item {
  background: var(--bg-surface); border: 1.5px solid var(--border-color); border-radius: 13px;
  padding: 11px 12px; cursor: pointer; margin-bottom: 8px;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.12s ease, box-shadow 0.16s ease;
}
.order-card-item:hover { border-color: var(--brand-border); box-shadow: var(--shadow-sm); }
.order-card-item.selected {
  border-color: var(--brand); background: var(--brand-light);
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.14);
}

.sup-chat-box {
  background: #efeae2; color: #0f172a; border-radius: 12px; padding: 12px;
  height: 310px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px;
  border: 1px solid var(--border-color);
}
.sup-msg { max-width: 88%; padding: 8px 11px; border-radius: 11px; font-size: 12.5px; white-space: pre-line; overflow-wrap: anywhere; word-break: break-word; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06); }
.sup-msg.supervisor { align-self: flex-end; background: #d9fdd3; color: #0f172a; border-bottom-left-radius: 4px; }
.sup-msg.customer { align-self: flex-start; background: #ffffff; color: #0f172a; border-bottom-right-radius: 4px; }
.sup-msg.bot { align-self: center; background: #e2e8f0; color: #334155; font-size: 11.5px; text-align: center; }

.thermal-receipt {
  width: 300px; margin: 0 auto; background: #ffffff; color: #000000;
  border: 1px dashed #94a3b8; padding: 14px; font-size: 12px; line-height: 1.5;
}
.tr-center { text-align: center; }
.tr-divider { border-top: 1px dashed #334155; margin: 7px 0; }
.tr-row { display: flex; justify-content: space-between; gap: 6px; }
.tr-bold { font-weight: 800; }
.receipt-cut-sep {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px auto;
  max-width: 310px;
  padding: 5px 10px;
  border-top: 2px dashed #0f172a;
  border-bottom: 2px dashed #0f172a;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}
.receipt-dual-hint {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.3);
  font-size: 11.5px;
  font-weight: 700;
  color: #0369a1;
  text-align: right;
}

.phone-frame {
  width: 370px; max-width: 100%; height: 690px; background: #111827;
  border-radius: 38px; padding: 11px; box-shadow: var(--shadow-lg); margin: 0 auto; position: relative;
}
.phone-screen {
  width: 100%; height: 100%; background: #efeae2; border-radius: 28px;
  overflow: hidden; position: relative; display: flex; flex-direction: column; color: #0f172a;
}

@media print {
  @page { margin: 0; }
  html, body { background: #fff !important; height: auto !important; overflow: visible !important; }
  body * { visibility: hidden !important; }
  #print-area, #print-area * { visibility: visible !important; }
  #print-area {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    width: 80mm !important;
    height: auto !important;
    padding: 2mm !important;
    overflow: visible !important;
    background: #fff !important;
  }
  body.print-paper-58 #print-area { width: 58mm !important; }
  #print-area .thermal-receipt {
    width: 100% !important;
    margin: 0 !important;
    border: none !important;
    padding: 2mm !important;
    box-shadow: none !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  #print-area .receipt-cut-sep {
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    page-break-after: always !important;
    break-after: page !important;
  }
  #print-area .receipt-dual-hint { display: none !important; }
}

@media (max-width: 1240px) {
  .sup-desk, .pos-split, .split-main-aside, .split-aside-main { grid-template-columns: 1fr !important; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 95;
  background: var(--topbar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-color);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -6px 22px rgba(15, 23, 42, 0.08);
  align-items: center;
  justify-content: space-around;
  gap: 4px;
}
.mbn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 5px 4px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  font-family: inherit;
}
.mbn-item .mbn-ico { font-size: 17px; line-height: 1.1; }
.mbn-item.active {
  color: var(--brand-text);
  background: var(--brand-light);
}
.mbn-badge {
  position: absolute;
  top: 2px;
  left: calc(50% - 18px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #d23c3c;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1040px) {
  .mobile-menu-btn { display: inline-flex; align-items: center; gap: 6px; }
  .app-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    transform: translateX(105%);
  }
  .app-sidebar.open { transform: translateX(0); }
  .app-mobile-nav { display: flex; }
  .app-main-pad { padding: 14px 12px calc(86px + env(safe-area-inset-bottom, 0px)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid-2, .split-main-aside, .split-aside-main { grid-template-columns: 1fr !important; }
  .col-span-2 { grid-column: span 1 !important; }
  .sup-tabs, .pos-tabs {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .pos-tab { flex: 0 0 auto; white-space: nowrap; }
}

@media (max-width: 768px) {
  .hide-sm { display: none !important; }
  .show-mobile-flex { display: flex !important; }
  .app-topbar { padding: 8px 12px; gap: 6px; }
  .app-main-pad h1 { font-size: 17.5px !important; line-height: 1.35; }
  .container { padding: 12px 12px 76px; }
  .card { padding: 14px; border-radius: 14px; }
  .card-header { gap: 8px; }
  .card-title { font-size: 14.5px; flex-wrap: wrap; }
  .kpi-card { padding: 12px; }
  .kpi-value { font-size: 18px; }
  .btn { max-width: 100%; }
  .btn-lg, .btn[style*="width:100%"] { white-space: normal; text-align: center; line-height: 1.35; }
  .grid-3, .side-pair-grid { grid-template-columns: 1fr !important; }
  .faq-edit-row { grid-template-columns: 1fr auto; }
  .faq-edit-row > input:first-child { grid-column: 1 / -1; }
  .oos-edit-row { grid-template-columns: minmax(0, 1fr) 82px auto auto; gap: 6px; font-size: 12px; }
  .form-control { font-size: 16px; min-height: 42px; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal-box {
    max-width: 100%;
    border-radius: 22px 22px 0 0;
    max-height: 90dvh;
    padding: 12px 16px calc(22px + env(safe-area-inset-bottom, 0px));
  }
  .modal-box::before {
    content: "";
    display: block;
    width: 42px;
    height: 4px;
    border-radius: 99px;
    background: var(--border-color);
    margin: 0 auto 12px;
  }
  .toast-container { bottom: calc(74px + env(safe-area-inset-bottom, 0px)); left: 12px; right: 12px; }
}

@media (max-width: 560px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; }
  .kpi-value { font-size: 16.5px; word-break: break-word; }
  .item-edit-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .avail-row { padding: 10px 12px; gap: 10px; flex-wrap: wrap; }
  .mod-edit-row { grid-template-columns: 1fr auto auto; }
  .mod-edit-row > input:first-child { grid-column: 1 / -1; }
  .denom-row { grid-template-columns: 76px minmax(0, 1fr) auto; gap: 6px; }
}

@media (max-width: 480px) {
  .sa-section .grid-4, .form-grid-4 { grid-template-columns: 1fr !important; }
}

/* ===================== v5.8 HARDWARE-GRADE TOUCHSCREEN POS TERMINAL ===================== */
body.pos-terminal-active {
  overflow: hidden;
  height: 100dvh;
}
body.pos-terminal-active .app-shell {
  display: block;
  height: 100dvh;
  overflow: hidden;
}
body.pos-terminal-active .app-topbar,
body.pos-terminal-active #app-fav-bar,
body.pos-terminal-active .app-mobile-nav,
body.pos-kiosk-mode .app-topbar,
body.pos-kiosk-mode #app-fav-bar,
body.pos-kiosk-mode .app-mobile-nav {
  display: none !important;
}
body.pos-terminal-active .app-sidebar {
  position: fixed;
  top: 0;
  right: -296px;
  bottom: 0;
  z-index: 1200;
  box-shadow: -10px 0 36px rgba(2, 6, 23, 0.45);
  transition: right 0.2s ease;
}
body.pos-terminal-active .app-sidebar.open {
  right: 0;
}
body.pos-terminal-active .app-content-col {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.pos-terminal-active #sub-expiry-banner {
  padding: 5px 12px !important;
  font-size: 11.5px !important;
  flex-shrink: 0;
}
body.pos-terminal-active .app-main-pad {
  flex: 1;
  min-height: 0;
  max-width: 100% !important;
  width: 100%;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pos-terminal-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--bg-page);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.pos-terminal-shell * {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.pos-hw-topbar {
  height: 56px;
  flex-shrink: 0;
  background: #0b1324;
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.pos-hw-left, .pos-hw-right {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.pos-hw-menu-btn {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.pos-hw-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  padding-inline: 4px;
}
.pos-hw-brand b { font-size: 13.5px; color: #ffffff; white-space: nowrap; }
.pos-hw-brand span { font-size: 10.5px; color: #94a3b8; white-space: nowrap; }

.pos-mode-switch {
  display: inline-flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.07);
  padding: 3px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.pos-mode-pill {
  min-height: 38px;
  padding: 5px 13px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  user-select: none;
}
.pos-mode-pill.active {
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
.pos-hw-btn {
  min-height: 38px;
  padding: 5px 11px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.pos-hw-btn:hover { background: rgba(255, 255, 255, 0.14); }
.pos-hw-btn.is-active { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }

.pos-register-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 152px minmax(0, 1fr) 412px;
  gap: 0;
  overflow: hidden;
}

/* Column 1: Vertical Touch Category Rail (Right side in RTL) */
.pos-cat-rail {
  background: var(--bg-card);
  border-left: 1.5px solid var(--border-color);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
  min-height: 0;
}
.pos-cat-rail-btn {
  min-height: 60px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  border-right: 5px solid var(--cat-accent, #64748b);
  background: var(--bg-page);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 900;
  text-align: right;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-shrink: 0;
  transition: transform 0.08s, background 0.12s;
}
.pos-cat-rail-btn:active { transform: scale(0.96); }
.pos-cat-rail-btn.active {
  background: var(--brand);
  color: var(--on-brand);
  border-color: var(--brand);
  border-right-color: #ffffff;
  box-shadow: var(--shadow-sm);
}
.pos-cat-rail-btn.is-new {
  border-right-color: #ef4444;
  background: #fff1f2;
  color: #be123c;
}
.pos-cat-rail-btn.is-new.active {
  background: linear-gradient(135deg, #ef4444 0%, #be123c 100%);
  color: #ffffff;
  border-color: #be123c;
}
body.theme-dark .pos-cat-rail-btn.is-new {
  background: rgba(225, 29, 72, 0.16);
  color: #fda4af;
}
.pos-cat-cnt {
  font-size: 10.5px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
}
.pos-cat-rail-btn.active .pos-cat-cnt {
  background: rgba(0, 0, 0, 0.24);
  color: var(--on-brand);
}

/* Keep .pos-cat-btn styling for Modifier Modal option buttons */
.pos-cat-btn {
  min-height: 46px;
  padding: 9px 15px;
  border-radius: 11px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-page);
  color: var(--text-main);
  font-size: 13.5px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pos-cat-btn:active { transform: scale(0.96); }
.pos-cat-btn.active {
  background: var(--brand);
  color: var(--on-brand);
  border-color: var(--brand);
}

/* Column 2: Center High-Speed Menu Tiles Workspace */
.pos-catalog-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 10px 12px;
  gap: 9px;
  background: var(--bg-page);
}
.pos-search-row {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-shrink: 0;
}
.pos-search-input {
  min-height: 46px;
  font-size: 14.5px;
  font-weight: 700;
  border-radius: 12px;
  flex: 1;
}
.pos-tiles-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
  grid-auto-rows: 148px;
  gap: 9px;
  align-content: start;
  padding: 2px;
}
.pos-tiles-grid.compact-mode {
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  grid-auto-rows: 98px;
}
.pos-item-tile {
  position: relative;
  border-radius: 14px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-align: right;
  font-family: inherit;
  color: var(--text-main);
  padding: 0;
  user-select: none;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: transform 0.07s, border-color 0.12s, box-shadow 0.12s;
}
.pos-item-tile:active { transform: scale(0.95); }
.pos-item-tile.in-cart {
  border-color: var(--brand);
  box-shadow: 0 0 0 2.5px var(--brand-border);
}
.pos-item-tile.is-oos {
  opacity: 0.45;
  cursor: not-allowed;
}
.pos-tile-media {
  position: relative;
  height: 78px;
  width: 100%;
  background: rgba(148, 163, 184, 0.12);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}
.pos-tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pos-tile-emoji { font-size: 28px; line-height: 1; }
.pos-tile-new {
  position: absolute;
  top: 0;
  left: 0;
  background: #dc2626;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 0 0 9px 0;
}
.pos-tile-qty {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 12.5px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.28);
}
.pos-tile-dec {
  position: absolute;
  bottom: 5px;
  left: 5px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.pos-tile-stock {
  position: absolute;
  bottom: 4px;
  right: 5px;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 6px;
}
.pos-tile-body {
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  justify-content: space-between;
}
.pos-tile-name {
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pos-tile-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}
.pos-tile-price {
  font-size: 13.5px;
  font-weight: 900;
  color: var(--brand-text);
}

/* Compact Fast Hardware POS Button Variant */
.pos-item-tile.is-compact {
  border-top: 4px solid var(--tile-accent, var(--brand));
  padding: 9px 10px;
  justify-content: space-between;
}
.pos-item-tile.is-compact .pos-tile-qty { top: 6px; left: 6px; right: auto; }
.pos-item-tile.is-compact.in-cart { background: var(--brand-light); }

/* Column 3: Left Full-Height Thermal Receipt & Action Pad Dock */
.pos-ticket-pane {
  background: var(--bg-card);
  border-right: 1.5px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.pos-dock-head {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex-shrink: 0;
}
.pos-type-seg {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.pos-type-btn {
  min-height: 44px;
  border-radius: 10px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-page);
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 900;
  cursor: pointer;
  font-family: inherit;
  user-select: none;
}
.pos-type-btn.active {
  background: var(--brand);
  color: var(--on-brand);
  border-color: var(--brand);
}
.pos-table-strip {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}
.pos-table-strip::-webkit-scrollbar { display: none; }
.pos-table-pill {
  min-height: 36px;
  padding: 5px 11px;
  border-radius: 9px;
  border: 1px solid var(--border-color);
  background: var(--bg-page);
  color: var(--text-main);
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
}
.pos-table-pill.active {
  background: var(--brand-light);
  color: var(--brand-text);
  border-color: var(--brand);
}
.pos-cust-chip-btn {
  min-height: 44px;
  width: 100%;
  padding: 6px 11px;
  border-radius: 10px;
  border: 1.5px dashed var(--border-color);
  background: var(--bg-page);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  text-align: right;
}
.pos-cust-chip-btn.has-data {
  border-style: solid;
  border-color: var(--brand-border);
  background: var(--brand-light);
}

.pos-cart-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pos-cart-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 11px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-page);
  cursor: pointer;
}
.pos-cart-row.selected {
  border-color: var(--brand);
  background: var(--brand-light);
}
.pos-qty-btn {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  display: grid;
  place-items: center;
  user-select: none;
  font-family: inherit;
}
.pos-qty-btn.plus {
  background: var(--brand);
  color: var(--on-brand);
  border-color: var(--brand);
}
.pos-qty-btn:active { transform: scale(0.92); }

.pos-dock-footer {
  flex-shrink: 0;
  border-top: 1.5px solid var(--border-color);
  padding: 9px 10px;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pos-fn-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}
.pos-fn-btn {
  min-height: 44px;
  padding: 4px 2px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-page);
  color: var(--text-main);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-family: inherit;
}
.pos-fn-btn:disabled { opacity: 0.42; cursor: not-allowed; }
.pos-fn-btn:active:not(:disabled) { transform: scale(0.95); }

.pos-totals-ledger {
  background: rgba(148, 163, 184, 0.08);
  border-radius: 11px;
  padding: 8px 11px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pos-submit-bar {
  display: grid;
  grid-template-columns: 0.85fr 1fr 1.25fr;
  gap: 6px;
}
.pos-submit-btn {
  min-height: 54px;
  font-size: 13px;
  font-weight: 900;
  border-radius: 12px;
  padding: 6px 8px;
}

/* Visual Restaurant Tables Map (Floor Plan Workspace) */
.pos-floor-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 14px;
  align-content: start;
}
.pos-floor-table {
  min-height: 132px;
  border-radius: 18px;
  border: 2px solid var(--border-color);
  background: var(--bg-card);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  text-align: right;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s;
}
.pos-floor-table:active { transform: scale(0.96); }
.pos-floor-table.is-occupied { border-color: #f59e0b; background: #fffbeb; color: #78350f; }
.pos-floor-table.is-calling { border-color: #ef4444; background: #fef2f2; color: #881337; }
body.theme-dark .pos-floor-table.is-occupied { background: rgba(245, 158, 11, 0.16); color: #fde68a; }
body.theme-dark .pos-floor-table.is-calling { background: rgba(239, 68, 68, 0.18); color: #fecdd3; }

/* Dedicated Split Touch Payment & Change Settlement Modal */
.pos-pay-split {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 14px;
  align-items: start;
}
.pos-pay-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.pos-pay-tile {
  min-height: 52px;
  padding: 7px 6px;
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-page);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  user-select: none;
}
.pos-pay-tile.active {
  border-color: var(--brand);
  background: var(--brand-light);
  color: var(--brand-text);
}
.pos-denom-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pos-denom-btn {
  min-height: 44px;
  padding: 6px 11px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-page);
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 900;
  cursor: pointer;
  font-family: inherit;
  flex: 1 0 auto;
}
.pos-denom-btn.active {
  background: var(--brand);
  color: var(--on-brand);
  border-color: var(--brand);
}
.touch-numpad {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.touch-key-btn {
  min-height: 54px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-page);
  color: var(--text-main);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  user-select: none;
  font-family: inherit;
}
.touch-key-btn.is-add { background: rgba(59, 130, 246, 0.12); color: var(--info-text); border-color: rgba(59, 130, 246, 0.35); font-size: 14px; }
.touch-key-btn:active { transform: scale(0.94); background: var(--brand-light); }

.pos-change-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 900;
  background: #ecfdf5;
  color: #065f46;
  border: 1.5px solid #a7f3d0;
}
.pos-change-box.short {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}
body.theme-dark .pos-change-box { background: rgba(16, 185, 129, 0.16); color: #6ee7b7; border-color: rgba(52, 211, 153, 0.35); }
body.theme-dark .pos-change-box.short { background: rgba(245, 158, 11, 0.16); color: #fcd34d; border-color: rgba(251, 191, 36, 0.35); }

.pos-drv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  width: 100%;
}
.pos-drv-tile {
  min-height: 46px;
  padding: 8px 11px;
  border-radius: 11px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-page);
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  text-align: right;
  font-family: inherit;
}
.pos-drv-tile.active {
  border-color: var(--brand);
  background: var(--brand-light);
  color: var(--brand-text);
}

.pos-queue-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
}
.pos-mob-pane-bar {
  display: none;
}

@media (max-width: 900px) {
  .pos-mob-pane-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 7px 10px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
  }
  .pos-register-layout {
    grid-template-columns: 116px minmax(0, 1fr);
  }
  .pos-register-layout[data-mob-pane="ticket"] {
    grid-template-columns: 1fr;
  }
  .pos-register-layout[data-mob-pane="catalog"] .pos-ticket-pane { display: none; }
  .pos-register-layout[data-mob-pane="ticket"] .pos-cat-rail,
  .pos-register-layout[data-mob-pane="ticket"] .pos-catalog-pane { display: none; }
  .pos-pay-split { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .pos-tiles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 136px; }
  .pos-submit-bar { grid-template-columns: 1fr 1fr; }
  .pos-submit-bar button:last-child { grid-column: 1 / -1; }
}

/* v5.7 Live Dine-In Table Calls Strip, Promo Studio & Printable Table QR Grid */
.table-calls-strip {
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%);
  border: 1.5px solid #f59e0b;
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
body.theme-dark .table-calls-strip {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16) 0%, rgba(234, 88, 12, 0.1) 100%);
  border-color: rgba(251, 191, 36, 0.45);
}
.table-calls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
}
.table-call-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid #fcd34d;
  box-shadow: var(--shadow-sm);
}
.table-call-card.is-bill {
  border-color: #f87171;
  background: #fef2f2;
}
body.theme-dark .table-call-card.is-bill {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(248, 113, 113, 0.45);
}
.promo-admin-card {
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px;
  background: var(--bg-page);
  margin-bottom: 10px;
}
.table-qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 12px;
}
.table-qr-card {
  border: 1.5px dashed var(--border-color);
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.table-qr-card img {
  width: 128px;
  height: 128px;
  background: #ffffff;
  padding: 5px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

/* ===================== v5.9 COMPREHENSIVE REPORTS & CONTACTS VAULT ===================== */
.report-subtabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.report-subtabs .nav-pill {
  white-space: nowrap;
  flex-shrink: 0;
}
.anomaly-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 10px;
}
.anomaly-stat-btn {
  border: 1.5px solid var(--border-color);
  border-radius: 13px;
  padding: 11px 13px;
  background: var(--bg-card);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  cursor: pointer;
  font-family: inherit;
  text-align: right;
  transition: transform 0.1s, border-color 0.15s, background 0.15s;
}
.anomaly-stat-btn span {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
}
.anomaly-stat-btn b {
  font-size: 21px;
  font-weight: 900;
}
.anomaly-stat-btn:active { transform: scale(0.97); }
.anomaly-stat-btn.tone-danger b { color: var(--danger-text); }
.anomaly-stat-btn.tone-warn b { color: var(--warn-text); }
.anomaly-stat-btn.tone-info b { color: var(--info-text); }
.anomaly-stat-btn.active {
  border-color: var(--brand);
  background: var(--brand-light);
}
.anomaly-stat-btn.tone-danger.active {
  border-color: #dc2626;
  background: rgba(239, 68, 68, 0.1);
}
.anomaly-stat-btn.tone-warn.active {
  border-color: #d97706;
  background: rgba(245, 158, 11, 0.12);
}
.anomaly-stat-btn.tone-info.active {
  border-color: #2563eb;
  background: rgba(59, 130, 246, 0.1);
}
.contacts-vault-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 640px) {
  .contacts-vault-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== StrixBot v6.0.0 Multi-Branch, Call Center & Touch KDS ==================== */
.ext-branch-bar {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
}
.ext-branch-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.ext-branch-pill {
  border: 1.5px solid var(--border-color);
  background: var(--bg-page);
  color: var(--text-main);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.ext-branch-pill.active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.25);
}
.ext-branch-pill.is-off:not(.active) {
  opacity: 0.72;
}

.cc-branch-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  margin-bottom: 12px;
}
.cc-branch-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 11px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-page);
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
.cc-branch-pill.active {
  background: var(--brand-light);
  border-color: var(--brand);
  color: var(--brand-text);
}
.cc-branch-pill.st-busy { border-color: #f59e0b; }
.cc-branch-pill.st-closed { border-color: #dc2626; opacity: 0.85; }
.cc-branch-gear {
  border: none;
  background: rgba(148, 163, 184, 0.16);
  color: inherit;
  border-radius: 7px;
  padding: 2px 6px;
  font-size: 12px;
  cursor: pointer;
}

/* Hardware Touch KDS & Expo Terminal */
.kds-terminal-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  background: var(--bg-page);
  overflow: hidden;
}
.kds-hw-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  background: #0f172a;
  color: #f8fafc;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.kds-stage-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.kds-stage-btn {
  min-height: 44px;
  padding: 6px 13px;
  border-radius: 11px;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.kds-stage-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
}
.kds-allday-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  padding: 8px 14px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}
.kds-allday-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(234, 88, 12, 0.1);
  border: 1px solid var(--brand-border);
  font-size: 12.5px;
  font-weight: 900;
  white-space: nowrap;
}
.kds-tickets-area {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
}
.kds-tickets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 315px), 1fr));
  gap: 14px;
  align-items: start;
}
.kds-ticket-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-top: 6px solid var(--brand);
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kds-ticket-card.sla-warn { border-top-color: #f59e0b; }
.kds-ticket-card.sla-late { border-top-color: #dc2626; box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.18); }
.kds-ticket-card.is-packed { border-top-color: #059669; }
.kds-ticket-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border-color);
}
.kds-item-touch-row {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  background: var(--bg-page);
  transition: background 0.14s ease, border-color 0.14s ease;
}
.kds-item-touch-row.is-done {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.45);
  text-decoration: line-through;
  opacity: 0.78;
}
.kds-check-box {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 2px solid var(--border-color);
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 900;
  flex-shrink: 0;
  background: var(--bg-card);
}
.kds-item-touch-row.is-done .kds-check-box {
  background: #04845c;
  border-color: #059669;
  color: #ffffff;
}
.kds-action-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
}
.kds-bump-btn {
  flex: 1;
  min-height: 52px;
  font-size: 14.5px;
  font-weight: 900;
  border-radius: 12px;
}

/* ==================== v7.0 Executive Supervisor Command Center ==================== */
.sup-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.sup-header-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.sup-mobile-switch {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 13px;
  padding: 5px;
  margin-bottom: 12px;
}
.sup-mobile-switch.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.sup-mob-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 800;
  font-size: 12.5px;
  padding: 9px 6px;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.sup-mob-btn.active { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-sm); }

.sup-queue-panel, .sup-chat-panel {
  position: sticky;
  top: 72px;
}
.sup-queue-scroll {
  max-height: calc(100vh - 270px);
  min-height: 260px;
  overflow-y: auto;
  padding-left: 2px;
}
.sup-order-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}
.sup-order-num {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.3px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sup-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.sup-meta-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12.5px;
}
.sup-meta-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.sup-pay-banner {
  padding: 11px 13px;
  border-radius: 12px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border: 1.5px solid var(--border-color);
}
.sup-pay-banner.is-verified { background: rgba(16, 185, 129, 0.10); border-color: rgba(16, 185, 129, 0.40); }
.sup-pay-banner.is-pending { background: rgba(245, 158, 11, 0.11); border-color: rgba(245, 158, 11, 0.45); }
.sup-pay-banner.is-online { background: rgba(37, 99, 235, 0.09); border-color: rgba(37, 99, 235, 0.35); }

.sup-items-card {
  border: 1px solid var(--border-color);
  border-radius: 13px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: var(--bg-surface);
}
.sup-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-color);
}
.sup-item-row.is-readonly {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
}
.sup-item-qty-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--brand-light);
  border: 1px solid var(--brand-border);
  color: var(--brand-text);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.sup-meta-grid.is-single-card {
  grid-template-columns: 1fr;
}
.sup-edit-mode-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 11px;
  background: rgba(245, 158, 11, 0.12);
  border: 1.5px dashed rgba(217, 119, 6, 0.55);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 800;
}
.sup-item-row:last-of-type { border-bottom: none; }
.sup-qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 2px 4px;
}
.sup-qty-stepper button { min-width: 28px; min-height: 28px; padding: 0; border-radius: 7px; font-weight: 900; }

.sup-summary-strip {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 13px;
  padding: 11px 13px;
  margin-bottom: 12px;
  font-size: 13px;
}
.sup-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
}
.sup-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  font-weight: 900;
  border-top: 1px dashed var(--border-color);
  margin-top: 7px;
  padding-top: 8px;
}

.sup-action-dock {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
}
.sup-stage-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 11px 14px;
  border-radius: 13px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-page);
}
.sup-stage-banner.is-preparing {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.42);
}
.sup-stage-banner.is-ready {
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.42);
}
.sup-stage-banner.is-delivery {
  background: rgba(99, 102, 241, 0.11);
  border-color: rgba(99, 102, 241, 0.42);
}
.sup-stage-banner.is-done {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.5);
}
.sup-stage-banner.is-cancelled {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.42);
}
.sup-stage-banner-title {
  font-size: 13.5px;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.35;
}
.sup-stage-banner-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 700;
}
.sup-primary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.sup-primary-actions.is-single {
  grid-template-columns: 1fr;
}
.sup-primary-actions .btn { min-height: 46px; font-size: 14px; font-weight: 900; }
.sup-btn-dispatch {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%) !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}
.sup-btn-dispatch:hover { filter: brightness(1.06); }
.sup-btn-complete {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  border-color: #047857 !important;
  color: #ffffff !important;
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.28);
}
.sup-btn-complete:hover { filter: brightness(1.06); }
.sup-secondary-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
}
.sup-quick-replies {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 9px;
}

@media (max-width: 1240px) {
  .sup-mobile-switch { display: grid; }
  .sup-queue-panel, .sup-chat-panel { position: static; }
  .sup-queue-scroll { max-height: 62vh; }
  .sup-pane-hidden-mob { display: none !important; }
}
@media (max-width: 680px) {
  .sup-meta-grid, .sup-primary-actions { grid-template-columns: 1fr; }
  .sup-item-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
}

/* ===================== v7.2 DELIVERY ZONES, EGYPT GEO & STREET PRICING ===================== */
.geo-hero-banner {
  background: linear-gradient(135deg, rgba(var(--brand-rgb, 234, 88, 12), 0.12), rgba(15, 23, 42, 0.04));
  border: 1.5px solid var(--brand-border, var(--border-color));
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.zone-bulk-bar {
  background: var(--bg-surface);
  border: 1.5px dashed var(--brand-border, var(--border-color));
  border-radius: 13px;
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.geo-area-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 10px;
}
.geo-area-card {
  border: 1.5px solid var(--border-color);
  border-radius: 13px;
  padding: 11px;
  background: var(--bg-card);
  transition: border-color 0.15s ease;
}
.geo-area-card.is-selected {
  border-color: var(--brand);
  background: var(--brand-light);
}
.geo-streets-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.geo-street-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.geo-street-chip.active {
  border-color: var(--brand);
  background: rgba(var(--brand-rgb, 234, 88, 12), 0.13);
  color: var(--text-main);
}
.street-price-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 125px auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 11px;
  background: var(--bg-card);
  margin-bottom: 7px;
}
@media (max-width: 680px) {
  .geo-area-grid { grid-template-columns: 1fr; }
  .street-price-row { grid-template-columns: minmax(0, 1fr) 95px auto auto; }
}

/* ===================== v7.3 SAAS & TENANT ANALYTICS CHARTS ===================== */
.sa-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.charts-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.charts-3col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.vbar-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
}
.vbar-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  min-height: 188px;
  padding: 22px 6px 4px;
  border-bottom: 1px solid var(--border-color);
}
.vbar-col {
  flex: 1 0 34px;
  min-width: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.vbar-val {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  white-space: nowrap;
}
.vbar-col.is-peak .vbar-val {
  color: var(--brand-text);
  font-weight: 900;
}
.vbar-track {
  width: 100%;
  max-width: 34px;
  height: 124px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(148, 163, 184, 0.08);
  border-radius: 8px 8px 3px 3px;
  overflow: hidden;
}
.vbar-fill {
  width: 100%;
  min-height: 3px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, var(--brand), rgba(234, 88, 12, 0.72));
  transition: height 0.2s ease;
}
.vbar-col.is-peak .vbar-fill {
  background: linear-gradient(180deg, #059669, #10b981);
}
.vbar-col.is-busy .vbar-fill {
  background: linear-gradient(180deg, #f59e0b, #ea580c);
}
.vbar-lbl {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
}
.vbar-sub {
  font-size: 9.5px;
  color: var(--text-muted);
  white-space: nowrap;
}
.hour-chart {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 3px;
  align-items: end;
  min-height: 175px;
  padding: 20px 2px 4px;
  border-bottom: 1px solid var(--border-color);
}
.hour-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.hour-track {
  width: 100%;
  height: 118px;
  display: flex;
  align-items: flex-end;
  background: rgba(148, 163, 184, 0.08);
  border-radius: 6px 6px 2px 2px;
  overflow: hidden;
}
.hour-fill {
  width: 100%;
  min-height: 2px;
  background: linear-gradient(180deg, #3b82f6, #60a5fa);
  border-radius: 5px 5px 0 0;
}
.hour-col.is-busy .hour-fill {
  background: linear-gradient(180deg, #f97316, #fb923c);
}
.hour-col.is-peak .hour-fill {
  background: linear-gradient(180deg, #be123c, #ef4444);
}
.hour-lbl {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--text-muted);
  white-space: nowrap;
}
.shift-blocks-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}
.shift-block-card {
  padding: 8px 9px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  font-size: 11.5px;
}
.mix-bar-row {
  margin-bottom: 9px;
}
.mix-bar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 4px;
}
.mix-bar-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
}
.mix-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--brand);
}
@media (max-width: 1024px) {
  .sa-kpi-grid, .charts-2col, .charts-3col { grid-template-columns: 1fr; }
  .sa-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .shift-blocks-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hour-chart { gap: 2px; min-width: 480px; }
  .hour-wrap-scroll { overflow-x: auto; }
}

/* Live Order Chat & Omni-Channel Pro Inbox (Full-Width Spacious Workspace) */
body.live-chats-active .app-main-pad {
  max-width: 100% !important;
  padding: 10px 14px 12px !important;
}
body.live-chats-active .strix-app-main-footer {
  display: none !important;
}
body.live-chats-active.lc-fullscreen-mode .app-sidebar,
body.live-chats-active.lc-fullscreen-mode .app-topbar,
body.live-chats-active.lc-fullscreen-mode .app-fav-bar,
body.live-chats-active.lc-fullscreen-mode .app-mobile-nav {
  display: none !important;
}
body.live-chats-active.lc-fullscreen-mode .app-main {
  margin-right: 0 !important;
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}
body.live-chats-active.lc-fullscreen-mode .app-main-pad {
  padding: 8px 10px !important;
}
.live-chats-page {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: calc(100dvh - 86px);
  min-height: 540px;
  max-width: 100%;
  overflow-x: hidden;
}
body.live-chats-active.lc-fullscreen-mode .live-chats-page {
  height: calc(100dvh - 18px);
  min-height: 480px;
}
.lc-header-bar {
  padding: 9px 14px;
  margin-bottom: 0 !important;
  flex-shrink: 0;
}
.lc-kpi-grid {
  gap: 8px !important;
  margin-bottom: 0 !important;
  flex-shrink: 0;
}
.lc-kpi-grid .kpi-card {
  padding: 7px 12px;
  border-radius: 11px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.lc-kpi-grid .kpi-label {
  font-size: 11.5px;
  margin: 0;
}
.lc-kpi-grid .kpi-value {
  font-size: 18px;
  margin: 0;
}
.lc-filter-tabs {
  margin-bottom: 0 !important;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.lc-filter-tabs::-webkit-scrollbar { display: none; }
.lc-filter-tabs .pos-tab {
  flex: 0 0 auto;
  white-space: nowrap;
}
.lc-mob-back-btn {
  display: none;
}
.live-chats-layout {
  display: grid;
  grid-template-columns: 315px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}
.live-chats-layout.with-details {
  grid-template-columns: 290px minmax(0, 1fr) 290px;
}
@media (min-width: 1600px) {
  .live-chats-layout {
    grid-template-columns: 360px minmax(0, 1fr);
  }
  .live-chats-layout.with-details {
    grid-template-columns: 340px minmax(0, 1fr) 330px;
  }
}
@media (max-height: 760px) and (min-width: 961px) {
  .lc-header-bar { padding: 6px 12px; }
  .lc-header-sub { display: none; }
  .lc-kpi-grid .kpi-card { padding: 5px 10px; }
  .lc-kpi-grid .kpi-value { font-size: 15.5px; }
}
.lc-list-card,
.lc-chat-card,
.lc-details-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  margin-bottom: 0 !important;
}
.lc-chat-card {
  padding: 12px 14px;
  position: relative;
}
.lc-chat-card.lc-drop-active {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.22);
}
.lc-drop-overlay {
  display: none;
  position: absolute;
  inset: 8px;
  z-index: 25;
  border-radius: 14px;
  border: 2.5px dashed var(--brand);
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  font-size: 16px;
  font-weight: 900;
  pointer-events: none;
}
.lc-chat-card.lc-drop-active .lc-drop-overlay {
  display: flex;
}
.lc-details-card {
  padding: 12px;
  overflow-y: auto;
  gap: 10px;
}
.live-chat-item-card {
  padding: 10px 11px;
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
  margin-bottom: 7px;
}
.live-chat-item-card:hover {
  border-color: var(--brand);
}
.live-chat-item-card.selected {
  border-color: var(--brand);
  background: var(--brand-light);
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.12);
}
.live-chat-item-card.needs-agent {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}
.live-chat-item-card.has-unread {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.06);
}
.live-chat-item-card.selected.needs-agent,
.live-chat-item-card.selected.has-unread {
  border-color: var(--brand);
  background: var(--brand-light);
}
.lc-avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.18), rgba(245, 158, 11, 0.22));
  color: var(--brand-text);
  border: 1.5px solid rgba(234, 88, 12, 0.28);
}
.lc-avatar-circle.wa {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(5, 150, 105, 0.25));
  color: #059669;
  border-color: rgba(16, 185, 129, 0.35);
}
.lc-unread-pill {
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 999px;
  background: #10b981;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.live-dot-pulse {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.28);
  animation: livePulseDot 1.6s infinite;
  vertical-align: middle;
}
@keyframes livePulseDot {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.sup-msg.handover-join {
  align-self: center;
  max-width: 92%;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #6ee7b7;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}
.sup-msg.handover-leave {
  align-self: center;
  max-width: 92%;
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #93c5fd;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}
.sup-msg.handover-req {
  align-self: center;
  max-width: 92%;
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fcd34d;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}
.lc-search-input {
  padding: 8px 11px;
  font-size: 13px;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.lc-queue-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  max-height: none;
  padding-left: 2px;
}
.lc-item-title {
  font-size: 13.5px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lc-open-hint {
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-text);
  white-space: nowrap;
  flex-shrink: 0;
}
.lc-card-mini-thumb {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}
.lc-photos-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 9px;
  margin-bottom: 8px;
  border-radius: 11px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}
.lc-photos-strip::-webkit-scrollbar { display: none; }
.lc-photo-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 4px;
  border-radius: 9px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.lc-photo-chip img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
}
.lc-contact-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 5px;
  font-size: 12px;
}
.lc-contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  font-weight: 800;
}
.lc-handover-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.lc-order-brief {
  border: 1px solid var(--border-color);
  border-radius: 11px;
  background: var(--bg-surface);
  margin-bottom: 8px;
  font-size: 12px;
  overflow: hidden;
  flex-shrink: 0;
}
.lc-order-brief-sum {
  list-style: none;
  cursor: pointer;
  padding: 7px 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}
.lc-order-brief-sum::-webkit-details-marker {
  display: none;
}
.lc-order-brief-body {
  padding: 8px 11px 9px;
  border-top: 1px dashed var(--border-color);
}
.lc-chat-box {
  flex: 1 1 auto;
  min-height: 240px;
  height: auto;
  max-height: none;
  padding: 16px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.lc-chat-box .sup-msg {
  max-width: 76%;
  padding: 10px 14px;
  border-radius: 15px;
  font-size: 14px;
  line-height: 1.62;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}
/* Rich Media Message Cards (Voice, Image, Video, Document, Location, Contact) */
.lc-msg-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.62;
}
.lc-voice-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 240px;
  max-width: 340px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.28);
  margin-top: 4px;
}
[data-theme="dark"] .lc-voice-card {
  background: rgba(255, 255, 255, 0.06);
}
.lc-voice-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 800;
}
.lc-voice-audio {
  width: 100%;
  height: 36px;
  border-radius: 8px;
}
.lc-speed-btn {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
.lc-media-img-wrap {
  margin-top: 5px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lc-media-img {
  max-width: min(340px, 100%);
  max-height: 310px;
  width: auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  object-fit: cover;
  cursor: zoom-in;
  display: block;
}
.lc-sticker-wrap {
  margin-top: 3px;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.lc-sticker-img {
  width: auto;
  height: auto;
  max-width: 156px;
  max-height: 156px;
  object-fit: contain;
  background: transparent;
  border: none;
  cursor: zoom-in;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.16));
}
.lc-sticker-anim-tag {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 1px 7px;
}
.lc-chat-box .sup-msg.is-sticker-msg {
  padding: 8px 11px;
}
.lc-reaction-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: 12px;
  font-weight: 800;
}
.lc-reaction-emoji {
  font-size: 18px;
  line-height: 1;
}
.lc-otp-copy-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 7px;
  padding: 7px 11px;
  border-radius: 11px;
  background: rgba(16, 185, 129, 0.12);
  border: 1.5px solid rgba(16, 185, 129, 0.45);
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 800;
}
.lc-otp-code-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: var(--ok-text);
  padding: 2px 8px;
  border-radius: 7px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}
.lc-unsupported-box {
  padding: 9px 11px;
  border-radius: 11px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: var(--text-main);
  font-size: 12px;
  line-height: 1.65;
  font-weight: 700;
}
.lc-rating-btns-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed var(--border-color);
}
.lc-rating-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 9px;
  font-size: 11.5px;
  font-weight: 800;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
}
.lc-rating-chip.is-pos {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.1);
  color: var(--ok-text);
}
.lc-rating-chip.is-neu {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.1);
  color: var(--warn-text);
}
.lc-rating-chip.is-neg {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-text);
}
.rating-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}
.rating-breakdown-item {
  text-align: right;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
  font-family: inherit;
}
.rating-breakdown-item:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}
.rating-breakdown-item.active {
  border-color: var(--brand);
  background: var(--brand-light);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.14);
}
.rating-bar-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
  overflow: hidden;
}
.rating-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.25s ease;
}
.rating-bar-fill.is-pos { background: linear-gradient(90deg, #10b981, #059669); }
.rating-bar-fill.is-neu { background: linear-gradient(90deg, #f59e0b, #d97706); }
.rating-bar-fill.is-neg { background: linear-gradient(90deg, #ef4444, #dc2626); }
.lc-media-fallback {
  margin-top: 4px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px dashed rgba(245, 158, 11, 0.55);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}
.lc-bot-takeover-note {
  padding: 6px 11px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--text-main);
  font-size: 11.5px;
  line-height: 1.45;
  display: flex;
  align-items: center;
  gap: 6px;
}
.lc-compose-actions {
  display: flex;
  gap: 6px;
  align-items: stretch;
  flex-shrink: 0;
}
.lc-compose-actions .btn {
  white-space: nowrap;
  min-height: 48px;
  font-size: 12.5px;
  padding: 8px 12px;
}
.lc-video-player {
  max-width: min(360px, 100%);
  max-height: 290px;
  border-radius: 12px;
  background: #000;
  margin-top: 5px;
  display: block;
}
.lc-doc-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  margin-top: 5px;
  min-width: 220px;
  max-width: 340px;
}
.lc-doc-ico {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  background: rgba(239, 68, 68, 0.12);
  flex-shrink: 0;
}
.lc-doc-meta {
  min-width: 0;
  flex: 1;
}
.lc-doc-name {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lc-doc-size {
  font-size: 11px;
  color: var(--text-muted);
}
.lc-loc-card {
  margin-top: 5px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid rgba(16, 185, 129, 0.35);
  min-width: 220px;
  max-width: 330px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lc-contact-card {
  margin-top: 5px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
}
/* Spacious Pro Composer & Voice Recorder */
.lc-composer-shell {
  flex-shrink: 0;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.lc-pending-media {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1.5px solid var(--brand);
}
.lc-pending-thumb {
  width: 52px;
  height: 52px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}
.lc-rec-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1.5px solid #ef4444;
  color: #dc2626;
  font-weight: 800;
}
.lc-rec-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ef4444;
  display: inline-block;
  animation: lcRecBlink 1s infinite;
}
@keyframes lcRecBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}
.lc-compose-tools {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.lc-compose-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.lc-compose-input-wrap {
  display: flex;
  gap: 7px;
  flex: 1;
  min-width: 180px;
  align-items: flex-end;
}
.lc-compose-input-wrap .form-control,
.lc-compose-textarea {
  flex: 1;
  min-width: 0;
  min-height: 50px;
  max-height: 160px;
  padding: 11px 14px;
  font-size: 14.5px;
  line-height: 1.5;
  border-radius: 13px;
  resize: none;
  font-family: inherit;
}
.lc-attach-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 10px;
}
.lc-compose-hint {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.lc-quick-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 92px;
  overflow-y: auto;
  padding: 6px 8px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
}
/* Customer Details & Media Gallery Drawer */
.lc-detail-section {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-surface);
  padding: 10px 11px;
}
.lc-detail-title {
  font-size: 12px;
  font-weight: 900;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lc-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.lc-gallery-thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  cursor: zoom-in;
}
@media (max-width: 1240px) {
  .live-chats-layout,
  .live-chats-layout.with-details {
    grid-template-columns: 270px minmax(0, 1fr);
  }
  .lc-details-card {
    display: none !important;
  }
  .lc-details-card.mob-drawer-open {
    display: flex !important;
    position: fixed;
    inset: 12px;
    z-index: 2500;
    height: auto;
    max-height: calc(100dvh - 24px);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  }
  .lc-compose-row.has-join-btn {
    flex-direction: column;
    align-items: stretch;
  }
  .lc-compose-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .lc-compose-actions .btn {
    min-height: 40px;
    flex: 1 1 auto;
  }
}
@media (max-width: 960px) {
  .live-chats-page,
  body.live-chats-active.lc-fullscreen-mode .live-chats-page {
    height: auto;
    min-height: 0;
  }
  .lc-mob-switch {
    display: grid !important;
    margin-bottom: 4px;
    padding: 4px;
  }
  .lc-mob-switch .sup-mob-btn {
    font-size: 12.5px;
    padding: 8px 8px;
    min-height: 40px;
    white-space: nowrap;
  }
  .live-chats-page .sup-pane-hidden-mob {
    display: none !important;
  }
  .lc-mob-back-btn {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    min-height: 36px;
    padding: 4px 10px;
    font-weight: 800;
  }
  .lc-fs-btn {
    display: none !important;
  }
  .lc-mob-mode-chat .lc-header-bar,
  .lc-mob-mode-chat .lc-kpi-grid,
  .lc-mob-mode-chat .lc-filter-tabs {
    display: none !important;
  }
  .lc-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  .lc-kpi-grid .kpi-card { padding: 7px 10px; border-radius: 10px; }
  .lc-kpi-grid .kpi-label { font-size: 11px; }
  .lc-kpi-grid .kpi-value { font-size: 16px; }
  .live-chats-layout,
  .live-chats-layout.with-details {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }
  .lc-list-card {
    height: calc(100dvh - 255px);
    min-height: 360px;
    overflow: hidden;
  }
  .lc-chat-card {
    height: calc(100dvh - 118px);
    min-height: 420px;
    overflow: hidden;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
  }
  .lc-queue-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }
  .lc-chat-box {
    flex: 1 1 auto;
    min-height: 180px;
    height: auto;
    max-height: none;
    padding: 10px 12px;
  }
  .lc-chat-box .sup-msg {
    max-width: 88%;
  }
  .lc-compose-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
  }
  .lc-compose-actions .btn {
    min-height: 42px;
    white-space: normal;
    line-height: 1.25;
    text-align: center;
    justify-content: center;
  }
}
@media (max-width: 768px) {
  .app-topbar-actions {
    width: 100%;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .app-topbar-actions::-webkit-scrollbar { display: none; }
  .app-topbar-actions > * { flex: 0 0 auto; }
  #topbar-store-status {
    min-height: 32px !important;
    font-size: 12px !important;
    max-width: 165px;
    padding: 4px 7px !important;
  }
  #topbar-desktop-notif-btn { display: none !important; }
  body.live-chats-active .app-fav-bar { display: none !important; }
  body.live-chats-active .app-main-pad {
    padding: 8px 8px calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  }
  body.live-chats-active.lc-input-focused .app-mobile-nav,
  body.live-chats-active.lc-input-focused .strix-app-main-footer {
    display: none !important;
  }
  body.live-chats-active.lc-input-focused .app-main-pad {
    padding-bottom: 10px !important;
  }
  .lc-header-bar { padding: 10px 12px; margin-bottom: 4px; }
  .lc-header-sub { display: none; }
  .lc-branch-select { width: 100% !important; }
  .lc-search-input { font-size: 16px !important; min-height: 42px; }
  .lc-list-card {
    height: calc(100dvh - 305px);
    min-height: 300px;
  }
  .lc-chat-card {
    height: calc(100dvh - 134px);
    min-height: 380px;
    padding: 9px 10px;
  }
  body.live-chats-active.lc-input-focused .lc-chat-card {
    height: calc(100dvh - 68px);
    min-height: 290px;
  }
  .lc-chat-header { gap: 6px; margin-bottom: 6px; padding-bottom: 6px; }
  .lc-handover-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }
  .lc-handover-actions .btn {
    min-height: 36px;
    justify-content: center;
    font-size: 11.5px;
    padding: 5px 8px;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }
  .lc-chat-box {
    padding: 9px 10px;
  }
  .lc-chat-box .sup-msg { max-width: 94%; font-size: 13.5px; padding: 8px 11px; }
  .lc-voice-card,
  .lc-doc-card,
  .lc-loc-card,
  .lc-contact-card {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
  .lc-sticker-img { max-width: 136px; max-height: 136px; }
  .lc-bot-takeover-note { font-size: 11px; padding: 5px 9px; }
  .lc-compose-tools {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .lc-compose-tools::-webkit-scrollbar { display: none; }
  .lc-compose-tools > * { flex: 0 0 auto; white-space: nowrap; }
  .lc-quick-strip {
    display: flex !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    padding: 5px 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .lc-quick-strip::-webkit-scrollbar { display: none; }
  .lc-quick-strip .btn {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 11.5px;
    padding: 6px 10px;
  }
  .lc-compose-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
  }
  .lc-compose-row:not(.has-join-btn) {
    flex-direction: row;
    align-items: flex-end;
  }
  .lc-compose-row .form-control,
  .lc-compose-textarea {
    font-size: 16px !important;
    min-height: 44px;
    min-width: 0 !important;
    padding: 8px 11px;
  }
  .lc-compose-row .btn {
    min-height: 42px;
    justify-content: center;
    font-size: 12px;
    padding: 7px 10px;
  }
  .lc-compose-input-wrap { min-width: 0; width: 100%; }
  .lc-compose-hint { display: none; }
}
@media (max-width: 480px) {
  .lc-compose-actions {
    grid-template-columns: 1fr;
  }
  .lc-handover-actions {
    grid-template-columns: 1fr;
  }
  .lc-kpi-grid .kpi-card {
    padding: 6px 8px;
  }
  .lc-kpi-grid .kpi-label { font-size: 10.5px; }
  .lc-kpi-grid .kpi-value { font-size: 15px; }
  .lc-chat-box .sup-msg { max-width: 96%; }
}

/* Bilingual LTR Layout Overrides & Language Switcher (v7.6.0) */
html[dir="ltr"], html[dir="ltr"] body {
  direction: ltr;
}
html[dir="ltr"] .app-sidebar {
  border-left: none;
  border-right: 1px solid rgba(148, 163, 184, 0.14);
}
html[dir="ltr"] .sidebar-link {
  text-align: left;
}
html[dir="ltr"] .toast-container {
  left: auto;
  right: 18px;
}
html[dir="ltr"] .food-new-ribbon {
  left: auto;
  right: 10px;
}
@media (max-width: 1040px) {
  html[dir="ltr"] .app-sidebar {
    right: auto;
    left: 0;
    transform: translateX(-105%);
  }
  html[dir="ltr"] .app-sidebar.open {
    transform: translateX(0);
  }
}
.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}
.lang-switch-btn:hover {
  border-color: var(--brand);
}
/* Dark-glass language switcher inside dark executive headers */
.lp-nav .lang-switch-btn,
.cc-nav .lang-switch-btn,
.rd-nav .lang-switch-btn,
.login-top-bar .lang-switch-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, 0.28);
  padding: 8px 12px;
  border-radius: 11px;
  font-weight: 800;
}
.lp-nav .lang-switch-btn:hover,
.cc-nav .lang-switch-btn:hover,
.rd-nav .lang-switch-btn:hover,
.login-top-bar .lang-switch-btn:hover {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(52, 211, 153, 0.5);
  color: #ffffff;
}

/* Live Unaccepted Order Countdown & Overdue Alarm Banner (v7.7.0) */
@keyframes strixAlarmPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
}
.overdue-alarm-banner {
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 800;
  border-bottom: 1px solid var(--border-color);
  z-index: 45;
}
.overdue-alarm-banner.is-waiting {
  background: #fffbeb;
  color: #92400e;
  border-bottom-color: #fde68a;
}
.overdue-alarm-banner.is-overdue {
  background: linear-gradient(90deg, #991b1b, #dc2626);
  color: #ffffff;
  border-bottom-color: #7f1d1d;
  animation: strixAlarmPulse 1.6s infinite;
}
body.theme-dark .overdue-alarm-banner.is-waiting {
  background: rgba(245, 158, 11, 0.16);
  color: #fde68a;
  border-bottom-color: rgba(245, 158, 11, 0.4);
}
.wait-timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.wait-timer-pill.wait-waiting {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}
.wait-timer-pill.wait-warn {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
}
.wait-timer-pill.wait-overdue {
  background: #dc2626;
  color: #ffffff;
  border: 1px solid #991b1b;
  animation: strixAlarmPulse 1.4s infinite;
}
.order-card-item.is-unaccepted-overdue {
  background: rgba(220, 38, 38, 0.08);
  border-color: #dc2626 !important;
}

/* System-wide Bilingual Salem Techno Copyright Footer (Refined Centered Executive Strip — v12.5.2) */
.strix-copy-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 9px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.035);
  text-align: center;
  line-height: 1.45;
}
.strix-app-main-footer {
  max-width: 1344px;
  width: calc(100% - 36px);
  margin: auto auto 18px;
}
.strix-copy-footer.strix-copy-public {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(340px, calc(100% - 32px)) !important;
  max-width: calc(100% - 32px) !important;
  padding: 12px 14px 4px;
  gap: 6px;
  font-size: 10.5px;
  border: none;
  border-top: 1px solid var(--brand-border, rgba(15, 23, 42, 0.1));
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.strix-copy-company {
  color: var(--text-main);
  font-weight: 900;
}
.salem-copy-link.salem-copy-brand-themed {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 11px;
  color: var(--brand-text, #047857);
  background: var(--brand-light, rgba(16, 185, 129, 0.08));
  border: 1px solid var(--brand-border, rgba(16, 185, 129, 0.24));
}
.salem-copy-link.salem-copy-brand-themed:hover {
  background: var(--brand, #047857);
  color: var(--on-brand, #ffffff);
  border-color: var(--brand, #047857);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.14);
}
body.theme-dark .strix-copy-company {
  color: #f1f5f9;
}
body.theme-dark .strix-copy-footer.strix-copy-public {
  background: transparent;
  border-top-color: rgba(148, 163, 184, 0.2);
}
.strix-copy-footer.strix-copy-dark {
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.2);
}
.strix-copy-footer.strix-copy-dark .strix-copy-ar,
.strix-copy-footer.strix-copy-dark .strix-copy-en {
  color: #cbd5e1;
}
.strix-copy-footer.strix-copy-dark .strix-copy-ar b,
.strix-copy-footer.strix-copy-dark .strix-copy-en b {
  color: #ffffff;
}
.strix-copy-brand {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px 7px;
}
.strix-copy-sep {
  opacity: 0.4;
  font-weight: 800;
}
.strix-copy-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}
.strix-copy-ar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}
.strix-copy-ar b {
  color: var(--text-main);
  font-weight: 800;
}
.strix-copy-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  font-size: 8.2px;
  font-weight: 900;
  letter-spacing: 0.35px;
  background: linear-gradient(135deg, #10b981, #047857);
  color: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.42);
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.22);
  flex-shrink: 0;
}
.strix-copy-public .strix-copy-mark {
  width: 17px;
  height: 17px;
  font-size: 7.8px;
  border-radius: 5px;
}
.strix-copy-en {
  font-size: 9.8px;
  opacity: 0.82;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--text-muted);
}
.strix-copy-en b {
  color: var(--text-main);
  font-weight: 800;
}
.salem-copy-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #047857;
  font-size: 9.8px;
  font-weight: 800;
  text-decoration: none;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.24);
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
  white-space: nowrap;
  line-height: 1.3;
}
.salem-copy-link svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  opacity: 0.85;
}
.salem-copy-link:hover {
  transform: translateY(-1px);
  background: rgba(16, 185, 129, 0.16);
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.16);
}
.salem-copy-phone {
  color: #0369a1;
  background: rgba(14, 165, 233, 0.08);
  border-color: rgba(14, 165, 233, 0.25);
}
.salem-copy-phone:hover {
  background: rgba(14, 165, 233, 0.16);
  box-shadow: 0 3px 10px rgba(14, 165, 233, 0.16);
}
.salem-copy-wa {
  color: #15803d;
  background: rgba(34, 197, 94, 0.09);
  border-color: rgba(34, 197, 94, 0.28);
}
.salem-copy-wa:hover {
  background: rgba(34, 197, 94, 0.18);
  box-shadow: 0 3px 10px rgba(34, 197, 94, 0.18);
}
.strix-copy-dark .salem-copy-link {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(52, 211, 153, 0.32);
}
.strix-copy-dark .salem-copy-phone {
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.14);
  border-color: rgba(56, 189, 248, 0.32);
}
.strix-copy-dark .salem-copy-wa {
  color: #86efac;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(74, 222, 128, 0.32);
}
@media (max-width: 900px) {
  .strix-app-main-footer {
    width: calc(100% - 24px);
    margin: 10px 12px calc(82px + env(safe-area-inset-bottom, 0px));
  }
}
@media (max-width: 768px) {
  .strix-copy-footer {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    gap: 6px;
  }
  .strix-copy-footer.strix-copy-public {
    padding: 7px 14px;
    gap: 5px;
  }
}
body.theme-dark .strix-copy-footer {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}
body.theme-dark .strix-copy-footer.strix-copy-public {
  background: rgba(15, 23, 42, 0.78);
  border-color: rgba(148, 163, 184, 0.22);
}
body.theme-dark .strix-copy-ar b,
body.theme-dark .strix-copy-en b {
  color: #e2e8f0;
}
body.theme-dark .strix-copy-mark {
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: rgba(52, 211, 153, 0.4);
}
body.theme-dark .salem-copy-link {
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.35);
}
body.theme-dark .salem-copy-phone {
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.35);
}
body.theme-dark .salem-copy-wa {
  color: #86efac;
  background: rgba(74, 222, 128, 0.15);
  border-color: rgba(74, 222, 128, 0.35);
}
body.pos-terminal-active .strix-app-main-footer {
  padding: 7px 12px;
  margin: 6px 14px 12px !important;
  font-size: 10.5px;
}

/* Shared Executive Account Security Modal, Password Meter & Dual-Mode Step-2 Banner */
.strix-acc-modal-box {
  max-width: 620px;
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(16, 185, 129, 0.32);
}
.strix-acc-modal-box.strix-user-wide {
  max-width: 1120px;
  width: min(1120px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
.strix-acc-modal-box.strix-user-wide .strix-acc-hero {
  padding: 13px 18px;
  flex-shrink: 0;
}
.strix-acc-modal-box.strix-user-wide .strix-acc-body {
  padding: 14px 18px 16px;
  overflow-y: auto;
}
.strix-user-wide-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 14px;
  align-items: start;
}
.strix-user-wide-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.strix-user-wide-col .strix-acc-card {
  margin-bottom: 0;
  padding: 12px 14px;
}
.strix-user-wide-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}
.strix-role-perms-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  max-height: 180px;
  overflow-y: auto;
  padding-left: 2px;
}
.strix-role-perms-grid .badge {
  justify-content: flex-start;
  white-space: normal;
  line-height: 1.35;
  text-align: right;
}
.strix-domain-input-wrap {
  display: flex;
  align-items: stretch;
  direction: ltr;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.strix-domain-input-wrap:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light);
}
.strix-domain-input-wrap .form-control {
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  flex: 1;
  min-width: 80px;
}
.strix-domain-suffix {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--ok-text);
  border-left: 1px solid var(--border-color);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  user-select: all;
}
.strix-domain-preview {
  margin-top: 5px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--info-text);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.strix-user-row-card {
  position: relative;
}
.strix-user-quick-bar {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed var(--border-color);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  padding-top: 0;
  margin-top: 0;
  border-top-color: transparent;
  transition: opacity 0.16s ease, max-height 0.18s ease, margin-top 0.16s ease, padding-top 0.16s ease;
}
.strix-user-row-card:hover .strix-user-quick-bar,
.strix-user-row-card.selected .strix-user-quick-bar,
.strix-user-row-card:focus-within .strix-user-quick-bar {
  opacity: 1;
  max-height: 90px;
  margin-top: 8px;
  padding-top: 7px;
  border-top-color: var(--border-color);
}
@media (hover: none) {
  .strix-user-quick-bar {
    opacity: 1;
    max-height: 90px;
    margin-top: 8px;
    padding-top: 7px;
    border-top-color: var(--border-color);
  }
}
.strix-confirm-backdrop {
  z-index: 320 !important;
}
.strix-review-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.strix-review-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border-color);
}
.strix-review-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.strix-review-row span:first-child {
  color: var(--text-muted);
  font-weight: 700;
}
.strix-review-row b {
  color: var(--text-main);
  text-align: left;
  word-break: break-word;
}
.strix-match-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 800;
  margin-top: 5px;
  padding: 3px 9px;
  border-radius: 999px;
}
.strix-match-pill.ok {
  background: rgba(16, 185, 129, 0.14);
  color: var(--ok-text);
}
.strix-match-pill.bad {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger-text);
}
.strix-match-pill.idle {
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-muted);
}
.strix-handover-backdrop {
  z-index: 330 !important;
}
.strix-handover-card {
  background: var(--bg-card);
  border: 2px solid rgba(16, 185, 129, 0.45);
  border-radius: 16px;
  padding: 15px 16px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
}
.strix-handover-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}
.strix-handover-field {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 11px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.strix-handover-field.full {
  grid-column: 1 / -1;
}
.strix-handover-lbl {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
}
.strix-handover-val {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 900;
  color: var(--text-main);
  word-break: break-all;
}
.strix-handover-val code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  font-weight: 900;
  color: var(--brand-text);
  background: rgba(16, 185, 129, 0.09);
  padding: 2px 7px;
  border-radius: 7px;
}
@media (max-width: 680px) {
  .strix-handover-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .strix-user-wide-grid {
    grid-template-columns: 1fr;
  }
  .strix-role-perms-grid {
    grid-template-columns: 1fr;
    max-height: none;
  }
}
.strix-acc-hero {
  background: linear-gradient(135deg, #07111f 0%, #0d243d 100%);
  color: #ffffff;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid rgba(52, 211, 153, 0.24);
}
.strix-acc-hero-ico {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.42);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.strix-acc-close {
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 900;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.strix-acc-close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}
.strix-acc-body {
  padding: 18px 20px 20px;
}
.strix-acc-card {
  background: rgba(148, 163, 184, 0.07);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.strix-acc-title {
  font-size: 12.5px;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.strix-pass-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.strix-pass-wrap .form-control {
  padding-left: 44px;
  padding-right: 12px;
}
.strix-pass-toggle {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 6px;
  border-radius: 8px;
  color: #475569;
}
.strix-pass-toggle:hover {
  background: rgba(148, 163, 184, 0.16);
}
.strix-pwd-meter {
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}
.strix-pwd-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 8px 0 10px;
}
.strix-pwd-bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.strix-pwd-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  font-size: 11.5px;
  font-weight: 700;
}
.strix-pwd-rule {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.06);
  transition: all 0.16s ease;
}
.strix-pwd-rule.met {
  color: var(--ok-text);
  background: rgba(16, 185, 129, 0.12);
}
.strix-pwd-rule.unmet {
  color: var(--danger-text);
  background: rgba(239, 68, 68, 0.08);
}
.step2-sec-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(14, 165, 233, 0.1));
  border: 1.5px solid rgba(16, 185, 129, 0.45);
  color: #065f46;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.6;
}
body.theme-dark .strix-pwd-meter {
  background: rgba(15, 23, 42, 0.72);
}
@media (max-width: 540px) {
  .strix-acc-body { padding: 14px; }
  .strix-pwd-rules { grid-template-columns: 1fr; }
}

/* Sticky Red Subscription Payment Header (3 Days Pre-Due & Grace) */
.sub-red-sticky-header {
  background: linear-gradient(90deg, #7f1d1d 0%, #dc2626 52%, #991b1b 100%);
  color: #ffffff;
  padding: 10px 18px;
  border-bottom: 2px solid #450a0a;
  box-shadow: 0 6px 20px rgba(153, 27, 27, 0.34);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12.5px;
  font-weight: 800;
  z-index: 95;
}
.sub-red-sticky-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.5;
}
.sub-red-sticky-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.sub-red-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}

/* Hover Explanatory Tooltips for Super Admin Subscription & Config Fields */
.sa-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  margin-inline-start: 5px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.14);
  color: var(--info-text);
  border: 1px solid rgba(37, 99, 235, 0.34);
  font-size: 11px;
  font-weight: 900;
  cursor: help;
  vertical-align: middle;
  line-height: 1;
}
body.theme-dark .sa-tip {
  background: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.4);
}
.sa-tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 9px);
  right: -6px;
  width: max-content;
  min-width: 190px;
  max-width: min(270px, 74vw);
  padding: 9px 12px;
  border-radius: 10px;
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.42);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.55;
  text-align: right;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 9999;
}
.sa-tip.sa-tip-flip::after {
  right: auto;
  left: -6px;
}
.form-group:hover > .form-label .sa-tip::after,
.form-group:focus-within > .form-label .sa-tip::after,
.sa-tip:hover::after,
.sa-tip:focus::after,
.sa-tip:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Clickable Brand Home Link & Hover Effect */
.brand-home-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}
.brand-home-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}
.brand-home-link > div,
.brand-home-link > .lp-brand-txt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: start;
}
.sa-floating-tip {
  position: fixed;
  z-index: 99999;
  max-width: min(300px, calc(100vw - 24px));
  padding: 10px 13px;
  border-radius: 11px;
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid rgba(56, 189, 248, 0.42);
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.48);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  text-align: right;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.14s ease;
}
.sa-floating-tip.visible {
  opacity: 1;
  visibility: visible;
}
body.sa-float-tip-ready .sa-tip::after {
  display: none !important;
}

/* ===================== v8.12.0 LIVE ORDER TRACKER & BULK % PRICING ===================== */
.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.lt-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.lt-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  animation: livePulseDot 1.5s infinite;
}
.lt-delay-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  color: #fff;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.22);
}
.lt-delay-banner.is-crit {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
  border: 1px solid #fca5a5;
}
.lt-delay-banner.is-warn {
  background: linear-gradient(135deg, #b45309, #d97706);
  border: 1px solid #fcd34d;
}
.lt-orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 14px;
}
.lt-order-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1.5px solid var(--border-color);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.lt-order-card.is-warn {
  border-color: #f59e0b;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.14);
}
.lt-order-card.is-crit {
  border-color: #dc2626;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.18);
}
.lt-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.lt-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12.5px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border-color);
}
.lt-timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.lt-timer-ok {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.lt-timer-warn {
  background: rgba(245, 158, 11, 0.18);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.45);
}
.lt-timer-crit {
  background: #dc2626;
  color: #fff;
  border: 1px solid #fecaca;
  animation: ltCritPulse 1.3s infinite;
}
@keyframes ltCritPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
}
.lt-pipeline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 12px;
  background: var(--bg-surface, var(--surface));
  border: 1px solid var(--border-color);
  overflow-x: auto;
}
.lt-step {
  flex: 1 1 0;
  min-width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
  position: relative;
}
.lt-step-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
  border: 2px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
}
.lt-step.is-done .lt-step-dot {
  background: #0c855d;
  border-color: #10b981;
  color: #fff;
}
.lt-step.is-active .lt-step-dot {
  background: #2563eb;
  border-color: #93c5fd;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.22);
}
.lt-step.is-warn .lt-step-dot {
  background: #ae5f05;
  border-color: #fde68a;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.25);
}
.lt-step.is-critical .lt-step-dot {
  background: #dc2626;
  border-color: #fecaca;
  color: #fff;
  animation: ltCritPulse 1.3s infinite;
}
.lt-step-lbl {
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.2;
}
.lt-step.is-pending .lt-step-lbl {
  color: var(--text-muted);
  font-weight: 600;
}
.lt-step-sub {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.lt-step.is-active .lt-step-sub { color: var(--info-text); }
.lt-step.is-warn .lt-step-sub { color: var(--warn-text); }
.lt-step.is-critical .lt-step-sub { color: var(--danger-text); }
.lt-culprit-box {
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--bg-surface, var(--surface));
  border: 1px solid var(--border-color);
}
.lt-culprit-box.is-delayed {
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.35);
}
.lt-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 4px;
}

.bulk-pricing-collapsed {
  border: 1.5px dashed var(--border-color);
}
.bulk-pricing-card {
  border: 1.5px solid var(--brand);
  box-shadow: 0 8px 24px rgba(234, 88, 12, 0.09);
}
.bulk-undo-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 9px 12px;
  border-radius: 11px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.42);
}
.bulk-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.bulk-mode-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface, var(--surface));
  color: var(--text-main);
  text-align: right;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.bulk-mode-btn b { font-size: 13px; }
.bulk-mode-btn span { font-size: 11px; color: var(--text-muted); }
.bulk-mode-btn.active {
  border-color: var(--brand);
  background: var(--brand-light);
}
.bulk-cat-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.bulk-cat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 11px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface, var(--surface));
}
.bulk-preview-box {
  padding: 10px;
  border-radius: 12px;
  background: var(--bg-surface, var(--surface));
  border: 1px solid var(--border-color);
}
@media (max-width: 1100px) {
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lt-orders-grid { grid-template-columns: 1fr; }
  .bulk-mode-tabs { grid-template-columns: 1fr; }
}
body.lt-kiosk-mode .app-sidebar,
body.lt-kiosk-mode .app-topbar,
body.lt-kiosk-mode .app-fav-bar,
body.lt-kiosk-mode .app-mobile-nav,
body.lt-kiosk-mode .strix-app-main-footer {
  display: none !important;
}
body.lt-kiosk-mode .app-content-col {
  width: 100%;
  max-width: 100%;
}
body.lt-kiosk-mode .app-main-pad {
  padding: 14px 18px 24px !important;
  max-width: 100% !important;
}
body.lt-kiosk-mode .lt-orders-grid {
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
}
html[dir="ltr"] .strix-brand-motto-sm {
  font-size: 7.4px !important;
  gap: 1.5px !important;
  font-weight: 800 !important;
  letter-spacing: -0.1px !important;
}

/* a11y-light-bubbles */
body.theme-dark .sup-msg.customer, body.theme-dark .sup-msg.bot { --text-muted: #475569; --ok-text: #047857; --info-text: #0369a1; --warn-text: #b45309; --danger-text: #b91c1c; }
.btn-new-badge-off { color: #b91c1c; }
body.theme-dark .btn-new-badge-off { color: #fca5a5; }

body.theme-dark .lt-timer-ok { color: #6ee7b7; }
body.theme-dark .lt-timer-warn { color: #fcd34d; }
body.theme-dark .lt-live-pill { color: #6ee7b7; }

/* Global Floating Scroll-To-Top Button (All Portals & Dashboards) */
.strix-scroll-top-btn {
  position: fixed;
  bottom: 24px;
  left: 22px;
  z-index: 860;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  background: var(--brand, #047857);
  color: var(--on-brand, #ffffff);
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.34);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.92);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease, box-shadow 0.2s ease;
}
.strix-scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.strix-scroll-top-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 14px 32px rgba(2, 6, 23, 0.44);
}
.strix-scroll-top-btn:active {
  transform: translateY(0) scale(0.96);
}
html[dir="ltr"] .strix-scroll-top-btn {
  left: auto;
  right: 22px;
}
@media (max-width: 900px) {
  .strix-scroll-top-btn {
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    left: 10px;
    width: 38px;
    height: 38px;
    opacity: 0;
  }
  .strix-scroll-top-btn.visible {
    opacity: 0.92;
  }
  .sup-action-dock {
    padding-bottom: 58px;
  }
  html[dir="ltr"] .strix-scroll-top-btn {
    left: auto;
    right: 10px;
  }
  .strix-scroll-top-btn.has-cart-bar {
    bottom: calc(144px + env(safe-area-inset-bottom, 0px));
  }
}
body.lt-kiosk-mode .strix-scroll-top-btn,
body.pos-kiosk-mode .strix-scroll-top-btn,
body.lc-input-focused .strix-scroll-top-btn {
  display: none !important;
}
@media print {
  .strix-scroll-top-btn {
    display: none !important;
  }
}

/* ==================== WHATSAPP CHANNELS EXECUTIVE CARDS (ZERO OVERFLOW) ==================== */
.wa-channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: 16px;
}
.wa-lines-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.wa-line-pill {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  padding: 11px 13px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.14s ease, background 0.16s ease;
}
.wa-line-pill:hover {
  border-color: var(--brand, #10b981);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}
.wa-line-pill.active {
  border-color: #10b981;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.09) 0%, rgba(14, 165, 233, 0.05) 100%);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.16);
}
.wa-line-pill-add {
  border: 1.5px dashed rgba(16, 185, 129, 0.52);
  background: rgba(16, 185, 129, 0.04);
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 92px;
  color: #059669;
  font-weight: 800;
}
.wa-line-pill-add:hover {
  background: rgba(16, 185, 129, 0.1);
}
.wa-engine-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.wa-engine-card {
  position: relative;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 13px;
  padding: 11px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.wa-engine-card:hover {
  border-color: #10b981;
}
.wa-engine-card.active {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15);
}
.wa-engine-card.disabled {
  opacity: 0.52;
  cursor: not-allowed;
}
.wa-dual-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.wa-dual-panels.single-col {
  grid-template-columns: 1fr;
}
.wa-panel-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
}
.wa-panel-box.is-primary-engine {
  border-color: rgba(16, 185, 129, 0.48);
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.08);
}
.wa-panel-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border-color);
}
.wa-qr-stage {
  background: var(--bg-surface, var(--bg-page));
  border: 1.5px dashed rgba(16, 185, 129, 0.45);
  border-radius: 14px;
  padding: 16px;
}
.wa-qr-frame {
  width: 224px;
  height: 224px;
  padding: 10px;
  background: #ffffff;
  border-radius: 16px;
  border: 3px solid #16a34a;
  box-shadow: 0 10px 26px rgba(22, 163, 74, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wa-qr-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.wa-qr-diag-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--bg-surface, var(--bg-page));
  border: 1px solid var(--border-color);
  font-size: 11.5px;
  color: var(--text-muted);
}
.wa-qr-diag-strip b { color: var(--text-main); }
.wa-ab-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.wa-ab-preset-btn {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.14s ease;
}
.wa-ab-preset-btn:hover {
  border-color: var(--brand);
  color: var(--brand-text);
  background: var(--brand-light);
}
.wa-ab-checks-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.wa-ab-check-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color 0.14s ease;
}
.wa-ab-check-card:hover { border-color: var(--brand); }
.wa-ab-check-card input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  flex-shrink: 0;
}
.wa-ab-check-title {
  font-weight: 800;
  font-size: 12px;
  color: var(--text-main);
  display: block;
}
.wa-ab-check-desc {
  font-size: 10.8px;
  color: var(--text-muted);
  line-height: 1.45;
  display: block;
  margin-top: 2px;
}
.wa-ab-hint {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.45;
}
.wa-quick-identity-card {
  background: var(--bg-surface, var(--bg-page));
  border: 1px solid var(--border-color);
  border-radius: 13px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
@media (max-width: 720px) {
  .wa-ab-checks-grid { grid-template-columns: 1fr; }
}

/* Executive Role Permissions Matrix Control Center */
.perm-subtabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 14px;
  background: var(--bg-surface, var(--bg-page));
  border: 1px solid var(--border-color);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.perm-subtab-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s ease;
}
.perm-subtab-btn.active {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}
.perm-roles-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.perm-role-card {
  text-align: right;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.15s ease;
}
.perm-role-card:hover { border-color: var(--brand); }
.perm-role-card.active {
  border-color: var(--brand);
  background: var(--brand-light);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.perm-preset-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-surface, var(--bg-page));
  border: 1px solid var(--border-color);
  margin-bottom: 12px;
}
.perm-groups-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.perm-cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.perm-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 900;
  font-size: 13px;
}
.perm-item-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 9px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface, var(--bg-page));
}
.perm-item-row.is-admin-special {
  border: 1.5px dashed var(--brand);
}
.perm-item-title {
  font-weight: 800;
  font-size: 12.5px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.perm-item-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.48;
  margin-top: 2px;
}
.perm-matrix-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 13px;
}
.perm-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.perm-matrix-table th,
.perm-matrix-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  white-space: nowrap;
}
.perm-matrix-table th:first-child,
.perm-matrix-table td:first-child {
  text-align: right;
  white-space: normal;
  min-width: 210px;
}
.perm-matrix-table thead th {
  background: var(--bg-surface, var(--bg-page));
  font-weight: 900;
}
.perm-cell-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.14s ease;
}
.perm-cell-btn.is-on {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.45);
}
.perm-cell-btn:disabled { opacity: 0.6; cursor: default; }
@media (max-width: 980px) {
  .perm-groups-grid { grid-template-columns: 1fr; }
}
@keyframes waQrSpin {
  to { transform: rotate(360deg); }
}
.wa-qr-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3.5px solid rgba(16, 185, 129, 0.22);
  border-top-color: #10b981;
  animation: waQrSpin 0.8s linear infinite;
  flex-shrink: 0;
}
@media (max-width: 980px) {
  .wa-dual-panels { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .wa-engine-cards { grid-template-columns: 1fr; }
  .wa-lines-strip { grid-template-columns: 1fr; }
  .wa-qr-frame { width: 204px; height: 204px; margin: 0 auto; }
}
.wa-ch-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
}
.wa-ch-card .card-header {
  margin-bottom: 2px;
}
.wa-meta-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.wa-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 11px;
  background: var(--bg-surface, #f8fafc);
  border: 1px solid var(--border-color);
  min-width: 0;
}
.wa-meta-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 0%;
  min-width: 0;
}
.wa-meta-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.wa-meta-code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  direction: ltr;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.wa-meta-code.expanded {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-all;
}
.wa-meta-link {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--info-text);
  direction: ltr;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  text-decoration: none;
}
.wa-meta-link:hover {
  text-decoration: underline;
}
.wa-meta-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.wa-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.wa-copy-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.wa-token-warn {
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.42);
  color: var(--text-main);
  font-size: 12px;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wa-token-warn strong {
  color: #b45309;
}
[data-theme="dark"] .wa-token-warn strong {
  color: #fbbf24;
}
@media (max-width: 640px) {
  .wa-meta-row {
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
  }
  .wa-meta-actions {
    justify-content: flex-end;
  }
}
.wa-health-strip {
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}
.wa-health-strip.online {
  background: rgba(16, 185, 129, 0.10);
  border-color: rgba(16, 185, 129, 0.38);
}
.wa-health-strip.error {
  background: rgba(239, 68, 68, 0.09);
  border-color: rgba(239, 68, 68, 0.36);
}
.wa-health-strip.pending {
  background: rgba(245, 158, 11, 0.09);
  border-color: rgba(245, 158, 11, 0.35);
}
.wa-health-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.wa-health-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-muted);
}
.wa-bot-studio-card {
  margin-top: 18px;
  border: 1.5px solid var(--brand-border, var(--border-color));
}
.wa-bot-btn-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface, #f8fafc);
  margin-bottom: 7px;
  flex-wrap: wrap;
}
.wa-cmd-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 360px);
  gap: 16px;
  align-items: start;
}
@media (max-width: 1080px) {
  .wa-cmd-layout {
    grid-template-columns: 1fr;
  }
}
.wa-phone-preview-wrap {
  position: sticky;
  top: 84px;
}
.wa-phone-mock {
  border-radius: 22px;
  overflow: hidden;
  border: 2px solid #0f172a;
  background: #e5ddd5;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16);
}
.wa-phone-hdr {
  background: #075e54;
  color: #fff;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.wa-phone-hdr img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
  flex-shrink: 0;
}
.wa-phone-chat {
  padding: 12px 10px;
  min-height: 290px;
  max-height: 460px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(180deg, #e5ddd5 0%, #dcd4cb 100%);
}
.wa-bub {
  max-width: 92%;
  padding: 8px 11px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.55;
  color: #111827;
  white-space: pre-line;
  word-break: break-word;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.10);
}
.wa-bub.in {
  align-self: flex-start;
  background: #d9fdd3;
  border-top-right-radius: 4px;
}
.wa-bub.out {
  align-self: flex-end;
  background: #ffffff;
  border-top-left-radius: 4px;
}
.wa-bub-link {
  display: block;
  margin-top: 6px;
  color: #0284c7;
  font-size: 11px;
  font-weight: 700;
  direction: ltr;
  text-align: left;
  word-break: break-all;
}
.wa-bub-cta {
  margin-top: 8px;
  padding: 7px 10px;
  border-top: 1px solid #e5e7eb;
  text-align: center;
  color: #0284c7;
  font-weight: 800;
  font-size: 12px;
}
.wa-bub-list-sheet {
  margin-top: 6px;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}
.wa-bub-list-hdr {
  padding: 7px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 11.5px;
  font-weight: 900;
  color: #0f172a;
}
.wa-bub-list-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid #f1f5f9;
  color: #0f172a;
}
.wa-bub-list-row:last-child {
  border-bottom: none;
}
.wa-opt-editor-row {
  display: grid;
  grid-template-columns: 56px minmax(120px, 0.85fr) minmax(150px, 1.35fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 11px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface, #f8fafc);
  margin-bottom: 8px;
}
@media (max-width: 720px) {
  .wa-opt-editor-row {
    grid-template-columns: 56px 1fr auto;
  }
  .wa-opt-editor-row .wa-opt-desc-inp {
    grid-column: 1 / -1;
  }
}

/* ==================== v11.0.0 Strix Fleet Pro (Pharmacies, Chains & Restaurants) ==================== */
.sf-hero-bar {
  background: linear-gradient(135deg, #061826 0%, #0b2d3b 52%, #07332a 100%);
  color: #f8fafc;
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 14px;
  border: 1px solid rgba(52, 211, 153, 0.34);
  box-shadow: 0 12px 30px rgba(6, 24, 38, 0.22);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.sf-hero-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.sf-hero-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1.5px solid rgba(52, 211, 153, 0.5);
  background: #05131e;
  padding: 3px;
  flex-shrink: 0;
}
.sf-hero-bar h1 {
  font-size: 19px;
  font-weight: 900;
  margin: 0;
  color: #ffffff;
}
.sf-hero-sub {
  font-size: 12.2px;
  color: #cbd5e1;
  margin-top: 3px;
}
.sf-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(110, 231, 183, 0.45);
  color: #a7f3d0;
}
.sf-hero-pill.sky {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(125, 211, 252, 0.45);
  color: #bae6fd;
}
.sf-hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.sf-btn-emerald {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}
.sf-btn-emerald:hover { filter: brightness(1.06); }
.sf-btn-ghost-dark {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-weight: 800;
}
.sf-btn-ghost-dark:hover { background: rgba(255, 255, 255, 0.18); color: #ffffff; }

.sf-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
@media (max-width: 1180px) { .sf-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .sf-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sf-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--sf-kpi-accent, #10b981);
  border-radius: 14px;
  padding: 12px 12px 11px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sf-kpi-lbl {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.sf-kpi-val {
  font-size: 21px;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.2;
}
.sf-kpi-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.sf-tabs-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.sf-tab-btn {
  flex: 1 1 auto;
  min-width: 135px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-weight: 800;
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.16s ease;
}
.sf-tab-btn:hover {
  background: var(--ghost-bg);
  color: var(--text-main);
}
.sf-tab-btn.active {
  background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
  color: #ffffff;
  box-shadow: 0 5px 14px rgba(5, 150, 105, 0.28);
}
.sf-tab-cnt {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.14);
}
.sf-tab-btn.active .sf-tab-cnt {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

.sf-filter-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  margin-bottom: 14px;
}
.sf-cat-chip {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 11.8px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}
.sf-cat-chip.active {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}
.sf-cat-chip.cold.active { background: #0891b2; border-color: #0891b2; }
.sf-cat-chip.ins.active { background: #0284c7; border-color: #0284c7; }
.sf-cat-chip.xfer.active { background: #7c3aed; border-color: #7c3aed; }

.sf-order-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--border-color);
  border-right: 4px solid #10b981;
  border-radius: 12px;
  margin-bottom: 9px;
  background: var(--bg-surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.sf-order-card.is-cold { border-right-color: #06b6d4; background: rgba(6, 182, 212, 0.06); }
.sf-order-card.is-urgent { border-right-color: #dc2626; background: rgba(220, 38, 38, 0.05); }
.sf-order-card.is-transfer { border-right-color: #7c3aed; background: rgba(124, 58, 237, 0.06); }
.sf-order-card.is-selected {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.28);
}

.sf-trip-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 13px;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-right: 4px solid #0284c7;
  border-radius: 12px;
  margin-bottom: 9px;
}
.sf-trip-card.is-cold { border-right-color: #06b6d4; }
.sf-trip-card.is-transfer { border-right-color: #7c3aed; }
body.theme-dark .sf-trip-card {
  background: rgba(14, 165, 233, 0.08);
  border-color: rgba(56, 189, 248, 0.28);
}

.sf-driver-card {
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}
.sf-driver-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 8px;
  border-radius: 10px;
  text-align: center;
  font-size: 11.5px;
}

.sf-batch-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(14, 165, 233, 0.12));
  border: 1.5px solid rgba(16, 185, 129, 0.48);
  margin-bottom: 12px;
}

.sf-mode-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.sf-mode-pill {
  padding: 7px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.sf-mode-pill.active {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}
.sf-cod-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 13px;
  border-radius: 11px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.35);
  margin-bottom: 12px;
  font-size: 13px;
}

/* =========================================================================
   Menu Visits Live Header Counter (24h) & 6-Month Comparative Charts
   ========================================================================= */
.topbar-visits-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1.5px solid rgba(16, 185, 129, 0.34);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.10), rgba(37, 99, 235, 0.08));
  color: var(--text-main);
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  font-family: inherit;
}
.topbar-visits-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(16, 185, 129, 0.65);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.18);
}
.topbar-visits-pill.is-bump {
  animation: mvPillBump 0.55s ease;
}
@keyframes mvPillBump {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  40% { transform: scale(1.06); box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
body.theme-dark .topbar-visits-pill {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(59, 130, 246, 0.15));
  border-color: rgba(52, 211, 153, 0.38);
  color: #f1f5f9;
}
.tv-tag-24h {
  font-size: 10px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--text-muted);
}
body.theme-dark .tv-tag-24h {
  background: rgba(255, 255, 255, 0.10);
  color: #cbd5e1;
}
.tv-seg {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-variant-numeric: tabular-nums;
}
.tv-seg-wa b {
  color: #059669;
  font-weight: 900;
}
body.theme-dark .tv-seg-wa b {
  color: #34d399;
}
.tv-seg-web b {
  color: #2563eb;
  font-weight: 900;
}
body.theme-dark .tv-seg-web b {
  color: #60a5fa;
}
.tv-sep {
  opacity: 0.35;
  font-weight: 400;
}
.mv-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: mvLivePulse 1.8s infinite;
  flex-shrink: 0;
}
@keyframes mvLivePulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.65); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.mv-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
@media (max-width: 1180px) {
  .mv-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .mv-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.mv-legend {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11.5px;
  font-weight: 800;
}
.mv-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.mv-legend-swatch {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  display: inline-block;
}
.mv-legend-swatch.wa { background: linear-gradient(180deg, #059669, #10b981); }
.mv-legend-swatch.web { background: linear-gradient(180deg, #2563eb, #38bdf8); }
.mv-legend-swatch.app { background: linear-gradient(180deg, #7c3aed, #a78bfa); }

.mv-dual-scroll {
  overflow-x: auto;
  padding-bottom: 6px;
}
.mv-dual-chart {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  min-height: 220px;
  padding: 24px 8px 6px;
  border-bottom: 1px solid var(--border-color);
}
.mv-dual-col {
  flex: 1 0 38px;
  min-width: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.mv-dual-val {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  white-space: nowrap;
  min-height: 14px;
  font-variant-numeric: tabular-nums;
}
.mv-dual-col.is-peak .mv-dual-val {
  color: #059669;
  font-weight: 900;
}
body.theme-dark .mv-dual-col.is-peak .mv-dual-val {
  color: #34d399;
}
.mv-dual-bars {
  width: 100%;
  max-width: 40px;
  height: 148px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  padding: 0 3px;
  background: rgba(148, 163, 184, 0.07);
  border-radius: 8px 8px 3px 3px;
}
.mv-bar-slot {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
}
.mv-bar-fill {
  width: 100%;
  border-radius: 5px 5px 0 0;
  transition: height 0.25s ease, filter 0.15s ease;
}
.mv-dual-col:hover .mv-bar-fill {
  filter: brightness(1.12);
}
.mv-bar-fill.wa {
  background: linear-gradient(180deg, #059669, #34d399);
}
.mv-bar-fill.web {
  background: linear-gradient(180deg, #2563eb, #60a5fa);
}
.mv-bar-fill.app {
  background: linear-gradient(180deg, #7c3aed, #a78bfa);
}
.mv-svg-wrap {
  width: 100%;
  overflow-x: auto;
  padding: 6px 0 2px;
}
.mv-svg-chart {
  width: 100%;
  min-width: 520px;
  height: 230px;
  display: block;
}
.mv-share-track {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.18);
  margin: 10px 0 14px;
}
.mv-share-seg-wa {
  background: linear-gradient(90deg, #059669, #10b981);
  transition: width 0.3s ease;
}
.mv-share-seg-web {
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  transition: width 0.3s ease;
}
.mv-share-seg-app {
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
  transition: width 0.3s ease;
}
.mv-ch-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 640px) {
  .mv-ch-compare-grid { grid-template-columns: 1fr; }
}
.mv-ch-box {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
}
.mv-ch-box.wa { border-top: 3px solid #10b981; }
.mv-ch-box.web { border-top: 3px solid #2563eb; }
.mv-ch-box.app { border-top: 3px solid #7c3aed; }
.mv-mini-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.mv-mini-pill.wa {
  background: rgba(16, 185, 129, 0.13);
  color: #047857;
}
body.theme-dark .mv-mini-pill.wa {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
}
.mv-mini-pill.web {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}
body.theme-dark .mv-mini-pill.web {
  background: rgba(59, 130, 246, 0.22);
  color: #93c5fd;
}
.mv-mini-pill.app {
  background: rgba(124, 58, 237, 0.13);
  color: #6d28d9;
}
body.theme-dark .mv-mini-pill.app {
  background: rgba(139, 92, 246, 0.24);
  color: #c4b5fd;
}
.tv-seg-app { color: #7c3aed; }
body.theme-dark .tv-seg-app { color: #c4b5fd; }


/* =========================================================================
   Universal Page Guide, Interactive Spotlight Tour & Screen Map (.sg-*)
   ========================================================================= */
.sg-topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 800;
  white-space: nowrap;
}
.sg-topbar-btn.is-map {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.13), rgba(16, 185, 129, 0.13));
  border-color: rgba(14, 165, 233, 0.34);
  color: var(--text-main);
}
.sg-topbar-btn.is-map:hover {
  border-color: #0ea5e9;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(16, 185, 129, 0.2));
}
.sg-kbd {
  font-size: 10px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-family: ui-monospace, monospace;
}

/* First-Visit Welcome Banner */
.sg-welcome-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 15px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #064e3b 100%);
  color: #ffffff;
  border: 1px solid rgba(52, 211, 153, 0.35);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
}
.sg-wb-main {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex: 1 1 280px;
}
.sg-wb-ico {
  font-size: 26px;
  flex-shrink: 0;
}
.sg-wb-title {
  font-size: 14.5px;
  font-weight: 900;
  color: #ffffff;
}
.sg-wb-sub {
  font-size: 12px;
  color: #cbd5e1;
  margin-top: 2px;
  line-height: 1.5;
}
.sg-wb-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.sg-welcome-banner .btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}
.sg-welcome-banner .btn-ghost {
  color: #e2e8f0;
}

/* Compact 1-Line Contextual Page Guide Strip */
.sg-inline-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.08), rgba(16, 185, 129, 0.08));
  border: 1px solid rgba(14, 165, 233, 0.26);
}
body.theme-dark .sg-inline-banner {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.14), rgba(16, 185, 129, 0.12));
  border-color: rgba(56, 189, 248, 0.3);
}
.sg-ib-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 280px;
}
.sg-ib-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  background: var(--bg-card);
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: var(--info-text);
  white-space: nowrap;
  flex-shrink: 0;
}
.sg-ib-text {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.45;
}
.sg-ib-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* Page Guide Side Drawer */
.sg-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3200;
  background: rgba(2, 6, 23, 0.56);
  backdrop-filter: blur(3px);
  display: none;
  justify-content: flex-end;
}
html[dir="rtl"] .sg-drawer-backdrop {
  justify-content: flex-end;
}
.sg-drawer-backdrop.open {
  display: flex;
}
.sg-drawer {
  width: min(460px, 100vw);
  height: 100dvh;
  background: var(--bg-card);
  color: var(--text-main);
  border-right: 1px solid var(--border-color);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.38);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: sgDrawerIn 0.2s ease-out;
}
@keyframes sgDrawerIn {
  from { transform: translateX(-28px); opacity: 0.6; }
  to { transform: translateX(0); opacity: 1; }
}
html[dir="ltr"] .sg-drawer {
  border-right: none;
  border-left: 1px solid var(--border-color);
}
.sg-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 16px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  flex-shrink: 0;
}
.sg-drawer-ico {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  background: rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}
.sg-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  flex-shrink: 0;
}
.sg-close-btn:hover {
  background: rgba(239, 68, 68, 0.8);
}
.sg-drawer-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 15px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.sg-meta-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.sg-summary-card {
  padding: 12px 13px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
}
.sg-sec-label {
  font-size: 12px;
  font-weight: 900;
  color: var(--text-muted);
}
.sg-cta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sg-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sg-steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.sg-steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 11px;
  border-radius: 11px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  font-size: 13px;
  line-height: 1.55;
  font-weight: 600;
}
.sg-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  flex-shrink: 0;
}
.sg-pill-wrap {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.sg-tips-box {
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.sg-tips-list {
  margin: 0;
  padding-right: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  line-height: 1.6;
}
.sg-related-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sg-related-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border-radius: 11px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, transform 0.12s;
}
.sg-related-card:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}
.sg-pref-footer {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.sg-prog-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: var(--border-color);
  overflow: hidden;
}
.sg-prog-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981, #0ea5e9);
  transition: width 0.25s ease;
}
.sg-pref-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* Interactive Screen Map Modal (Ctrl+K / F1) */
.sg-map-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3250;
  background: rgba(2, 6, 23, 0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.sg-map-backdrop.open {
  display: flex;
}
.sg-map-modal {
  width: min(1160px, 100%);
  max-height: 92dvh;
  background: var(--bg-card);
  color: var(--text-main);
  border-radius: 18px;
  border: 1px solid var(--border-color);
  box-shadow: 0 28px 72px rgba(2, 6, 23, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sg-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  flex-shrink: 0;
}
.sg-map-head div {
  color: inherit;
}
.sg-map-toolbar {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex-shrink: 0;
}
.sg-map-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 11px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
}
.sg-map-search-box:focus-within {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.14);
}
.sg-map-search-box .form-control {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 7px 4px;
  font-size: 14px;
  font-weight: 700;
}
.sg-map-tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.sg-role-strip {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.sg-role-strip::-webkit-scrollbar { display: none; }
.sg-role-pill {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
.sg-role-pill.active {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}
.sg-map-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 18px 22px;
}
.sg-flow-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sg-flow-stage {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sg-flow-stage-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border-radius: 13px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-right: 5px solid var(--sg-stage-color, var(--brand));
}
.sg-stage-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sg-stage-color, var(--brand));
  color: #ffffff;
  font-weight: 900;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sg-flow-arrow {
  text-align: center;
  font-size: 18px;
  color: var(--text-muted);
  opacity: 0.7;
  padding: 2px 0;
}
.sg-dir-group {
  margin-bottom: 16px;
}
.sg-dir-group-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: 11px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  margin-bottom: 9px;
}
.sg-dir-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.sg-screen-card {
  display: flex;
  flex-direction: column;
  padding: 11px 12px;
  border-radius: 13px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.sg-screen-card:hover {
  border-color: var(--brand);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}
.sg-screen-card.is-current {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}
.sg-card-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.sg-card-summary {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 9px;
  flex: 1;
}
.sg-card-subtabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 9px;
}
.sg-subtab-chip {
  padding: 2px 7px;
  border-radius: 7px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
.sg-subtab-chip:hover {
  border-color: var(--brand);
  color: var(--brand-text);
}
.sg-subtab-more {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text-muted);
  padding: 2px 4px;
}
.sg-card-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
}
.sg-intent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.sg-intent-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.sg-intent-card:hover {
  border-color: #0ea5e9;
  background: var(--bg-surface);
}
.sg-intent-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* Interactive Spotlight Tour Overlay */
.sg-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 3400;
  display: none;
  pointer-events: auto;
}
.sg-tour-overlay.open {
  display: block;
}
.sg-tour-ring {
  position: fixed;
  border-radius: 14px;
  border: 3px solid #10b981;
  box-shadow: 0 0 0 9999px rgba(2, 6, 23, 0.68), 0 0 0 6px rgba(16, 185, 129, 0.32);
  pointer-events: none;
  transition: top 0.22s ease, left 0.22s ease, width 0.22s ease, height 0.22s ease;
}
.sg-tour-pop {
  position: fixed;
  z-index: 3410;
  padding: 14px 16px;
  border-radius: 15px;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1.5px solid #10b981;
  box-shadow: 0 20px 54px rgba(2, 6, 23, 0.45);
  transition: top 0.2s ease, left 0.2s ease;
}

@media (max-width: 1024px) {
  .sg-dir-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .sg-map-backdrop { padding: 6px; }
  .sg-map-modal { max-height: 95dvh; border-radius: 14px; }
  .sg-map-head, .sg-map-toolbar, .sg-map-body { padding: 11px 12px; }
  .sg-dir-grid, .sg-intent-grid { grid-template-columns: 1fr; }
  .sg-drawer-backdrop { align-items: flex-end; }
  .sg-drawer {
    width: 100vw;
    height: 88dvh;
    border-radius: 18px 18px 0 0;
    border: none;
  }
  .sg-kbd { display: none; }
  .sg-inline-banner { padding: 8px 10px; }
}

/* Authentic WhatsApp Interactive Rating Preview Card (Studio > Rating) */
.wa-rating-preview-card {
  max-width: 370px;
  border-radius: 14px;
  background: #1f2c34;
  color: #e9edef;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}
.wa-rating-preview-body {
  padding: 13px 15px 6px;
  font-size: 13.5px;
  line-height: 1.65;
  white-space: pre-line;
  word-break: break-word;
}
.wa-rating-preview-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
  padding: 2px 15px 10px;
}
.wa-rating-preview-footer {
  font-size: 11.5px;
  color: #8696a0;
  line-height: 1.4;
}
.wa-rating-preview-time {
  font-size: 10.5px;
  color: #8696a0;
  flex-shrink: 0;
}
.wa-rating-preview-actions {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  flex-direction: column;
}
.wa-rating-preview-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
  color: #00a884;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.015);
}
.wa-rating-preview-btn:last-child {
  border-bottom: none;
}
.wa-rating-preview-btn .wa-reply-ico {
  font-size: 13.5px;
  opacity: 0.9;
}
.wa-rating-preview-btn.is-list {
  color: #25d366;
}
