/* =============================================================
   Admin Theme  —  Dark sidebar + Light content
   Loaded after public-redesign.css so these rules take precedence
   for admin-only component class names.
   ============================================================= */

/* ── Admin design tokens ───────────────────────────────────── */
:root {
  /* Sidebar */
  --as-sidebar:          #1e293b;
  --as-sidebar-hover:    #334155;
  --as-sidebar-active:   rgba(37,99,235,0.18);
  --as-sidebar-active-border: #2563eb;
  --as-sidebar-text:     #94a3b8;
  --as-sidebar-text-hover: #e2e8f0;
  --as-sidebar-text-active: #ffffff;
  --as-sidebar-divider:  rgba(255,255,255,0.08);
  --as-sidebar-icon:     #64748b;

  /* Content */
  --as-content-bg:       #f8fafc;
  --as-card-bg:          #ffffff;
  --as-border:           #e2e8f0;
  --as-border-light:     #f1f5f9;
  --as-accent:           4px solid #2563eb;
  --as-shadow:           0 2px 10px rgba(0,0,0,0.07);
  --as-shadow-hover:     0 6px 20px rgba(37,99,235,0.12);

  /* Typography */
  --as-text:             #111827;
  --as-text-secondary:   #4b5563;
  --as-text-muted:       #9ca3af;
  --as-label:            0.72rem;
}

/* =============================================================
   SIDEBAR  (entities.html  —  .bhoechie-tab-container)
   ============================================================= */

.bhoechie-tab-container {
  background: var(--as-sidebar) !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: 2px 0 12px rgba(0,0,0,0.18) !important;
}

/* Sidebar header bar
   Specificity must be (0,3,0) or higher to beat the general
   .card-header.color-primary rule (0,2,0) lower in this file. */
.bhoechie-tab-container .card-header.tree-header,
.bhoechie-tab-container .card-header.color-primary,
.bhoechie-tab-container .card-header.clr-primary,
.bhoechie-tab-container .card-header {
  background: rgba(255,255,255,0.05) !important;
  border-bottom: 1px solid var(--as-sidebar-divider) !important;
  border-left: none !important;       /* no blue accent on sidebar header */
  color: #e2e8f0 !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.65rem 0.75rem !important;
}

.bhoechie-tab-container .fa-bars {
  color: #64748b;
  margin-right: 6px;
}

/* Nav items container */
.bhoechie-tab-menu .list-group {
  background: transparent !important;
  border: none !important;
  padding: 4px 6px !important;
}

/* Individual nav item */
.bhoechie-tab-menu .list-group-item {
  background: transparent !important;
  border: none !important;
  border-radius: 7px !important;
  margin-bottom: 2px !important;
  padding: 0.6rem 0.75rem !important;
  color: var(--as-sidebar-text) !important;
  transition: all 0.18s ease;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.bhoechie-tab-menu .list-group-item:hover {
  background: rgba(255,255,255,0.07) !important;
  color: var(--as-sidebar-text-hover) !important;
}

.bhoechie-tab-menu .list-group-item.active,
.bhoechie-tab-menu .list-group-item:active {
  background: var(--as-sidebar-active) !important;
  border-left: 3px solid var(--as-sidebar-active-border) !important;
  color: var(--as-sidebar-text-active) !important;
  font-weight: 600;
}

.bhoechie-tab-menu .list-group-item .fa {
  color: var(--as-sidebar-icon);
  font-size: 0.95rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  transition: color 0.18s;
}

.bhoechie-tab-menu .list-group-item:hover .fa,
.bhoechie-tab-menu .list-group-item.active .fa {
  color: #93c5fd;
}

.bhoechie-tab-menu .list-group-item span {
  font-size: 0.82rem;
  white-space: nowrap;
}

/* Sidebar pin / icon buttons */
.bhoechie-tab-container .btn-just-icon,
.bhoechie-tab-container .btn-simple.btn-outline.btn-just-icon {
  background: transparent !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  color: #94a3b8 !important;
  width: 26px !important;
  height: 26px !important;
  padding: 0 !important;
  min-width: unset !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 5px !important;
  box-shadow: none !important;
  font-size: 0.75rem !important;
}

.bhoechie-tab-container .btn-just-icon:hover {
  background: rgba(255,255,255,0.1) !important;
  color: #fff !important;
  border-color: rgba(255,255,255,0.35) !important;
}

/* =============================================================
   STYLE.CSS OVERRIDE FIXES
   style.css has higher-specificity / !important rules that
   fight our dark sidebar. These selectors match or beat them.
   ============================================================= */

/* 1. style.css sets icon colour to teal: div.bhoechie-tab-menu div.list-group > a .fa { color: #13a8de }
      That selector has (0,1,3). Ours uses !important to win. */
div.bhoechie-tab-menu .sidebar-nav-item .sidebar-icon {
  color: #64748b !important;
}
div.bhoechie-tab-menu .sidebar-nav-item:hover .sidebar-icon,
div.bhoechie-tab-menu .sidebar-nav-item.active .sidebar-icon {
  color: #93c5fd !important;
}

/* 2. style.css sets active background to teal WITH !important at (0,2,3).
      Match specificity (0,2,3) so "last stylesheet wins" rule applies
      (admin-theme.css loads after style.css). */
div.bhoechie-tab-menu div.list-group > a.sidebar-nav-item.active {
  background: var(--as-sidebar-active) !important;
  color: var(--as-sidebar-text-active) !important;
  border-left: 3px solid var(--as-sidebar-active-border) !important;
  padding-left: calc(0.85rem - 3px) !important;
}

/* 3. style.css adds an orange arrow (:after) on active items — remove it */
div.bhoechie-tab-menu div.list-group > a.sidebar-nav-item.active::after {
  display: none !important;
  content: none !important;
}

/* Ensure the menu background is transparent (not inherited dark that can
   look different due to z-index or paint order differences) */
div.bhoechie-tab-menu {
  background: transparent !important;
}

/* ── Sidebar section labels ─────────────────────────────────── */
/* Group labels like "Operations", "Settings" */
.sidebar-section-label {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.5);   /* increased from 0.28 — actually readable now */
  padding: 0.9rem 0.9rem 0.3rem;
  display: block;
  border-top: 1px solid rgba(255,255,255,0.07);
  margin-top: 0.25rem;
}

/* First label in the sidebar has no top border */
.bhoechie-tab-menu > .sidebar-section-label:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 0.6rem;
}

/* ── PageBuilder info panel ─────────────────────────────────── */
/* Shown instead of nav items when in PageBuilder mode (sidebar is
   otherwise empty, making it look blank / completely dark) */
.sidebar-pagebuilder-info {
  padding: 1.25rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-pb-icon {
  font-size: 1.75rem;
  color: rgba(37,99,235,0.5);
  display: block;
}

.sidebar-pb-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.55);
}

.sidebar-pb-hint {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.55;
  margin: 0;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 0.6rem;
}

.sidebar-pb-hint strong {
  color: rgba(255,255,255,0.55);
}

/* ── New clean nav item (sidebar-nav-item) ──────────────────── */
/* Replaces the old text-center px-1 + inner div.col.d-flex pattern */
.sidebar-nav-item {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  padding: 0.58rem 0.85rem !important;
  background: transparent !important;
  border: none !important;
  border-radius: 7px !important;
  margin: 1px 6px !important;
  color: var(--as-sidebar-text) !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.18s ease;
  width: calc(100% - 12px) !important;
}

.sidebar-nav-item:hover {
  background: rgba(255,255,255,0.07) !important;
  color: var(--as-sidebar-text-hover) !important;
  text-decoration: none !important;
}

.sidebar-nav-item.active {
  background: var(--as-sidebar-active) !important;
  border-left: 3px solid var(--as-sidebar-active-border) !important;
  color: var(--as-sidebar-text-active) !important;
  font-weight: 600;
  padding-left: calc(0.85rem - 3px) !important;
}

/* ── Sidebar icon ───────────────────────────────────────────── */
.sidebar-icon {
  font-size: 0.92rem !important;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  color: #64748b;
  transition: color 0.18s;
}

.sidebar-nav-item:hover .sidebar-icon {
  color: #93c5fd;
}

.sidebar-nav-item.active .sidebar-icon {
  color: #93c5fd;
}

/* ── Sidebar label ──────────────────────────────────────────── */
.sidebar-label {
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

/* ── Collapsed sidebar (icon-only, unpin=false) ─────────────── */
/* In collapsed mode the container gets inline width:60px but no col-X class.
   Target it by the absence of Bootstrap col classes. */
.bhoechie-tab-container:not(.col-1):not(.col-2) .sidebar-nav-item {
  justify-content: center !important;
  padding: 0.65rem 0 !important;
  margin: 1px 4px !important;
  width: calc(100% - 8px) !important;
}

.bhoechie-tab-container:not(.col-1):not(.col-2) .sidebar-section-label {
  display: none !important;
}

/* ── PageBuilder sidebar (col-2) ────────────────────────────── */
/* The "+" create entity button in the header */
.bhoechie-tab-container.col-2 .tree-header {
  padding: 0.9rem 1rem !important;
}

.bhoechie-tab-container.col-2 .tree-header .btn-just-icon {
  width: 28px !important;
  height: 28px !important;
  background: rgba(37,99,235,0.22) !important;
  border: 1.5px solid rgba(100,148,255,0.45) !important;
  color: #93c5fd !important;
  border-radius: 6px !important;
}

.bhoechie-tab-container.col-2 .tree-header .btn-just-icon:hover {
  background: rgba(37,99,235,0.42) !important;
  border-color: rgba(100,148,255,0.75) !important;
  color: #fff !important;
}

/* ── Tree view within sidebar (PageBuilder) ─────────────────── */
.buildertreelist {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
}

.tree-container {
  padding: 0.5rem 0.4rem !important;
  overflow-y: auto;
  max-height: calc(100vh - 80px);
}

/* angular-tree-widget on dark sidebar — make text visible */
.bhoechie-tab-container treenode .node-name {
  color: var(--as-sidebar-text) !important;  /* #94a3b8 slate */
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  padding-top: 2px !important;
}

.bhoechie-tab-container treenode .pointer {
  border-radius: 6px;
  padding: 2px 4px;
  transition: background 0.15s;
}

.bhoechie-tab-container treenode .pointer:hover .node-name {
  color: var(--as-sidebar-text-hover) !important; /* #e2e8f0 */
}

.bhoechie-tab-container treenode .pointer:hover {
  background: rgba(255,255,255,0.07) !important;
}

/* Selected node */
.bhoechie-tab-container treenode .selected {
  background: var(--as-sidebar-active) !important;
  box-shadow: none !important;
  border-radius: 6px !important;
}

.bhoechie-tab-container treenode .selected .node-name {
  color: #fff !important;
}

/* Tree expand/collapse arrow icons are dark PNGs — invert them */
.bhoechie-tab-container .tree-node-ico {
  filter: brightness(10) !important;
  opacity: 0.45;
}

.bhoechie-tab-container treenode .pointer:hover .tree-node-ico,
.bhoechie-tab-container treenode .selected .tree-node-ico {
  opacity: 0.8;
}

/* List indentation */
.bhoechie-tab-container treenode ul {
  border-left: 1px solid rgba(255,255,255,0.08) !important;
}

/* fa icons within tree nodes */
.bhoechie-tab-container treenode .icon-fa {
  color: #64748b !important;
  font-size: 0.85rem !important;
}

/* Scrollbar inside sidebar */
.bhoechie-tab-menu::-webkit-scrollbar { width: 4px; }
.bhoechie-tab-menu::-webkit-scrollbar-track { background: transparent; }
.bhoechie-tab-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }

/* Content panel inside entities */
.bhoechie-tab-panel > .card {
  border-radius: 10px !important;
  border: 1px solid var(--as-border) !important;
  box-shadow: var(--as-shadow) !important;
  background: var(--as-card-bg) !important;
}

/* =============================================================
   CARD HEADERS  —  white with blue left accent
   Covers .card-theme, .clr-primary, .color-primary
   ============================================================= */

.card-header.card-theme,
.card-header.clr-primary,
.card-header.color-primary {
  background: var(--as-card-bg) !important;
  border-left: var(--as-accent) !important;
  border-bottom: 1px solid var(--as-border) !important;
  color: var(--as-text) !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  padding: 0.85rem 1.25rem !important;
  letter-spacing: 0;
}

/* Remove text-white override on these specific headers */
.card-header.card-theme.text-white,
.card-header.clr-primary.text-white,
.card-header.color-primary.text-white {
  color: var(--as-text) !important;
}

/* =============================================================
   DASHBOARD WIDGETS  (Main.html  —  .mai-wrapper)
   ============================================================= */

.mai-wrapper {
  padding: 1.25rem 0;
}

.widget {
  background: var(--as-card-bg) !important;
  border-radius: 12px !important;
  border: 1px solid var(--as-border) !important;
  box-shadow: var(--as-shadow) !important;
  overflow: hidden;
  margin-bottom: 1.25rem;
  transition: box-shadow 0.2s;
}

.widget:hover {
  box-shadow: var(--as-shadow-hover) !important;
}

.widget-head {
  background: var(--as-card-bg) !important;
  border-left: var(--as-accent) !important;
  border-bottom: 1px solid var(--as-border) !important;
  padding: 0.85rem 1.25rem !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.widget-head .title {
  color: var(--as-text) !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.widget-chart-container {
  padding: 1rem !important;
  background: var(--as-card-bg);
}

/* Metric counters below chart */
.widget-info {
  background: var(--as-border-light) !important;
  border-top: 1px solid var(--as-border) !important;
}

.counter-block {
  padding: 0.85rem 1.25rem !important;
  text-align: center;
  border-right: 1px solid var(--as-border);
}

.counter-block:last-child { border-right: none; }

.counter-block .counter {
  display: block !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  color: var(--as-text) !important;
  line-height: 1.2 !important;
  font-family: 'Inter', 'Poppins', sans-serif;
}

.counter-block .title {
  display: block !important;
  font-size: 0.72rem !important;
  color: var(--as-text-muted) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin-top: 3px;
}

/* =============================================================
   KPI INDICATOR CARDS  (widget-indicators)
   ============================================================= */

.widget-indicators {
  display: flex !important;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.indicator-item {
  background: var(--as-card-bg) !important;
  border-radius: 10px !important;
  border: 1px solid var(--as-border) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
  padding: 0.85rem 1.1rem !important;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: box-shadow 0.18s, transform 0.18s;
}

.indicator-item:hover {
  box-shadow: var(--as-shadow-hover) !important;
  transform: translateY(-1px);
}

.indicator-item-icon .icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #eff6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #2563eb;
  flex-shrink: 0;
}

.indicator-item-icon .icon span {
  font-size: 1.25rem;
  color: #2563eb;
}

.indicator-item-value { flex: 1; }

.indicator-value-counter {
  display: block !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  color: var(--as-text) !important;
  line-height: 1.2 !important;
  font-family: 'Inter', 'Poppins', sans-serif;
}

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

.indicator-value-title {
  font-size: 0.72rem !important;
  color: var(--as-text-muted) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin-top: 3px;
  display: block;
}

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

/* =============================================================
   ADMIN TOOLBAR  —  .admin-toolbar  (sales, item, vendor,
   customer, stock pages) + legacy .row.my-2 inside admin panels
   ============================================================= */

/* ── New unified toolbar ─────────────────────────────────────── */
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--as-card-bg);
  border: 1px solid var(--as-border);
  border-left: var(--as-accent);
  border-radius: 10px;
  padding: 0.6rem 1rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  flex-wrap: wrap;
}

/* Search group (left side) */
.admin-toolbar-search {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.admin-toolbar-search .form-control {
  height: 34px !important;
  font-size: 0.875rem !important;
  border: 1px solid var(--as-border) !important;
  border-radius: 7px !important;
  background: var(--as-border-light) !important;
  color: var(--as-text) !important;
  flex: 1;
  min-width: 120px;
  max-width: 200px;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.admin-toolbar-search .form-control:focus {
  background: #fff !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1) !important;
}

/* Action buttons group (right side) */
.admin-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ── Toolbar button variants ─────────────────────────────────── */
.admin-btn-search,
.admin-btn-new,
.admin-btn-save,
.admin-btn-delete,
.admin-btn-export {
  height: 34px !important;
  padding: 0 0.9rem !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  border-radius: 7px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px;
  white-space: nowrap;
  transition: all 0.18s;
  border-width: 1.5px !important;
}

/* Search — solid primary */
.admin-btn-search {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
}
.admin-btn-search:hover {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  color: #fff !important;
}

/* New — solid primary */
.admin-btn-new {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
}
.admin-btn-new:hover {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  color: #fff !important;
  box-shadow: 0 2px 6px rgba(37,99,235,0.3);
}

/* Save — green (distinct from primary) */
.admin-btn-save {
  background: #059669 !important;
  border-color: #059669 !important;
  color: #fff !important;
}
.admin-btn-save:hover {
  background: #047857 !important;
  border-color: #047857 !important;
  color: #fff !important;
  box-shadow: 0 2px 6px rgba(5,150,105,0.3);
}

/* Delete — neutral border, red on hover */
.admin-btn-delete {
  background: transparent !important;
  border-color: var(--as-border) !important;
  color: var(--as-text-secondary) !important;
}
.admin-btn-delete:hover {
  border-color: #dc2626 !important;
  color: #dc2626 !important;
  background: #fee2e2 !important;
}

/* Export — neutral border, blue on hover */
.admin-btn-export {
  background: transparent !important;
  border-color: var(--as-border) !important;
  color: var(--as-text-secondary) !important;
}
.admin-btn-export:hover {
  border-color: #2563eb !important;
  color: #2563eb !important;
  background: #eff6ff !important;
}

/* ── Legacy .row.my-2 inside admin panels (report page etc.) ── */
.bhoechie-tab-panel .row.my-2,
.mai-wrapper .row.my-2,
.row.mt-1.px-3.w-100.mx-0.header-section-theme {
  background: var(--as-card-bg);
  border-radius: 10px;
  border: 1px solid var(--as-border);
  border-left: var(--as-accent);
  padding: 0.65rem 1rem !important;
  margin-bottom: 1rem !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  align-items: center;
}

.bhoechie-tab-panel .row.my-2 .form-control,
.mai-wrapper .row.my-2 .form-control,
.header-section-theme .form-control {
  border: 1px solid var(--as-border);
  border-radius: 7px !important;
  font-size: 0.875rem !important;
  height: 34px !important;
  color: var(--as-text);
  background: var(--as-border-light);
  transition: all 0.18s;
}

.bhoechie-tab-panel .row.my-2 .form-control:focus,
.header-section-theme .form-control:focus {
  background: #fff !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1) !important;
}

.bhoechie-tab-panel .row.my-2 .btn,
.mai-wrapper .row.my-2 .btn,
.header-section-theme .btn {
  height: 34px !important;
  padding: 0 0.9rem !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  border-radius: 7px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px;
}

/* =============================================================
   BTN-SIMPLE / BTN-OUTLINE  (non-standard admin theme classes)
   ============================================================= */

.btn-simple {
  box-shadow: none !important;
}

.btn-simple.btn-primary {
  background: transparent !important;
  border: 1.5px solid #2563eb !important;
  color: #2563eb !important;
}

.btn-simple.btn-primary:hover {
  background: #2563eb !important;
  color: #fff !important;
}

.btn-simple.btn-outline,
.btn-simple.btn-outline.btn-just-icon {
  background: transparent !important;
  border: 1.5px solid var(--as-border) !important;
  color: var(--as-text-secondary) !important;
}

.btn-simple.btn-outline:hover {
  border-color: #2563eb !important;
  color: #2563eb !important;
  background: #eff6ff !important;
}

/* =============================================================
   REPORT PAGE  —  toolbar and card headers
   ============================================================= */

/* Replace teal .btn-secondary (was #7fe0ba inline style) */
.header-section-theme .btn-secondary,
.header-section-theme .btn-secondary.dropdown-toggle {
  background: var(--as-card-bg) !important;
  border: 1.5px solid var(--as-border) !important;
  color: var(--as-text-secondary) !important;
  font-weight: 500 !important;
}

.header-section-theme .btn-secondary:hover {
  border-color: #2563eb !important;
  color: #2563eb !important;
  background: #eff6ff !important;
}

/* Report section card headers — target by class added via our fix */
.report-card-header {
  background: var(--as-card-bg) !important;
  border-left: var(--as-accent) !important;
  border-bottom: 1px solid var(--as-border) !important;
  color: var(--as-text) !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  padding: 0.7rem 1.1rem !important;
}

/* =============================================================
   DATA GRIDS  (ui-grid  —  used across all admin list pages)
   ============================================================= */

.ui-grid {
  border: 1px solid var(--as-border) !important;
  border-radius: 10px !important;
  overflow: hidden;
}

.ui-grid-header {
  background: var(--as-border-light) !important;
  border-bottom: 2px solid #dbeafe !important;
}

.ui-grid-header-cell {
  background: var(--as-border-light) !important;
  color: var(--as-text-secondary) !important;
  font-weight: 700 !important;
  font-size: 0.72rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  border-right-color: var(--as-border) !important;
}

.ui-grid-header-cell-label {
  color: var(--as-text-secondary) !important;
}

.ui-grid-row:nth-child(odd) .ui-grid-cell {
  background: var(--as-card-bg) !important;
}

.ui-grid-row:nth-child(even) .ui-grid-cell {
  background: var(--as-border-light) !important;
}

.ui-grid-row:hover .ui-grid-cell {
  background: #eff6ff !important;
}

.ui-grid-cell {
  font-size: 0.85rem !important;
  color: var(--as-text-secondary) !important;
  border-right-color: var(--as-border-light) !important;
  border-bottom-color: var(--as-border-light) !important;
}

.ui-grid-footer-cell {
  background: var(--as-border-light) !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  color: var(--as-text) !important;
}

/* Grid selection checkbox */
.ui-grid-selection-row-header-buttons {
  color: #2563eb !important;
}

/* Grid pagination bar */
.ui-grid-pager-container {
  background: var(--as-card-bg) !important;
  border-top: 1px solid var(--as-border) !important;
  padding: 0.5rem 1rem !important;
  border-radius: 0 0 10px 10px !important;
}

.ui-grid-pager-row-count-picker select {
  border: 1px solid var(--as-border) !important;
  border-radius: 5px !important;
  font-size: 0.8rem !important;
  color: var(--as-text) !important;
  padding: 2px 6px;
}

.ui-grid-pager-max-pages-number,
.ui-grid-pager-count {
  font-size: 0.8rem !important;
  color: var(--as-text-secondary) !important;
}

.ui-grid-icon-angle-right,
.ui-grid-icon-angle-left {
  color: #2563eb !important;
}

/* Sort icons */
.ui-grid-icon-up-dir,
.ui-grid-icon-down-dir {
  color: #2563eb !important;
}

/* =============================================================
   REPORT TABLES  (table-bordered in report.html)
   ============================================================= */

.table-bordered {
  border-color: var(--as-border) !important;
  border-radius: 8px;
  overflow: hidden;
}

.table-bordered thead th {
  background: var(--as-border-light) !important;
  color: var(--as-text-secondary) !important;
  font-weight: 700 !important;
  font-size: 0.75rem !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-color: var(--as-border) !important;
  padding: 0.6rem 0.85rem !important;
}

.table-bordered td {
  font-size: 0.875rem !important;
  color: var(--as-text-secondary) !important;
  border-color: var(--as-border-light) !important;
  padding: 0.55rem 0.85rem !important;
  vertical-align: middle;
}

.table-bordered tbody tr:nth-child(even) td {
  background: var(--as-border-light) !important;
}

.table-bordered tbody tr:hover td {
  background: #eff6ff !important;
}

/* Input group text (used in report filter toolbar) */
.input-group-text {
  background: var(--as-border-light) !important;
  border-color: var(--as-border) !important;
  color: var(--as-text-secondary) !important;
  font-size: 0.875rem !important;
}

/* =============================================================
   DROPDOWN MENUS  (admin pages)
   ============================================================= */

.mai-wrapper .dropdown-menu,
.bhoechie-tab-panel .dropdown-menu,
.header-section-theme .dropdown-menu {
  border: 1px solid var(--as-border) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1) !important;
  padding: 0.25rem 0 !important;
}

.mai-wrapper .dropdown-item,
.bhoechie-tab-panel .dropdown-item,
.header-section-theme .dropdown-item {
  font-size: 0.875rem !important;
  color: var(--as-text-secondary) !important;
  padding: 0.5rem 1rem !important;
  transition: all 0.15s;
}

.mai-wrapper .dropdown-item:hover,
.bhoechie-tab-panel .dropdown-item:hover,
.header-section-theme .dropdown-item:hover {
  background: #eff6ff !important;
  color: #2563eb !important;
}

/* =============================================================
   PROGRESS BARS
   ============================================================= */

.progress {
  border-radius: 6px !important;
  background: var(--as-border) !important;
  height: 7px !important;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, #2563eb, #3b82f6) !important;
  border-radius: 6px;
}

/* =============================================================
   DARK SIDEBAR  (Main.html  —  .bg-dark side menu, currently d-none)
   ============================================================= */

.bg-dark .list-group-item {
  background: transparent !important;
  border-color: rgba(255,255,255,0.08) !important;
  color: #94a3b8 !important;
  transition: all 0.18s;
}

.bg-dark .list-group-item:hover {
  background: rgba(255,255,255,0.07) !important;
  color: #e2e8f0 !important;
}

.bg-dark .btn-outline.dropdown-toggle.text-white {
  border-color: rgba(255,255,255,0.2) !important;
  color: #94a3b8 !important;
  background: transparent !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
}

.bg-dark .btn-outline.dropdown-toggle.text-white:hover {
  border-color: rgba(255,255,255,0.5) !important;
  color: #fff !important;
}

/* =============================================================
   PAYMENT / ALERT BADGES
   Override the hardcoded red inline style on payment alert pills
   ============================================================= */

[style*="background: red"],
[style*="background:red"] {
  background: #fee2e2 !important;
  color: #dc2626 !important;
  border: 1px solid #fecaca !important;
  border-radius: 20px !important;
  font-weight: 600;
}

/* =============================================================
   FORM CONTROLS  (admin area)
   ============================================================= */

.mai-wrapper .form-control,
.bhoechie-tab-panel .form-control {
  border: 1px solid var(--as-border);
  border-radius: 7px;
  font-size: 0.875rem;
  color: var(--as-text);
  transition: border-color 0.18s, box-shadow 0.18s;
}

.mai-wrapper .form-control:focus,
.bhoechie-tab-panel .form-control:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1) !important;
}

/* =============================================================
   SCROLLBARS  (thin, branded)
   ============================================================= */

.bhoechie-tab-panel *::-webkit-scrollbar { width: 5px; height: 5px; }
.bhoechie-tab-panel *::-webkit-scrollbar-track { background: var(--as-border-light); }
.bhoechie-tab-panel *::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.bhoechie-tab-panel *::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* =============================================================
   ENTITY LIST COMPONENT  (entity-list.html + entity-field.html)
   Used inside PageBuilder and all Settings/Management entity views.
   These use different class names from the other admin pages —
   .datasetToolbar instead of .row.my-2, .btn-success icon buttons,
   .modal-header as the card header equivalent, etc.
   ============================================================= */

/* ── Main wrapper ─────────────────────────────────────────── */
.dataset-list-page,
.dataset-item-mainDiv {
  background: var(--as-card-bg) !important;
  border: 1px solid var(--as-border) !important;
  border-radius: 10px !important;
  overflow: hidden;
  box-shadow: var(--as-shadow) !important;
}

/* ── Dataset toolbar (replaces .row.my-2 pattern here) ────── */
/* entity-list uses .breadcrumb.datasetToolbar for its action bar */
.datasetToolbar,
.breadcrumb.datasetToolbar {
  background: var(--as-card-bg) !important;
  border-bottom: 1px solid var(--as-border) !important;
  border-left: var(--as-accent) !important;
  border-radius: 0 !important;
  padding: 0.6rem 1rem !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  list-style: none;
}

.datasetToolbar span,
.datasetToolbar .row > span {
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  color: var(--as-text) !important;
}

/* ── Entity-field header (modal-header used as card header) ── */
.dataset-item-mainDiv .modal-header,
.dataset-list-page .modal-header {
  background: var(--as-card-bg) !important;
  border-bottom: 1px solid var(--as-border) !important;
  border-left: var(--as-accent) !important;
  padding: 0.6rem 1rem !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dataset-item-mainDiv .modal-title,
.dataset-item-mainDiv .modal-title span,
.dataset-list-page .modal-title {
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  color: var(--as-text) !important;
}

/* ── Modal body inside entity list ─────────────────────────── */
.dataset-list-page .modal-body,
.dataset-item-mainDiv .modal-body {
  padding: 0.75rem !important;
  background: var(--as-border-light) !important;
}

/* ── Icon action buttons (.btn-success used as neutral icon btn) */
/* entity-list uses btn-success for ALL action buttons (Save, New, Delete)
   even though they shouldn't be green — normalise them here.       */
.dataset-list-page .btn-just-icon,
.dataset-item-mainDiv .btn-just-icon,
.datasetToolbar .btn-just-icon {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 0.6rem !important;
  font-size: 0.78rem !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px;
  box-shadow: none !important;
  border-width: 1.5px !important;
  white-space: nowrap;
}

/* btn-success — neutral style (overrides the teal/green default) */
.dataset-list-page .btn-just-icon.btn-success,
.dataset-item-mainDiv .btn-just-icon.btn-success,
.datasetToolbar .btn-just-icon.btn-success {
  background: transparent !important;
  border-color: var(--as-border) !important;
  color: var(--as-text-secondary) !important;
}

.dataset-list-page .btn-just-icon.btn-success:hover,
.dataset-item-mainDiv .btn-just-icon.btn-success:hover,
.datasetToolbar .btn-just-icon.btn-success:hover {
  border-color: #2563eb !important;
  color: #2563eb !important;
  background: #eff6ff !important;
}

/* btn-danger — keep red but soften */
.dataset-list-page .btn-just-icon.btn-danger,
.dataset-item-mainDiv .btn-just-icon.btn-danger {
  background: transparent !important;
  border-color: #fecaca !important;
  color: #dc2626 !important;
}

.dataset-list-page .btn-just-icon.btn-danger:hover,
.dataset-item-mainDiv .btn-just-icon.btn-danger:hover {
  background: #fee2e2 !important;
  border-color: #f87171 !important;
}

/* ── Breadcrumb buttons row (entity-field.html) ─────────────── */
.breadcrumb-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Settings cog button (top-right of entity list) ─────────── */
.dataset-list-page .btn-just-icon.btn-outline,
.dataset-item-mainDiv .btn-just-icon.btn-outline {
  background: transparent !important;
  border-color: var(--as-border) !important;
  color: var(--as-text-secondary) !important;
}

.dataset-list-page .btn-just-icon.btn-outline:hover,
.dataset-item-mainDiv .btn-just-icon.btn-outline:hover {
  border-color: #2563eb !important;
  color: #2563eb !important;
  background: #eff6ff !important;
}

/* =============================================================
   ENTITY FIELD FORM  (#DatasetForm  —  entity-field.html)
   The "add / edit entity" modal opened from PageBuilder.
   Scoped tightly to #DatasetForm to avoid touching other modals.
   ============================================================= */

/* ── Modal header — gradient banner ────────────────────────── */
#DatasetForm .modal-header {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%) !important;
  border-bottom: none !important;
  border-left: none !important;
  padding: 0.85rem 1.25rem !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#DatasetForm .modal-title,
#DatasetForm .modal-title span {
  color: #fff !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
}

/* ── Header buttons (frosted-glass on dark background) ─────── */
#DatasetForm .modal-header .breadcrumb-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Save button */
#DatasetForm .modal-header .btn-success.btn-just-icon {
  background: rgba(255,255,255,0.18) !important;
  border: 1.5px solid rgba(255,255,255,0.45) !important;
  color: #fff !important;
  border-radius: 7px !important;
  height: 30px !important;
  padding: 0 0.8rem !important;
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px;
  transition: all 0.18s;
  text-transform: none;
}

#DatasetForm .modal-header .btn-success.btn-just-icon:hover:not([disabled]) {
  background: rgba(255,255,255,0.32) !important;
  border-color: rgba(255,255,255,0.7) !important;
}

#DatasetForm .modal-header .btn-success.btn-just-icon[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Delete / Cancel buttons */
#DatasetForm .modal-header .btn-danger.btn-just-icon {
  background: transparent !important;
  border: 1.5px solid rgba(255,255,255,0.25) !important;
  color: rgba(255,255,255,0.82) !important;
  border-radius: 7px !important;
  height: 30px !important;
  padding: 0 0.8rem !important;
  font-size: 0.78rem !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px;
  transition: all 0.18s;
}

#DatasetForm .modal-header .btn-danger.btn-just-icon:hover {
  background: rgba(239,68,68,0.22) !important;
  border-color: rgba(255,120,120,0.55) !important;
  color: #fff !important;
}

/* ── Form body ──────────────────────────────────────────────── */
#DatasetForm .modal-body {
  padding: 1.25rem !important;
  background: #f8fafc !important;
}

/* ── Form labels ────────────────────────────────────────────── */
#DatasetForm .form-control-label {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.07em !important;
  color: #6b7280 !important;
  margin-bottom: 0.35rem !important;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Validation error icon */
#DatasetForm .error-icon {
  display: inline-flex;
  align-items: center;
}

#DatasetForm .error-icon .fa-exclamation-circle {
  color: #dc2626;
  font-size: 0.85rem;
  cursor: pointer;
  margin-left: 4px;
}

/* ── Form controls ──────────────────────────────────────────── */
#DatasetForm .form-control {
  border: 1px solid #e2e8f0 !important;
  border-radius: 7px !important;
  font-size: 0.875rem !important;
  color: #111827 !important;
  background: #fff !important;
  height: 36px !important;
  transition: border-color 0.18s, box-shadow 0.18s;
}

#DatasetForm .form-control:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1) !important;
  outline: none;
}

/* Select dropdown */
#DatasetForm select.form-control {
  height: 36px !important;
  cursor: pointer;
}

/* Checkboxes */
#DatasetForm input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #2563eb;
  border-radius: 4px;
  margin-top: 4px;
}

/* ── "Fields" section header ────────────────────────────────── */
#DatasetForm .section-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0.6rem 0.9rem !important;
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-left: 4px solid #2563eb !important;
  border-radius: 8px 8px 0 0 !important;
  margin-top: 0.5rem;
}

#DatasetForm .section-title span {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.07em !important;
  color: #374151 !important;
}

/* New Field button — solid primary */
#DatasetForm .section-header .btn-primary.btn-just-icon {
  background: #2563eb !important;
  border: none !important;
  color: #fff !important;
  border-radius: 6px !important;
  height: 28px !important;
  padding: 0 0.7rem !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px;
}

#DatasetForm .section-header .btn-primary.btn-just-icon:hover {
  background: #1d4ed8 !important;
  box-shadow: 0 2px 6px rgba(37,99,235,0.3);
}

/* Select All / Delete buttons — neutral (btn-danger misused here) */
#DatasetForm .section-header .btn-danger.btn-just-icon {
  background: transparent !important;
  border: 1.5px solid #e2e8f0 !important;
  color: #6b7280 !important;
  border-radius: 6px !important;
  height: 28px !important;
  padding: 0 0.7rem !important;
  font-size: 0.75rem !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px;
  transition: all 0.18s;
}

#DatasetForm .section-header .btn-danger.btn-just-icon:hover {
  border-color: #dc2626 !important;
  color: #dc2626 !important;
  background: #fee2e2 !important;
}

/* ── Fields grid / body area ─────────────────────────────────── */
#DatasetForm .dataset-section-body {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-top: none !important;
  border-radius: 0 0 8px 8px !important;
  padding: 0.5rem !important;
}

/* No-data placeholder card */
#DatasetForm .noDataMessage {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 90px !important;
  border: 2px dashed #e2e8f0 !important;
  border-radius: 8px !important;
  background: #f8fafc !important;
  box-shadow: none !important;
}

#DatasetForm .noDataMessage .form-control-label {
  font-size: 0.875rem !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: #9ca3af !important;
  font-weight: 400 !important;
}

/* ── Nested DataSource URL modal ────────────────────────────── */
#dataSourceModal .modal-content {
  border-radius: 10px !important;
  border: none !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2) !important;
  overflow: hidden;
}

#dataSourceModal .modal-header {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%) !important;
  border-bottom: none !important;
  padding: 0.85rem 1.25rem !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#dataSourceModal .modal-title span {
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
}

#dataSourceModal .breadcrumb-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

#dataSourceModal .btn-just-icon {
  background: rgba(255,255,255,0.15) !important;
  border: 1.5px solid rgba(255,255,255,0.35) !important;
  color: #fff !important;
  border-radius: 7px !important;
  height: 30px !important;
  padding: 0 0.8rem !important;
  font-size: 0.78rem !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px;
  transition: all 0.18s;
}

#dataSourceModal .btn-just-icon:hover {
  background: rgba(255,255,255,0.28) !important;
  border-color: rgba(255,255,255,0.6) !important;
}

#dataSourceModal .modal-body {
  padding: 1.25rem !important;
  background: #f8fafc;
}

#dataSourceModal textarea {
  border: 1px solid #e2e8f0 !important;
  border-radius: 7px !important;
  font-size: 0.85rem !important;
  color: #111827 !important;
  padding: 0.75rem !important;
  resize: vertical;
  min-height: 120px;
  width: 100% !important;
}

/* =============================================================
   ADMIN FORM COMPONENTS  (itemDetail.html, StockDetail.html,
   and any other admin detail modals using these classes)
   ============================================================= */

/* ── Grouped field sections ──────────────────────────────────── */
.admin-form-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}

.admin-form-section:last-child {
  margin-bottom: 0;
}

/* Sub-section heading (e.g. "Opening Stock", "Pricing") */
.admin-form-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #2563eb;
  border-left: 3px solid #2563eb;
  padding-left: 8px;
  margin-bottom: 0.9rem;
}

/* ── Field labels ─────────────────────────────────────────────── */
.admin-form-label {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.07em !important;
  color: #6b7280 !important;
  margin-bottom: 0.3rem !important;
  display: block;
}

/* Checkbox labels — inline, not uppercase */
.admin-form-checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: #374151 !important;
  cursor: pointer;
  margin-bottom: 0;
}

.admin-form-checkbox-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #2563eb;
  flex-shrink: 0;
  cursor: pointer;
}

/* ── Form controls ────────────────────────────────────────────── */
.admin-form-control {
  border: 1px solid #e2e8f0 !important;
  border-radius: 7px !important;
  font-size: 0.875rem !important;
  color: #111827 !important;
  background: #fff !important;
  height: 36px !important;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.admin-form-control:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1) !important;
  outline: none;
}

textarea.admin-form-control {
  height: auto !important;
  min-height: 80px;
  resize: vertical;
  padding: 0.5rem 0.75rem !important;
  line-height: 1.55;
}

select.admin-form-control {
  cursor: pointer;
  padding-right: 2rem !important;
}
