:root {
  color-scheme: light;
  --primary: #1e3a8a;
  --primary-hover: #1e40af;
  --primary-btn-bg: var(--primary);
  --primary-btn-hover: var(--primary-hover);
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --surface-elevated: #ffffff;
  --text: #0f172a;
  --text-muted: #475569; /* >= 4.5:1 on #ffffff and #f8fafc */
  --border: #e2e8f0;
  --border-subtle: #cbd5e1;
  --on-primary: #ffffff;
  --btn-success-bg: #15803d; /* #fff on #15803d = 5.13:1 */
  --btn-wa-bg: #15803d;
  --status-submitted-bg: #eff6ff;
  --status-submitted-fg: #1d4ed8;
  --status-submitted-border: #93c5fd;
  --status-pending-bg: #fef3c7;
  --status-pending-fg: #92400e;
  --status-pending-border: #fcd34d;
  --status-processed-bg: #dcfce7;
  --status-processed-fg: #166534;
  --status-processed-border: #86efac;
  --status-cancelled-bg: #fee2e2;
  --status-cancelled-fg: #991b1b;
  --status-cancelled-border: #fca5a5;
  --success-bg: #dcfce7;
  --success-text: #15803d;
  --warning-bg: #fef3c7;
  --warning-text: #92400e;
  --danger-bg: #fee2e2;
  --danger-text: #b91c1c;
  --radius: 10px;
  --z-header: 40;
  --z-floating-bar: 45;
  --z-sidecar: 90;
  --z-dropdown: 100;
  --z-backdrop: 950;
  --z-modal: 1000;
  --z-nested-backdrop: 1045;
  --z-nested-modal: 1050;
  --z-lightbox-backdrop: 1070;
  --z-lightbox-modal: 1075;
  --z-pin-overlay: 1080;
  --z-dialog-backdrop: 1090;
  --z-dialog-modal: 1095;
  --z-toast: 1100;
  --focus-ring: #1d4ed8;
}

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

html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.4;
  font-size: 15px;
}

:where(button, [role="button"], a[href], input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.app-header :where(button, select, [role="button"], [tabindex]:not([tabindex="-1"])):focus-visible,
.daily-stats-card :where(button, input, [tabindex]:not([tabindex="-1"])):focus-visible,
.order-floating-bar :where(button):focus-visible,
.vb6-sidecar-header :where(button, select):focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background-color: var(--primary-btn-bg);
  color: #ffffff;
  padding: 10px 14px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  max-width: 100vw;
  box-sizing: border-box;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 6px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
}

.status-dot.offline {
  background-color: #ef4444;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-shrink: 1;
}

.btn-refresh {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  color: #ffffff;
  border-radius: 6px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  flex-shrink: 0;
}
.btn-refresh:active {
  background: rgba(255,255,255,0.35);
  transform: scale(0.95);
}
.btn-refresh.spinning .refresh-icon {
  animation: spin 0.7s linear infinite;
}

.warehouse-select {
  background: rgba(255,255,255,0.18);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 12px;
  font-weight: 600;
  min-height: 44px;
  max-width: 140px;
  min-width: 80px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  flex-shrink: 1;
}
.warehouse-select option {
  color: #0f172a;
}

/* Header Overflow Menu (⋮) */
.header-menu-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.btn-header-menu {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  color: #ffffff;
  border-radius: 6px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  flex-shrink: 0;
}
.btn-header-menu:active,
.btn-header-menu.active {
  background: rgba(255,255,255,0.35);
  transform: scale(0.95);
}

.header-menu-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  border: 1px solid #e2e8f0;
  min-width: 195px;
  padding: 6px;
  z-index: var(--z-dropdown);
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: menuFadeIn 0.15s ease-out;
}

@keyframes menuFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #1e293b;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.15s ease;
}
.header-menu-item:hover,
.header-menu-item:active {
  background: #f1f5f9;
}
.header-menu-item.danger {
  color: #ef4444;
}
.header-menu-item.danger:hover,
.header-menu-item.danger:active {
  background: #fee2e2;
}

.menu-item-icon {
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  flex-shrink: 0;
}
.menu-item-label {
  flex: 1;
  white-space: nowrap;
}

.header-menu-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 4px 0;
}

/* Search bar */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 10px 48px 10px 14px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 16px;
  background-color: #ffffff;
  color: #0f172a;
}
.search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.2);
}

.btn-clear-search {
  position: absolute;
  right: 2px;
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: none;
  color: #64748b;
  font-size: 18px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

/* Offline Notice Banner */
.offline-banner {
  background-color: #fef3c7;
  border-bottom: 1px solid #fde68a;
  color: #92400e;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}
.offline-banner svg {
  flex-shrink: 0;
  color: #d97706;
}

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: #475569;
}

/* Group Filter Button */
.btn-group-filter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  min-height: 34px;
  background-color: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  max-width: 130px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-group-filter:active {
  background-color: #e2e8f0;
  transform: scale(0.98);
}

.group-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-caret {
  font-size: 10px;
  color: #475569;
}

.filter-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  min-height: 34px;
  padding: 4px 0;
  font-weight: 500;
}

.filter-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.filter-count {
  margin-left: auto;
  font-weight: 700;
  color: var(--text);
  font-size: 13px;
}

/* Item List */
.item-container {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 70px;
  transition: opacity 0.15s ease;
}

.item-container.loading-subtle {
  opacity: 0.5;
  pointer-events: none;
}

.item-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.item-card:active {
  transform: scale(0.985);
  border-color: #93c5fd;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.08);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
}

.item-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  line-height: 1.25;
}

.item-code {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  font-family: Consolas, monospace;
}

.item-grup {
  font-size: 12px;
  background-color: #f1f5f9;
  color: #334155;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
}

.stock-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f8fafc;
  padding: 8px 10px;
  border-radius: 6px;
  border-left: 4px solid #22c55e;
}

.stock-row.low {
  border-left-color: #f59e0b;
}

.stock-row.empty {
  border-left-color: #ef4444;
}

.stock-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.breakdown-text {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.2px;
}

.stock-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.badge-stock {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.badge-stock.available {
  background-color: var(--success-bg);
  color: var(--success-text);
}

.badge-stock.low {
  background-color: var(--warning-bg);
  color: var(--warning-text);
}

.badge-stock.empty {
  background-color: var(--danger-bg);
  color: var(--danger-text);
}

.total-pcs {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  text-align: left;
}

/* Bottom Sheet Modal */
.bottom-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: var(--z-backdrop);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.bottom-sheet-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  z-index: var(--z-modal);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.15);
  overflow-x: hidden;
}

.bottom-sheet.show {
  transform: translateY(0);
}

.sheet-handle-bar {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0 4px;
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background-color: #cbd5e1;
  border-radius: 2px;
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--border);
  gap: 8px;
  box-sizing: border-box;
}

.sheet-title {
  font-size: 15px;
  font-weight: 700;
  min-width: 0;
  flex: 1;
  word-break: break-word;
  line-height: 1.3;
}

.btn-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px 12px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 8px;
}
.btn-close:hover {
  color: var(--text);
}

.sheet-content {
  padding: 14px 16px;
  overflow-y: auto;
}

/* Group Sheet Specifics */
.group-sheet {
  max-height: 80vh;
}

.group-search-container {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.group-search-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  background: #f8fafc;
  box-sizing: border-box;
}

.group-search-input:focus {
  border-color: var(--primary);
  background: #ffffff;
}

.group-list {
  padding: 8px 12px 24px;
  overflow-y: auto;
  max-height: 55vh;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.group-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  min-height: 44px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  transition: background 0.1s ease;
  box-sizing: border-box;
}

.group-item:active, .group-item:hover {
  background-color: #f1f5f9;
}

.group-item.active {
  background-color: #e0e7ff;
  color: var(--primary);
  font-weight: 700;
}

.group-item-check {
  font-size: 14px;
  color: var(--primary);
}

.unit-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.unit-tab {
  padding: 8px 16px;
  min-height: 36px;
  border-radius: 20px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
}
.unit-tab.active {
  background: var(--primary-btn-bg);
  color: #ffffff;
  border-color: var(--primary-btn-bg);
}

.price-table {
  width: 100%;
  border-collapse: collapse;
}

.price-table th, .price-table td {
  padding: 9px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.price-table td.val {
  text-align: right;
  font-weight: 700;
  color: #1e3a8a;
  font-variant-numeric: tabular-nums;
}

/* PIN Screen */
.pin-overlay {
  position: fixed;
  inset: 0;
  background-color: var(--surface);
  z-index: var(--z-pin-overlay);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.pin-card {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

.pin-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
}

.pin-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.pin-input {
  width: 100%;
  font-size: 28px;
  text-align: center;
  letter-spacing: 12px;
  padding: 10px;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  font-weight: 700;
}
.pin-input:focus {
  border-color: var(--primary);
}

.btn-submit-pin {
  background-color: var(--primary-btn-bg);
  color: #ffffff;
  padding: 12px;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.btn-submit-pin:active {
  background-color: var(--primary-btn-hover);
}

.pin-error {
  background-color: var(--danger-bg);
  color: var(--danger-text);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  display: none;
}

/* Empty / Loading State */
.state-box {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-muted);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.btn-retry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  background-color: var(--primary-btn-bg);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn-retry:active {
  background-color: var(--primary-btn-hover);
  transform: scale(0.98);
}

.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(0,0,0,0.1);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
  margin-bottom: 8px;
}

.spinner-small {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-radius: 50%;
  border-top-color: currentColor;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

body.theme-dark .spinner-small {
  border-color: rgba(255, 255, 255, 0.2);
  border-top-color: currentColor;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   MULTI-USER LOGIN & ROLE SWITCHER
   ========================================================================== */
.login-role-tabs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 10px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 8px;
}

.role-tab {
  flex: 1;
  padding: 8px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.role-tab.active {
  background: #ffffff;
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.form-group {
  margin-top: 10px;
  text-align: left;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px;
  display: block;
}

.form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  box-sizing: border-box;
  background: #ffffff;
}

/* ==========================================================================
   MULTI-SCREEN LAYOUT & SUB-NAV
   ========================================================================== */
.screen-container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 14px 40px;
  box-sizing: border-box;
}

.sub-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 8px;
}

.btn-sub-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-sub-back:active {
  background: #f1f5f9;
}

.sub-nav-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  flex: 1;
  text-align: center;
}

.btn-sub-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #e0e7ff;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #3730a3;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  white-space: nowrap;
}

.btn-sub-action:active {
  background: #c7d2fe;
}

.admin-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: nowrap;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-action-split {
  background: #0369a1;
  color: #ffffff;
  border-color: #0369a1;
}

.btn-action-split:hover, .btn-action-split:active {
  background: #075985;
  color: #ffffff;
}

.action-svg-icon, .sub-back-icon {
  flex-shrink: 0;
}

/* ==========================================================================
   SCREEN 1: HUB MENU
   ========================================================================== */
.user-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #ffffff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.2);
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  border: 2px solid rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
  overflow: hidden;
}

.hub-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-badge-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.badge-role {
  background: #f59e0b;
  color: #000000;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.badge-warehouse {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.hub-menu-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hub-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.hub-card:active {
  transform: scale(0.98);
  border-color: var(--primary);
}

.hub-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.icon-stock { background: #e0f2fe; }
.icon-order { background: #dcfce7; }
.icon-info { background: #fef2f2; }
.icon-admin { background: #fef3c7; }
.icon-users { background: #f3e8ff; }

.hub-card-body {
  flex: 1;
  min-width: 0;
}

.hub-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.hub-card-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
}

.hub-card-badges {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge-draft {
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.badge-submitted {
  background: #e0f2fe;
  color: #0369a1;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #bae6fd;
}

.badge-cancelled-today {
  background: var(--status-cancelled-bg);
  color: var(--status-cancelled-fg);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--status-cancelled-border);
}

.tab-pending-badge {
  display: inline-block;
  background: var(--status-pending-bg);
  color: var(--status-pending-fg);
  border: 1px solid var(--status-pending-border);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
  animation: pulse-soft 2s infinite ease-in-out;
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.04); }
}

/* Hub Pending Alert Banner */
.hub-pending-alert-banner {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-left: 5px solid #f59e0b;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
}
.hub-pending-alert-icon {
  font-size: 24px;
  line-height: 1;
}
.hub-pending-alert-content {
  flex: 1;
  min-width: 0;
}
.hub-pending-alert-title {
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 2px;
}
.hub-pending-alert-desc {
  font-size: 12px;
  color: #b45309;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-hub-pending-action {
  background: #92400e;
  color: #ffffff;
  border: 1px solid #78350f;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-hub-pending-action:hover {
  background: #78350f;
}

/* Order Screen Sticky Banner */
.order-pending-sticky-banner {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-left: 4px solid #ea580c;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.order-pending-sticky-icon {
  font-size: 18px;
}
.order-pending-sticky-content {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: #9a3412;
}
.order-pending-sticky-desc {
  font-size: 11px;
  color: #c2410c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-order-pending-sticky {
  background: #c2410c;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.btn-order-pending-sticky:hover {
  background: #9a3412;
}

/* Soft Intercept Modal */
.pending-intercept-modal {
  max-width: 440px;
  width: 92%;
}
.pending-intercept-intro {
  font-size: 13px;
  color: #475569;
  margin-bottom: 12px;
  line-height: 1.4;
}
.pending-intercept-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 16px;
}
.pending-intercept-card {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
}
.pending-intercept-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.pending-intercept-card-no {
  font-weight: 700;
  color: #92400e;
}
.pending-intercept-card-toko {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}
.pending-intercept-card-reason {
  color: #b45309;
  font-weight: 600;
}
.pending-intercept-card-note {
  color: #78350f;
  margin-top: 4px;
  background: rgba(255, 255, 255, 0.6);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
}
.pending-intercept-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.btn-intercept-check {
  background: #0369a1 !important;
  color: #ffffff !important;
  font-weight: 700;
  padding: 10px !important;
  font-size: 13px !important;
}

/* WA Admin Button on Card */
.btn-chat-admin-wa {
  background: var(--btn-wa-bg);
  color: #ffffff;
  border: none;
  font-weight: 600;
}
.btn-chat-admin-wa:hover {
  background: #166534;
}

.badge-alert {
  background: #fee2e2;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.badge-pending-queue {
  background: var(--status-pending-bg);
  color: var(--status-pending-fg);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--status-pending-border);
}

.hub-card-arrow {
  font-size: 22px;
  color: #94a3b8;
  font-weight: 700;
}

/* ==========================================================================
   STOCK SCREEN: ACTIONS
   ========================================================================== */
.stock-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.btn-card-price {
  flex: 1;
  padding: 8px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

.btn-card-po {
  flex: 1;
  padding: 8px;
  background: #e0e7ff;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #3730a3;
  cursor: pointer;
}

/* ==========================================================================
   PURCHASE ORDER (PO) SCREEN
   ========================================================================== */
.order-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
}

.order-tab {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  text-align: center;
}

.order-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 700;
}

.order-section {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.order-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-step {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary-btn-bg);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  margin-right: 6px;
  flex-shrink: 0;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  flex: 1;
}

.btn-add-item-trigger {
  background: #e0e7ff;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #3730a3;
  cursor: pointer;
}

.cust-search-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  box-sizing: border-box;
}

.recent-outlets-section {
  margin-top: 8px;
}

.recent-outlets-title {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 4px;
}

.recent-outlets-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.recent-chip {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 6px 12px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: #334155;
  cursor: pointer;
}

.customer-results-list {
  max-height: 220px;
  overflow-y: auto;
  margin-top: 8px;
  border-top: 1px solid #f1f5f9;
}

.customer-result-card {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.1s ease;
}

.customer-result-card:active {
  background: #eff6ff;
}

.customer-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cust-code {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}

.cust-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.cust-address {
  font-size: 12px;
  color: #475569;
  margin-top: 2px;
}

.cust-city {
  font-size: 11px;
  color: #94a3b8;
}

/* Badges for outlet types (INCS) */
.badge-outlet {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-retail { background: #e0f2fe; color: #0369a1; }
.badge-kanvas { background: #fef3c7; color: #b45309; }
.badge-grosir { background: #ede9fe; color: #6d28d9; }
.badge-semigrosir { background: #fae8ff; color: #a21caf; }
.badge-pasar { background: #fee2e2; color: #b91c1c; }
.badge-modern { background: #dcfce7; color: #15803d; }
.badge-horeka { background: #ffedd5; color: #c2410c; }

.selected-customer-box {
  background: #eff6ff;
  border: 1.5px solid #93c5fd;
  border-radius: 8px;
  padding: 12px;
}

.btn-change-customer {
  margin-top: 8px;
  background: #ffffff;
  border: 1px solid #93c5fd;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #1d4ed8;
  cursor: pointer;
}

/* Order item list */
.order-items-empty {
  padding: 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

.order-item-row {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
}

.order-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.order-item-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.order-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.order-item-unit-select {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  background: #ffffff;
}

.qty-stepper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-stepper {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.input-qty {
  width: 48px;
  height: 44px;
  text-align: center;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  box-sizing: border-box;
}

.order-item-conversion {
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
}

.order-item-warn {
  color: #dc2626;
  font-weight: 600;
}

.btn-del-item {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 16px;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 8px;
}

.order-notes-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  resize: vertical;
}

.order-summary-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  position: sticky;
  bottom: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.order-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #475569;
  margin-bottom: 6px;
}

.order-action-buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.btn-draft {
  flex: 1;
  padding: 12px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

.btn-submit-order {
  flex: 1.5;
  padding: 12px;
  background: var(--btn-success-bg);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
}

.btn-submit-order:active {
  background: #166534;
}

.btn-submit-order.btn-offline-submit {
  background: #b45309;
}

.btn-submit-order.btn-offline-submit:active {
  background: #92400e;
}

.offline-submit-hint {
  font-size: 11px;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 6px 10px;
  margin-top: 8px;
  text-align: center;
  line-height: 1.4;
}

.offline-login-badge {
  margin-top: 10px;
  padding: 6px 10px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 6px;
  font-size: 11px;
  color: #92400e;
  text-align: center;
}

/* ==========================================================================
   ORDER LIST & STATUS
   ========================================================================== */
.order-status-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.status-tab {
  padding: 6px 12px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
}

.status-tab.active {
  background: var(--primary-btn-bg);
  border-color: var(--primary-btn-bg);
  color: #ffffff;
}

.order-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  transition: all 0.15s ease-in-out;
}

/* Status-based backgrounds for PO Cards */
.order-card.status-SUBMITTED {
  background: var(--status-submitted-bg);
  border-color: var(--status-submitted-border);
  border-left: 4px solid var(--status-submitted-fg);
}

.order-card.status-PENDING {
  background: var(--status-pending-bg);
  border-color: var(--status-pending-border);
  border-left: 4px solid var(--status-pending-fg);
}

.order-card.status-PROCESSED {
  background: var(--status-processed-bg);
  border-color: var(--status-processed-border);
  border-left: 4px solid var(--status-processed-fg);
}

.order-card.status-CANCELLED {
  background: var(--status-cancelled-bg);
  border-color: var(--status-cancelled-border);
  border-left: 4px solid var(--status-cancelled-fg);
  opacity: 0.92;
}

.order-card.status-DRAFT {
  background: var(--surface-subtle);
  border-color: var(--border);
  border-left: 4px solid var(--text-muted);
}

/* Admin Adjustment Warning Banner */
.order-admin-note-banner {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-left: 4px solid #ea580c;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
  font-size: 11.5px;
  line-height: 1.45;
  color: #9a3412;
}

.order-admin-note-banner .banner-header {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
  color: #c2410c;
}

.order-admin-note-banner .banner-body {
  white-space: pre-line;
  word-break: break-word;
}

/* Order Pending Reason Banner */
.order-pending-banner {
  background: var(--status-pending-bg);
  border: 1px solid var(--status-pending-border);
  border-left: 4px solid var(--status-pending-fg);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
  font-size: 11.5px;
  line-height: 1.45;
  color: #78350f;
}

.order-pending-banner-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}

.order-pending-banner-title {
  font-weight: 700;
  color: var(--status-pending-fg);
}

.order-pending-age {
  font-size: 10.5px;
  font-weight: 700;
  background: #fde68a;
  color: #78350f;
  padding: 1px 6px;
  border-radius: 999px;
}

.order-pending-reason-text {
  font-weight: 700;
  color: #78350f;
  word-break: break-word;
}

.order-pending-note-text {
  margin-top: 2px;
  color: var(--status-pending-fg);
  white-space: pre-line;
  word-break: break-word;
}

.order-pending-meta {
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--status-pending-fg);
  opacity: 0.95;
}

/* Search Box for Orders */
.order-search-box {
  margin-bottom: 10px;
}

.order-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.order-search-icon {
  position: absolute;
  left: 10px;
  font-size: 13px;
  pointer-events: none;
  opacity: 0.6;
}

.order-search-input {
  width: 100%;
  padding: 10px 46px 10px 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: #ffffff;
  transition: border-color 0.15s;
}

.order-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.1);
}

.btn-clear-order-search {
  position: absolute;
  right: 2px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 13px;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.order-no {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

.badge-status-SUBMITTED {
  background: var(--status-submitted-bg);
  color: var(--status-submitted-fg);
  border: 1px solid var(--status-submitted-border);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}
.badge-status-PENDING {
  background: var(--status-pending-bg);
  color: var(--status-pending-fg);
  border: 1px solid var(--status-pending-border);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}
.badge-status-PROCESSED {
  background: var(--status-processed-bg);
  color: var(--status-processed-fg);
  border: 1px solid var(--status-processed-border);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}
.badge-status-CANCELLED {
  background: var(--status-cancelled-bg);
  color: var(--status-cancelled-fg);
  border: 1px solid var(--status-cancelled-border);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}
.badge-status-DRAFT {
  background: var(--surface-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.order-outlet-line {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.order-time-line {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 6px;
}

.order-items-preview {
  font-size: 12px;
  color: #334155;
  background: #f8fafc;
  padding: 6px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.order-card-actions {
  display: flex;
  gap: 8px;
}

.btn-action-view {
  flex: 1;
  padding: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #1d4ed8;
  cursor: pointer;
}

.btn-action-cancel {
  padding: 8px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #b91c1c;
  cursor: pointer;
}

/* ==========================================================================
   ADMIN DASHBOARD: GROUPED PER SALES & ACCORDION
   ========================================================================== */
.admin-filter-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  background: #ffffff;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.admin-filter-group {
  flex: 1 1 140px;
}

.admin-filter-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  display: block;
  margin-bottom: 2px;
}

.admin-filter-select {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
}

.sales-group-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}

.sales-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.sales-group-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sales-group-count {
  font-size: 12px;
  font-weight: 600;
  background: #e0e7ff;
  color: #3730a3;
  padding: 2px 8px;
  border-radius: 12px;
}

.sales-group-orders {
  padding: 10px;
}

/* ==========================================================================
   ADMIN INLINE ITEMS & FAST ACTIONS
   ========================================================================== */
.admin-order-items-box {
  margin-top: 8px;
  margin-bottom: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-order-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.admin-order-items-table th {
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid #e2e8f0;
}

.admin-order-items-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

.admin-order-items-table tr:last-child td {
  border-bottom: none;
}

.admin-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.btn-card-confirm {
  flex: 2 1 140px;
  padding: 8px 12px;
  background: var(--btn-success-bg);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.15s ease;
}

.btn-card-confirm:active {
  background: #166534;
}

.btn-card-copy {
  flex: 1 1 90px;
  padding: 8px 10px;
  background: #0369a1;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.15s ease;
}

.btn-card-copy:active {
  background: #075985;
}

.btn-card-detail {
  padding: 8px 10px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-card-cancel {
  padding: 8px 10px;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-card-pending {
  padding: 8px 10px;
  background: var(--status-pending-bg);
  color: var(--status-pending-fg);
  border: 1px solid var(--status-pending-border);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-card-pending:hover {
  background: #fde68a;
}

.btn-card-resume {
  flex: 1 1 115px;
  padding: 8px 10px;
  background: #b45309;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-card-resume:hover {
  background: #92400e;
}

.btn-action-pending {
  background: var(--status-pending-bg);
  border: 1px solid var(--status-pending-border);
  color: var(--status-pending-fg);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-action-pending:hover {
  background: #fde68a;
}

.btn-action-resume {
  background: #b45309;
  border: none;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-action-resume:hover {
  background: #92400e;
}

.btn-confirm-next {
  background: #059669;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-confirm-next:active {
  background: #047857;
}

/* ==========================================================================
   MODAL DIALOGS
   ========================================================================== */
.modal-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 92%;
  max-width: 540px;
  max-height: 85vh;
  background: #ffffff;
  border-radius: 12px;
  z-index: var(--z-modal);
  display: none;
  flex-direction: column;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.25);
  box-sizing: border-box;
}

.modal-dialog.show {
  display: flex;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.modal-body {
  padding: 14px 16px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.modal-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.table-scroll-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 10px;
}

.detail-table th {
  background: #f1f5f9;
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.detail-table td {
  padding: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.btn-copy-format {
  flex: 1;
  padding: 10px;
  background: #0369a1;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.btn-confirm-print {
  flex: 1;
  padding: 10px;
  background: var(--btn-success-bg);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* User Management Form */
.add-user-card {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 14px;
}

.add-user-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.form-row {
  display: flex;
  gap: 8px;
}

.form-input-sm {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
}

.btn-primary-sm {
  padding: 8px 14px;
  background: var(--primary-btn-bg);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-secondary-sm {
  padding: 8px 14px;
  background: var(--surface-subtle);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn-secondary-sm:hover {
  background: var(--border);
}
.btn-secondary-sm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary-action {
  padding: 8px 14px;
  background: var(--primary);
  color: var(--on-primary);
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color 0.15s ease;
}
.btn-primary-action:hover {
  background: var(--primary-hover);
}
.btn-primary-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary-action {
  padding: 8px 14px;
  background: var(--surface-subtle);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn-secondary-action:hover {
  background: var(--border);
}
.btn-secondary-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.user-list-title {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
}

.admin-user-list {
  max-height: 240px;
  overflow-y: auto;
}

.admin-user-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 6px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}

.btn-reset-pin {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-delete-user {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-delete-user:hover {
  background: #fee2e2;
}

.role-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 4px;
}

.role-badge-super {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.role-badge-admin {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.role-badge-spv {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.role-badge-sales {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.btn-user-groups {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-user-groups:hover {
  background: #dcfce7;
}

.user-groups-checklist {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 8px;
  background: #ffffff;
}

.user-group-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

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

.user-group-item:hover {
  background: #f8fafc;
}

.user-group-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Item Picker Modal */
.item-picker-sheet {
  top: 24px;
  bottom: 0;
  height: calc(100% - 24px);
  max-height: calc(100% - 24px);
  display: flex;
  flex-direction: column;
}

.picker-count-badge {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  margin-left: 6px;
}

.item-picker-search {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.picker-group-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}

.picker-group-chips::-webkit-scrollbar {
  display: none;
}

.picker-group-chip {
  padding: 6px 14px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.picker-group-chip:active {
  background: #e2e8f0;
}

.picker-group-chip.active {
  background: var(--primary-btn-bg);
  color: #ffffff;
  border-color: var(--primary-btn-bg);
}

.picker-items-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 12px 300px 12px;
}

.picker-item-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: all 0.12s ease;
  border-radius: 6px;
  margin-bottom: 2px;
}

.picker-item-card:hover {
  background: #f8fafc;
}

.picker-item-card:active {
  background: #eff6ff;
}

.picker-item-card.selected {
  background: #f0f7ff;
  border-left: 3px solid var(--primary);
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1);
}

.picker-item-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 1.5px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #ffffff;
  transition: all 0.15s ease;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.picker-item-card.selected .picker-item-checkbox {
  background: var(--primary-btn-bg);
  border-color: var(--primary-btn-bg);
}

.picker-item-info {
  flex: 1;
  min-width: 0;
}

.picker-item-name {
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
  line-height: 1.3;
}

.picker-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 4px;
}

.picker-item-group-badge {
  display: inline-block;
  padding: 1px 6px;
  background: #e0e7ff;
  color: #3730a3;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 4px;
}

.picker-already-in-po {
  display: inline-block;
  padding: 1px 6px;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  margin-left: 4px;
}

.picker-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
  margin-left: 6px;
}

.picker-item-unit-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%232563eb' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding: 4px 22px 4px 8px;
  border: 1.5px solid #93c5fd;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #1e3a8a;
  cursor: pointer;
  max-width: 125px;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.picker-item-unit-select:focus {
  border-color: var(--primary);
}

.picker-item-qty-stepper {
  display: flex;
  align-items: center;
  gap: 3px;
  background: #ffffff;
  padding: 2px 4px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  flex-shrink: 0;
}

.picker-stepper-btn {
  min-width: 44px;
  min-height: 44px;
  border-radius: 4px;
  border: none;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.1s;
}

.picker-stepper-btn:active {
  background: #cbd5e1;
}

.picker-stepper-val {
  min-width: 26px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  color: #1e293b;
}

/* Sticky Bottom Batch Bar in Item Picker */
.picker-batch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.08);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
}

.picker-batch-info {
  display: flex;
  flex-direction: column;
}

.picker-batch-count {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.picker-batch-subtext {
  font-size: 11px;
  color: #64748b;
}

.btn-picker-batch-add {
  background: var(--primary-btn-bg);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
  transition: all 0.15s ease;
}

.btn-picker-batch-add:active {
  background: var(--primary-btn-hover);
  transform: scale(0.97);
}

/* ==========================================================================
   DATE FILTER STYLES (SALES & ADMIN)
   ========================================================================== */
.order-date-filter-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 12px;
}

.date-chip-group {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.date-chip-group::-webkit-scrollbar {
  display: none;
}

.date-chip {
  padding: 6px 12px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.date-chip:active {
  background: #e2e8f0;
}

.date-chip.active {
  background: var(--primary-btn-bg);
  border-color: var(--primary-btn-bg);
  color: #ffffff;
}

.custom-date-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  flex-wrap: wrap;
}

.date-input {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text);
  background: var(--surface);
  flex: 1 1 120px;
  min-width: 0;
}

.date-sep, .date-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.btn-date-apply {
  padding: 6px 14px;
  background: var(--primary-btn-bg);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-date-apply:active {
  background: var(--primary-btn-hover);
}

/* ==========================================================================
   PHASE 2 & 3: CONNECTION PILL, TOAST, QUICK CHIPS & DAILY STATS
   ========================================================================== */
.connection-pill {
  display: none;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 6px;
  transition: all 0.2s ease;
}
.connection-pill.online {
  display: none;
}
.connection-pill.offline,
.connection-pill.warning {
  display: inline-flex;
}
.connection-pill.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.connection-pill.offline {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.connection-pill .pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.reconnected-toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  background: #f0fdf4;
  border-bottom: 1px solid #86efac;
  color: #166534;
  font-size: 12px;
  font-weight: 600;
}
.btn-toast-sync {
  background: var(--btn-success-bg);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.btn-toast-dismiss {
  background: transparent;
  color: #166534;
  border: none;
  font-size: 14px;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  line-height: 1;
}

body.theme-dark .reconnected-toast {
  background: #064e3b;
  border-color: #059669;
  color: #a7f3d0;
}

body.theme-dark .btn-toast-dismiss {
  color: #a7f3d0;
}

.qty-quick-chips {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  align-items: center;
}
.btn-chip-qty {
  flex: 1;
  padding: 6px 4px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  text-align: center;
  transition: all 0.1s ease;
}
.btn-chip-qty:active {
  background: #3b82f6;
  color: #ffffff;
  border-color: #3b82f6;
  transform: scale(0.96);
}

.daily-stats-card {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  color: #ffffff;
  border-radius: 12px;
  padding: 14px;
  margin: 12px 14px 4px;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.15);
}
.stats-card-header {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 10px;
  opacity: 0.95;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.stat-box {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.stat-num {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
}
.stat-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  display: block;
  opacity: 0.9;
  margin-top: 2px;
}
.stat-sublabel {
  font-size: 9px;
  opacity: 0.75;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-draft-toggle-bar {
  margin-top: 8px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
}

.stats-draft-toggle-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.stats-draft-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.stats-draft-status-pill.is-off {
  background: rgba(15, 23, 42, 0.35);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.stats-draft-status-pill.is-on {
  background: rgba(34, 197, 94, 0.25);
  color: #bbf7d0;
  border: 1px solid rgba(74, 222, 128, 0.5);
}

.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}

.toggle-switch.toggle-switch-sm {
  width: 34px;
  height: 19px;
}

.toggle-switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch-slider {
  position: relative;
  width: 100%;
  height: 100%;
  background: rgba(148, 163, 184, 0.55);
  border-radius: 999px;
  transition: background 0.18s ease;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.25);
}

.toggle-switch-slider::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.3);
  transition: transform 0.18s ease;
}

.toggle-switch.toggle-switch-sm .toggle-switch-slider::before {
  width: 15px;
  height: 15px;
}

.toggle-switch-input:checked + .toggle-switch-slider {
  background: #22c55e;
}

.toggle-switch-input:checked + .toggle-switch-slider::before {
  transform: translateX(16px);
}

.toggle-switch.toggle-switch-sm .toggle-switch-input:checked + .toggle-switch-slider::before {
  transform: translateX(15px);
}

.toggle-switch-input:focus-visible + .toggle-switch-slider {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

/* ==========================================================================
   PUSH NOTIFICATIONS & IN-APP TOAST
   ========================================================================== */
.push-prompt-card {
  max-width: 640px;
  margin: 10px auto 0;
  padding: 12px 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.push-prompt-content {
  flex: 1;
}

.push-prompt-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 2px;
}

.push-prompt-desc {
  font-size: 11px;
  color: #3b82f6;
  line-height: 1.3;
}

.push-prompt-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.btn-enable-push {
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-enable-push:hover {
  background: #1d4ed8;
}

.btn-dismiss-push {
  background: transparent;
  color: #64748b;
  border: 1px solid #cbd5e1;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.in-app-banner {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: 500px;
  background: #1e293b;
  color: #ffffff;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: var(--z-toast);
  animation: slideDownInApp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDownInApp {
  from {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.in-app-banner-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.in-app-banner-text {
  flex: 1;
  min-width: 0;
}

.in-app-banner-title {
  font-size: 13px;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.in-app-banner-body {
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-close-banner {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.btn-close-banner:hover {
  color: #ffffff;
}

/* Adjust / Split Order Modal */
.adjust-modal-sheet {
  max-width: 560px;
  width: 95%;
}

.btn-adjust-order {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-adjust-order:hover {
  background: #dcfce7;
}

.adjust-items-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px;
  background: #f8fafc;
}

.adjust-item-row {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.15s ease;
}

.adjust-item-row.zero-qty {
  opacity: 0.65;
  background: #fef2f2;
  border-color: #fecaca;
}

.adjust-item-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.adjust-item-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.adjust-item-group-badge {
  display: inline-block;
  background: #f1f5f9;
  color: #475569;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.adjust-item-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.adjust-stepper {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  overflow: hidden;
}

.adjust-stepper-btn {
  background: #ffffff;
  border: none;
  min-width: 44px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.adjust-stepper-btn:hover {
  background: #e2e8f0;
}

.adjust-stepper-input {
  width: 44px;
  height: 44px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: #0f172a;
}

.adjust-unit-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  padding-right: 6px;
}

.adjust-diff-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.adjust-diff-full {
  background: #dcfce7;
  color: #15803d;
}

.adjust-diff-reduced {
  background: #fef3c7;
  color: #b45309;
}

.adjust-diff-zero {
  background: #fee2e2;
  color: #b91c1c;
}

/* ==========================================================================
   DAILY RECAP & WHATSAPP REPORT MODAL
   ========================================================================== */
.stats-card-action {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
}

.btn-daily-recap {
  width: 100%;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-daily-recap:hover {
  background: #dbeafe;
}

.daily-recap-dialog {
  max-width: 580px;
  width: 95%;
  height: 90vh;
  max-height: 90vh;
}

.recap-modal-body {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  gap: 10px;
  overflow-y: auto;
}

.recap-form-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  flex-shrink: 0;
}

.recap-form-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.recap-form-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.recap-form-col.flex-1 {
  flex: 1;
}

.recap-form-col.w-col-sm {
  width: 90px;
}

.recap-label {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
}

.recap-options-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.recap-toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #334155;
  cursor: pointer;
  user-select: none;
}

.recap-draft-toggle-label {
  width: 100%;
  justify-content: flex-start;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px dashed #cbd5e1;
}

.recap-draft-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  white-space: nowrap;
}

.recap-draft-badge.is-included {
  background: #dcfce7;
  color: #15803d;
}

.recap-draft-badge.is-excluded {
  background: #fef3c7;
  color: #92400e;
}

.recap-empty-hint {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 11px;
  line-height: 1.4;
}

.recap-nav-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 2px;
  flex-shrink: 0;
}

.recap-nav-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.recap-nav-tab.active {
  color: #1e3a8a;
  border-bottom: 2px solid #1e3a8a;
}

.recap-tab-panel {
  flex: 1;
  overflow-y: auto;
}

.recap-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recap-summary-bar {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #1e3a8a;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.recap-group-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.recap-group-header {
  background: #f1f5f9;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.recap-item-row {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

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

.recap-item-name {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
}

.recap-item-cust {
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
}

.recap-item-qty {
  text-align: right;
  white-space: nowrap;
}

.recap-qty-badge {
  display: inline-block;
  background: #f0fdf4;
  color: #166534;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #bbf7d0;
}

.recap-item-val {
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
}

.recap-wa-textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.5;
  background: #f8fafc;
  color: #0f172a;
  resize: vertical;
  box-sizing: border-box;
}

.recap-wa-textarea:focus {
  border-color: #0284c7;
  background: #ffffff;
}

.recap-text-hint {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 6px;
}

.recap-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}

.btn-recap-copy {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-recap-copy:hover {
  background: #f1f5f9;
}

.btn-recap-wa {
  background: var(--btn-wa-bg);
  color: #ffffff;
  border: 1px solid #166534;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-recap-wa:hover {
  background: #166534;
}

/* ==========================================================================
   USER AVATAR & PROFILE PICTURE STYLES
   ========================================================================== */

.header-avatar-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.25);
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  overflow: hidden;
  position: relative;
}

.header-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.header-avatar-initials {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: -0.5px;
}

.header-profile-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  transition: background 0.15s ease;
}

.header-profile-box:hover {
  background: #f1f5f9;
}

.header-profile-avatar-wrap {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #3b82f6;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.menu-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.menu-avatar-initials {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.avatar-camera-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: 10px;
  background: rgba(15, 23, 42, 0.7);
  color: #ffffff;
  width: 100%;
  text-align: center;
  line-height: 14px;
  opacity: 0.9;
}

.header-profile-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.menu-user-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.menu-user-role {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
}

/* Avatar Modal Dialog */
.avatar-modal {
  max-width: 480px;
  z-index: var(--z-nested-modal);
}

#avatarModal.show {
  display: flex !important;
  visibility: visible !important;
}

#avatarModal:not(.show) {
  display: none !important;
}

#avatarModalBackdrop {
  z-index: var(--z-nested-backdrop);
}

#avatarModalBackdrop.show {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.avatar-modal-body {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.avatar-preview-wrap {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #e2e8f0;
  border: 3px solid #3b82f6;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25);
  margin-top: 6px;
}

.avatar-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-preview-initials {
  font-size: 38px;
  font-weight: 800;
  color: #475569;
}

.avatar-user-label {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.avatar-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 300px;
}

.btn-avatar-pick {
  background: #2563eb;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
  transition: all 0.15s ease;
}

.btn-avatar-pick:hover {
  background: #1d4ed8;
}

.btn-avatar-remove {
  background: #fee2e2;
  color: #b91c1c;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #fecaca;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-avatar-remove:hover {
  background: #fecaca;
}

.avatar-tips {
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
  background: #f8fafc;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px dashed #cbd5e1;
}

/* ==========================================================================
   WA TEMPLATE SETTINGS MODAL (ADMIN)
   ========================================================================== */
.wa-template-modal {
  max-width: 980px;
  width: 96%;
  height: 88vh;
  max-height: 90vh;
}

.wa-template-modal.show {
  display: flex;
  flex-direction: column;
}

.wa-template-modal-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 12px 16px;
}

.wa-sub-tabs {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 12px;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
}

.wa-sub-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.wa-sub-tab-btn:hover {
  color: #0f172a;
}

.wa-sub-tab-btn.active {
  background: #ffffff;
  color: #0369a1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.wa-subtab-pane {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.wa-subtab-pane:not(.active) {
  display: none !important;
}

#subtabContentTeamConfig {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 #f1f5f9;
}

#subtabContentTeamConfig::-webkit-scrollbar {
  width: 8px;
}
#subtabContentTeamConfig::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}
#subtabContentTeamConfig::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}
#subtabContentTeamConfig::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

.team-members-quick-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-xs-link {
  background: none;
  border: none;
  font-size: 11px;
  color: #0369a1;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.btn-xs-link:hover {
  text-decoration: underline;
}

.sep-dot {
  color: #cbd5e1;
  font-size: 10px;
}

.team-members-filter-row {
  margin-bottom: 4px;
}

.wa-template-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.wa-tab-btn {
  background: none;
  border: none;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 13px;
  color: #64748b;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s ease;
}

.wa-tab-btn:hover {
  color: #0369a1;
}

.wa-tab-btn.active {
  color: #0369a1;
  border-bottom-color: #0369a1;
  font-weight: 700;
}

.wa-template-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
  flex-shrink: 0;
}

.wa-template-editor {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 6px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 #f1f5f9;
}

.wa-template-editor::-webkit-scrollbar {
  width: 8px;
}
.wa-template-editor::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}
.wa-template-editor::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}
.wa-template-editor::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

.wa-cat-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  transition: all 0.15s ease;
}

.wa-cat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  border-bottom: 1px dashed #cbd5e1;
  padding-bottom: 6px;
  cursor: pointer;
  user-select: none;
}

.wa-cat-toggle-icon {
  display: inline-block;
  transition: transform 0.2s ease;
  margin-right: 4px;
  font-size: 10px;
  color: #0284c7;
}

.wa-cat-card.collapsed .wa-cat-toggle-icon {
  transform: rotate(-90deg);
  color: #94a3b8;
}

.wa-cat-card.collapsed .wa-cat-key-row,
.wa-cat-card.collapsed .wa-item-table,
.wa-cat-card.collapsed .btn-add-item {
  display: none !important;
}

.wa-cat-card.collapsed .wa-cat-header {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.wa-cat-title {
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wa-cat-badge {
  background: #e2e8f0;
  color: #334155;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
}

.wa-item-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wa-item-row {
  display: grid;
  grid-template-columns: 1fr 1.3fr 32px;
  gap: 8px;
  align-items: center;
}

.wa-input-sm {
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
  background: #ffffff;
  color: #0f172a;
  box-sizing: border-box;
  width: 100%;
}

.wa-input-sm:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

.wa-btn-del {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 6px;
  height: 28px;
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s ease;
}

.wa-btn-del:hover {
  background: #fecaca;
}

.btn-add-item {
  align-self: flex-start;
  margin-top: 6px;
  font-size: 11px;
  padding: 4px 8px;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.btn-add-item:hover {
  background: #bae6fd;
}

.wa-cat-del-btn {
  background: transparent;
  color: #94a3b8;
  border: none;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
}

.wa-cat-del-btn:hover {
  color: #ef4444;
  background: #fee2e2;
}

.wa-cat-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.wa-btn-order, .wa-btn-rename {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 11px;
  color: #334155;
  transition: all 0.15s ease;
}

.wa-btn-order:hover:not(:disabled), .wa-btn-rename:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.wa-btn-order:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.wa-cat-key-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 5px 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.wa-cat-key-label {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.input-cat-keys {
  flex: 1;
}

.wa-template-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  flex-shrink: 0;
}

.danger-text {
  color: #dc2626 !important;
}

/* Order Success Feedback Modal */
.order-success-modal {
  max-width: 420px;
  text-align: center;
}

.order-success-header {
  border-bottom: 1px solid var(--border);
}

.order-success-body {
  padding: 24px 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.order-success-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 4px;
}

.order-success-heading {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.order-success-msg {
  font-size: 14px;
  color: #475569;
  line-height: 1.5;
  text-align: center;
}

.order-success-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
}

.btn-next-store {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  background: var(--primary-btn-bg);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-next-store:hover {
  background: var(--primary-btn-hover);
}

.btn-view-po-list {
  width: 100%;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-view-po-list:hover {
  background: #e2e8f0;
}

/* ==========================================================================
   PAYMENT TYPE BADGES & CONFIRMATION MODAL
   ========================================================================== */
.badge-payment-cash,
.badge-cash {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--status-processed-bg);
  color: var(--status-processed-fg);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--status-processed-border);
  letter-spacing: 0.3px;
}

.badge-payment-kredit,
.badge-kredit {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--border);
  letter-spacing: 0.2px;
}

.badge-payment-large {
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 800;
}

.payment-confirm-dialog {
  max-width: 440px;
}

.payment-confirm-body {
  padding: 16px;
}

.payment-confirm-outlet-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.payment-confirm-cust {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.payment-confirm-info {
  font-size: 12px;
  color: #64748b;
  margin-top: 3px;
  font-weight: 500;
}

.payment-confirm-question {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 12px;
  line-height: 1.4;
}

.payment-options-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-payment-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  width: 100%;
}

.btn-payment-option .pay-icon {
  font-size: 30px;
  line-height: 1;
  flex-shrink: 0;
}

.btn-payment-option .pay-details {
  display: flex;
  flex-direction: column;
}

.btn-payment-option .pay-title {
  font-size: 14px;
  font-weight: 800;
}

.btn-payment-option .pay-desc {
  font-size: 11.5px;
  margin-top: 3px;
  line-height: 1.3;
}

.btn-pay-cash {
  background: #f0fdf4;
  border: 2px solid #22c55e;
  color: #14532d;
}

.btn-pay-cash:hover, .btn-pay-cash:active {
  background: #dcfce7;
  border-color: #16a34a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.btn-pay-kredit {
  background: #f8fafc;
  border: 2px solid #94a3b8;
  color: #1e293b;
}

.btn-pay-kredit:hover, .btn-pay-kredit:active {
  background: #f1f5f9;
  border-color: #64748b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.15);
}

/* ==========================================================================
   VB6 COMPANION / SIDECAR MODE (380PX DOCKED RIGHT)
   ========================================================================== */
.vb6-sidecar-panel {
  position: fixed;
  right: 0;
  top: 0;
  width: 380px;
  max-width: 100vw;
  height: 100vh;
  background: #ffffff;
  box-shadow: -4px 0 20px rgba(0,0,0,0.25);
  z-index: var(--z-sidecar);
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
}

.vb6-sidecar-header {
  background: var(--primary-btn-bg);
  color: #ffffff;
  padding: 8px 10px;
  flex-shrink: 0;
}

.vb6-sidecar-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.vb6-sidecar-title {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}

.vb6-sidecar-tools {
  display: flex;
  gap: 4px;
}

.btn-sidecar-icon {
  background: rgba(255,255,255,0.18);
  border: none;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  font-weight: 600;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-sidecar-icon:hover {
  background: rgba(255,255,255,0.3);
}

.vb6-sidecar-sales-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.vb6-sidecar-select {
  flex: 1;
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  font-weight: 600;
  background: #ffffff;
  color: #0f172a;
}

.sidecar-status-select {
  max-width: 125px;
}

.vb6-sidecar-badge {
  background: #38bdf8;
  color: #0f172a;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 10px;
  white-space: nowrap;
}

.vb6-sidecar-chips {
  background: #f1f5f9;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 5px;
  overflow-x: auto;
  white-space: nowrap;
  flex-shrink: 0;
}

.vb6-sidecar-chip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 3px 8px;
  border-radius: 14px;
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  color: #334155;
}

.vb6-sidecar-chip:hover {
  background: #e2e8f0;
}

.vb6-sidecar-chip.active {
  background: #0369a1;
  color: #ffffff;
  border-color: #0369a1;
  font-weight: 700;
}

.vb6-sidecar-chip.is-pending {
  background: var(--status-pending-bg);
  border-color: var(--status-pending-border);
  color: var(--status-pending-fg);
}

.vb6-sidecar-chip.is-pending:hover {
  background: #fde68a;
}

.vb6-sidecar-chip.is-pending.active {
  background: #b45309;
  border-color: #92400e;
  color: #ffffff;
}

.sidecar-chip-pending-badge {
  font-size: 10px;
  margin-left: 2px;
}

.vb6-sidecar-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
  background: #ffffff;
}

.vb6-sidecar-footer {
  background: #f8fafc;
  border-top: 1.5px solid #cbd5e1;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.sidecar-total-bar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  gap: 3px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 11px;
}

.sidecar-total-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidecar-total-item span {
  font-size: 10px;
  color: #64748b;
}

.sidecar-total-item strong {
  font-size: 13px;
  color: #0f172a;
}

.sidecar-btn-row {
  display: flex;
  gap: 6px;
}

.btn-sidecar-action-sec {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.btn-sidecar-action-sec:hover {
  background: #f1f5f9;
}

.btn-sidecar-action-warn {
  background: var(--status-pending-bg);
  border: 1px solid var(--status-pending-border);
  color: var(--status-pending-fg);
  padding: 7px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.btn-sidecar-action-warn:hover {
  background: #fde68a;
}

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

.btn-sidecar-action-resume {
  background: #b45309;
  border: 1px solid #92400e;
  color: #ffffff;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 1px 2px rgba(180, 83, 9, 0.25);
}

.btn-sidecar-action-resume:hover {
  background: #92400e;
}

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

.sidecar-pending-banner {
  margin-top: 0;
  margin-bottom: 8px;
  padding: 8px 10px;
  font-size: 11px;
}

.btn-sidecar-edit-pending {
  background: #fde68a;
  border: 1px solid #f59e0b;
  color: #78350f;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-sidecar-edit-pending:hover {
  background: #fcd34d;
}

.btn-sidecar-action-prim {
  flex: 1;
  background: var(--btn-success-bg);
  color: #ffffff;
  border: none;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  box-shadow: 0 1px 3px rgba(21, 128, 61, 0.3);
}

.btn-sidecar-action-prim:hover {
  background: #166534;
}

.sidecar-cust-box {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
}

.sidecar-cust-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.sidecar-cust-code {
  font-family: Consolas, monospace;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.3px;
}

.sidecar-cust-name {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidecar-cust-sub {
  font-size: 10px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidecar-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #64748b;
  margin-top: 4px;
  border-top: 1px dashed #e2e8f0;
  padding-top: 3px;
}

.sidecar-item-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 6px;
}

.sidecar-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: background 0.1s;
}

.sidecar-item-row:hover {
  background: #f8fafc;
}

.sidecar-item-row.row-strike {
  background: #f1f5f9;
  opacity: 0.45;
}

.sidecar-item-row.row-strike .sidecar-item-name,
.sidecar-item-row.row-strike .sidecar-item-code {
  text-decoration: line-through;
}

.sidecar-chk {
  transform: scale(1.15);
  cursor: pointer;
}

.sidecar-item-info {
  flex: 1;
  min-width: 0;
}

.sidecar-item-code {
  font-family: Consolas, monospace;
  font-weight: 800;
  font-size: 13px;
  color: #0f172a;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  display: inline-block;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.sidecar-item-code:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
}

.sidecar-item-code.copied,
.sidecar-cust-code.copied {
  background: #dcfce7 !important;
  border-color: #86efac !important;
  color: #166534 !important;
}

.sidecar-cust-code[data-copy-kdrl] {
  cursor: pointer;
  user-select: none;
  padding: 1px 5px;
  border-radius: 4px;
  transition: background 0.12s;
}

.sidecar-cust-code[data-copy-kdrl]:hover {
  background: #e0f2fe;
}

.badge-booking-expired {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fdba74;
}

.stock-chunk-sentinel {
  grid-column: 1 / -1;
  text-align: center;
  padding: 12px 8px;
}

.btn-load-more-stock {
  background: #f8fafc;
  color: #0369a1;
  border: 1px dashed #93c5fd;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  max-width: 420px;
}

.btn-load-more-stock:hover {
  background: #eff6ff;
}

.sidecar-item-name {
  font-size: 11px;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.sidecar-item-qty {
  font-size: 14px;
  font-weight: 800;
  color: #0369a1;
  text-align: right;
  white-space: nowrap;
  padding-left: 4px;
  flex-shrink: 0;
}

/* ==========================================================================
   LIVE FLOATING SUMMARY BAR (ORDER SCREEN)
   ========================================================================== */
.order-floating-bar {
  position: fixed;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  left: 12px;
  right: 12px;
  max-width: 500px;
  margin: 0 auto;
  z-index: var(--z-floating-bar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: #0f172a;
  color: #ffffff;
  border-radius: 12px;
  border: 1px solid #334155;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  animation: slideUpFloating 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpFloating {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.floating-summary-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.floating-summary-qty {
  font-size: 13px;
  font-weight: 700;
  color: #38bdf8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floating-summary-val {
  font-size: 11px;
  color: #cbd5e1;
}

.btn-floating-submit {
  background: var(--btn-success-bg);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 4px rgba(21, 128, 61, 0.3);
  transition: background 0.15s, transform 0.1s;
}

.btn-floating-submit:active {
  transform: scale(0.97);
}

.btn-floating-submit:hover {
  background: #166534;
}

/* ==========================================================================
   VB6 SIDECAR FOCUS & AUDIO SHORTCUT
   ========================================================================== */
.sidecar-item-row.focused {
  outline: 2px solid #0284c7;
  border-color: #38bdf8;
  background: #f0f9ff !important;
}

/* ==========================================================================
   SEMANTIC ORDER CLASSES (LIGHT MODE DEFAULT)
   ========================================================================== */
.order-detail-header-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
}
.order-detail-cust-card {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #334155;
}
.order-detail-cust-title {
  color: #1e3a8a;
}
.order-item-code-badge {
  display: inline-block;
  padding: 2px 7px;
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.order-item-table-name {
  color: #0f172a;
}
.detail-table-total-row {
  background: #f8fafc;
  color: #0f172a;
}
.order-user-notes-box {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
}

/* ==========================================================================
   COMPREHENSIVE OLED DARK MODE (THEME-DARK)
   High contrast, OLED Pure Black, zero unreadable text
   ========================================================================== */
body.theme-dark {
  color-scheme: dark;
  --primary: #38bdf8;
  --primary-hover: #0ea5e9;
  --primary-btn-bg: #0369a1;
  --primary-btn-hover: #075985;
  --on-primary: #0f172a;
  --focus-ring: #38bdf8;
  --bg: #000000;
  --surface: #0a0f1d;
  --surface-subtle: #0d1527;
  --surface-elevated: #111a33;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --border: #1e293b;
  --border-subtle: #334155;
  --btn-success-bg: #15803d;
  --btn-wa-bg: #15803d;
  --status-submitted-bg: #1e3a8a;
  --status-submitted-fg: #93c5fd;
  --status-submitted-border: #3b82f6;
  --status-pending-bg: #451a03;
  --status-pending-fg: #fde68a;
  --status-pending-border: #d97706;
  --status-processed-bg: #064e3b;
  --status-processed-fg: #86efac;
  --status-processed-border: #10b981;
  --status-cancelled-bg: #450a0a;
  --status-cancelled-fg: #fca5a5;
  --status-cancelled-border: #ef4444;
  --success-bg: #064e3b;
  --success-text: #6ee7b7;
  --warning-bg: #451a03;
  --warning-text: #fcd34d;
  --danger-bg: #450a0a;
  --danger-text: #fca5a5;
  background-color: #000000 !important;
  color: #f8fafc !important;
}

/* Scrollbars in Dark Mode */
body.theme-dark *::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
body.theme-dark *::-webkit-scrollbar-track {
  background: #000000;
}
body.theme-dark *::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
body.theme-dark *::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* App Header & Navigation */
body.theme-dark .app-header {
  background-color: #080d1a !important;
  border-bottom: 1px solid #1e293b !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.8);
}
body.theme-dark .sub-nav-bar {
  background: #080d1a !important;
  border-bottom: 1px solid #1e293b !important;
}
body.theme-dark .sub-nav-title {
  color: #f8fafc !important;
}
body.theme-dark .btn-sub-back {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

/* Forms, Inputs, Textareas, Selects */
body.theme-dark input[type="text"],
body.theme-dark input[type="password"],
body.theme-dark input[type="date"],
body.theme-dark input[type="number"],
body.theme-dark select,
body.theme-dark textarea,
body.theme-dark .search-input,
body.theme-dark .order-search-input,
body.theme-dark #pickerSearchInput,
body.theme-dark .group-search-input,
body.theme-dark .cust-search-input,
body.theme-dark .warehouse-select,
body.theme-dark .admin-filter-select,
body.theme-dark .form-select,
body.theme-dark .form-input-sm,
body.theme-dark .order-notes-input {
  background-color: #0a0f1d !important;
  color: #f8fafc !important;
  border: 1px solid #334155 !important;
}
body.theme-dark input:focus,
body.theme-dark select:focus,
body.theme-dark textarea:focus {
  border-color: #38bdf8 !important;
}
body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
  color: #64748b !important;
}
body.theme-dark .btn-clear-search,
body.theme-dark .btn-clear-order-search {
  color: #94a3b8 !important;
}

/* Status Tabs, Chips, Unit Tabs */
body.theme-dark .status-tab,
body.theme-dark .date-chip,
body.theme-dark .group-chip,
body.theme-dark .unit-tab,
body.theme-dark .role-tab {
  background: #111827 !important;
  color: #94a3b8 !important;
  border: 1px solid #1e293b !important;
}
body.theme-dark .status-tab.active,
body.theme-dark .date-chip.active,
body.theme-dark .group-chip.active,
body.theme-dark .unit-tab.active,
body.theme-dark .role-tab.active {
  background: var(--primary-btn-bg) !important;
  color: #ffffff !important;
  border-color: #38bdf8 !important;
}

/* Stock Cards */
body.theme-dark .item-card {
  background: #0a0f1d !important;
  border: 1px solid #1e293b !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.5) !important;
}
body.theme-dark .item-name {
  color: #f8fafc !important;
}
body.theme-dark .item-code {
  color: #94a3b8 !important;
}
body.theme-dark .item-grup {
  background: #1e293b !important;
  color: #94a3b8 !important;
}
body.theme-dark .stock-row {
  background: #050811 !important;
}
body.theme-dark .breakdown-text {
  color: #38bdf8 !important;
}
body.theme-dark .total-pcs {
  color: #94a3b8 !important;
}
body.theme-dark .btn-card-price {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border: 1px solid #334155 !important;
}
body.theme-dark .btn-card-price:hover {
  background: #334155 !important;
}
body.theme-dark .btn-card-po {
  background: var(--primary-btn-bg) !important;
  color: #ffffff !important;
}
body.theme-dark .btn-load-more-stock {
  background: #0a0f1d !important;
  color: #38bdf8 !important;
  border: 1px dashed #334155 !important;
}

/* Hub Screen */
body.theme-dark .hub-card,
body.theme-dark #salesDailyStatsCard,
body.theme-dark .user-profile-card {
  background: #0a0f1d !important;
  border: 1px solid #1e293b !important;
}
body.theme-dark .hub-card-title,
body.theme-dark .user-name {
  color: #f8fafc !important;
}
body.theme-dark .hub-card-desc {
  color: #94a3b8 !important;
}
body.theme-dark .icon-stock { background: #0c4a6e !important; color: #38bdf8 !important; }
body.theme-dark .icon-order { background: #064e3b !important; color: #4ade80 !important; }
body.theme-dark .icon-admin { background: #451a03 !important; color: #fbbf24 !important; }

/* Order Screen & Customer */
body.theme-dark .order-section,
body.theme-dark .order-summary-box,
body.theme-dark .customer-result-card {
  background: #0a0f1d !important;
  border: 1px solid #1e293b !important;
}
body.theme-dark .section-title,
body.theme-dark .cust-name,
body.theme-dark .order-summary-row {
  color: #f8fafc !important;
}
body.theme-dark .cust-code,
body.theme-dark .cust-address,
body.theme-dark .cust-city,
body.theme-dark .order-summary-row span:first-child {
  color: #94a3b8 !important;
}
body.theme-dark .selected-customer-box {
  background: #064e3b !important;
  border: 1px solid #047857 !important;
  color: #f8fafc !important;
}
body.theme-dark .btn-change-customer {
  background: #111827 !important;
  border: 1px solid #334155 !important;
  color: #38bdf8 !important;
}
body.theme-dark .order-items-empty {
  color: #64748b !important;
}
body.theme-dark .order-item-row {
  background: #0a0f1d !important;
  border: 1px solid #1e293b !important;
}
body.theme-dark .order-item-title {
  color: #f8fafc !important;
}
body.theme-dark .order-item-conversion {
  color: #94a3b8 !important;
}
body.theme-dark .order-item-unit-select,
body.theme-dark .picker-item-unit-select {
  background: #111827 !important;
  border: 1px solid #334155 !important;
  color: #f8fafc !important;
}
body.theme-dark .qty-stepper,
body.theme-dark .picker-item-qty-stepper {
  background: #111827 !important;
  border: 1px solid #334155 !important;
}
body.theme-dark .btn-stepper,
body.theme-dark .picker-stepper-btn {
  background: #1e293b !important;
  color: #f8fafc !important;
}
body.theme-dark .input-qty,
body.theme-dark .picker-stepper-val {
  background: #0a0f1d !important;
  color: #f8fafc !important;
  border: none !important;
}
body.theme-dark .btn-draft {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
}

/* Item Picker Sheet */
body.theme-dark .picker-item-card {
  background: #0a0f1d !important;
  border: 1px solid #1e293b !important;
}
body.theme-dark .picker-item-name {
  color: #f8fafc !important;
}
body.theme-dark .picker-item-meta {
  color: #94a3b8 !important;
}
body.theme-dark .picker-item-group-badge {
  background: #1e293b !important;
  color: #94a3b8 !important;
}
body.theme-dark .picker-already-in-po {
  background: #064e3b !important;
  color: #86efac !important;
}
body.theme-dark .picker-item-checkbox {
  background: #111827 !important;
  border: 1px solid #334155 !important;
  color: #38bdf8 !important;
}
body.theme-dark .picker-item-card.selected {
  background: #0c2340 !important;
  border-color: #0284c7 !important;
}
body.theme-dark .picker-batch-bar {
  background: #080d1a !important;
  border-top: 1px solid #1e293b !important;
}
body.theme-dark .picker-batch-count {
  color: #38bdf8 !important;
}

/* Order History Cards (Sales & Admin) */
body.theme-dark .order-card,
body.theme-dark .sales-group-card {
  background: #0a0f1d !important;
  border: 1px solid #1e293b !important;
}
body.theme-dark .sales-group-header {
  background: #050811 !important;
  border-bottom: 1px solid #1e293b !important;
}
body.theme-dark .sales-group-title {
  color: #f8fafc !important;
}
body.theme-dark .sales-group-count {
  background: #1e293b !important;
  color: #38bdf8 !important;
}
body.theme-dark .order-no {
  color: #f8fafc !important;
}
body.theme-dark .order-outlet-line {
  color: #e2e8f0 !important;
}
body.theme-dark .order-time-line,
body.theme-dark .order-items-preview {
  color: #94a3b8 !important;
}
body.theme-dark .order-items-preview strong {
  color: #38bdf8 !important;
}
body.theme-dark .admin-order-items-box {
  background: #050811 !important;
  border: 1px solid #1e293b !important;
}
body.theme-dark .admin-order-items-table th {
  background: #111827 !important;
  color: #94a3b8 !important;
  border-bottom: 1px solid #1e293b !important;
}
body.theme-dark .admin-order-items-table td {
  color: #e2e8f0 !important;
  border-bottom: 1px solid #1e293b !important;
}
body.theme-dark .order-admin-note-banner {
  background: #451a03 !important;
  border: 1px solid #78350f !important;
  color: #fde68a !important;
}
body.theme-dark .order-admin-note-banner .banner-header {
  color: #fcd34d !important;
}
body.theme-dark .order-admin-note-banner .banner-body {
  color: #fef3c7 !important;
}
body.theme-dark .btn-action-view,
body.theme-dark .btn-card-detail {
  background: #111827 !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
}
body.theme-dark .btn-action-cancel,
body.theme-dark .btn-card-cancel {
  background: #450a0a !important;
  border: 1px solid #7f1d1d !important;
  color: #fca5a5 !important;
}
body.theme-dark .bulk-draft-header {
  background: #052e16 !important;
  border: 1px solid #16a34a !important;
}
body.theme-dark .bulk-draft-header div {
  color: #a7f3d0 !important;
}

/* Badges (High Contrast in Dark Mode) */
body.theme-dark .badge-status-SUBMITTED {
  background: var(--status-submitted-bg) !important;
  color: var(--status-submitted-fg) !important;
  border: 1px solid var(--status-submitted-border) !important;
  border-radius: 6px;
}
body.theme-dark .badge-status-PENDING {
  background: var(--status-pending-bg) !important;
  color: var(--status-pending-fg) !important;
  border: 1px solid var(--status-pending-border) !important;
  border-radius: 6px;
}
body.theme-dark .badge-pending-queue {
  background: var(--status-pending-bg) !important;
  color: var(--status-pending-fg) !important;
  border: 1px solid var(--status-pending-border) !important;
}
body.theme-dark .badge-submitted {
  background: var(--status-submitted-bg) !important;
  color: var(--status-submitted-fg) !important;
  border: 1px solid var(--status-submitted-border) !important;
}
body.theme-dark .badge-cancelled-today {
  background: #450a0a !important;
  color: #fca5a5 !important;
  border: 1px solid #7f1d1d !important;
}
body.theme-dark .hub-pending-alert-banner {
  background: #451a03 !important;
  border-color: #b45309 !important;
  border-left-color: #f59e0b !important;
}
body.theme-dark .hub-pending-alert-title {
  color: #fde68a !important;
}
body.theme-dark .hub-pending-alert-desc {
  color: #fcd34d !important;
}
body.theme-dark .btn-hub-pending-action {
  background: #b45309 !important;
  border-color: #f59e0b !important;
  color: #ffffff !important;
}
body.theme-dark .btn-hub-pending-action:hover {
  background: #92400e !important;
}
body.theme-dark .order-pending-sticky-banner {
  background: #431407 !important;
  border-color: #9a3412 !important;
  border-left-color: #ea580c !important;
}
body.theme-dark .order-pending-sticky-content {
  color: #ffedd5 !important;
}
body.theme-dark .order-pending-sticky-desc {
  color: #fed7aa !important;
}
body.theme-dark .btn-order-pending-sticky {
  background: #c2410c !important;
  color: #ffffff !important;
}
body.theme-dark .pending-intercept-card {
  background: #451a03 !important;
  border-color: #78350f !important;
}
body.theme-dark .pending-intercept-card-toko {
  color: #f8fafc !important;
}
body.theme-dark .pending-intercept-card-no {
  color: #fde68a !important;
}
body.theme-dark .pending-intercept-card-reason {
  color: #fcd34d !important;
}
body.theme-dark .pending-intercept-card-note {
  background: rgba(0, 0, 0, 0.4) !important;
  color: #fef3c7 !important;
}
body.theme-dark .tab-pending-badge {
  background: #78350f !important;
  color: #fde68a !important;
  border-color: #b45309 !important;
}
body.theme-dark .badge-status-PROCESSED {
  background: var(--status-processed-bg) !important;
  color: var(--status-processed-fg) !important;
  border: 1px solid var(--status-processed-border) !important;
  border-radius: 6px;
}
body.theme-dark .badge-status-CANCELLED {
  background: var(--status-cancelled-bg) !important;
  color: var(--status-cancelled-fg) !important;
  border: 1px solid var(--status-cancelled-border) !important;
  border-radius: 6px;
}
body.theme-dark .badge-status-DRAFT {
  background: #1e293b !important;
  color: #94a3b8 !important;
  border: 1px solid #334155 !important;
  border-radius: 6px;
}

body.theme-dark .badge-payment-cash,
body.theme-dark .badge-cash {
  background: #064e3b !important;
  color: #86efac !important;
  border: 1px solid #047857 !important;
  border-radius: 6px;
}
body.theme-dark .badge-payment-kredit,
body.theme-dark .badge-kredit {
  background: #0a0f1d !important;
  color: #94a3b8 !important;
  border: 1px solid #334155 !important;
  border-radius: 6px;
}

body.theme-dark .badge-stock.available {
  background: #064e3b !important;
  color: #86efac !important;
}
body.theme-dark .badge-stock.low {
  background: #451a03 !important;
  color: #fcd34d !important;
}
body.theme-dark .badge-stock.empty {
  background: #450a0a !important;
  color: #fca5a5 !important;
}

body.theme-dark .badge-retail { background: #0c4a6e !important; color: #7dd3fc !important; }
body.theme-dark .badge-kanvas { background: #451a03 !important; color: #fcd34d !important; }
body.theme-dark .badge-grosir { background: #3b0764 !important; color: #d8b4fe !important; }
body.theme-dark .badge-semigrosir { background: #4a044e !important; color: #f0abfc !important; }
body.theme-dark .badge-pasar { background: #450a0a !important; color: #fca5a5 !important; }
body.theme-dark .badge-modern { background: #064e3b !important; color: #86efac !important; }
body.theme-dark .badge-horeka { background: #431407 !important; color: #fdba74 !important; }

/* Modals, Sheets, Dialogs, Dropdowns */
body.theme-dark .modal-dialog,
body.theme-dark .bottom-sheet,
body.theme-dark .price-sheet,
body.theme-dark .picker-sheet,
body.theme-dark .adjust-modal-sheet,
body.theme-dark #adminVb6Sidecar,
body.theme-dark .vb6-sidecar-panel,
body.theme-dark .order-success-modal,
body.theme-dark .daily-recap-dialog,
body.theme-dark .header-menu-dropdown,
body.theme-dark .pin-card {
  background: #080d1a !important;
  border: 1px solid #1e293b !important;
  color: #f8fafc !important;
}
body.theme-dark .modal-header,
body.theme-dark .modal-footer,
body.theme-dark .sheet-header,
body.theme-dark .header-profile-box {
  border-color: #1e293b !important;
}
body.theme-dark .modal-title,
body.theme-dark .sheet-title,
body.theme-dark .menu-user-name {
  color: #f8fafc !important;
}
body.theme-dark .header-menu-item {
  color: #e2e8f0 !important;
}
body.theme-dark .header-menu-item:hover,
body.theme-dark .header-menu-item:active {
  background: #111827 !important;
}
body.theme-dark .header-menu-divider {
  background: #1e293b !important;
}
body.theme-dark .detail-table th,
body.theme-dark .price-table th {
  background: #111827 !important;
  color: #94a3b8 !important;
  border-bottom: 1px solid #1e293b !important;
}
body.theme-dark .detail-table td,
body.theme-dark .price-table td {
  color: #e2e8f0 !important;
  border-bottom: 1px solid #0a0f1d !important;
}
body.theme-dark .price-table td.val {
  color: #38bdf8 !important;
}
body.theme-dark .state-box {
  background: #0a0f1d !important;
  color: #94a3b8 !important;
  border: 1px solid #1e293b !important;
}

/* Order Detail Modal Specific Elements */
body.theme-dark .order-detail-header-card {
  background: #0a0f1d !important;
  border: 1px solid #1e293b !important;
  color: #94a3b8 !important;
}
body.theme-dark .order-detail-header-card strong {
  color: #f8fafc !important;
}
body.theme-dark .order-detail-cust-card {
  background: #0c2340 !important;
  border: 1px solid #0284c7 !important;
  color: #cbd5e1 !important;
}
body.theme-dark .order-detail-cust-title {
  color: #38bdf8 !important;
}
body.theme-dark .order-item-code-badge {
  background: #0c4a6e !important;
  border: 1px solid #0284c7 !important;
  color: #7dd3fc !important;
  border-radius: 6px;
}
body.theme-dark .order-item-table-name {
  color: #f8fafc !important;
}
body.theme-dark .detail-table-total-row {
  background: #0a0f1d !important;
  color: #f8fafc !important;
}
body.theme-dark .order-user-notes-box {
  background: #451a03 !important;
  border: 1px solid #78350f !important;
  color: #fde68a !important;
}

/* VB6 Sidecar */
body.theme-dark .sidecar-cust-box {
  background: #050811 !important;
  border: 1px solid #1e293b !important;
}
body.theme-dark .sidecar-cust-name {
  color: #f8fafc !important;
}
body.theme-dark .sidecar-cust-sub,
body.theme-dark .sidecar-meta-row {
  color: #94a3b8 !important;
}
body.theme-dark .sidecar-item-row {
  background: #0a0f1d !important;
  border: 1px solid #1e293b !important;
}
body.theme-dark .sidecar-item-row:hover {
  background: #111827 !important;
}
body.theme-dark .sidecar-item-row.focused {
  outline: 2px solid #38bdf8 !important;
  border-color: #0284c7 !important;
  background: #0c2340 !important;
}
body.theme-dark .sidecar-item-name {
  color: #e2e8f0 !important;
}
body.theme-dark .sidecar-item-code {
  background: #111827 !important;
  border: 1px solid #334155 !important;
  color: #38bdf8 !important;
}
body.theme-dark .sidecar-item-qty {
  color: #38bdf8 !important;
}
body.theme-dark .notes-box {
  background: #0c2340 !important;
  border: 1px solid #0284c7 !important;
  color: #7dd3fc !important;
}

/* Daily Recap Modal & WA Textarea */
body.theme-dark .recap-wa-textarea {
  background: #050811 !important;
  border: 1px solid #334155 !important;
  color: #f8fafc !important;
}
body.theme-dark .recap-group-header {
  background: #111827 !important;
  color: #38bdf8 !important;
}
body.theme-dark .recap-item-row {
  border-bottom: 1px solid #111827 !important;
}
body.theme-dark .recap-item-name {
  color: #e2e8f0 !important;
}
body.theme-dark .recap-offline-banner {
  background: #451a03 !important;
  border: 1px solid #78350f !important;
  color: #fde68a !important;
}
body.theme-dark .recap-draft-toggle-label {
  border-top-color: #1e293b !important;
}
body.theme-dark .recap-draft-badge {
  background: #1e293b !important;
  color: #94a3b8 !important;
}
body.theme-dark .recap-draft-badge.is-included {
  background: #052e16 !important;
  color: #86efac !important;
}
body.theme-dark .recap-draft-badge.is-excluded {
  background: #451a03 !important;
  color: #fde68a !important;
}
body.theme-dark .recap-empty-hint {
  background: #451a03 !important;
  border-color: #78350f !important;
  color: #fde68a !important;
}
body.theme-dark .daily-stats-card .stats-draft-toggle-bar {
  background: rgba(15, 23, 42, 0.45) !important;
  border-color: #334155 !important;
}

/* Adjust / Split Modal */
body.theme-dark .adjust-items-container {
  background: #050811 !important;
  border: 1px solid #1e293b !important;
}
body.theme-dark .adjust-item-row {
  background: #0a0f1d !important;
  border: 1px solid #1e293b !important;
}
body.theme-dark .adjust-item-name {
  color: #f8fafc !important;
}
body.theme-dark .adjust-item-group-badge {
  background: #1e293b !important;
  color: #94a3b8 !important;
}
body.theme-dark .adjust-item-row.zero-qty {
  background: #450a0a !important;
  border: 1px solid #7f1d1d !important;
}
body.theme-dark #adjustOrderHeaderInfo,
body.theme-dark #adjustPaymentPreview {
  background: #0a0f1d !important;
  border: 1px solid #1e293b !important;
  color: #e2e8f0 !important;
}
body.theme-dark .adjust-action-box {
  background: #2a1506 !important;
  border: 1px solid #7c2d12 !important;
  color: #fde68a !important;
}

/* Miscellaneous Containers */
body.theme-dark #syncStatusInfoText {
  background: #111827 !important;
  border: 1px solid #1e293b !important;
  color: #94a3b8 !important;
}
body.theme-dark #adminCustomDateRow {
  background: #0a0f1d !important;
  border: 1px solid #1e293b !important;
}
body.theme-dark #btnReorderLast {
  background: #0c4a6e !important;
  border: 1px solid #0284c7 !important;
  color: #7dd3fc !important;
}
body.theme-dark .btn-toggle-pay {
  background: #111827 !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
}
body.theme-dark .pin-overlay {
  background: rgba(0, 0, 0, 0.9) !important;
}
body.theme-dark .pin-input {
  background: #050811 !important;
  border: 1px solid #334155 !important;
  color: #f8fafc !important;
}
body.theme-dark .add-user-card {
  background: #0a0f1d !important;
  border: 1px solid #1e293b !important;
}
body.theme-dark .add-user-title {
  color: #f8fafc !important;
}
body.theme-dark .admin-user-row {
  border-bottom: 1px solid #111827 !important;
  color: #e2e8f0 !important;
}

/* ==========================================================================
   SEMANTIC ORDER & ADJUST UTILITY CLASSES (LIGHT MODE DEFAULTS)
   ========================================================================== */
.order-split-subcard {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 6px;
  margin-bottom: 6px;
  border: 1px solid #e2e8f0;
  font-size: 12px;
}
.order-split-subid {
  font-weight: 700;
  color: #0f172a;
}
.order-split-subgrp {
  color: #64748b;
  font-size: 11px;
}
.order-split-subcount {
  font-size: 11px;
  color: #475569;
}
.bulk-draft-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  margin-bottom: 12px;
}
.bulk-draft-title {
  font-size: 13px;
  font-weight: 600;
  color: #166534;
}
.btn-bulk-send {
  padding: 7px 14px;
  background: var(--btn-success-bg);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}
.order-detail-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.order-detail-no {
  font-size: 14px;
  color: #0f172a;
  font-weight: 700;
}
.order-detail-badges {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.order-detail-meta-line {
  font-size: 12px;
  color: #475569;
  margin-top: 3px;
}
.order-detail-cust-top {
  display: flex;
  align-items: center;
  gap: 6px;
}
.order-detail-cust-addr {
  font-size: 12px;
  color: #334155;
  margin-top: 4px;
}
.order-detail-cust-sub {
  font-size: 11px;
  color: #64748b;
}
.order-detail-items-heading {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-top: 8px;
  margin-bottom: 4px;
}
.adjust-header-title {
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
}
.adjust-header-sub {
  margin-top: 2px;
  font-size: 12px;
  color: #475569;
}
.adjust-preview-heading {
  font-weight: 700;
  margin-bottom: 4px;
  color: #0f172a;
}
.adjust-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px dashed #cbd5e1;
  font-size: 12px;
}
.adjust-pay-cash {
  color: var(--btn-success-bg);
  font-weight: 700;
}
.adjust-pay-kredit {
  color: #2563eb;
  font-weight: 700;
}
.adjust-subtext-cash {
  font-size: 11px;
  color: var(--btn-success-bg);
}
.adjust-preview-cash-alert {
  color: var(--btn-success-bg);
  font-weight: 600;
  font-size: 12px;
  padding: 4px 0;
}
.sidecar-empty-state {
  text-align: center;
  padding: 40px 16px;
  color: #64748b;
}
.sidecar-empty-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}
.sidecar-empty-sub {
  font-size: 11px;
  margin-top: 4px;
  color: #64748b;
}
.notes-box {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11.5px;
  color: var(--text);
  margin-top: 6px;
  line-height: 1.4;
}

.notes-box-split {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
  margin-top: 6px;
}
.sidecar-items-header-title {
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
}
.admin-item-pcs-cell {
  text-align: right;
  white-space: nowrap;
  color: #475569;
}

/* ==========================================================================
   COMPREHENSIVE OLED DARK MODE OVERRIDES (ZERO LIGHT ELEMENTS, MAX CONTRAST)
   ========================================================================== */
body.theme-dark .order-split-subcard {
  background: #080d1a !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}
body.theme-dark .order-split-subid {
  color: #f8fafc !important;
}
body.theme-dark .order-split-subgrp {
  color: #94a3b8 !important;
}
body.theme-dark .order-split-subcount {
  color: #cbd5e1 !important;
}
body.theme-dark .bulk-draft-title {
  color: #86efac !important;
}
body.theme-dark .order-detail-no {
  color: #f8fafc !important;
}
body.theme-dark .order-detail-meta-line {
  color: #94a3b8 !important;
}
body.theme-dark .order-detail-meta-line strong {
  color: #f8fafc !important;
}
body.theme-dark .order-detail-cust-addr {
  color: #cbd5e1 !important;
}
body.theme-dark .order-detail-cust-sub {
  color: #94a3b8 !important;
}
body.theme-dark .order-detail-items-heading {
  color: #f8fafc !important;
}
body.theme-dark .adjust-header-title {
  color: #f8fafc !important;
}
body.theme-dark .adjust-header-sub {
  color: #94a3b8 !important;
}
body.theme-dark .adjust-header-sub strong {
  color: #f8fafc !important;
}
body.theme-dark .adjust-preview-heading {
  color: #38bdf8 !important;
}
body.theme-dark .adjust-preview-row {
  border-bottom: 1px dashed #334155 !important;
  color: #cbd5e1 !important;
}
body.theme-dark .adjust-pay-cash {
  color: #4ade80 !important;
}
body.theme-dark .adjust-pay-kredit {
  color: #38bdf8 !important;
}
body.theme-dark .adjust-subtext-cash {
  color: #4ade80 !important;
}
body.theme-dark .adjust-preview-cash-alert {
  color: #4ade80 !important;
}
body.theme-dark .sidecar-empty-state {
  color: #94a3b8 !important;
}
body.theme-dark .sidecar-empty-title {
  color: #f8fafc !important;
}
body.theme-dark .sidecar-empty-sub {
  color: #94a3b8 !important;
}
body.theme-dark .notes-box-split {
  background: #0c2340 !important;
  border-color: #0284c7 !important;
  color: #7dd3fc !important;
}
body.theme-dark .sidecar-items-header-title {
  color: #f8fafc !important;
}
body.theme-dark .admin-item-pcs-cell {
  color: #94a3b8 !important;
}

/* Comprehensive screen-wide Dark Mode containment */
body.theme-dark .order-section {
  background: #080d1a !important;
  border: 1px solid #1e293b !important;
  color: #f8fafc !important;
}
body.theme-dark .login-role-tabs {
  background: #0a0f1d !important;
  border: 1px solid #1e293b !important;
}
body.theme-dark .order-card.status-SUBMITTED {
  background: #08182b !important;
  border-color: #1e3a8a !important;
  border-left: 4px solid var(--status-submitted-fg) !important;
}
body.theme-dark .order-card.status-PENDING {
  background: #200f04 !important;
  border-color: #78350f !important;
  border-left: 4px solid var(--status-pending-fg) !important;
}
body.theme-dark .order-card.status-PROCESSED {
  background: #061910 !important;
  border-color: #064e3b !important;
  border-left: 4px solid var(--status-processed-fg) !important;
}
body.theme-dark .order-card.status-CANCELLED {
  background: #1f0d0d !important;
  border-color: #7f1d1d !important;
  border-left: 4px solid var(--status-cancelled-fg) !important;
}
body.theme-dark .order-card.status-DRAFT {
  background: #0d111c !important;
  border-color: #1e293b !important;
  border-left: 4px solid #64748b !important;
}
body.theme-dark .order-date-filter-box {
  background: #080d1a !important;
  border-color: #1e293b !important;
}
body.theme-dark .date-input {
  background: #050811 !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
  color-scheme: dark;
}
body.theme-dark .recent-chip {
  background: #111827 !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
}
body.theme-dark .customer-result-card {
  background: #0a1426 !important;
  border-color: #1e3a5f !important;
  color: #f8fafc !important;
}
body.theme-dark .user-groups-checklist {
  background: #080d1a !important;
  border-color: #1e293b !important;
}
body.theme-dark .user-group-item {
  background: #0a0f1d !important;
  color: #e2e8f0 !important;
}
body.theme-dark .user-group-item:hover {
  background: #111827 !important;
}
body.theme-dark .picker-group-chips {
  background: #050811 !important;
  border-color: #1e293b !important;
}
body.theme-dark .picker-group-chip {
  background: #111827 !important;
  border: 1px solid #334155 !important;
  color: #94a3b8 !important;
}
body.theme-dark .picker-group-chip.active {
  background: #0369a1 !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
}
body.theme-dark .push-prompt-card {
  background: #081a36 !important;
  border-color: #1d4ed8 !important;
}
body.theme-dark .push-prompt-title {
  color: #60a5fa !important;
}
body.theme-dark .push-prompt-desc {
  color: #cbd5e1 !important;
}
body.theme-dark .recap-form-section {
  background: #0a0f1d !important;
  border-color: #1e293b !important;
}
body.theme-dark .recap-group-card {
  background: #080d1a !important;
  border: 1px solid #1e293b !important;
}
body.theme-dark .recap-modal-footer {
  background: #080d1a !important;
  border-top: 1px solid #1e293b !important;
}
body.theme-dark .btn-recap-copy {
  background: #111827 !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
}
body.theme-dark .recap-qty-badge {
  background: #064e3b !important;
  color: #86efac !important;
}
body.theme-dark .wa-cat-card {
  background: #080d1a !important;
  border: 1px solid #1e293b !important;
}
body.theme-dark .wa-cat-title {
  color: #f8fafc !important;
}
body.theme-dark .wa-cat-badge {
  background: #111827 !important;
  color: #94a3b8 !important;
}
body.theme-dark .wa-input-sm {
  background: #050811 !important;
  border: 1px solid #334155 !important;
  color: #f8fafc !important;
}
body.theme-dark .wa-btn-order,
body.theme-dark .wa-btn-rename {
  background: #111827 !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
}
body.theme-dark .wa-cat-key-row {
  background: #0a0f1d !important;
  border-color: #1e293b !important;
}
body.theme-dark .wa-cat-key-label {
  color: #cbd5e1 !important;
}
body.theme-dark .wa-template-footer {
  background: #080d1a !important;
  border-color: #1e293b !important;
}
body.theme-dark .wa-sub-tabs {
  background: #0a0f1d !important;
  border-color: #1e293b !important;
}
body.theme-dark .wa-sub-tab-btn {
  color: #94a3b8 !important;
}
body.theme-dark .wa-sub-tab-btn.active {
  background: #1e293b !important;
  color: #38bdf8 !important;
}
body.theme-dark .wa-template-editor::-webkit-scrollbar-track,
body.theme-dark #subtabContentTeamConfig::-webkit-scrollbar-track {
  background: #0f172a !important;
}
body.theme-dark .wa-template-editor::-webkit-scrollbar-thumb,
body.theme-dark #subtabContentTeamConfig::-webkit-scrollbar-thumb {
  background: #334155 !important;
}
body.theme-dark .wa-template-editor::-webkit-scrollbar-thumb:hover,
body.theme-dark #subtabContentTeamConfig::-webkit-scrollbar-thumb:hover {
  background: #475569 !important;
}
body.theme-dark .payment-confirm-outlet-box {
  background: #0a0f1d !important;
  border-color: #1e293b !important;
}
body.theme-dark .payment-confirm-cust {
  color: #f8fafc !important;
}
body.theme-dark .payment-confirm-question {
  color: #e2e8f0 !important;
}
body.theme-dark .btn-pay-cash {
  background: #052e16 !important;
  border: 1.5px solid #16a34a !important;
  color: #86efac !important;
}
body.theme-dark .btn-pay-kredit {
  background: #0f172a !important;
  border: 1.5px solid #0284c7 !important;
  color: #7dd3fc !important;
}
body.theme-dark .vb6-sidecar-panel {
  background: #050811 !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}
body.theme-dark .vb6-sidecar-header {
  background: #080d1a;
  color: #f8fafc;
  border-bottom: 1px solid var(--border);
}
body.theme-dark .vb6-sidecar-chips {
  background: #080d1a !important;
  border-color: #1e293b !important;
}
body.theme-dark .vb6-sidecar-chip {
  background: #111827 !important;
  border: 1px solid #334155 !important;
  color: #94a3b8 !important;
}
body.theme-dark .vb6-sidecar-chip.active {
  background: #0369a1 !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
}
body.theme-dark .vb6-sidecar-body {
  background: #050811 !important;
  color: #f8fafc !important;
}
body.theme-dark .vb6-sidecar-footer {
  background: #080d1a !important;
  border-color: #1e293b !important;
}
body.theme-dark .sidecar-total-bar {
  background: #0a0f1d !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}
body.theme-dark .btn-sidecar-action-sec {
  background: #111827 !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
}
body.theme-dark .sidecar-cust-code {
  background: #064e3b !important;
  color: #86efac !important;
}
body.theme-dark .row-strike {
  background: #111827 !important;
  opacity: 0.6;
}
body.theme-dark .badge-booking-expired {
  background: #451a03 !important;
  border: 1px solid #9a3412 !important;
  color: #fdba74 !important;
}
body.theme-dark .offline-submit-hint {
  background: #451a03 !important;
  border: 1px solid #78350f !important;
  color: #fde68a !important;
}
body.theme-dark .offline-banner {
  background: #451a03 !important;
  border: 1px solid #78350f !important;
  color: #fde68a !important;
}
body.theme-dark .admin-filter-container {
  background: #080d1a !important;
  border-color: #1e293b !important;
}
body.theme-dark .filter-bar {
  background: #080d1a !important;
  border-color: #1e293b !important;
}
body.theme-dark .btn-group-filter {
  background: #111827 !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
}
body.theme-dark .avatar-tips {
  background: #0a0f1d !important;
  color: #94a3b8 !important;
  border-color: #1e293b !important;
}
body.theme-dark .btn-avatar-remove {
  background: #450a0a !important;
  color: #fecaca !important;
  border-color: #7f1d1d !important;
}
body.theme-dark .btn-avatar-remove:hover {
  background: #7f1d1d !important;
}
body.theme-dark .btn-view-po-list {
  background: #111827 !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
}
body.theme-dark .order-success-heading {
  color: #f8fafc !important;
}
body.theme-dark .order-success-msg {
  color: #cbd5e1 !important;
}
body.theme-dark .adjust-stepper {
  background: #050811 !important;
  border: 1px solid #334155 !important;
}
body.theme-dark .adjust-stepper-btn {
  background: #111827 !important;
  color: #e2e8f0 !important;
}
body.theme-dark .adjust-stepper-input {
  color: #f8fafc !important;
}
body.theme-dark .order-floating-bar {
  background: #000000 !important;
  border: 1.5px solid #0284c7 !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.85) !important;
}
body.theme-dark .recap-summary-bar {
  background: #0c2340 !important;
  border: 1px solid #0284c7 !important;
  color: #7dd3fc !important;
}
body.theme-dark .daily-stats-card {
  background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%) !important;
  border: 1px solid #1e293b !important;
}

/* ==========================================================================
   OLED DARK MODE - SPECIFIC WIDGETS & BUTTONS (HIGH CONTRAST)
   ========================================================================== */
body.theme-dark .copied {
  background: #052e16 !important;
  color: #4ade80 !important;
  border-color: #16a34a !important;
}
body.theme-dark .btn-chip-qty {
  background: #111827 !important;
  border: 1px solid #334155 !important;
  color: #38bdf8 !important;
}
body.theme-dark .btn-chip-qty:hover,
body.theme-dark .btn-chip-qty:active {
  background: #1e293b !important;
}
body.theme-dark .btn-add-item-trigger {
  background: #0c4a6e !important;
  border: 1.5px dashed #0284c7 !important;
  color: #7dd3fc !important;
}
body.theme-dark .btn-sub-action {
  background: #1e1b4b !important;
  border: 1px solid #3730a3 !important;
  color: #a5b4fc !important;
}
body.theme-dark .offline-login-badge {
  background: #451a03 !important;
  border: 1px solid #78350f !important;
  color: #fde68a !important;
}
body.theme-dark .form-label,
body.theme-dark .user-list-title,
body.theme-dark .recap-label,
body.theme-dark .recap-toggle-label,
body.theme-dark .payment-confirm-info,
body.theme-dark .date-label,
body.theme-dark .date-sep,
body.theme-dark .picker-batch-subtext,
body.theme-dark .picker-count-badge,
body.theme-dark .recent-outlets-title,
body.theme-dark .sidecar-total-item {
  color: #cbd5e1 !important;
}
body.theme-dark .avatar-user-label {
  color: #f8fafc !important;
}
body.theme-dark .btn-user-groups {
  background: #052e16 !important;
  border-color: #15803d !important;
  color: #86efac !important;
}
body.theme-dark .btn-reset-pin {
  background: #450a0a !important;
  border-color: #991b1b !important;
  color: #fca5a5 !important;
}
body.theme-dark .btn-add-item {
  background: #0c4a6e !important;
  border-color: #0284c7 !important;
  color: #7dd3fc !important;
}
body.theme-dark .vb6-sidecar-select {
  background: #050811 !important;
  border: 1px solid #334155 !important;
  color: #f8fafc !important;
}
body.theme-dark .vb6-sidecar-badge {
  background: #0369a1 !important;
  color: #ffffff !important;
}
body.theme-dark .customer-result-card:active {
  background: #0c2340 !important;
}

/* ==========================================================================
   SUPERVISOR DAILY REPORT & DYNAMIC TEAMS MODULE
   ========================================================================== */
.hub-card-supervisor {
  border-left: 4px solid #0284c7 !important;
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
}
.hub-card-supervisor:hover {
  border-left-color: #0369a1 !important;
  background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 100%);
}
.hub-card-users {
  border-left: 4px solid #9333ea !important;
  background: linear-gradient(135deg, #ffffff 0%, #faf5ff 100%);
}
.hub-card-users:hover {
  border-left-color: #7e22ce !important;
  background: linear-gradient(135deg, #ffffff 0%, #f3e8ff 100%);
}
.icon-supervisor {
  background: #e0f2fe;
  color: #0369a1;
}

.spv-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #ffffff;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  flex-wrap: nowrap;
}
.spv-nav-bar .sub-nav-title {
  min-width: 0;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spv-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.spv-filter-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.spv-filter-primary-row {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(145px, 1.05fr) minmax(130px, 0.9fr);
  gap: 10px;
  align-items: end;
}
.spv-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.spv-filter-label {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  line-height: 1.2;
}
.spv-select,
.spv-date-input {
  flex: none;
  width: 100%;
  height: 38px;
  min-height: 38px;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.3;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #f8fafc;
  color: #0f172a;
  box-sizing: border-box;
  min-width: 0;
}
.spv-select:focus,
.spv-date-input:focus {
  border-color: #0284c7;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.12);
}

.spv-preset-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
}
.spv-preset-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}
.spv-preset-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.btn-preset-pill {
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-preset-pill:hover {
  background: #e2e8f0;
}
.btn-preset-pill.active {
  background: #0369a1;
  color: #ffffff;
  border-color: #0369a1;
  box-shadow: 0 1px 3px rgba(3, 105, 161, 0.3);
}

.spv-params-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 86px 86px minmax(0, 1.35fr);
  align-items: end;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
}
.spv-param-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.spv-param-label {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spv-param-col .form-input-sm {
  flex: none;
  width: 100%;
  height: 36px;
  min-height: 36px;
  padding: 6px 8px;
  font-size: 12.5px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #f8fafc;
  color: #0f172a;
  box-sizing: border-box;
  min-width: 0;
}
.spv-param-col .form-input-sm:focus {
  border-color: #0284c7;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.12);
}

.spv-stats-card {
  margin: 0 0 12px 0;
}
.spv-stats-card .stats-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.spv-stats-card .stat-box {
  min-width: 0;
  padding: 10px 6px;
}
.spv-stats-card .stat-num {
  font-size: clamp(14px, 3vw, 17px);
  overflow-wrap: anywhere;
}

.spv-team-badge {
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 3px 9px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  white-space: nowrap;
}

.spv-tabs-row {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 12px;
  gap: 4px;
}
.spv-tabs-row .recap-nav-tab {
  border-bottom: none;
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 13px;
}
.spv-tabs-row .recap-nav-tab.active {
  background: #eff6ff;
  color: #1d4ed8;
  border-bottom: none;
  box-shadow: 0 1px 2px rgba(29, 78, 216, 0.12);
}
#screenSupervisorReport .recap-tab-panel {
  overflow: visible;
}

.spv-wa-actions-bar {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Dynamic Teams in WA Template Modal */
.wa-team-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 8px;
  flex-shrink: 0;
}
#waTeamTabsList {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  flex: 1;
}
.btn-add-team-pill {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px dashed #0369a1;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-add-team-pill:hover {
  background: #e0f2fe;
}

.wa-team-config-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.team-config-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.team-config-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 100px;
}

.team-members-section {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #cbd5e1;
}
.team-members-label-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.team-members-label {
  font-size: 11px;
  font-weight: 700;
  color: #1e293b;
}
.team-members-hint {
  font-size: 10px;
  color: #64748b;
}

.wa-team-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}
.team-member-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  user-select: none;
  transition: all 0.15s ease;
}
.team-member-checkbox-label:hover {
  background: #f0fdf4;
  border-color: #86efac;
}
.team-member-checkbox-label input[type="checkbox"]:checked + span {
  font-weight: 700;
  color: #0369a1;
}

.btn-delete-team-link {
  color: #dc2626;
  background: none;
  border: none;
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
  padding: 2px 4px;
}

body.theme-dark .hub-card-supervisor {
  background: linear-gradient(135deg, #0b1528 0%, #082f49 100%) !important;
  border-left-color: #38bdf8 !important;
}
body.theme-dark .hub-card-users {
  background: linear-gradient(135deg, #160d2e 0%, #2e1065 100%) !important;
  border-left-color: #c084fc !important;
}
body.theme-dark .icon-supervisor {
  background: #0c4a6e;
  color: #38bdf8;
}
body.theme-dark .icon-users {
  background: #3b0764 !important;
  color: #c084fc !important;
}
body.theme-dark .role-badge-super {
  background: #3b0764 !important;
  color: #d8b4fe !important;
  border-color: #7e22ce !important;
}
body.theme-dark .role-badge-admin {
  background: #1e3a8a !important;
  color: #93c5fd !important;
  border-color: #3b82f6 !important;
}
body.theme-dark .role-badge-spv {
  background: #14532d !important;
  color: #86efac !important;
  border-color: #22c55e !important;
}
body.theme-dark .role-badge-sales {
  background: #1e293b !important;
  color: #cbd5e1 !important;
  border-color: #475569 !important;
}
body.theme-dark .spv-nav-bar,
body.theme-dark .spv-filter-card,
body.theme-dark .spv-tabs-row,
body.theme-dark #waTeamTabsList,
body.theme-dark .wa-team-config-card {
  background: #0f172a !important;
  border-color: #1e293b !important;
}
body.theme-dark .spv-preset-row,
body.theme-dark .spv-params-row {
  border-top-color: #1e293b !important;
}
body.theme-dark .spv-select,
body.theme-dark .spv-date-input,
body.theme-dark .spv-param-col .form-input-sm,
body.theme-dark .wa-team-members-grid {
  background: #050811 !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}
body.theme-dark .spv-date-input {
  color-scheme: dark;
}
body.theme-dark .spv-tabs-row .recap-nav-tab {
  color: #94a3b8 !important;
}
body.theme-dark .spv-tabs-row .recap-nav-tab.active {
  background: #0c4a6e !important;
  color: #e0f2fe !important;
}
body.theme-dark .spv-team-badge {
  background: rgba(14, 165, 233, 0.2) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  color: #e0f2fe !important;
}
body.theme-dark .spv-filter-label,
body.theme-dark .spv-preset-label,
body.theme-dark .spv-param-label,
body.theme-dark .team-members-label {
  color: #94a3b8 !important;
}
body.theme-dark .btn-preset-pill {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}
body.theme-dark .btn-preset-pill.active {
  background: #0369a1;
  color: #ffffff;
  border-color: #0369a1;
}
body.theme-dark .team-member-checkbox-label {
  background: #050811;
  border-color: #1e293b;
  color: #e2e8f0;
}
body.theme-dark .team-member-checkbox-label input[type="checkbox"]:checked + span {
  color: #38bdf8 !important;
}
body.theme-dark .btn-add-team-pill {
  background: #0c2340 !important;
  color: #38bdf8 !important;
  border-color: #0369a1 !important;
}

/* ==========================================================================
   INFO / PENGUMUMAN MODULE (DASHBOARD SALES, SCREEN INFO, ADMIN MODAL)
   ========================================================================== */
body.theme-dark .icon-info {
  background: #450a0a !important;
  color: #fca5a5 !important;
}

.latest-info-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #2563eb;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.latest-info-card.has-unread {
  border-color: #fecaca;
  border-left: 4px solid #dc2626;
  background: linear-gradient(135deg, #ffffff 0%, #fff7f7 100%);
}

.latest-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.latest-info-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

.latest-info-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-info-unread {
  background: #dc2626;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.3);
}

.badge-info-read {
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
}

.latest-info-body {
  cursor: pointer;
  padding: 4px 0;
}

.latest-info-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.info-cat-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.info-cat-badge.cat-umum { background: #e0f2fe; color: #0369a1; }
.info-cat-badge.cat-promo { background: #dcfce7; color: #15803d; }
.info-cat-badge.cat-stok { background: #fef3c7; color: #b45309; }
.info-cat-badge.cat-harga { background: #ede9fe; color: #6d28d9; }
.info-cat-badge.cat-penting { background: #fee2e2; color: #b91c1c; }

.info-pin-badge {
  font-size: 10px;
  font-weight: 700;
  background: #fef9c3;
  color: #854d0e;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #fde047;
}

.latest-info-time {
  font-size: 11px;
  color: #64748b;
}

.latest-info-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 3px;
}

.latest-info-excerpt {
  font-size: 12px;
  color: #475569;
  line-height: 1.45;
  white-space: pre-line;
  overflow: hidden;
}
.latest-info-excerpt.is-text-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
}
.latest-info-excerpt.is-structured-preview {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 155px;
  overflow: hidden;
  white-space: normal;
}

.latest-info-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}

.btn-latest-info-read {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.btn-latest-info-read:active {
  background: #bbf7d0;
}

.btn-latest-info-all {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.btn-latest-info-all:active {
  background: #dbeafe;
}

/* Screen Info */
.info-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.info-nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-mark-all-read {
  background: #dcfce7 !important;
  color: #15803d !important;
  border-color: #86efac !important;
}

.info-filter-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 6px 0 10px;
  scrollbar-width: none;
}
.info-filter-bar::-webkit-scrollbar {
  display: none;
}

.info-filter-chip {
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.info-filter-chip.active {
  background: var(--primary-btn-bg);
  border-color: var(--primary-btn-bg);
  color: #ffffff;
}

.chip-count-pill {
  background: #dc2626;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 9999px;
}

.info-offline-notice {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  margin-bottom: 10px;
}

.info-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 24px;
}

.info-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.info-card:active {
  transform: scale(0.99);
}
.info-card.unread {
  border-left: 4px solid #dc2626;
  background: #fffafa;
}

.info-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.info-card-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.info-new-badge {
  background: #dc2626;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.info-card-time {
  font-size: 11px;
  color: #64748b;
}

.info-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.info-card-body {
  font-size: 13px;
  color: #334155;
  line-height: 1.45;
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.info-card-body.info-rich-content {
  white-space: normal;
}
.info-card-body.is-structured-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
  white-space: normal;
  -webkit-line-clamp: unset;
  max-height: 230px;
  overflow: hidden;
}

.info-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed #f1f5f9;
  font-size: 11px;
  color: #64748b;
  gap: 8px;
  flex-wrap: wrap;
}
.info-card.inactive-admin {
  opacity: 0.78;
  background: #f8fafc;
}
.info-target-summary {
  margin-top: 6px;
  font-size: 11px;
  color: #475569;
  line-height: 1.4;
}
.info-card-admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}
.info-detail-footer {
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.info-detail-admin-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}

.info-detail-content {
  font-size: 14px;
  color: #1e293b;
  line-height: 1.55;
  white-space: pre-wrap;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  margin-top: 10px;
}
.info-detail-content.info-rich-content {
  white-space: normal;
}

/* Rich Text Shared Formatting (Reset Guard against * padding/margin 0) */
.info-rich-content {
  white-space: normal;
  word-break: break-word;
}
.info-rich-content p {
  margin: 0 0 6px;
}
.info-rich-content p:last-child {
  margin-bottom: 0;
}
.info-rich-content ul,
.info-rich-content ol {
  margin: 4px 0 6px;
  padding-left: 20px;
}
.info-rich-content ul {
  list-style-type: disc;
}
.info-rich-content ol {
  list-style-type: decimal;
}
.info-rich-content li {
  margin-bottom: 2px;
}

/* Rich Text Editor (Admin Info Modal) */
.rich-editor-wrap {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.rich-editor-wrap:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.rich-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 6px 8px;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}
.rich-editor-btn {
  min-width: 34px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.rich-editor-btn:hover {
  background: #e2e8f0;
}
.rich-editor-btn.active {
  background: #1d4ed8;
  border-color: #1e40af;
  color: #ffffff;
}
.rich-editor-sep {
  width: 1px;
  height: 20px;
  background: #cbd5e1;
  margin: 0 2px;
}
.rich-editor-area {
  min-height: 115px;
  max-height: 240px;
  overflow-y: auto;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #0f172a;
  position: relative;
  word-break: break-word;
}
.rich-editor-area.is-empty::before {
  content: attr(data-placeholder);
  color: #94a3b8;
  pointer-events: none;
  position: absolute;
  left: 12px;
  top: 10px;
}
.rich-editor-area p {
  margin: 0 0 6px;
}
.rich-editor-area p:last-child {
  margin-bottom: 0;
}
.rich-editor-area ul,
.rich-editor-area ol {
  margin: 4px 0 6px;
  padding-left: 22px;
}
.rich-editor-area ul {
  list-style-type: disc;
}
.rich-editor-area ol {
  list-style-type: decimal;
}
.rich-editor-area li {
  margin-bottom: 2px;
}
.rich-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 11px;
  color: #64748b;
}
.rich-editor-counter.over-limit {
  color: #dc2626;
  font-weight: 700;
}

/* Admin Structured Price & Stock Builders */
.admin-structured-section {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-structured-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-structured-title {
  font-size: 12px;
  font-weight: 800;
  color: #1e293b;
}
.admin-structured-wh-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-structured-mini-label {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
}
.form-input-xs {
  padding: 3px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  font-size: 11px;
  background: #ffffff;
  color: #0f172a;
}
.admin-picker-filter-row,
.admin-picker-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-picker-search-wrap input {
  flex: 1;
}
.admin-stock-group-select {
  flex: 1;
}
.admin-btn-manual-item {
  white-space: nowrap;
  padding: 6px 10px;
  font-size: 11px;
}
.admin-picker-results {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
}
.admin-picker-result-item {
  width: 100%;
  text-align: left;
  background: #ffffff;
  border: none;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-picker-result-item:last-child {
  border-bottom: none;
}
.admin-picker-result-item:hover {
  background: #eff6ff;
}
.admin-picker-result-name {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}
.admin-picker-result-meta {
  font-size: 11px;
  color: #64748b;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-structured-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-structured-row-card {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.admin-structured-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.admin-structured-row-name {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  flex: 1;
}
.admin-structured-row-code {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  background: #e2e8f0;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
}
.admin-structured-row-remove {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.admin-structured-row-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.admin-structured-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-structured-field label {
  font-size: 10px;
  font-weight: 600;
  color: #475569;
}
.admin-structured-diff-preview {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 5px;
  background: #f1f5f9;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-structured-diff-preview.up {
  background: #fee2e2;
  color: #b91c1c;
}
.admin-structured-diff-preview.down {
  background: #dcfce7;
  color: #15803d;
}
.admin-structured-stock-badge {
  font-size: 10px;
  font-weight: 600;
  color: #0369a1;
  background: #e0f2fe;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

/* Sales Structured Info Rendering: HARGA & STOK */
.info-price-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}
.info-price-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #7c3aed;
  border-radius: 7px;
  padding: 7px 9px;
}
.info-price-card.compact {
  padding: 5px 8px;
}
.info-price-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}
.info-price-name {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}
.info-price-meta-badge {
  font-size: 10px;
  font-weight: 700;
  background: #ede9fe;
  color: #5b21b6;
  padding: 1px 6px;
  border-radius: 4px;
}
.info-price-compare {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
}
.info-price-old {
  color: #64748b;
  text-decoration: line-through;
  font-size: 11px;
}
.info-price-arrow {
  color: #94a3b8;
  font-weight: 700;
}
.info-price-new {
  color: #0f172a;
  font-weight: 800;
  font-size: 13px;
}
.info-price-diff {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 9999px;
  margin-left: auto;
}
.info-price-diff.up {
  background: #fee2e2;
  color: #b91c1c;
}
.info-price-diff.down {
  background: #dcfce7;
  color: #15803d;
}
.info-price-diff.flat {
  background: #e2e8f0;
  color: #475569;
}
.info-price-note {
  font-size: 11px;
  color: #475569;
  margin-top: 3px;
  font-style: italic;
}
.info-structured-more-pill {
  font-size: 11px;
  font-weight: 700;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px dashed #93c5fd;
  border-radius: 5px;
  padding: 3px 8px;
  text-align: center;
}

.info-stock-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}
.info-stock-top-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.info-stock-status-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
}
.info-stock-status-badge.status-restock {
  background: #e0f2fe;
  color: #0369a1;
}
.info-stock-status-badge.status-melimpah {
  background: #dcfce7;
  color: #15803d;
}
.info-stock-status-badge.status-menipis {
  background: #fef3c7;
  color: #b45309;
}
.info-stock-status-badge.status-kosong {
  background: #fee2e2;
  color: #b91c1c;
}
.info-stock-wh-badge {
  font-size: 10px;
  font-weight: 700;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 1px 6px;
  border-radius: 4px;
}
.info-stock-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.info-stock-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #0284c7;
  border-radius: 7px;
  padding: 7px 9px;
}
.info-stock-card.compact {
  padding: 5px 8px;
}
.info-stock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}
.info-stock-qty-badge {
  font-size: 11px;
  font-weight: 800;
  background: #dbeafe;
  color: #1d4ed8;
  padding: 1px 7px;
  border-radius: 9999px;
}
.info-stock-live-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
  font-size: 11px;
}
.info-stock-live-pill {
  background: #dcfce7;
  color: #15803d;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
}
.info-stock-live-pill.out {
  background: #fee2e2;
  color: #b91c1c;
}
.info-stock-snapshot {
  color: #64748b;
  font-size: 10px;
}
.info-stock-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.btn-info-quick-stock,
.btn-info-quick-po {
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.btn-info-quick-stock {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.btn-info-quick-po {
  background: #1d4ed8;
  color: #ffffff;
  border: 1px solid #1e40af;
}

/* Admin Info Modal & Redesign Workspace */
.admin-info-modal {
  max-width: 720px;
  width: min(96vw, 720px);
  max-height: 92vh;
  transition: max-width 0.18s ease;
}
.admin-info-modal.is-list-wide {
  max-width: 840px;
  width: min(96vw, 840px);
}
.modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.admin-modal-subtitle {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 500;
}
.admin-info-quick-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.admin-quick-tabs-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.btn-admin-quick-tab {
  flex: 1;
  background: #ffffff;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.btn-admin-quick-tab.active {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #60a5fa;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.1);
}
.admin-btn-new-topbar {
  background: #0f766e;
  color: #ffffff;
  border-color: #0f766e;
  white-space: nowrap;
}
.admin-info-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.admin-info-form-card {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.admin-info-form-card.is-editing {
  background: #eff6ff;
  border: 2px solid #2563eb;
}
.admin-info-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-info-form-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-info-form-title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}
.admin-editing-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}

/* Split-Pane Editor Grid (Desktop >= 960px in PROMO mode) */
.admin-editor-split-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.admin-editor-right-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.admin-surkom-ref-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #3b82f6;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-surkom-ref-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-surkom-ref-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}
.admin-mobile-surkom-toggle {
  display: none;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
}
.admin-surkom-left-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Numbered Color-Coded Editor Segments */
.admin-segment-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.admin-segment-card.seg-identity {
  border-left: 4px solid #64748b;
}
.admin-segment-card.seg-header {
  border-left: 4px solid #2563eb;
}
.admin-segment-card.seg-subblocks {
  border-left: 4px solid #10b981;
}
.admin-segment-card.seg-price {
  border-left: 4px solid #f59e0b;
}
.admin-segment-card.seg-stock {
  border-left: 4px solid #0284c7;
}
.admin-segment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}
.admin-segment-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-seg-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}
.seg-badge-slate {
  background: #e2e8f0;
  color: #334155;
}
.seg-badge-blue {
  background: #dbeafe;
  color: #1e40af;
}
.seg-badge-emerald {
  background: #d1fae5;
  color: #065f46;
}
.admin-segment-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
}

.admin-seg1-meta-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 8px;
}
.admin-pub-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.admin-pub-summary-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.admin-pub-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.admin-pub-pill.is-muted {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}
.admin-info-checks-inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 0;
}
.admin-seg1-extras-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px dashed #cbd5e1;
}
.admin-seg1-extras-body.is-collapsed {
  display: none;
}
.admin-info-radio-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-info-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.admin-info-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
}
.admin-info-row-2 {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-info-radio-row {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 12px;
}
.admin-info-radio-label,
.admin-info-check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #334155;
  cursor: pointer;
}
.admin-info-target-box {
  margin-top: 6px;
}
.admin-info-target-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.admin-info-target-count {
  font-size: 11px;
  font-weight: 700;
  color: #1e40af;
}
.admin-info-target-quick-btns {
  display: flex;
  align-items: center;
  gap: 5px;
}
.btn-admin-info-xs {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.btn-admin-info-xs:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.admin-info-checks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
}
.admin-info-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Sticky Modal Footer & Validation Status */
.admin-info-sticky-footer {
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  flex-shrink: 0;
  border-radius: 0 0 12px 12px;
}
.admin-footer-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}
.admin-footer-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
}
.admin-footer-badge.is-warn {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}
.admin-footer-badge.is-ok {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

/* Admin List Toolbar, Filters & Surkom Health Pills */
.admin-info-list-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-list-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
}
.admin-list-search-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-list-search-row input {
  flex: 1;
  min-width: 190px;
}
.admin-list-status-select {
  width: auto;
  min-width: 138px;
}
.admin-list-filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.admin-list-cat-pill {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.admin-list-cat-pill.active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}
.admin-list-surkom-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin: 6px 0 4px;
}
.admin-list-role-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}
.admin-list-role-badge.is-distributor {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}
.admin-list-role-badge.is-principal {
  background: #f3e8ff;
  color: #6b21a8;
  border: 1px solid #d8b4fe;
}
.admin-list-health-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}
.admin-list-health-pill.is-warn {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fdba74;
}
.admin-list-health-pill.is-ok {
  background: #ecfdf5;
  color: #166534;
  border-color: #86efac;
}

.admin-info-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}
.admin-info-list-count {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}
.admin-info-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-info-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
}
.admin-info-item.inactive {
  opacity: 0.72;
  background: #f8fafc;
}
.admin-info-item.is-editing {
  border: 2px solid #2563eb;
  background: #eff6ff;
}
.admin-info-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}
.btn-receipt-pill {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.admin-info-btn-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.btn-admin-info-sm {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.btn-admin-info-sm.primary {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}
.btn-admin-info-sm.danger {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

#infoReadReceiptModalBackdrop {
  z-index: var(--z-nested-backdrop);
}
#infoReadReceiptModal {
  z-index: var(--z-nested-modal);
  max-width: 480px;
}
.receipt-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin: 10px 0 6px;
}
.receipt-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  margin-bottom: 5px;
  font-size: 12px;
}
.receipt-user-row.unread {
  background: #fef2f2;
  border-color: #fecaca;
}
.receipt-user-row.read {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

/* Dark Theme Overrides for Info Feature */
body.theme-dark .latest-info-card {
  background: #0a0f1d !important;
  border-color: #1e293b !important;
  border-left-color: #38bdf8 !important;
}
body.theme-dark .latest-info-card.has-unread {
  background: linear-gradient(135deg, #0f172a 0%, #2a0a0a 100%) !important;
  border-color: #7f1d1d !important;
  border-left-color: #ef4444 !important;
}
body.theme-dark .latest-info-heading,
body.theme-dark .latest-info-title,
body.theme-dark .info-card-title,
body.theme-dark .admin-info-form-title,
body.theme-dark .admin-info-list-header {
  color: #f8fafc !important;
}
body.theme-dark .latest-info-excerpt,
body.theme-dark .info-card-body,
body.theme-dark .info-card-time,
body.theme-dark .latest-info-time {
  color: #cbd5e1 !important;
}
body.theme-dark .latest-info-actions,
body.theme-dark .info-card-footer,
body.theme-dark .admin-info-item-actions {
  border-top-color: #1e293b !important;
}
body.theme-dark .info-card,
body.theme-dark .admin-info-item,
body.theme-dark .info-filter-chip {
  background: #0a0f1d !important;
  border-color: #1e293b !important;
  color: #e2e8f0 !important;
}
body.theme-dark .info-card.unread {
  background: #1a0b0e !important;
  border-left-color: #ef4444 !important;
}
body.theme-dark .info-filter-chip.active {
  background: #0369a1 !important;
  border-color: #0369a1 !important;
  color: #ffffff !important;
}
body.theme-dark .info-detail-content,
body.theme-dark .admin-info-form-card {
  background: #050811 !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}
body.theme-dark .admin-info-label,
body.theme-dark .admin-info-radio-label,
body.theme-dark .admin-info-check-label,
body.theme-dark .receipt-section-title {
  color: #cbd5e1 !important;
}
body.theme-dark .receipt-user-row.unread {
  background: #2a0a0a !important;
  border-color: #7f1d1d !important;
  color: #fecaca !important;
}
body.theme-dark .receipt-user-row.read {
  background: #052e16 !important;
  border-color: #166534 !important;
  color: #bbf7d0 !important;
}
body.theme-dark .rich-editor-wrap,
body.theme-dark .admin-structured-section,
body.theme-dark .admin-picker-results {
  background: #050811 !important;
  border-color: #334155 !important;
}
body.theme-dark .rich-editor-toolbar,
body.theme-dark .rich-editor-footer {
  background: #0f172a !important;
  border-color: #1e293b !important;
  color: #cbd5e1 !important;
}
body.theme-dark .rich-editor-btn {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
body.theme-dark .rich-editor-btn.active {
  background: #0369a1 !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
}
body.theme-dark .rich-editor-area {
  color: #f8fafc !important;
}
body.theme-dark .admin-structured-title,
body.theme-dark .admin-picker-result-name,
body.theme-dark .admin-structured-row-name,
body.theme-dark .info-price-name,
body.theme-dark .info-price-new {
  color: #f8fafc !important;
}
body.theme-dark .admin-structured-mini-label,
body.theme-dark .admin-picker-result-meta,
body.theme-dark .admin-structured-field label,
body.theme-dark .info-price-note,
body.theme-dark .info-stock-snapshot {
  color: #94a3b8 !important;
}
body.theme-dark .admin-picker-result-item,
body.theme-dark .admin-structured-row-card,
body.theme-dark .info-price-card,
body.theme-dark .info-stock-card,
body.theme-dark .form-input-xs {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
body.theme-dark .admin-picker-result-item:hover {
  background: #1e293b !important;
}
body.theme-dark .admin-structured-row-code,
body.theme-dark .info-stock-wh-badge {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}
body.theme-dark .info-structured-more-pill {
  background: #0f172a !important;
  border-color: #1d4ed8 !important;
  color: #93c5fd !important;
}
body.theme-dark .btn-info-quick-stock {
  background: #0c4a6e !important;
  border-color: #0369a1 !important;
  color: #e0f2fe !important;
}
body.theme-dark .admin-info-quick-bar,
body.theme-dark .admin-info-sticky-footer {
  background: #0f172a !important;
  border-color: #1e293b !important;
}
body.theme-dark .admin-modal-subtitle,
body.theme-dark .admin-surkom-ref-sub,
body.theme-dark .admin-footer-summary {
  color: #94a3b8 !important;
}
body.theme-dark .btn-admin-quick-tab {
  background: #050811 !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}
body.theme-dark .btn-admin-quick-tab.active {
  background: #0c4a6e !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
}
body.theme-dark .admin-btn-new-topbar {
  background: #0d9488 !important;
  border-color: #14b8a6 !important;
  color: #ffffff !important;
}
body.theme-dark .admin-editing-pill {
  background: #1e3a8a !important;
  border-color: #3b82f6 !important;
  color: #dbeafe !important;
}
body.theme-dark .admin-surkom-ref-card,
body.theme-dark .admin-segment-card {
  background: #0a0f1d !important;
  border-color: #334155 !important;
}
body.theme-dark .admin-segment-card.seg-identity {
  border-left-color: #94a3b8 !important;
}
body.theme-dark .admin-segment-card.seg-header,
body.theme-dark .admin-surkom-ref-card {
  border-left-color: #38bdf8 !important;
}
body.theme-dark .admin-segment-card.seg-subblocks {
  border-left-color: #34d399 !important;
}
body.theme-dark .admin-segment-card.seg-price {
  border-left-color: #fbbf24 !important;
}
body.theme-dark .admin-segment-card.seg-stock {
  border-left-color: #38bdf8 !important;
}
body.theme-dark .admin-segment-head {
  border-bottom-color: #1e293b !important;
}
body.theme-dark .admin-segment-title {
  color: #f8fafc !important;
}
body.theme-dark .admin-seg-badge.seg-badge-slate {
  background: #334155 !important;
  color: #e2e8f0 !important;
}
body.theme-dark .admin-seg-badge.seg-badge-blue {
  background: #1e3a8a !important;
  color: #bfdbfe !important;
}
body.theme-dark .admin-seg-badge.seg-badge-emerald {
  background: #064e3b !important;
  color: #a7f3d0 !important;
}
body.theme-dark .admin-mobile-surkom-toggle,
body.theme-dark .admin-pub-summary-bar,
body.theme-dark .admin-list-toolbar {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
body.theme-dark .admin-pub-pill {
  background: #0c4a6e !important;
  border-color: #0284c7 !important;
  color: #bae6fd !important;
}
body.theme-dark .admin-pub-pill.is-muted,
body.theme-dark .admin-footer-badge,
body.theme-dark .admin-list-health-pill {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}
body.theme-dark .admin-footer-badge.is-warn,
body.theme-dark .admin-list-health-pill.is-warn {
  background: #431407 !important;
  border-color: #ea580c !important;
  color: #fdba74 !important;
}
body.theme-dark .admin-footer-badge.is-ok,
body.theme-dark .admin-list-health-pill.is-ok {
  background: #064e3b !important;
  border-color: #10b981 !important;
  color: #a7f3d0 !important;
}
body.theme-dark .admin-seg1-extras-body {
  border-top-color: #334155 !important;
}
body.theme-dark .admin-list-cat-pill {
  background: #050811 !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}
body.theme-dark .admin-list-cat-pill.active {
  background: #0369a1 !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
}
body.theme-dark .admin-list-role-badge.is-distributor {
  background: #1e3a8a !important;
  border-color: #3b82f6 !important;
  color: #bfdbfe !important;
}
body.theme-dark .admin-list-role-badge.is-principal {
  background: #3b0764 !important;
  border-color: #a855f7 !important;
  color: #e9d5ff !important;
}
body.theme-dark .admin-info-form-card.is-editing,
body.theme-dark .admin-info-item.is-editing {
  background: #0c2340 !important;
  border-color: #38bdf8 !important;
}
body.theme-dark .admin-info-target-count {
  color: #7dd3fc !important;
}
body.theme-dark .btn-admin-info-xs,
body.theme-dark .btn-admin-info-sm {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
body.theme-dark .btn-admin-info-sm.primary {
  background: #1e3a8a !important;
  border-color: #3b82f6 !important;
  color: #dbeafe !important;
}
body.theme-dark .btn-admin-info-sm.danger {
  background: #450a0a !important;
  border-color: #7f1d1d !important;
  color: #fecaca !important;
}
body.theme-dark .info-target-summary {
  color: #94a3b8 !important;
}
body.theme-dark .info-card-admin-bar {
  border-top-color: #1e293b !important;
}

/* ==========================================================================
   APP TOAST (BACK BUTTON GUARD & QUICK FEEDBACK)
   ========================================================================== */
.app-toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(12px);
  max-width: calc(100vw - 32px);
  width: max-content;
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.25);
  z-index: var(--z-toast);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.app-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

body.theme-dark .app-toast {
  background: rgba(30, 41, 59, 0.96);
  color: #f8fafc;
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   SURKOM PROMO & GROQ AI OCR MODULE (TAHAP 1 + TAHAP 2)
   ========================================================================== */
.admin-groq-header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-groq-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
}
.admin-groq-badge.is-ready {
  background: #dcfce7;
  color: #166534;
}
.admin-groq-badge.is-missing {
  background: #fef3c7;
  color: #92400e;
}
.admin-groq-badge.is-disabled {
  background: #fee2e2;
  color: #991b1b;
}

.admin-groq-settings-panel {
  margin: 10px 0;
  padding: 12px;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-groq-settings-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: #1e3a8a;
}
.admin-groq-tier-note {
  font-size: 11px;
  font-weight: 600;
  color: #0369a1;
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: 999px;
}
.admin-groq-key-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.admin-groq-key-row input[type="password"] {
  flex: 1;
}
.admin-groq-clear-lbl {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: #b91c1c;
  white-space: nowrap;
  cursor: pointer;
}
.admin-groq-key-hint {
  font-size: 11px;
  color: #475569;
  margin-top: 4px;
}
.admin-groq-settings-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#adminInfoModalBackdrop {
  z-index: var(--z-backdrop);
}

.admin-promo-builder {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-promo-subgroup {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-subgroup-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #1e3a8a;
  letter-spacing: 0.1px;
}
.admin-promo-role-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.admin-role-card {
  text-align: left;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 9px 11px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #334155;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.admin-role-card:hover {
  border-color: #93c5fd;
  background: #f8fafc;
}
.admin-role-card.is-active[data-role="DISTRIBUTOR"] {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1e3a8a;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
}
.admin-role-card.is-active[data-role="PRINCIPAL"] {
  border-color: #9333ea;
  background: #faf5ff;
  color: #581c87;
  box-shadow: 0 2px 6px rgba(147, 51, 234, 0.12);
}
.admin-role-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
}
.admin-role-dot {
  font-size: 13px;
  line-height: 1;
}
.admin-role-card-desc {
  font-size: 11px;
  line-height: 1.35;
  color: inherit;
  opacity: 0.9;
}
.admin-visually-hidden-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  pointer-events: none;
}

.admin-surkom-upload-box {
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 10px;
  padding: 10px;
  margin: 2px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-surkom-empty-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 20px 12px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
}
.admin-surkom-empty-icon {
  font-size: 28px;
  line-height: 1;
}
.admin-surkom-empty-text {
  font-size: 11.5px;
  line-height: 1.45;
  color: #64748b;
}
.admin-surkom-upload-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.admin-surkom-upload-actions .btn-secondary-sm {
  flex: 1;
  justify-content: center;
}
.btn-secondary-sm.danger-text {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}
.admin-surkom-attach-chk {
  margin: 0;
  font-size: 11.5px;
}
.admin-surkom-hint-row input {
  width: 100%;
  box-sizing: border-box;
}
.btn-extract-ai {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  border-color: #6d28d9;
  color: #ffffff;
  width: 100%;
  justify-content: center;
}
.btn-extract-ai:disabled {
  opacity: 0.6;
  cursor: wait;
}
.admin-surkom-preview-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px;
}
.admin-surkom-preview-canvas-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}
.admin-surkom-preview-thumb {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  cursor: zoom-in;
  display: block;
}
.admin-surkom-meta-text {
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.admin-surkom-ocr-result {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
}
.admin-surkom-ocr-status {
  font-weight: 600;
  color: #0f172a;
}
.admin-surkom-ocr-status.is-error {
  color: #b91c1c;
}
.admin-surkom-ocr-status.is-success {
  color: #15803d;
}
.admin-surkom-ocr-warnings {
  margin: 6px 0 6px 18px;
  padding: 0;
  color: #9a3412;
  font-size: 11.5px;
}
.admin-surkom-transcript {
  margin: 6px 0 0;
  padding: 8px;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 6px;
  font-size: 11px;
  max-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
}

.admin-promo-header-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 0;
}
.admin-promo-header-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.admin-promo-blocks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-promo-blocks-overview {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 600;
  margin-top: 2px;
}
.admin-promo-blocks-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.admin-zone-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 11px;
  color: #475569;
}
.admin-zone-legend .legend-title {
  font-weight: 800;
  color: #334155;
}
.admin-zone-legend .legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}
.admin-zone-legend .dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  display: inline-block;
}
.admin-zone-legend .dot-a { background: #64748b; }
.admin-zone-legend .dot-b { background: #10b981; }
.admin-zone-legend .dot-c { background: #f59e0b; }
.admin-zone-legend .dot-d { background: #06b6d4; }
.admin-zone-legend .dot-e { background: #6366f1; }

.admin-promo-subblocks {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-promo-block-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.admin-promo-block-card.is-highlighted {
  background: #fefce8;
  border-color: #eab308;
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.15);
}
.admin-promo-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 11px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
  user-select: none;
}
.admin-promo-block-card.is-collapsed .admin-promo-block-header {
  border-bottom: none;
}
.admin-promo-block-card.is-highlighted .admin-promo-block-header {
  background: #fef9c3;
  border-bottom-color: #fde047;
}
.admin-promo-blk-title-group {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 180px;
}
.admin-promo-block-idx {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  background: #dbeafe;
  color: #1e40af;
}
.admin-promo-blk-title-text {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}
.admin-promo-blk-pack-text {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
}
.admin-promo-blk-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.admin-promo-mode-pill,
.admin-promo-fokus-pill,
.admin-promo-sku-pill {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.admin-promo-mode-pill.is-strata {
  background: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
}
.admin-promo-mode-pill.is-multiple {
  background: #f3e8ff;
  color: #6b21a8;
  border-color: #d8b4fe;
}
.admin-promo-fokus-pill {
  background: #fde047;
  color: #713f12;
  border-color: #eab308;
}
.admin-promo-sku-pill.is-ok {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}
.admin-promo-sku-pill.is-warn {
  background: #ffedd5;
  color: #9a3412;
  border-color: #fdba74;
}
.admin-promo-sku-pill.is-empty {
  background: #f1f5f9;
  color: #64748b;
  border-color: #cbd5e1;
}
.admin-promo-blk-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.btn-promo-chevron {
  min-width: 28px;
}
.admin-promo-block-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-promo-block-card.is-collapsed .admin-promo-block-body {
  display: none;
}

/* 5 Color-Coded Sub-Block Zones */
.promo-zone-card {
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  border-left-width: 4px;
  padding: 9px 10px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.promo-zone-card.zone-identity {
  border-left-color: #64748b;
  background: #f8fafc;
}
.promo-zone-card.zone-rule {
  border-left-color: #10b981;
  background: #f0fdf4;
}
.promo-zone-card.zone-rule.is-multiple {
  border-left-color: #9333ea;
  background: #faf5ff;
}
.promo-zone-card.zone-cash {
  border-left-color: #f59e0b;
  background: #fffbeb;
}
.promo-zone-card.zone-bonus {
  border-left-color: #06b6d4;
  background: #ecfeff;
}
.promo-zone-card.zone-items {
  border-left-color: #6366f1;
  background: #eef2ff;
}
.promo-zone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.promo-zone-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}
.promo-zone-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.08);
  color: #334155;
}
.promo-zone-preview-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #67e8f9;
  color: #0e7490;
}
.promo-zone-preview-pill.is-empty {
  border-color: #cbd5e1;
  color: #64748b;
}
.promo-mode-pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.promo-mode-pill {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.promo-mode-pill.is-active[data-mode="STRATA"] {
  background: #059669;
  border-color: #047857;
  color: #ffffff;
}
.promo-mode-pill.is-active[data-mode="MULTIPLE"] {
  background: #7c3aed;
  border-color: #6d28d9;
  color: #ffffff;
}
.promo-strata-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.promo-strata-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.promo-strata-table-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr) 32px;
  gap: 6px;
  align-items: center;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.12);
  font-size: 10.5px;
  font-weight: 800;
  color: #065f46;
}
.admin-promo-tier-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr) 32px;
  gap: 6px;
  align-items: center;
}
.admin-promo-tier-row .form-input-xs,
.promo-zone-card .form-input-xs,
.admin-promo-header-grid .form-input-sm {
  min-width: 0;
  box-sizing: border-box;
}
.admin-promo-tier-row .form-input-xs {
  width: 100%;
}
.promo-bundle-mixing-box {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #d8b4fe;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.promo-bundle-scope-hint {
  font-size: 11px;
  line-height: 1.35;
  color: #6b21a8;
  font-weight: 600;
}
.promo-cash-combine-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
}
.promo-zone-note {
  font-size: 11px;
  color: #92400e;
  font-weight: 600;
}
.promo-regbonus-cascade-hint {
  font-size: 11px;
  line-height: 1.35;
  color: #0e7490;
  background: rgba(6, 182, 212, 0.1);
  border: 1px dashed #67e8f9;
  border-radius: 7px;
  padding: 5px 8px;
}
.admin-promo-regbonus-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #bae6fd;
}
.admin-promo-regbonus-grid-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px minmax(0, 1fr) 32px;
  gap: 6px;
  align-items: end;
}
.admin-promo-regbonus-grid-bot {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 6px;
  align-items: end;
}
.promo-linking-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 7px 10px;
  border-radius: 8px;
  background: #fef3c7;
  border: 1.5px solid #f59e0b;
  color: #92400e;
  font-size: 11.5px;
  font-weight: 700;
}
.admin-promo-item-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  font-size: 11px;
  color: #1e293b;
}
.admin-promo-item-chip.is-mapped {
  background: #ecfdf5;
  border-color: #86efac;
  color: #166534;
}
.admin-promo-item-chip.is-unmapped {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}
.admin-promo-item-chip.is-linking-target {
  border-color: #d97706;
  background: #fef3c7;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}
.admin-promo-items-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Info Screen Promo Group Filter & Surkom Cards */
.info-promo-group-row {
  display: flex;
  gap: 6px;
  padding: 0 12px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.info-promo-group-chip {
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
}
.info-promo-group-chip.active {
  background: #0f766e;
  border-color: #0f766e;
  color: #ffffff;
}

.info-promo-container {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.info-promo-header-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 11.5px;
}
.info-promo-meta-pill {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
}
.info-promo-subblock {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.info-promo-subblock.is-highlighted {
  background: linear-gradient(135deg, #fef9c3 0%, #fef08a 100%);
  border: 1.5px solid #ca8a04;
  box-shadow: 0 3px 10px rgba(202, 138, 4, 0.16);
}
.info-promo-subhead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
  flex-wrap: wrap;
}
.info-promo-subtitle {
  font-weight: 800;
  font-size: 13px;
  color: #0f172a;
}
.info-promo-star-badge {
  background: #b45309;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
}
.info-promo-tiers-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.info-promo-tier-pill {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11.5px;
  display: flex;
  flex-direction: column;
}
.info-promo-tier-qty {
  font-size: 10.5px;
  color: #64748b;
  font-weight: 600;
}
.info-promo-tier-disc {
  font-weight: 800;
  color: #0f766e;
}
.info-promo-cash-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11.5px;
}
.info-promo-cash-pill {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
}
.info-promo-regbonus-pill {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
}
.info-promo-nominal-pill {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
}
.info-promo-pool-pill {
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #a5b4fc;
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
}
.info-promo-nonmix-pill {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
}
.info-promo-principal-pill {
  background: #f3e8ff;
  color: #6b21a8;
  border: 1px solid #d8b4fe;
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 800;
}
.info-promo-bundle-pill {
  background: #fae8ff;
  color: #86198f;
  border: 1px solid #f0abfc;
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
}
.info-promo-quota-pill {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fdba74;
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
}
.admin-promo-role-hint {
  font-size: 11px;
  color: #475569;
  margin-top: 3px;
  line-height: 1.35;
}
.admin-promo-bundle-box {
  background: #faf5ff;
  border: 1px dashed #c084fc;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.info-promo-rule-note {
  font-size: 11.5px;
  font-weight: 600;
  color: #7c2d12;
  background: rgba(255, 255, 255, 0.7);
  padding: 4px 8px;
  border-radius: 6px;
}
.info-promo-items-list {
  font-size: 11.5px;
  color: #334155;
  line-height: 1.45;
}
.info-promo-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.btn-promo-action {
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
}
.btn-promo-action.primary {
  background: #0369a1;
  border-color: #075985;
  color: #ffffff;
}
.btn-promo-action.surkom-view {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

/* Lightbox Surkom Viewer */
#surkomImageModalBackdrop {
  z-index: var(--z-lightbox-backdrop);
}
#surkomImageModal {
  z-index: var(--z-lightbox-modal);
}
.surkom-image-modal {
  max-width: 780px;
  width: calc(100vw - 24px);
}
.surkom-modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.surkom-image-modal-body {
  padding: 10px 12px;
  max-height: 75vh;
  overflow: auto;
  background: #0f172a;
}
.surkom-image-modal-meta {
  font-size: 12px;
  color: #cbd5e1;
  margin-bottom: 8px;
}
.surkom-image-zoom-stage {
  overflow: auto;
  text-align: center;
  border-radius: 8px;
  background: #020617;
  padding: 6px;
}
.surkom-image-full {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  transition: width 0.2s ease;
}
.surkom-image-full.is-zoomed {
  max-width: none;
  width: 175%;
  cursor: zoom-out;
}

/* Contextual Stock / Picker / Cek Harga Promo Badges */
.stock-promo-banner {
  margin: 0 12px 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: linear-gradient(90deg, #fef9c3, #e0f2fe);
  border: 1px solid #eab308;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #0f172a;
}
.stock-promo-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  color: #92400e;
}
.stock-promo-badge.is-fokus {
  background: #fde047;
  border-color: #ca8a04;
  color: #713f12;
}
.stock-promo-badge.is-principal {
  background: #f3e8ff;
  border-color: #c084fc;
  color: #6b21a8;
}
.stock-promo-badge.is-fokus.is-principal {
  background: #fae8ff;
  border-color: #a21caf;
  color: #701a75;
}
.picker-promo-pill {
  display: inline-block;
  margin: 2px 0 0 2px;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  vertical-align: middle;
  max-width: 100%;
  background: #fef08a;
  color: #854d0e;
  border: 1px solid #eab308;
}
.picker-promo-pill.is-fokus {
  background: #fde047;
  border-color: #ca8a04;
  color: #713f12;
}
.picker-promo-pill.is-principal {
  background: #f3e8ff;
  border-color: #c084fc;
  color: #6b21a8;
}
.picker-promo-pill.is-fokus.is-principal {
  background: #fae8ff;
  border-color: #a21caf;
  color: #701a75;
}
.price-sheet-promo-box {
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  background: #fffbeb;
  border: 1px solid #f59e0b;
  font-size: 12px;
  color: #78350f;
}

/* Tahap 2: PO Live Promo Strata Tracker, Notes Helper & Payment Reminder */
.po-promo-tracker {
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.po-promo-tracker-title {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.po-promo-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.po-promo-card.is-highlighted {
  background: #fefce8;
  border-color: #eab308;
}
.po-promo-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #0f172a;
}
.po-promo-qty-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
}
.po-promo-earned {
  color: #15803d;
  font-weight: 700;
}
.po-promo-nudge {
  color: #b45309;
  font-weight: 600;
  background: #fffbeb;
  border: 1px dashed #f59e0b;
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 11.5px;
}
.po-promo-cash-tip {
  color: #0f766e;
  font-size: 11px;
  font-weight: 600;
}
.po-promo-regbonus-tip {
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 11.5px;
  font-weight: 600;
}
.po-promo-regbonus-tip.is-earned {
  color: #065f46;
  background: #ecfdf5;
  border-color: #6ee7b7;
  font-weight: 700;
}
.po-promo-cascade-box {
  background: #f0fdfa;
  border: 1px solid #5eead4;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 11.5px;
  color: #134e4a;
  line-height: 1.45;
}
.po-promo-cascade-title {
  font-weight: 800;
  margin-bottom: 3px;
  color: #0f766e;
}
.po-promo-cascade-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
}
.po-promo-role-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  margin-right: 4px;
  vertical-align: middle;
}
.po-promo-role-badge.is-distributor {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}
.po-promo-role-badge.is-principal {
  background: #f3e8ff;
  color: #6b21a8;
  border: 1px solid #d8b4fe;
}
.po-promo-quota-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
}
.po-promo-quota-pill.is-exhausted {
  background: #fef2f2;
  border-color: #f87171;
  color: #b91c1c;
  font-weight: 800;
}
.po-promo-notes-helper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 8px;
  font-size: 11.5px;
}
.po-promo-notes-text {
  color: #1e40af;
  font-weight: 600;
}
.btn-insert-surkom {
  background: #1d4ed8;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.payment-promo-reminder {
  margin: 8px 0 10px;
  padding: 9px 11px;
  border-radius: 8px;
  background: #ecfdf5;
  border: 1px solid #34d399;
  color: #065f46;
  font-size: 12px;
  line-height: 1.45;
}

/* Dark Theme Overrides for Surkom Promo & AI Module */
body.theme-dark .admin-groq-settings-panel,
body.theme-dark .admin-surkom-upload-box,
body.theme-dark .po-promo-notes-helper {
  background: #0c2340 !important;
  border-color: #1e40af !important;
  color: #e2e8f0 !important;
}
body.theme-dark .admin-groq-settings-head,
body.theme-dark .po-promo-notes-text {
  color: #93c5fd !important;
}
body.theme-dark .admin-surkom-preview-wrap,
body.theme-dark .admin-surkom-ocr-result,
body.theme-dark .admin-promo-block-card,
body.theme-dark .info-promo-subblock,
body.theme-dark .po-promo-tracker,
body.theme-dark .po-promo-card,
body.theme-dark .btn-promo-action {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
body.theme-dark .admin-promo-block-card.is-highlighted,
body.theme-dark .info-promo-subblock.is-highlighted,
body.theme-dark .po-promo-card.is-highlighted {
  background: linear-gradient(135deg, #422006 0%, #713f12 100%) !important;
  border-color: #eab308 !important;
  color: #fef08a !important;
}
body.theme-dark .info-promo-subblock.is-highlighted .info-promo-subtitle,
body.theme-dark .info-promo-subblock.is-highlighted .info-promo-items-list,
body.theme-dark .po-promo-card.is-highlighted .po-promo-card-head {
  color: #fef9c3 !important;
}
body.theme-dark .info-promo-tier-pill {
  background: #020617 !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}
body.theme-dark .info-promo-tier-disc {
  color: #34d399 !important;
}
body.theme-dark .info-promo-rule-note {
  background: rgba(2, 6, 23, 0.55) !important;
  color: #fde68a !important;
}
body.theme-dark .stock-promo-badge,
body.theme-dark .picker-promo-pill {
  background: #422006 !important;
  border-color: #ca8a04 !important;
  color: #fef08a !important;
}
body.theme-dark .stock-promo-badge.is-fokus,
body.theme-dark .picker-promo-pill.is-fokus {
  background: #713f12 !important;
  border-color: #eab308 !important;
  color: #fef9c3 !important;
}
body.theme-dark .stock-promo-badge.is-principal,
body.theme-dark .picker-promo-pill.is-principal {
  background: #3b0764 !important;
  border-color: #a855f7 !important;
  color: #e9d5ff !important;
}
body.theme-dark .stock-promo-badge.is-fokus.is-principal,
body.theme-dark .picker-promo-pill.is-fokus.is-principal {
  background: #4a044e !important;
  border-color: #d946ef !important;
  color: #f5d0fe !important;
}
body.theme-dark .stock-promo-banner {
  background: #1e293b !important;
  border-color: #eab308 !important;
  color: #fef08a !important;
}
body.theme-dark .price-sheet-promo-box,
body.theme-dark .po-promo-nudge {
  background: #2e1d06 !important;
  border-color: #d97706 !important;
  color: #fde68a !important;
}
body.theme-dark .payment-promo-reminder {
  background: #052e16 !important;
  border-color: #16a34a !important;
  color: #bbf7d0 !important;
}
body.theme-dark .info-promo-regbonus-pill {
  background: #0c4a6e !important;
  border-color: #0284c7 !important;
  color: #e0f2fe !important;
}
body.theme-dark .info-promo-nominal-pill {
  background: #451a03 !important;
  border-color: #d97706 !important;
  color: #fde68a !important;
}
body.theme-dark .info-promo-pool-pill {
  background: #1e1b4b !important;
  border-color: #4f46e5 !important;
  color: #c7d2fe !important;
}
body.theme-dark .info-promo-nonmix-pill {
  background: #450a0a !important;
  border-color: #dc2626 !important;
  color: #fecaca !important;
}
body.theme-dark .info-promo-principal-pill,
body.theme-dark .po-promo-role-badge.is-principal {
  background: #3b0764 !important;
  border-color: #a855f7 !important;
  color: #e9d5ff !important;
}
body.theme-dark .info-promo-bundle-pill {
  background: #4a044e !important;
  border-color: #d946ef !important;
  color: #f5d0fe !important;
}
body.theme-dark .info-promo-quota-pill,
body.theme-dark .po-promo-quota-pill {
  background: #431407 !important;
  border-color: #ea580c !important;
  color: #fed7aa !important;
}
body.theme-dark .po-promo-quota-pill.is-exhausted {
  background: #450a0a !important;
  border-color: #ef4444 !important;
  color: #fecaca !important;
}
body.theme-dark .po-promo-role-badge.is-distributor {
  background: #1e3a8a !important;
  border-color: #3b82f6 !important;
  color: #bfdbfe !important;
}
body.theme-dark .admin-promo-role-hint {
  color: #94a3b8 !important;
}
body.theme-dark .admin-promo-subgroup,
body.theme-dark .admin-zone-legend {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}
body.theme-dark .admin-subgroup-title,
body.theme-dark .admin-zone-legend .legend-title,
body.theme-dark .admin-promo-blk-title-text,
body.theme-dark .promo-zone-title {
  color: #f8fafc !important;
}
body.theme-dark .admin-promo-blocks-overview,
body.theme-dark .admin-promo-blk-pack-text,
body.theme-dark .admin-surkom-empty-text {
  color: #94a3b8 !important;
}
body.theme-dark .admin-role-card,
body.theme-dark .admin-surkom-empty-box,
body.theme-dark .promo-mode-pill {
  background: #050811 !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}
body.theme-dark .admin-role-card.is-active[data-role="DISTRIBUTOR"] {
  background: #0c2340 !important;
  border-color: #38bdf8 !important;
  color: #bae6fd !important;
}
body.theme-dark .admin-role-card.is-active[data-role="PRINCIPAL"] {
  background: #2e1065 !important;
  border-color: #c084fc !important;
  color: #f3e8ff !important;
}
body.theme-dark .admin-surkom-preview-thumb {
  background: #020617 !important;
  border-color: #334155 !important;
}
body.theme-dark .btn-secondary-sm.danger-text {
  background: #450a0a !important;
  border-color: #7f1d1d !important;
  color: #fecaca !important;
}
body.theme-dark .admin-promo-block-header {
  background: #111827 !important;
  border-bottom-color: #334155 !important;
}
body.theme-dark .admin-promo-block-card.is-highlighted .admin-promo-block-header {
  background: #422006 !important;
  border-bottom-color: #ca8a04 !important;
}
body.theme-dark .admin-promo-block-idx {
  background: #1e3a8a !important;
  color: #bfdbfe !important;
}
body.theme-dark .admin-promo-mode-pill.is-strata {
  background: #064e3b !important;
  border-color: #10b981 !important;
  color: #a7f3d0 !important;
}
body.theme-dark .admin-promo-mode-pill.is-multiple {
  background: #3b0764 !important;
  border-color: #a855f7 !important;
  color: #e9d5ff !important;
}
body.theme-dark .admin-promo-fokus-pill {
  background: #713f12 !important;
  border-color: #eab308 !important;
  color: #fef08a !important;
}
body.theme-dark .admin-promo-sku-pill.is-ok,
body.theme-dark .admin-promo-item-chip.is-mapped {
  background: #064e3b !important;
  border-color: #10b981 !important;
  color: #a7f3d0 !important;
}
body.theme-dark .admin-promo-sku-pill.is-warn,
body.theme-dark .admin-promo-item-chip.is-unmapped {
  background: #431407 !important;
  border-color: #ea580c !important;
  color: #fed7aa !important;
}
body.theme-dark .admin-promo-sku-pill.is-empty {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}
body.theme-dark .promo-zone-card {
  border-color: #334155 !important;
}
body.theme-dark .promo-zone-card.zone-identity {
  background: #0b1120 !important;
  border-left-color: #94a3b8 !important;
}
body.theme-dark .promo-zone-card.zone-rule {
  background: #052e20 !important;
  border-left-color: #10b981 !important;
}
body.theme-dark .promo-zone-card.zone-rule.is-multiple {
  background: #1e103c !important;
  border-left-color: #a855f7 !important;
}
body.theme-dark .promo-zone-card.zone-cash {
  background: #271a06 !important;
  border-left-color: #f59e0b !important;
}
body.theme-dark .promo-zone-card.zone-bonus {
  background: #082838 !important;
  border-left-color: #22d3ee !important;
}
body.theme-dark .promo-zone-card.zone-items {
  background: #15193b !important;
  border-left-color: #818cf8 !important;
}
body.theme-dark .promo-zone-badge {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #e2e8f0 !important;
}
body.theme-dark .promo-zone-preview-pill {
  background: #050811 !important;
  border-color: #0891b2 !important;
  color: #a5f3fc !important;
}
body.theme-dark .promo-zone-preview-pill.is-empty {
  border-color: #334155 !important;
  color: #94a3b8 !important;
}
body.theme-dark .promo-strata-table-head {
  background: rgba(16, 185, 129, 0.18) !important;
  color: #a7f3d0 !important;
}
body.theme-dark .promo-bundle-mixing-box {
  background: rgba(15, 23, 42, 0.65) !important;
  border-color: #9333ea !important;
}
body.theme-dark .promo-bundle-scope-hint {
  color: #e9d5ff !important;
}
body.theme-dark .promo-zone-note {
  color: #fde68a !important;
}
body.theme-dark .promo-regbonus-cascade-hint {
  background: rgba(14, 116, 144, 0.25) !important;
  border-color: #0891b2 !important;
  color: #a5f3fc !important;
}
body.theme-dark .admin-promo-regbonus-row {
  background: rgba(15, 23, 42, 0.72) !important;
  border-color: #0e7490 !important;
}
body.theme-dark .promo-linking-banner {
  background: #422006 !important;
  border-color: #f59e0b !important;
  color: #fef08a !important;
}
body.theme-dark .admin-promo-item-chip.is-linking-target {
  background: #713f12 !important;
  border-color: #f59e0b !important;
  color: #fef9c3 !important;
}
body.theme-dark .admin-promo-bundle-box {
  background: #2e1065 !important;
  border-color: #a855f7 !important;
  color: #f3e8ff !important;
}
body.theme-dark .po-promo-cascade-box {
  background: #042f2e !important;
  border-color: #0d9488 !important;
  color: #ccfbf1 !important;
}
body.theme-dark .po-promo-cascade-title {
  color: #5eead4 !important;
}
body.theme-dark .po-promo-regbonus-tip {
  background: #082f49 !important;
  border-color: #0369a1 !important;
  color: #bae6fd !important;
}
body.theme-dark .po-promo-regbonus-tip.is-earned {
  background: #064e3b !important;
  border-color: #10b981 !important;
  color: #a7f3d0 !important;
}
body.theme-dark .info-promo-subtitle,
body.theme-dark .po-promo-tracker-title,
body.theme-dark .po-promo-card-head,
body.theme-dark .admin-surkom-meta-text,
body.theme-dark .admin-surkom-ocr-status {
  color: #f8fafc !important;
}
body.theme-dark .info-promo-items-list {
  color: #cbd5e1 !important;
}
body.theme-dark .btn-promo-action.primary {
  background: #0369a1 !important;
  border-color: #075985 !important;
  color: #ffffff !important;
}
body.theme-dark .btn-promo-action.surkom-view {
  background: #1e3a8a !important;
  border-color: #3b82f6 !important;
  color: #dbeafe !important;
}

/* ==========================================================================
   PO ESTIMATION BREAKDOWN, CASCADING PROMO TAGS & SIDECAR VB6 INSTRUCTIONS
   ========================================================================== */
.order-summary-subrow {
  font-size: 12.5px;
  padding-top: 2px;
}

.order-summary-net-row {
  border-top: 1px dashed #cbd5e1;
  padding-top: 6px;
  margin-top: 4px;
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.pay-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.pay-est-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.pay-est-badge.is-cash {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.pay-est-badge.is-kredit {
  background: #e2e8f0;
  color: #1e293b;
  border: 1px solid #cbd5e1;
}

.order-promo-summary-strip {
  font-size: 11.5px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 5px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
  line-height: 1.4;
}

.order-promo-summary-strip .promo-strip-disc {
  color: #15803d;
  font-weight: 600;
}

.order-promo-summary-strip .promo-strip-net {
  color: #0f172a;
}

.order-promo-summary-strip .promo-strip-bonus {
  color: #b45309;
  font-weight: 700;
}

.admin-item-promo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
}

.admin-promo-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  line-height: 1.35;
  border: 1px solid transparent;
}

.admin-promo-tag.tag-d1 {
  background: #dbeafe;
  color: #1e40af;
  border-color: #93c5fd;
}

.admin-promo-tag.tag-d2 {
  background: #f3e8ff;
  color: #6b21a8;
  border-color: #d8b4fe;
}

.admin-promo-tag.tag-d3 {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.admin-promo-tag.tag-split {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

.admin-promo-tag.tag-quota {
  background: #ffedd5;
  color: #9a3412;
  border-color: #fdba74;
}

.admin-item-net-line {
  font-size: 10.5px;
  color: #475569;
  margin-top: 2px;
}

.admin-item-net-line strong {
  color: #15803d;
}

.admin-order-financial-footer {
  border-top: 1px dashed #cbd5e1;
  background: #f1f5f9;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11.5px;
}

.admin-fin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: #334155;
}

.admin-fin-row.is-disc {
  color: #15803d;
  font-weight: 600;
}

.admin-fin-row.is-disc.is-d2 {
  color: #6b21a8;
}

.admin-fin-row.is-disc.is-d3 {
  color: #047857;
}

.admin-fin-row.is-muted {
  color: #64748b;
  font-size: 10.5px;
}

.admin-fin-row.is-net {
  border-top: 1px solid #cbd5e1;
  padding-top: 4px;
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
}

.admin-fin-row.is-net strong {
  color: #15803d;
}

.admin-fin-bonus {
  margin-top: 3px;
  padding: 4px 7px;
  border-radius: 5px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 11px;
  line-height: 1.35;
}

.order-detail-financial-card {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.order-detail-bonus-box {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fffbeb;
  border: 1px solid #f59e0b;
  color: #78350f;
  font-size: 12px;
}

.order-detail-bonus-title {
  font-weight: 800;
  margin-bottom: 3px;
}

.order-detail-bonus-line {
  line-height: 1.4;
}

.bonus-surkom-tag {
  font-size: 11px;
  opacity: 0.85;
}

.sidecar-item-promo-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 3px;
}

.sidecar-split-note {
  width: 100%;
  font-size: 10px;
  font-weight: 700;
  color: #b45309;
  line-height: 1.25;
}

.sidecar-quota-note {
  width: 100%;
  font-size: 10px;
  font-weight: 600;
  color: #9a3412;
  line-height: 1.25;
}

.sidecar-item-net-mini {
  font-size: 10px;
  font-weight: 700;
  color: #15803d;
  margin-top: 1px;
  white-space: nowrap;
}

.sidecar-bonus-box {
  margin-top: 8px;
  padding: 7px 8px;
  border-radius: 6px;
  background: #fffbeb;
  border: 1.5px solid #f59e0b;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidecar-bonus-title {
  font-size: 10.5px;
  font-weight: 800;
  color: #92400e;
  letter-spacing: 0.2px;
}

.sidecar-bonus-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11px;
  color: #78350f;
  cursor: pointer;
  line-height: 1.3;
  padding: 2px 0;
}

.sidecar-bonus-row.row-strike {
  opacity: 0.45;
  text-decoration: line-through;
}

.sidecar-bonus-chk {
  margin-top: 2px;
  cursor: pointer;
}

.sidecar-total-discount-note {
  font-size: 10px;
  color: #15803d;
  font-weight: 700;
  line-height: 1.3;
  padding-top: 2px;
  border-top: 1px dashed #e2e8f0;
}

/* Dark Theme Overrides: PO Promo Estimation & Sidecar Enhancements */
body.theme-dark .order-summary-net-row {
  border-top-color: #334155 !important;
  color: #f8fafc !important;
}
body.theme-dark #lblSummaryNetTotal {
  color: #38bdf8 !important;
}
body.theme-dark .pay-est-badge.is-cash {
  background: #064e3b !important;
  color: #86efac !important;
  border-color: #10b981 !important;
}
body.theme-dark .pay-est-badge.is-kredit {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #475569 !important;
}
body.theme-dark .order-promo-summary-strip {
  background: #052e16 !important;
  border-color: #16a34a !important;
  color: #bbf7d0 !important;
}
body.theme-dark .order-promo-summary-strip .promo-strip-disc {
  color: #4ade80 !important;
}
body.theme-dark .order-promo-summary-strip .promo-strip-net {
  color: #f8fafc !important;
}
body.theme-dark .order-promo-summary-strip .promo-strip-bonus {
  color: #fcd34d !important;
}
body.theme-dark .admin-promo-tag.tag-d1 {
  background: #1e3a8a !important;
  color: #bfdbfe !important;
  border-color: #3b82f6 !important;
}
body.theme-dark .admin-promo-tag.tag-d2 {
  background: #3b0764 !important;
  color: #e9d5ff !important;
  border-color: #a855f7 !important;
}
body.theme-dark .admin-promo-tag.tag-d3 {
  background: #064e3b !important;
  color: #86efac !important;
  border-color: #10b981 !important;
}
body.theme-dark .admin-promo-tag.tag-split {
  background: #451a03 !important;
  color: #fde68a !important;
  border-color: #d97706 !important;
}
body.theme-dark .admin-promo-tag.tag-quota {
  background: #431407 !important;
  color: #fed7aa !important;
  border-color: #ea580c !important;
}
body.theme-dark .admin-item-net-line {
  color: #94a3b8 !important;
}
body.theme-dark .admin-item-net-line strong {
  color: #4ade80 !important;
}
body.theme-dark .admin-order-financial-footer {
  background: #0a0f1d !important;
  border-top-color: #334155 !important;
}
body.theme-dark .order-detail-financial-card {
  background: #0a0f1d !important;
  border-color: #1e293b !important;
}
body.theme-dark .admin-fin-row {
  color: #cbd5e1 !important;
}
body.theme-dark .admin-fin-row.is-disc {
  color: #4ade80 !important;
}
body.theme-dark .admin-fin-row.is-disc.is-d2 {
  color: #d8b4fe !important;
}
body.theme-dark .admin-fin-row.is-disc.is-d3 {
  color: #34d399 !important;
}
body.theme-dark .admin-fin-row.is-muted {
  color: #94a3b8 !important;
}
body.theme-dark .admin-fin-row.is-net {
  border-top-color: #334155 !important;
  color: #f8fafc !important;
}
body.theme-dark .admin-fin-row.is-net strong {
  color: #4ade80 !important;
}
body.theme-dark .admin-fin-bonus,
body.theme-dark .order-detail-bonus-box,
body.theme-dark .sidecar-bonus-box {
  background: #2e1d06 !important;
  border-color: #d97706 !important;
  color: #fde68a !important;
}
body.theme-dark .sidecar-bonus-title,
body.theme-dark .order-detail-bonus-title {
  color: #fcd34d !important;
}
body.theme-dark .sidecar-bonus-row {
  color: #fef3c7 !important;
}
body.theme-dark .sidecar-split-note {
  color: #fcd34d !important;
}
body.theme-dark .sidecar-quota-note {
  color: #fdba74 !important;
}
body.theme-dark .sidecar-item-net-mini {
  color: #4ade80 !important;
}
body.theme-dark .sidecar-total-price-row {
  border-top-color: #334155 !important;
}
body.theme-dark .sidecar-total-discount-note {
  border-top-color: #334155 !important;
  color: #4ade80 !important;
}

/* Pending Order Modal & Controls */
#pendingOrderModalBackdrop {
  z-index: var(--z-nested-backdrop);
}
#pendingOrderModal {
  z-index: var(--z-nested-modal);
  max-width: 500px;
  width: 94%;
}
.pending-order-header-info {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 12px;
  color: #334155;
}
.pending-field-group {
  margin-bottom: 12px;
}
.pending-field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}
.pending-reason-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pending-reason-chip {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
}
.pending-reason-chip:hover {
  background: var(--status-pending-bg);
  border-color: var(--status-pending-border);
  color: var(--status-pending-fg);
}
.pending-reason-chip.active {
  background: #b45309;
  border-color: #92400e;
  color: #ffffff;
}
.pending-note-textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 54px;
  font-family: inherit;
}
.pending-booking-info-box {
  background: var(--status-pending-bg);
  border: 1px solid var(--status-pending-border);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 11.5px;
  line-height: 1.45;
  color: #78350f;
}
.btn-pending-save {
  background: #b45309;
  border-color: #92400e;
  color: #ffffff;
}
.btn-pending-save:hover {
  background: #92400e;
}

/* Dark Mode for Pending UI */
body.theme-dark .order-pending-banner {
  background: var(--status-pending-bg) !important;
  border-color: var(--status-pending-border) !important;
  border-left-color: #f59e0b !important;
  color: var(--status-pending-fg) !important;
}
body.theme-dark .order-pending-banner-title,
body.theme-dark .order-pending-reason-text {
  color: #fef3c7 !important;
}
body.theme-dark .order-pending-age {
  background: #78350f !important;
  color: #fef3c7 !important;
}
body.theme-dark .order-pending-note-text,
body.theme-dark .order-pending-meta {
  color: #fcd34d !important;
}
body.theme-dark .btn-card-pending,
body.theme-dark .btn-action-pending,
body.theme-dark .btn-sidecar-action-warn {
  background: #451a03 !important;
  border-color: #d97706 !important;
  color: #fde68a !important;
}
body.theme-dark .btn-card-resume,
body.theme-dark .btn-action-resume {
  background: #b45309 !important;
  color: #ffffff !important;
}
body.theme-dark .pending-order-header-info {
  background: #0a0f1d !important;
  border-color: #1e293b !important;
  color: #e2e8f0 !important;
}
body.theme-dark .pending-field-label {
  color: #e2e8f0 !important;
}
body.theme-dark .pending-reason-chip {
  background: #111827 !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}
body.theme-dark .pending-reason-chip.active {
  background: #b45309 !important;
  border-color: #f59e0b !important;
  color: #ffffff !important;
}
body.theme-dark .pending-booking-info-box {
  background: #451a03 !important;
  border-color: #d97706 !important;
  color: #fde68a !important;
}
body.theme-dark .vb6-sidecar-chip.is-pending {
  background: #451a03 !important;
  border-color: #d97706 !important;
  color: #fde68a !important;
}
body.theme-dark .vb6-sidecar-chip.is-pending.active {
  background: #b45309 !important;
  border-color: #f59e0b !important;
  color: #ffffff !important;
}
body.theme-dark .btn-sidecar-action-resume {
  background: #b45309 !important;
  border-color: #f59e0b !important;
  color: #ffffff !important;
}
body.theme-dark .btn-sidecar-edit-pending {
  background: #78350f !important;
  border-color: #d97706 !important;
  color: #fef3c7 !important;
}
body.theme-dark .btn-pending-save {
  background: #b45309 !important;
  border-color: #f59e0b !important;
  color: #ffffff !important;
}

/* ==========================================================================
   EXTRACTED SEMANTIC COMPONENT CLASSES (PHASE 4 TASK 1)
   ========================================================================== */
.header-sync-info {
  padding: 6px 14px;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface-subtle);
  border-radius: 4px;
  margin: 4px 8px;
}

.badge-stat-offline {
  display: none;
  font-size: 10px;
  font-weight: normal;
  background: var(--status-pending-bg);
  color: var(--status-pending-fg);
  border: 1px solid var(--status-pending-border);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.btn-reorder-last {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}
body.theme-dark .btn-reorder-last {
  background: #0c2340 !important;
  color: #38bdf8 !important;
  border-color: #0284c7 !important;
}

.summary-subtext {
  font-weight: 400;
  font-size: 12px;
  color: var(--text-muted);
}

.summary-value-highlight {
  color: #0369a1;
}
body.theme-dark .summary-value-highlight {
  color: #38bdf8 !important;
}

.summary-promo-disc {
  color: var(--btn-success-bg);
}
body.theme-dark .summary-promo-disc {
  color: #4ade80 !important;
}

.summary-net-total {
  color: var(--text);
}

.summary-cash-option {
  color: var(--btn-success-bg);
}
body.theme-dark .summary-cash-option {
  color: #4ade80 !important;
}

.summary-bonus {
  color: var(--status-pending-fg);
  text-align: right;
}

.admin-custom-date-row {
  margin-bottom: 12px;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
body.theme-dark .admin-custom-date-row {
  background: #0a0f1d !important;
  border-color: #1e293b !important;
}

.required-star {
  color: #ef4444;
}

.modal-subtext {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.form-input-full {
  width: 100% !important;
  box-sizing: border-box !important;
}

.adjust-header-info {
  background: var(--surface-subtle);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text);
}
body.theme-dark .adjust-header-info {
  background: #0c1a2e !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}

.adjust-section-heading {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.btn-adjust-autogroup {
  font-size: 11px;
  padding: 4px 8px;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  cursor: pointer;
}
body.theme-dark .btn-adjust-autogroup {
  background: #0c2340 !important;
  color: #38bdf8 !important;
  border-color: #0284c7 !important;
}

.adjust-payment-preview {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--text);
}
body.theme-dark .adjust-payment-preview {
  background: #0c1a2e !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}

.adjust-action-box {
  margin-top: 14px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 10px;
}

.adjust-action-title {
  font-size: 12px;
  font-weight: 700;
  color: #9a3412;
  margin-bottom: 6px;
}
body.theme-dark .adjust-action-title {
  color: #fed7aa !important;
}

.adjust-action-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
}

.adjust-action-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.adjust-field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.btn-confirm-adjust {
  background: #0369a1;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
body.theme-dark .btn-confirm-adjust {
  background: #0369a1 !important;
}

.pending-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  background: var(--status-pending-bg);
  border: 1px solid var(--status-pending-border);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--status-pending-fg);
}
body.theme-dark .pending-checkbox-label {
  background: #200f04 !important;
  border-color: #78350f !important;
  color: #fde68a !important;
}

.pending-checkbox-desc {
  font-size: 11px;
  color: var(--status-pending-fg);
  opacity: 0.95;
}
body.theme-dark .pending-checkbox-desc {
  color: #fcd34d !important;
}

.user-admin-wa-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  width: 100%;
  box-sizing: border-box;
}

.user-admin-wa-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-admin-wa-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.4;
}

.user-admin-wa-saved {
  font-size: 11px;
  color: var(--btn-success-bg);
  margin-top: 4px;
  font-weight: 600;
}
body.theme-dark .user-admin-wa-saved {
  color: #4ade80 !important;
}

.sidecar-total-qty {
  color: #0369a1;
}
body.theme-dark .sidecar-total-qty {
  color: #38bdf8 !important;
}

.sidecar-total-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed var(--border);
  padding-top: 3px;
}

.sidecar-total-price-label {
  font-size: 10px;
  color: var(--text-muted);
}

.sidecar-total-price-val {
  font-size: 12px;
  color: var(--btn-success-bg);
  font-weight: 700;
}
body.theme-dark .sidecar-total-price-val {
  color: #4ade80 !important;
}

.btn-send-draft {
  background: #0369a1;
  color: #ffffff;
  border: 1px solid #0369a1;
  border-radius: 6px;
  cursor: pointer;
}
body.theme-dark .btn-send-draft {
  background: #0369a1 !important;
  color: #ffffff !important;
  border-color: #0369a1 !important;
}

.btn-share-wa {
  background: var(--btn-wa-bg);
  color: #ffffff;
  border: 1px solid var(--btn-wa-bg);
  border-radius: 6px;
  cursor: pointer;
}
body.theme-dark .btn-share-wa {
  background: #15803d !important;
  color: #ffffff !important;
  border-color: #15803d !important;
}

.order-card-total-highlight {
  color: #0369a1;
}
body.theme-dark .order-card-total-highlight {
  color: #38bdf8 !important;
}

/* Extracted Inline Badge & Text Contrast Classes (Phase 4 Final Fix) */
body.theme-dark .info-pin-badge {
  background: #422006;
  color: #fef08a;
  border-color: #ca8a04;
}
.info-pin-badge.is-specific {
  background: #ede9fe;
  color: #5b21b6;
  border-color: #c4b5fd;
}
body.theme-dark .info-pin-badge.is-specific {
  background: #2e1065;
  color: #ddd6fe;
  border-color: #7c3aed;
}
.info-pin-badge.is-archived {
  background: #e2e8f0;
  color: #334155;
  border-color: #cbd5e1;
}
body.theme-dark .info-pin-badge.is-archived {
  background: #1e293b;
  color: #cbd5e1;
  border-color: #475569;
}
.info-pin-badge.is-expired {
  background: var(--status-cancelled-bg);
  color: var(--status-cancelled-fg);
  border-color: var(--status-cancelled-border);
}
body.theme-dark .info-pin-badge.is-expired {
  background: var(--status-cancelled-bg);
  color: var(--status-cancelled-fg);
  border-color: var(--status-cancelled-border);
}
.info-pin-badge.is-editing {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}
body.theme-dark .info-pin-badge.is-editing {
  background: #1e3a8a;
  color: #bfdbfe;
  border-color: #3b82f6;
}

.promo-pool-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: #4338ca;
}
body.theme-dark .promo-pool-tag {
  color: #c7d2fe !important;
}

.promo-bundle-line {
  margin-top: 2px;
  font-weight: 700;
  color: #86198f;
}
body.theme-dark .promo-bundle-line {
  color: #f0abfc !important;
}

.promo-regbonus-line {
  margin-top: 2px;
  font-weight: 600;
  color: #0369a1;
}
body.theme-dark .promo-regbonus-line {
  color: #7dd3fc !important;
}

.po-promo-est-disc {
  color: var(--btn-success-bg);
}
body.theme-dark .po-promo-est-disc {
  color: #4ade80 !important;
}

.po-promo-pct-active {
  color: #0f766e;
}
body.theme-dark .po-promo-pct-active {
  color: #5eead4 !important;
}

.po-promo-muted-note {
  font-size: 11.5px;
  color: var(--text-muted);
}
.po-promo-sub-note {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.info-promo-packspec {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 6px;
}
body.theme-dark .po-promo-muted-note,
body.theme-dark .po-promo-sub-note,
body.theme-dark .info-promo-packspec {
  color: #cbd5e1 !important;
}
body.theme-dark .po-promo-card.is-highlighted .po-promo-muted-note,
body.theme-dark .po-promo-card.is-highlighted .po-promo-sub-note,
body.theme-dark .info-promo-subblock.is-highlighted .info-promo-packspec {
  color: #fef3c7 !important;
}

.po-promo-pool-line {
  font-size: 11px;
  font-weight: 700;
  color: #4338ca;
}
body.theme-dark .po-promo-pool-line {
  color: #c7d2fe !important;
}

.po-promo-partial-warn {
  font-size: 11px;
  color: #b45309;
}
body.theme-dark .po-promo-partial-warn {
  color: #fcd34d !important;
}

.info-promo-attachment-note {
  font-size: 11px;
  color: #1d4ed8;
  font-weight: 600;
}
body.theme-dark .info-promo-attachment-note {
  color: #93c5fd !important;
}

.info-read-status {
  font-weight: 700;
}
.info-read-status.is-read {
  color: var(--btn-success-bg);
}
.info-read-status.is-unread {
  color: #b91c1c;
}
body.theme-dark .info-read-status.is-read {
  color: #4ade80 !important;
}
body.theme-dark .info-read-status.is-unread {
  color: #fca5a5 !important;
}

.info-detail-target {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.admin-promo-bundle-heading {
  font-weight: 700;
  color: #86198f;
  margin-bottom: 4px;
}
body.theme-dark .admin-promo-bundle-heading {
  color: #f0abfc !important;
}

.stock-ready-text,
.picker-item-ready {
  font-weight: 700;
}
.picker-item-ready {
  font-size: 13px;
}
.stock-ready-text.is-ready,
.picker-item-ready.is-ready {
  color: var(--btn-success-bg);
}
.stock-ready-text.is-empty,
.picker-item-ready.is-empty {
  color: #b91c1c;
}
body.theme-dark .stock-ready-text.is-ready,
body.theme-dark .picker-item-ready.is-ready {
  color: #4ade80 !important;
}
body.theme-dark .stock-ready-text.is-empty,
body.theme-dark .picker-item-ready.is-empty {
  color: #fca5a5 !important;
}

.order-detail-processed-note {
  margin-top: 10px;
  font-size: 11px;
  color: var(--btn-success-bg);
}
.order-detail-cancelled-note {
  margin-top: 10px;
  font-size: 11px;
  color: #b91c1c;
}
body.theme-dark .order-detail-processed-note {
  color: #4ade80 !important;
}
body.theme-dark .order-detail-cancelled-note {
  color: #fca5a5 !important;
}

.receipt-summary-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.receipt-status-read {
  color: var(--btn-success-bg);
  font-weight: 700;
}
.receipt-status-unread {
  color: #b91c1c;
  font-weight: 700;
}
.receipt-empty-note {
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 0;
}
.receipt-empty-note.is-all-read {
  color: var(--btn-success-bg);
  padding: 4px 0 8px;
}
.receipt-read-time {
  font-size: 11px;
  color: var(--btn-success-bg);
}
body.theme-dark .receipt-status-read,
body.theme-dark .receipt-empty-note.is-all-read,
body.theme-dark .receipt-read-time {
  color: #4ade80 !important;
}
body.theme-dark .receipt-status-unread {
  color: #fca5a5 !important;
}

#screenOrder.screen-container {
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}

/* ==========================================================================
   IN-APP ALERT / CONFIRM / PROMPT DIALOG
   ========================================================================== */
#appDialogModalBackdrop {
  z-index: var(--z-dialog-backdrop);
}
#appDialogModalBackdrop.show {
  display: block !important;
  opacity: 1;
  pointer-events: auto;
}
#appDialogModal {
  z-index: var(--z-dialog-modal);
  max-width: 440px;
  width: 92%;
}
#appDialogModal.show {
  display: flex !important;
}
.app-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.app-dialog-message {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-line;
  word-break: break-word;
}
.app-dialog-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.app-dialog-choice-chip {
  padding: 8px 12px;
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-subtle);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.app-dialog-choice-chip:hover {
  border-color: var(--primary);
}
.app-dialog-choice-chip.active {
  background: var(--primary-btn-bg);
  color: #ffffff;
  border-color: var(--primary-btn-bg);
}
.app-dialog-input-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.app-dialog-input {
  padding: 10px 12px !important;
  font-size: 14px !important;
  min-height: 44px;
}
.app-dialog-footer {
  justify-content: flex-end;
  gap: 8px;
}
.app-dialog-footer .btn-primary-sm,
.app-dialog-footer .btn-secondary-sm {
  min-height: 44px;
  min-width: 84px;
}
.btn-danger-sm {
  padding: 8px 14px;
  min-height: 44px;
  min-width: 84px;
  background: #b91c1c;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.btn-danger-sm:hover {
  background: #991b1b;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (CONSOLIDATED)
   ========================================================================== */
@media (min-width: 1024px) {
  #screenAdmin.screen-container,
  #screenSupervisorReport.screen-container {
    max-width: 1180px;
  }
  body.sidecar-docked #screenAdmin.screen-container {
    padding-right: 400px;
  }
  .admin-info-modal.is-promo-wide {
    max-width: min(1180px, 96vw);
    width: min(1180px, 96vw);
  }
  .admin-info-form-card.is-promo-mode .admin-editor-split-grid {
    display: grid;
    grid-template-columns: minmax(310px, 37%) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
  }
  .admin-info-form-card.is-promo-mode .admin-surkom-left-pane {
    position: sticky;
    top: 2px;
    max-height: calc(92vh - 175px);
    overflow-y: auto;
  }
}

@media (max-width: 1023px) {
  .admin-mobile-surkom-toggle {
    display: flex;
  }
  .admin-surkom-left-content {
    display: none;
  }
  .admin-surkom-left-content.is-open {
    display: flex;
  }
  .admin-surkom-ref-sub {
    display: none;
  }
  .admin-surkom-preview-thumb {
    max-height: 210px;
  }
}

@media (max-width: 767px) {
  .admin-nav-bar {
    gap: 6px;
  }
  .admin-nav-bar .btn-sub-text {
    display: none;
  }
  .admin-nav-bar .btn-sub-action,
  .admin-nav-bar .btn-sub-back {
    padding: 8px 10px;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
  }
  .admin-nav-bar .sub-nav-title {
    font-size: 14px;
    text-align: left;
  }
  .admin-promo-header-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .payment-confirm-dialog,
  .order-detail-modal {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    max-width: 100%;
    max-height: 88vh;
    max-height: 88dvh;
    border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
  }
  .wa-template-modal {
    width: 98%;
    height: 94vh;
    max-height: 96vh;
  }
  .wa-template-modal-body {
    padding: 8px 10px;
  }
  .admin-seg1-meta-grid {
    grid-template-columns: 1fr;
  }
  .spv-nav-bar {
    padding: 8px 10px;
    gap: 6px;
  }
  .spv-nav-bar .btn-sub-text {
    display: none;
  }
  .spv-nav-bar .btn-sub-back,
  .spv-nav-bar .btn-sub-action {
    padding: 8px 10px;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
  }
  .spv-nav-bar .sub-nav-title {
    text-align: left;
    font-size: 14px;
  }
  .spv-filter-primary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .spv-filter-primary-row .spv-filter-field:first-child {
    grid-column: 1 / -1;
  }
  .spv-params-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .spv-params-row .spv-param-col:first-child,
  .spv-params-row .spv-param-col:last-child {
    grid-column: 1 / -1;
  }
  .admin-promo-role-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .admin-nav-bar .sub-nav-title {
    display: none;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .spv-wa-actions-bar {
    flex-direction: column;
  }
  .spv-wa-actions-bar .btn-recap-copy,
  .spv-wa-actions-bar .btn-recap-wa {
    width: 100%;
  }
  .admin-promo-header-grid,
  .admin-promo-header-grid-3,
  .promo-mode-pills {
    grid-template-columns: 1fr;
  }
  .admin-promo-regbonus-grid-top {
    grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr) 30px;
  }
  .admin-promo-regbonus-grid-bot {
    grid-template-columns: 100px minmax(0, 1fr);
  }
}

@media (max-width: 380px) {
  .app-header {
    padding: 8px 10px;
  }
  .brand {
    font-size: 13.5px;
    gap: 4px;
    min-width: 0;
    flex-shrink: 1;
  }
  .header-actions {
    gap: 4px;
  }
  .btn-refresh,
  .btn-header-menu {
    min-width: 44px;
    min-height: 44px;
  }
  .warehouse-select {
    max-width: 105px;
    min-width: 60px;
    padding: 2px 4px;
    font-size: 11px;
    min-height: 44px;
  }
}

@media (max-height: 600px) {
  .wa-template-modal {
    height: 96vh;
    max-height: 98vh;
  }
  .wa-template-modal-body {
    padding: 6px 8px;
  }
}

/* ==========================================================================
   REDUCED MOTION PREFERENCES
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .header-menu-dropdown,
  .in-app-banner,
  .order-floating-bar,
  .badge-pending-queue {
    animation: none;
  }
  .spinner,
  .spinner-small,
  .btn-refresh.spinning .refresh-icon {
    animation-duration: 3s;
  }
  .bottom-sheet,
  .bottom-sheet-backdrop,
  .app-toast,
  .toggle-switch-slider::before,
  .vb6-sidecar-panel,
  .hub-card,
  .info-card {
    transition: opacity 0.15s ease;
  }
}

/* ==========================================================================
   PO INFO PLAFOND GOLONGAN PER GRUP BARANG (MA062)
   ========================================================================== */
.po-plafond-panel {
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.po-plafond-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.po-plafond-title {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.po-plafond-header-pills {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.po-plafond-count-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
}

.po-plafond-count-pill.is-locked {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
}

.po-plafond-count-pill.is-over {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #ef4444;
}

.po-plafond-status-note {
  font-size: 11.5px;
  color: #64748b;
  padding: 4px 2px;
}

.po-plafond-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
}

.po-plafond-card.is-locked-safe {
  background: #fffbeb;
  border-color: #f59e0b;
  border-left: 4px solid #d97706;
}

.po-plafond-card.is-locked-over {
  background: #fef2f2;
  border-color: #ef4444;
  border-left: 4px solid #dc2626;
}

.po-plafond-card.is-normal {
  border-left: 4px solid #16a34a;
}

.po-plafond-card.is-none {
  border-left: 4px solid #94a3b8;
}

.po-plafond-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.po-plafond-group-name {
  font-weight: 800;
  color: #0f172a;
  font-size: 12.5px;
}

.po-plafond-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.po-plafond-badge.badge-locked-safe {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
}

.po-plafond-badge.badge-locked-over {
  background: #dc2626;
  color: #ffffff;
  border: 1px solid #b91c1c;
}

.po-plafond-badge.badge-normal {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.po-plafond-badge.badge-none {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.po-plafond-metrics {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #334155;
}

.po-plafond-amount {
  font-weight: 800;
  font-size: 13.5px;
  color: #0f172a;
}

.po-plafond-card.is-locked-safe .po-plafond-amount {
  color: #92400e;
}

.po-plafond-card.is-locked-over .po-plafond-amount {
  color: #b91c1c;
}

.po-plafond-est {
  font-size: 11.5px;
  color: #475569;
}

.po-plafond-est.is-exceeded {
  color: #b91c1c;
  font-weight: 700;
}

.po-plafond-warn-box {
  font-size: 11.5px;
  line-height: 1.4;
  padding: 6px 8px;
  border-radius: 6px;
}

.po-plafond-warn-box.warn-amber {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(217, 119, 6, 0.35);
  color: #78350f;
}

.po-plafond-warn-box.warn-red {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #991b1b;
  font-weight: 600;
}

.po-plafond-subnote {
  font-size: 11px;
  line-height: 1.35;
  color: #475569;
}

.po-plafond-subnote.is-info {
  color: #0369a1;
}

/* Modal Konfirmasi Pembayaran: Banner Peringatan Plafond Terkunci */
.payment-plafond-warning {
  margin: 8px 0 10px;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.45;
}

.payment-plafond-warning.is-amber {
  background: #fffbeb;
  border: 1px solid #f59e0b;
  border-left: 4px solid #d97706;
  color: #78350f;
}

.payment-plafond-warning.is-red {
  background: #fef2f2;
  border: 1px solid #ef4444;
  border-left: 4px solid #dc2626;
  color: #991b1b;
}

.payment-plafond-warning-title {
  font-weight: 800;
  margin-bottom: 4px;
}

.payment-plafond-warning-note {
  margin-top: 5px;
  font-size: 11.5px;
  opacity: 0.95;
}

/* Dark OLED Theme Overrides for Plafond UI */
body.theme-dark .po-plafond-panel {
  background: #0a0f1d !important;
  border-color: #334155 !important;
}
body.theme-dark .po-plafond-title,
body.theme-dark .po-plafond-group-name {
  color: #f8fafc !important;
}
body.theme-dark .po-plafond-count-pill {
  background: #1e293b !important;
  color: #cbd5e1 !important;
}
body.theme-dark .po-plafond-count-pill.is-locked {
  background: #451a03 !important;
  color: #fde68a !important;
  border-color: #d97706 !important;
}
body.theme-dark .po-plafond-count-pill.is-over {
  background: #450a0a !important;
  color: #fecaca !important;
  border-color: #ef4444 !important;
}
body.theme-dark .po-plafond-card {
  background: #111827 !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
body.theme-dark .po-plafond-card.is-locked-safe {
  background: #271a06 !important;
  border-color: #d97706 !important;
  border-left-color: #f59e0b !important;
}
body.theme-dark .po-plafond-card.is-locked-over {
  background: #2a0a0a !important;
  border-color: #dc2626 !important;
  border-left-color: #ef4444 !important;
}
body.theme-dark .po-plafond-card.is-normal {
  border-left-color: #22c55e !important;
}
body.theme-dark .po-plafond-metrics {
  color: #cbd5e1 !important;
}
body.theme-dark .po-plafond-amount {
  color: #f8fafc !important;
}
body.theme-dark .po-plafond-card.is-locked-safe .po-plafond-amount {
  color: #fcd34d !important;
}
body.theme-dark .po-plafond-card.is-locked-over .po-plafond-amount {
  color: #fca5a5 !important;
}
body.theme-dark .po-plafond-est {
  color: #94a3b8 !important;
}
body.theme-dark .po-plafond-est.is-exceeded {
  color: #fca5a5 !important;
}
body.theme-dark .po-plafond-badge.badge-locked-safe {
  background: #78350f !important;
  color: #fef3c7 !important;
  border-color: #f59e0b !important;
}
body.theme-dark .po-plafond-badge.badge-normal {
  background: #064e3b !important;
  color: #86efac !important;
  border-color: #10b981 !important;
}
body.theme-dark .po-plafond-badge.badge-none {
  background: #1e293b !important;
  color: #94a3b8 !important;
  border-color: #475569 !important;
}
body.theme-dark .po-plafond-warn-box.warn-amber {
  background: rgba(217, 119, 6, 0.22) !important;
  border-color: #d97706 !important;
  color: #fde68a !important;
}
body.theme-dark .po-plafond-warn-box.warn-red {
  background: rgba(220, 38, 38, 0.25) !important;
  border-color: #ef4444 !important;
  color: #fecaca !important;
}
body.theme-dark .po-plafond-subnote {
  color: #94a3b8 !important;
}
body.theme-dark .po-plafond-subnote.is-info {
  color: #38bdf8 !important;
}
body.theme-dark .payment-plafond-warning.is-amber {
  background: #271a06 !important;
  border-color: #d97706 !important;
  border-left-color: #f59e0b !important;
  color: #fde68a !important;
}
body.theme-dark .payment-plafond-warning.is-red {
  background: #2a0a0a !important;
  border-color: #dc2626 !important;
  border-left-color: #ef4444 !important;
  color: #fecaca !important;
}

/* ==========================================================================
   SUPER ADMIN FEATURE FLAGS (KELOLA FITUR OPSIONAL)
   ========================================================================== */
.hub-card-icon.icon-features {
  background: #f3e8ff;
  color: #6b21a8;
}

body.theme-dark .hub-card-icon.icon-features {
  background: #3b0764 !important;
  color: #e9d5ff !important;
}

.feature-flags-modal {
  max-width: 540px;
  width: 94%;
}

.feature-flags-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-flags-loading {
  text-align: center;
  padding: 18px 10px;
  color: #64748b;
  font-size: 13px;
}

.feature-flag-category {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-flag-category-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #475569;
  padding-left: 2px;
}

.feature-flag-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.feature-flag-card.is-enabled {
  background: #f0fdf4;
  border-color: #86efac;
}

.feature-flag-card.is-saving {
  opacity: 0.65;
  pointer-events: none;
}

.feature-flag-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feature-flag-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.feature-flag-name {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.feature-flag-state-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
}

.feature-flag-state-pill.is-on {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.feature-flag-state-pill.is-off {
  background: #e2e8f0;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.feature-flag-desc {
  font-size: 12px;
  line-height: 1.4;
  color: #475569;
}

.feature-flag-meta {
  font-size: 10.5px;
  color: #64748b;
  margin-top: 2px;
}

.feature-flag-toggle-wrap {
  flex-shrink: 0;
  padding-top: 2px;
}

/* Dark OLED Theme Overrides for Feature Flags Modal */
body.theme-dark .feature-flag-category-title {
  color: #94a3b8 !important;
}
body.theme-dark .feature-flag-card {
  background: #0f172a !important;
  border-color: #334155 !important;
}
body.theme-dark .feature-flag-card.is-enabled {
  background: #052e16 !important;
  border-color: #16a34a !important;
}
body.theme-dark .feature-flag-name {
  color: #f8fafc !important;
}
body.theme-dark .feature-flag-desc {
  color: #cbd5e1 !important;
}
body.theme-dark .feature-flag-meta {
  color: #94a3b8 !important;
}
body.theme-dark .feature-flag-state-pill.is-on {
  background: #064e3b !important;
  color: #86efac !important;
  border-color: #10b981 !important;
}
body.theme-dark .feature-flag-state-pill.is-off {
  background: #1e293b !important;
  color: #94a3b8 !important;
  border-color: #475569 !important;
}
