:root {
  /* Mega Print Official Brand Palette (Sampled from roll logo clr.png) */
  --mega-cyan: #18b4e4;
  --mega-sky: #18a8e4;
  --mega-azure: #2484d8;
  --mega-royal: #2478cc;
  --mega-indigo: #3054b4;
  --mega-navy: #242b7f;
  --mega-navy-deep: #181d5c;
  --mega-gradient: linear-gradient(135deg, #18b4e4 0%, #2478cc 52%, #242b7f 100%);
  --mega-gradient-h: linear-gradient(90deg, #18b4e4 0%, #2478cc 50%, #242b7f 100%);

  /* Surfaces & Typography */
  --bg-canvas: #f3f7fb;
  --bg-surface: #ffffff;
  --bg-subtle: #f7fafd;
  --bg-tint: #ebf5fc;
  --ink-primary: #111b36;
  --ink-secondary: #425270;
  --ink-muted: #64748b;
  --border: #dce6f2;
  --border-strong: #c2d4e8;

  /* Semantic Accents */
  --brand: var(--mega-royal);
  --brand-hover: var(--mega-navy);
  --brand-soft: #e6f4fb;
  --success: #047857;
  --success-soft: #ecfdf5;
  --warning: #b45309;
  --warning-soft: #fffbeb;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;

  --radius-sm: 8px;
  --radius-md: 12px;
  --shadow-sm: 0 1px 3px rgba(24, 29, 92, 0.06);
  --shadow-md: 0 8px 24px rgba(24, 29, 92, 0.10);
  --font-ar: "Cairo", "Segoe UI", Tahoma, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-ar);
  background: var(--bg-canvas);
  color: var(--ink-primary);
  direction: rtl;
  -webkit-font-smoothing: antialiased;
}

.num {
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
}

span.num, strong.num, b.num, a.num {
  display: inline-block;
}

td.num, th.num {
  display: table-cell;
  text-align: right;
  white-space: nowrap;
}

/* Signature Brand Top Accent Stripe + Sticky Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-surface);
  border-top: 3.5px solid transparent;
  border-image: var(--mega-gradient-h) 1;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 9px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--mega-navy);
}

.brand-logo-icon {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 15px;
  font-weight: 900;
  color: var(--mega-navy);
  letter-spacing: 0.2px;
}

.brand-text span {
  font-size: 11px;
  font-weight: 700;
  color: var(--mega-azure);
}

.branch-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-tint);
  border: 1px solid var(--border);
  padding: 3px;
  border-radius: var(--radius-sm);
}

.branch-btn {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 6px;
  font-family: var(--font-ar);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.branch-btn.active {
  background: var(--mega-gradient);
  color: #fff;
  box-shadow: 0 2px 6px rgba(36, 43, 127, 0.25);
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tab-btn {
  border: 1px solid transparent;
  background: transparent;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ar);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  background: var(--bg-tint);
  color: var(--mega-navy);
}

.tab-btn.active {
  background: var(--brand-soft);
  color: var(--mega-navy);
  border-color: #93c9ee;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.badge-neutral { background: #e5eef7; color: #334a6b; }
.badge-brand { background: #d9f0fc; color: var(--mega-navy); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.btn {
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--ink-primary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ar);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn:hover:not(:disabled) {
  background: var(--bg-tint);
  border-color: var(--mega-azure);
  color: var(--mega-navy);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--mega-gradient);
  border-color: var(--mega-royal);
  color: #fff;
  box-shadow: 0 2px 8px rgba(36, 120, 204, 0.22);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #149fd4 0%, #1e66b3 50%, #1b2268 100%);
  border-color: var(--mega-navy);
  color: #fff;
  transform: translateY(-1px);
}

.btn-success {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.btn-success:hover:not(:disabled) {
  background: #065f46;
  color: #fff;
}

.btn-danger {
  background: var(--danger-soft);
  border-color: #fecaca;
  color: var(--danger);
}

.btn-danger:hover:not(:disabled) {
  background: #fee2e2;
  color: var(--danger);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

/* Main Workspace Layout */
.container {
  max-width: 1460px;
  margin: 0 auto;
  padding: 18px 20px 40px;
}

.pos-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 18px;
  align-items: start;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: visible;
}

.card-header {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, #fafdff 0%, #f3f8fd 100%);
}

/* Smooth independently-scrollable sticky aside panels */
.sticky-panel {
  position: sticky;
  top: 74px;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Floating SmartCombo Portal (always in front, never clipped by containers) */
.smart-combo-portal {
  position: fixed;
  z-index: 99999;
  background: #ffffff;
  border: 1.5px solid var(--mega-azure);
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(20, 32, 80, 0.18);
  overflow-y: auto;
  direction: rtl;
  font-family: var(--font-ar);
}

.smart-combo-portal .sc-item {
  padding: 9px 12px;
  cursor: pointer;
  border-bottom: 1px solid #eef4fa;
  transition: background 0.1s ease;
}

.smart-combo-portal .sc-item:last-child {
  border-bottom: none;
}

.smart-combo-portal .sc-item:hover,
.smart-combo-portal .sc-item.sc-active {
  background: #e6f4fb;
}

.smart-combo-portal .sc-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--mega-navy);
}

.smart-combo-portal .sc-sub {
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.smart-combo-portal .sc-empty {
  padding: 12px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-muted);
}

/* Topbar Management Dropdown */
.nav-menu-wrap {
  position: relative;
}

.nav-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 245px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(20, 32, 80, 0.15);
  z-index: 9999;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-menu-panel a {
  display: block;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-primary);
  text-decoration: none;
}

.nav-menu-panel a:hover,
.nav-menu-panel a.active {
  background: #e6f4fb;
  color: var(--mega-navy);
}

/* Multi-select checklist box for Billing orders & invoices */
.multi-check-box {
  max-height: 165px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafdff;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.multi-check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12.5px;
  cursor: pointer;
}

.multi-check-item:hover {
  background: #e6f4fb;
}

/* ==================== v1.2.0 UX UPGRADES ==================== */
/* Sticky Table Headers on all scrollable data tables */
.table-wrap {
  max-height: calc(100vh - 255px);
  overflow: auto;
  position: relative;
}

.report-page .table-wrap,
.table-wrap.no-max-h {
  max-height: none;
  overflow: visible;
}

table.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg-subtle);
  box-shadow: 0 1.5px 0 var(--border);
}

table.data-table th.sortable {
  cursor: pointer;
  user-select: none;
}

table.data-table th.sortable:hover {
  background: #e6f4fb;
}

table.data-table tbody tr:nth-child(even) {
  background: #fcfdff;
}

/* SmartCombo v2 input affordance (caret + clear button) */
.sc-input-wrap {
  position: relative;
  width: 100%;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.sc-input-wrap input.input {
  width: 100%;
  padding-left: 44px;
}

/* Inline Qty Stepper & Cash Change Calculator */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.qty-stepper button {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--mega-navy);
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.qty-stepper button:hover {
  background: #e6f4fb;
  border-color: var(--mega-azure);
}

.change-banner {
  padding: 10px 12px;
  border-radius: 9px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  font-weight: 800;
  margin-bottom: 12px;
}

.change-banner.short {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.sc-caret {
  position: absolute;
  left: 10px;
  pointer-events: none;
  color: var(--mega-azure);
  font-size: 12px;
  font-weight: 900;
}

.sc-clear-btn {
  position: absolute;
  left: 24px;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  line-height: 1;
}

.sc-clear-btn:hover {
  color: var(--danger);
}

/* Topbar Utility Icons & Bell Badge */
.topbar-utilities {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #fafdff;
  color: var(--mega-navy);
  cursor: pointer;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.icon-btn:hover,
.icon-btn.active {
  background: #e6f4fb;
  border-color: var(--mega-azure);
}

.bell-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10.5px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Floating Notification Drawer */
.notif-drawer {
  position: fixed;
  top: 64px;
  left: 18px;
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100vh - 84px);
  background: #fff;
  border: 1.5px solid var(--mega-azure);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(18, 30, 74, 0.24);
  z-index: 99995;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  direction: rtl;
}

.notif-drawer-body {
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notif-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fafdff;
  font-size: 12.5px;
}

.notif-card.unread {
  border-right: 4px solid var(--mega-azure);
  background: #eff8ff;
}

.notif-card.alert-overdue {
  border-right: 4px solid var(--warning);
  background: #fffbeb;
}

/* Sensitive-Screen Re-Auth Lock Gate */
.sensitive-lock-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.sensitive-lock-card {
  width: min(410px, 100%);
  background: #fff;
  border-radius: 14px;
  border-top: 4px solid var(--mega-azure);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  padding: 22px;
  direction: rtl;
}

/* Ctrl+K Command Palette */
.cmd-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}

.cmd-box {
  width: min(520px, calc(100vw - 24px));
  background: #fff;
  border-radius: 14px;
  border: 1.5px solid var(--mega-azure);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  overflow: hidden;
  direction: rtl;
}

.cmd-item {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  font-weight: 700;
  border-bottom: 1px solid #eef4fa;
}

.cmd-item:hover,
.cmd-item.active {
  background: #e6f4fb;
  color: var(--mega-navy);
}

/* Universal Table Filter Bar & Per-Column Filter Row */
.tbl-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 14px;
  background: #f8fbff;
  border-bottom: 1px solid var(--border);
}

.tbl-filter-bar input.tbl-quick-search {
  max-width: 260px;
  padding: 5px 10px;
  font-size: 12.5px;
}

.tbl-col-filter-row th {
  padding: 5px 6px !important;
  background: #f1f7fd !important;
  position: sticky;
  top: 38px;
  z-index: 4;
}

.tbl-col-filter-row input.tbl-col-input {
  width: 100%;
  min-width: 60px;
  padding: 4px 6px;
  font-size: 11.5px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-family: var(--font-ar);
  background: #fff;
}

.tbl-col-filter-row input.tbl-col-input:focus {
  outline: none;
  border-color: var(--mega-azure);
}

/* Mobile Responsive Drawer — STRICTLY scoped to #main-nav-tabs ONLY! Never hide in-page .nav-tabs! */
.mobile-menu-btn {
  display: none;
}

@media (max-width: 980px) {
  .mobile-menu-btn {
    display: inline-flex;
  }
  .topbar {
    flex-wrap: wrap;
    padding: 8px 12px;
  }
  #main-nav-tabs {
    display: none;
    width: 100%;
    order: 3;
    flex-direction: column;
    align-items: stretch;
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }
  #main-nav-tabs.mobile-open {
    display: flex;
  }
  #main-nav-tabs .nav-menu-panel {
    position: static;
    box-shadow: none;
    border: 1px dashed var(--border);
    margin-top: 4px;
  }
}

.card-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 800;
  color: var(--mega-navy);
}

.card-body {
  padding: 18px;
}

/* Form Controls */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-secondary);
  margin-bottom: 5px;
}

.input, .select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-ar);
  font-size: 14px;
  color: var(--ink-primary);
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus, .select:focus {
  border-color: var(--mega-azure);
  box-shadow: 0 0 0 3px rgba(24, 168, 228, 0.16);
}

/* Autocomplete Dropdown */
.autocomplete-wrap {
  position: relative;
}

.autocomplete-list {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  z-index: 50;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  max-height: 280px;
  overflow-y: auto;
}

.autocomplete-item {
  padding: 9px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13.5px;
}

.autocomplete-item:hover {
  background: var(--brand-soft);
}

/* Quick Chips for Services & Sizes */
.chip-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.chip {
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--ink-primary);
  padding: 6px 11px;
  border-radius: 7px;
  font-family: var(--font-ar);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s ease;
}

.chip:hover {
  border-color: var(--mega-cyan);
  background: var(--brand-soft);
  color: var(--mega-navy);
}

.chip.active {
  background: var(--mega-gradient);
  border-color: var(--mega-royal);
  color: #fff;
}

/* Live Price Preview Strip */
.price-preview-bar {
  background: var(--bg-tint);
  border: 1px solid #c5dff5;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

table.data-table th {
  text-align: right;
  padding: 10px 12px;
  background: var(--bg-subtle);
  color: var(--mega-navy);
  font-weight: 800;
  font-size: 12px;
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}

table.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf2f8;
  vertical-align: middle;
}

table.data-table tbody tr:hover {
  background: #f5fafe;
}

/* Summary Panel */
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: 14px;
  color: var(--ink-secondary);
}

.summary-row.total {
  border-top: 2px solid var(--mega-navy);
  margin-top: 8px;
  padding-top: 12px;
  font-size: 18px;
  font-weight: 900;
  color: var(--mega-navy);
}

.action-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 27, 54, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal-box {
  background: #fff;
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border-top: 3px solid var(--mega-azure);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 120;
  background: var(--mega-navy);
  color: #fff;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: var(--shadow-md);
}

.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

.hidden { display: none !important; }

/* Login Page */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at 85% 15%, rgba(24, 180, 228, 0.14), transparent 42%),
              radial-gradient(circle at 15% 85%, rgba(36, 43, 127, 0.12), transparent 45%),
              var(--bg-canvas);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--border);
  border-top: 4px solid transparent;
  border-image: var(--mega-gradient-h) 1;
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 30px 28px;
}

.login-logo {
  max-width: 210px;
  height: auto;
  margin-bottom: 12px;
}

/* Responsive */
@media (max-width: 1024px) {
  .pos-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 10px 12px;
  }
  .container {
    padding: 12px;
  }
  .card-body {
    padding: 12px;
  }
}

/* ==================== v1.4.0 BRANCH THEME & UX ENHANCEMENTS ==================== */
/* #31 Dynamic Branch 02 (التجمع الخامس) Emerald / Teal Theme */
body.branch-02 {
  --mega-cyan: #14b8a6;
  --mega-sky: #0d9488;
  --mega-azure: #0f766e;
  --mega-royal: #0f766e;
  --mega-indigo: #115e59;
  --mega-navy: #134e4a;
  --mega-navy-deep: #0b3331;
  --mega-gradient: linear-gradient(135deg, #14b8a6 0%, #0f766e 55%, #134e4a 100%);
  --mega-gradient-h: linear-gradient(90deg, #14b8a6 0%, #0f766e 55%, #134e4a 100%);
  --bg-canvas: #f1faf8;
  --bg-subtle: #f5fcfb;
  --bg-tint: #e6f7f4;
  --brand: #0f766e;
  --brand-hover: #134e4a;
  --brand-soft: #dff5f1;
  --border: #cceae4;
  --border-strong: #94d2c6;
}

body.branch-02 .card-header {
  background: linear-gradient(180deg, #f7fefe 0%, #eaf8f5 100%);
}

body.branch-02 .topbar {
  background: linear-gradient(180deg, #ffffff 0%, #f4fbf9 100%);
}

body.branch-02 .tab-btn.active {
  border-color: #5eead4;
}

/* #5 POS Highlighted Line-Entry Zone */
.line-entry-zone {
  background: linear-gradient(180deg, #f4f9ff 0%, #eef6fd 100%);
  border: 1.5px solid #c5dff5;
  border-radius: 11px;
  padding: 14px;
  margin-top: 8px;
}

body.branch-02 .line-entry-zone {
  background: linear-gradient(180deg, #f2fbf9 0%, #e7f6f2 100%);
  border-color: #99d6ca;
}

/* #34 Customer Alert & Delivery Policy Banner */
.customer-alert-banner {
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1.5px solid #fcd34d;
  background: #fffbeb;
  color: #78350f;
  font-size: 13px;
}

.customer-alert-banner .alert-note-line {
  font-weight: 800;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 6px;
}

.customer-alert-banner .policy-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #bae6fd;
}

/* Customer validation border states (#3) */
.input.cust-valid {
  border-color: #10b981 !important;
  background: #f0fdf4;
}

.input.cust-invalid {
  border-color: #ef4444 !important;
  background: #fef2f2;
}

/* #26 Paid-in-Full Lock Badge */
.paid-full-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 9px;
  background: #ecfdf5;
  border: 1.5px solid #10b981;
  color: #065f46;
  font-weight: 900;
  font-size: 14px;
}

/* #9 Drawer 7-denomination single horizontal row */
.denom-row-7 {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

@media (max-width: 920px) {
  .denom-row-7 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .denom-row-7 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.denom-cell {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px;
  text-align: center;
}

.denom-cell label {
  display: block;
  font-size: 12px;
  font-weight: 900;
  color: var(--mega-navy);
  margin-bottom: 4px;
}

.denom-cell input {
  text-align: center;
  font-weight: 800;
  padding: 6px;
}

.denom-cell .denom-sub {
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 3px;
}

/* #6 Multi-row POS grid table */
.multi-row-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.multi-row-grid th, .multi-row-grid td {
  padding: 6px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.multi-row-grid input, .multi-row-grid select {
  padding: 5px 7px;
  font-size: 12.5px;
}

/* #28 Task Manager cards */
.notif-card.task-due {
  border-right: 4px solid #dc2626;
  background: #fef2f2;
}

.notif-card.task-upcoming {
  border-right: 4px solid #0284c7;
  background: #f0f9ff;
}

/* Order activity timeline box */
.timeline-box {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-subtle);
  font-size: 12px;
}

.timeline-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dashed var(--border);
}

.timeline-item:last-child {
  border-bottom: none;
}

