@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;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-color: #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;
  --text-main: #f8fafc;
  --text-muted: #b6c2d3;
  --border-color: #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, 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;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
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);
  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;
  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 {
  padding: 18px 20px 48px;
  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); display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal-box {
  width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  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: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: 9px;
  padding-top: 4px;
}
.sup-primary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.sup-primary-actions .btn { min-height: 44px; font-size: 13.5px; font-weight: 900; }
.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 Tracking & Human Handover (v7.5.0) */
.live-chats-layout {
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.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: 8px;
}
.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.selected.needs-agent {
  border-color: var(--brand);
  background: var(--brand-light);
}
.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: 94%;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #6ee7b7;
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
}
.sup-msg.handover-leave {
  align-self: center;
  max-width: 94%;
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #93c5fd;
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
}
.sup-msg.handover-req {
  align-self: center;
  max-width: 94%;
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fcd34d;
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
}
.lc-search-input {
  padding: 7px 10px;
  font-size: 13px;
  margin-bottom: 10px;
}
.lc-queue-scroll {
  max-height: calc(100dvh - 300px);
  overflow-y: auto;
}
.lc-item-title {
  font-size: 14px;
  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: 7px 10px;
  margin-bottom: 9px;
  border-radius: 11px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.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: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
}
.lc-compose-input-wrap {
  display: flex;
  gap: 6px;
  flex: 1;
  min-width: 180px;
  align-items: stretch;
}
.lc-compose-input-wrap .form-control {
  flex: 1;
  min-width: 0;
}
.lc-attach-btn {
  min-width: 42px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.lc-contact-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 6px;
  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: 10px;
  font-size: 12px;
  overflow: hidden;
}
.lc-order-brief-sum {
  list-style: none;
  cursor: pointer;
  padding: 8px 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 {
  height: clamp(340px, calc(100dvh - 430px), 540px);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
@media (max-width: 1240px) {
  .live-chats-layout { grid-template-columns: 1fr; }
  .lc-queue-scroll { max-height: none; min-height: 0; overflow: visible; }
}
@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));
  }
  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;
  }
  .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-header-bar { padding: 10px 12px; margin-bottom: 8px; }
  .lc-header-sub { display: none; }
  .lc-branch-select { width: 100% !important; }
  .lc-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
  }
  .lc-kpi-grid .kpi-card { padding: 8px 10px; border-radius: 11px; }
  .lc-kpi-grid .kpi-label { font-size: 11px; }
  .lc-kpi-grid .kpi-value { font-size: 16px; margin-top: 2px; }
  .lc-mob-switch { margin-bottom: 8px; padding: 4px; }
  .lc-mob-switch .sup-mob-btn { font-size: 12px; padding: 8px 6px; min-height: 38px; white-space: nowrap; }
  .lc-search-input { font-size: 16px !important; min-height: 42px; }
  .lc-chat-card { padding: 10px; display: flex; flex-direction: column; }
  .lc-chat-header { gap: 8px; margin-bottom: 8px; padding-bottom: 8px; }
  .lc-handover-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .lc-handover-actions .btn {
    min-height: 38px;
    justify-content: center;
    font-size: 11.5px;
    padding: 6px 8px;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }
  .lc-chat-box {
    height: calc(100dvh - 340px);
    min-height: 220px;
    max-height: 60dvh;
    padding: 9px;
    margin-bottom: 8px;
  }
  body.live-chats-active.lc-input-focused .lc-chat-box {
    height: calc(100dvh - 240px);
    min-height: 155px;
  }
  .sup-msg { max-width: 92%; font-size: 13px; padding: 7px 10px; }
  .lc-quick-strip {
    display: flex !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    margin-bottom: 8px;
    padding-bottom: 2px;
    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: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: stretch;
  }
  .lc-compose-row .form-control {
    font-size: 16px !important;
    min-height: 42px;
    min-width: 0 !important;
    padding: 8px 11px;
  }
  .lc-compose-row .btn {
    min-height: 42px;
    justify-content: center;
    white-space: nowrap;
    font-size: 12.5px;
    padding: 8px 12px;
  }
  .lc-compose-input-wrap { min-width: 0; }
  .lc-compose-row.has-join-btn {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lc-compose-row.has-join-btn .lc-compose-input-wrap {
    grid-column: 1 / -1;
  }
}

/* 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 */
.strix-copy-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  text-align: center;
  line-height: 1.6;
}
.strix-copy-en {
  font-size: 11.5px;
  opacity: 0.85;
  font-weight: 600;
}
.salem-copy-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #047857;
  font-weight: 900;
  text-decoration: none;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.28);
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.salem-copy-link:hover {
  transform: translateY(-1px);
  background: rgba(16, 185, 129, 0.18);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.18);
}
body.theme-dark .strix-copy-footer {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.22);
  color: #cbd5e1;
}
body.theme-dark .salem-copy-link {
  color: #34d399;
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.35);
}
body.pos-terminal-active .strix-app-main-footer {
  padding: 7px 12px;
  margin: 6px 14px 12px !important;
  font-size: 11px;
}

/* 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-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(84px + env(safe-area-inset-bottom, 0px));
    left: 14px;
    width: 42px;
    height: 42px;
  }
  html[dir="ltr"] .strix-scroll-top-btn {
    left: auto;
    right: 14px;
  }
  .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-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;
  }
}
