/* JMC app — Bootstrap 5 layer */
:root {
  --fl-accent: #b45309;
  --fl-accent-hover: #92400e;
  --fl-navbar: #292524;
  --fl-sidebar-width: 280px;
}

html {
  scroll-behavior: smooth;
}

body.bg-body-tertiary {
  min-height: 100vh;
  padding-left: var(--fl-sidebar-width);
  padding-top: 48px;
}

main.container {
  max-width: none;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

main.container > p > .btn-primary,
main.container .row-actions .btn-primary {
  border-radius: 0;
  background: #428bca;
  border-color: #428bca;
}

main.container > .table-responsive {
  background: #fff;
  border: 1px solid #d9dee3;
  border-radius: 0;
  padding: 0;
}

main.container > .table-responsive .table {
  margin-bottom: 0;
}

/* Primary / links accent (content area only) */
main.container a:not(.btn):not(.nav-link):not(.navbar-brand):not(.page-link) {
  color: var(--fl-accent);
}

main.container a:not(.btn):not(.nav-link):not(.navbar-brand):not(.page-link):hover {
  color: var(--fl-accent-hover);
}

.fl-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--fl-sidebar-width);
  height: 100vh;
  background: #000;
  color: #d1d5db;
  overflow-y: auto;
  z-index: 1030;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.fl-sidebar-brand {
  background: #000;
  color: #f8fafc;
  font-weight: 700;
  padding: 9px 10px 10px;
  font-size: 1.05rem;
  border-bottom: 1px solid #111;
}

.fl-menu {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}

.fl-menu li a {
  display: flex;
  align-items: center;
  min-height: 40px;
  line-height: 1.25;
  padding-block: 0.35rem;
  padding: 0;
  color: #ccc;
  text-decoration: none;
  border-left: 0;
  border-bottom: 1px solid #111;
  font-size: 0.93rem;
  position: relative;
  overflow: visible;
  white-space: normal;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.fl-menu li a:hover {
  background: #111;
  color: #fff;
}

.fl-menu li a > i {
  margin-right: 10px;
  height: 40px;
  width: 40px;
  line-height: 40px;
  padding: 0;
  display: inline-block;
  text-align: center;
  flex: 0 0 40px;
  color: #b2b8bd;
  font-size: 13px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.fl-menu li a > span {
  display: block;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
  padding-inline-end: 0.5rem;
}

.fl-menu li a.is-active {
  background: #428bca;
  color: #fff;
  border-bottom-color: #428bca;
  font-weight: 600;
}

.fl-menu li a.is-active .fl-menu-dot {
  background: #fff;
}

.fl-menu li a.is-active > i {
  color: #fff;
}

.fl-menu li a:hover > i {
  color: #fff;
}

.fl-menu li.fl-has-submenu {
  border-bottom: 1px solid #111;
}

.fl-menu li.fl-accordion .fl-accordion-head .fl-submenu-parent {
  border-bottom: 0;
}

/* ERP-style accordion row: main nav label + chevron (AtomManager-like). */
.fl-accordion-head {
  display: flex;
  align-items: stretch;
  min-height: 40px;
}

.fl-accordion-head .fl-submenu-parent {
  flex: 1;
  min-width: 0;
}

.fl-accordion-toggle {
  flex: 0 0 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.fl-accordion-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.fl-accordion-toggle .fa {
  font-size: 14px;
  transition: transform 0.2s ease;
}

.fl-menu li.fl-accordion.is-open .fl-accordion-toggle .fa {
  transform: rotate(180deg);
}

.fl-menu li.fl-accordion:not(.is-open) > .fl-submenu {
  display: none;
}

/* Nested panel: slightly lighter strip + bullet dots beside labels */
.fl-submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #161616;
}

.fl-submenu.fl-submenu--erp {
  background: #1a1a1a;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.fl-submenu li a {
  position: relative;
  padding-inline-start: 2.65rem;
  min-height: 36px;
  line-height: 1.2;
  padding-block: 0.35rem;
  font-size: 0.8125rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #cfd5dc;
}

.fl-submenu.fl-submenu--erp li a::before {
  content: '';
  position: absolute;
  inset-inline-start: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.fl-submenu.fl-submenu--erp li a:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.fl-submenu.fl-submenu--erp li a.is-active::before {
  background: #fff;
  box-shadow: none;
}

.fl-submenu li:last-child a {
  border-bottom: 0;
}

.fl-submenu li a > span {
  white-space: normal;
  overflow-wrap: anywhere;
  display: block;
  line-height: 1.2;
  padding-inline-end: 0.5rem;
}

.fl-topbar {
  position: fixed;
  top: 0;
  left: var(--fl-sidebar-width);
  right: 0;
  height: 48px;
  background: #000;
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.25rem 1rem;
  z-index: 1029;
}

.fl-topbar .btn,
.fl-topbar .small,
.fl-topbar .btn-group-sm > .btn,
.fl-topbar .btn-sm {
  line-height: 1.2;
}

#flSidebarToggle {
  display: none;
}

.fl-topbar-right {
  display: flex;
  align-items: center;
  margin-inline-start: auto;
}

.fl-quick-btn {
  min-width: 110px;
  border-radius: 0;
  color: #fff !important;
  border: none !important;
  opacity: 0.9;
}

.fl-quick-btn:hover {
  opacity: 1;
  filter: none;
}

.fl-quick-blue { background: #3b82f6 !important; }
.fl-quick-green { background: #16a34a !important; }
.fl-quick-orange { background: #f59e0b !important; color: #1f2937 !important; }
.fl-quick-red { background: #dc2626 !important; }
.fl-quick-gray { background: #64748b !important; }
.fl-quick-cyan { background: #06b6d4 !important; color: #1f2937 !important; }

.fl-navbar .nav-link {
  color: rgba(255, 255, 255, 0.88) !important;
  border-radius: 0.375rem;
  padding: 0.5rem 0.65rem !important;
}

.fl-navbar .nav-link:hover,
.fl-navbar .nav-link:focus {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08);
}

.fl-brand {
  color: #fef3c7 !important;
  letter-spacing: -0.02em;
}

.fl-brand:hover {
  color: #fff !important;
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.35);
}

.navbar-toggler-icon {
  filter: invert(1);
}

/* Page titles */
.page-title {
  color: #1c1917;
  letter-spacing: -0.02em;
}

/* Cards: subtle lift */
.card.fl-card {
  border-radius: 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.fl-card > h2,
.fl-card > .fl-section-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
}

.fl-card > .fl-section-body {
  padding: 1rem;
}

/* Unified section rhythm across all list/detail pages */
main.container > .card.fl-card:last-child {
  margin-bottom: 0 !important;
}

.fl-section-body.pt-2 {
  padding-top: 0.7rem !important;
}

.fl-section-body > .table-responsive {
  margin-top: 0.35rem;
}

.fl-section-body > .table-responsive > .table,
.fl-section-body > table.table {
  margin-bottom: 0;
}

.fl-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.fl-kpi-card {
  padding: 0.85rem 0.95rem;
  margin-bottom: 0;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Generic page body rhythm so old/new templates render consistently */
.fl-card p {
  margin-bottom: 0.7rem;
}

.fl-card p:last-child {
  margin-bottom: 0;
}

.fl-card label {
  display: block;
  font-size: 0.9rem;
  color: #374151;
}

.fl-card input[type="text"],
.fl-card input[type="email"],
.fl-card input[type="tel"],
.fl-card input[type="number"],
.fl-card input[type="password"],
.fl-card select,
.fl-card textarea {
  width: 100%;
  max-width: 34rem;
  min-height: 34px;
  border: 1px solid #c7ccd1;
  border-radius: 0;
  background: #fff;
  padding: 0.34rem 0.5rem;
  font-size: 0.9rem;
}

.fl-card textarea {
  min-height: 72px;
}

.fl-card input:focus,
.fl-card select:focus,
.fl-card textarea:focus {
  outline: none;
  border-color: #428bca;
  box-shadow: 0 0 0 2px rgba(66, 139, 202, 0.2);
}

.fl-card .btn {
  border-radius: 0;
}

.fl-card .btn:not(.btn-primary):not(.btn-danger):not(.btn-outline-danger):not(.btn-outline-primary):not(.btn-outline-secondary) {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  color: #111827;
}

.fl-card .table thead th {
  background: #e9ebec;
  border-bottom: 1px solid #dbdee0;
  font-size: 0.86rem;
  font-weight: 700;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.fl-card .table tbody td {
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  font-size: 0.9rem;
  vertical-align: middle;
}

.fl-card .table tbody tr:hover {
  background: rgba(66, 139, 202, 0.06);
}

.fl-card .table tbody tr td a {
  text-decoration: none;
}

.fl-card .table tbody tr td a:hover {
  text-decoration: underline;
}

.fl-card .table td:first-child,
.fl-card .table th:first-child {
  padding-left: 0.7rem;
}

.fl-card .table td:last-child,
.fl-card .table th:last-child {
  padding-right: 0.7rem;
}

.fl-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.fl-toolbar .fl-toolbar-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.fl-toolbar + .table-responsive {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  margin-top: 0.5rem;
  padding-top: 0.55rem !important;
}

/* AtomManager-like content boxes for detailed pages */
.atm-box {
  border: 1px solid #d9dee3;
  border-radius: 0;
  background: #fff;
  margin-bottom: 1rem;
}

.atm-box-header {
  background: #f5f6f7;
  border-bottom: 1px solid #d9dee3;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.atm-box-content {
  padding: 0.9rem;
}

.atm-box-content .table-responsive {
  margin-top: 0.55rem;
}

.atm-meta {
  font-size: 0.88rem;
  color: #6b7280;
}

/* Stat numbers on dashboard */
.fl-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--fl-accent);
}

/* Mortality / danger zone */
.fl-card-danger {
  border-left: 4px solid #b91c1c !important;
}

/* Nested tables (e.g. group PO medicine lots) */
.table-nested {
  font-size: 0.875rem;
}

.table-nested th {
  font-weight: 600;
  background: #f5f5f4;
}

/* Row of form controls */
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.row-actions .form-control,
.row-actions .form-select {
  min-width: 8rem;
}

/* RTL: Arabic */
html[dir="rtl"] body {
  font-family: Tahoma, "Segoe UI", "Noto Sans Arabic", Arial, sans-serif;
}

html[dir="rtl"] body.bg-body-tertiary {
  padding-left: 0;
  padding-right: var(--fl-sidebar-width);
}

html[dir="rtl"] .fl-sidebar {
  left: auto;
  right: 0;
  border-right: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

html[dir="rtl"] .fl-topbar {
  left: 0;
  right: var(--fl-sidebar-width);
}

html[dir="rtl"] .fl-menu li a > i {
  margin-right: 0;
  margin-left: 10px;
}

html[dir="rtl"] .table th,
html[dir="rtl"] .table td {
  text-align: start;
}

html[dir="rtl"] .row-actions {
  flex-direction: row-reverse;
}

/* —— Theme: light (neutral bar, blue accents) —— */
html.theme-light {
  --fl-accent: #2563eb;
  --fl-accent-hover: #1d4ed8;
}

html.theme-light .page-title {
  color: var(--bs-emphasis-color, #0f172a);
}

html.theme-light .fl-topbar {
  background: #000 !important;
  border-bottom: 0 !important;
}

html.theme-light .fl-menu li a {
  color: #ccc;
}

html.theme-light .fl-menu li a:hover {
  background: #111;
  color: #fff;
}

html.theme-light .fl-menu-dot {
  background: rgba(204, 204, 204, 0.65);
}

html.theme-light .fl-menu li a.is-active {
  background: #428bca;
  color: #fff;
  border-bottom-color: #428bca;
}

html.theme-light .fl-menu li a.is-active .fl-menu-dot {
  background: #fff;
}

html.theme-light .fl-menu li a > i {
  color: #b2b8bd;
}

html.theme-light .fl-menu li a.is-active > i {
  color: #fff;
}

html.theme-light .fl-sidebar {
  background: #000;
  border-right-color: #111;
}

html.theme-light .fl-brand {
  color: var(--fl-accent) !important;
}

html.theme-light .fl-brand:hover {
  color: var(--fl-accent-hover) !important;
}

html.theme-light .navbar-toggler {
  border-color: rgba(15, 23, 42, 0.22);
}

html.theme-light .navbar-toggler-icon {
  filter: none;
}

html.theme-light .fl-topbar .text-white-50 {
  color: #b2b8bd !important;
}

html.theme-light .fl-topbar .btn-outline-light {
  color: #b2b8bd;
  border-color: #333;
}

html.theme-light .fl-topbar .btn-outline-light:hover {
  color: #fff;
  background: #111;
  border-color: #444;
}

html.theme-light .fl-topbar .btn-light {
  background: #428bca;
  color: #fff;
  border-color: #428bca;
}

html.theme-light main.container > .table-responsive {
  background: #fff;
  border-color: #d9dee3;
}

html.theme-light .table-nested th {
  background: var(--bs-tertiary-bg, #f1f5f9);
}

html.theme-light .fl-card > h2,
html.theme-light .fl-card > .fl-section-title {
  background: #f8fafc;
}

/* —— Theme: dark (Bootstrap color mode + tuned chrome) —— */
html.theme-dark .page-title {
  color: var(--bs-heading-color);
}

html.theme-dark .fl-topbar {
  background: linear-gradient(135deg, #0c0a09 0%, #1c1917 100%) !important;
}

html.theme-dark .table-nested th {
  background: var(--bs-tertiary-bg);
}

html.theme-dark .fl-card {
  border-color: rgba(148, 163, 184, 0.25);
}

html.theme-dark .fl-card > h2,
html.theme-dark .fl-card > .fl-section-title {
  border-bottom-color: rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.4);
}

html.theme-dark .fl-card label {
  color: #cbd5e1;
}

html.theme-dark .fl-card input[type="text"],
html.theme-dark .fl-card input[type="email"],
html.theme-dark .fl-card input[type="tel"],
html.theme-dark .fl-card input[type="number"],
html.theme-dark .fl-card input[type="password"],
html.theme-dark .fl-card select,
html.theme-dark .fl-card textarea {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
}

html.theme-dark main.container > .table-responsive {
  background: var(--bs-body-bg);
  border-color: rgba(148, 163, 184, 0.3);
}

/* —— Theme: ATMManager (classic admin black + blue) —— */
html.theme-atmmanager {
  --fl-accent: #428bca;
  --fl-accent-hover: #2f6fa3;
}

html.theme-atmmanager .fl-sidebar,
html.theme-atmmanager .fl-topbar,
html.theme-atmmanager .fl-sidebar-brand {
  background: #000 !important;
}

html.theme-atmmanager .fl-menu li a {
  color: #ccc;
  border-bottom-color: #111;
}

html.theme-atmmanager .fl-menu li a:hover {
  background: #111;
  color: #fff;
}

html.theme-atmmanager .fl-menu li a > i {
  color: #b2b8bd;
}

html.theme-atmmanager .fl-menu li a.is-active {
  background: #428bca;
  color: #fff;
  border-bottom-color: #428bca;
}

html.theme-atmmanager .fl-menu li a.is-active > i {
  color: #fff;
}

html.theme-atmmanager .fl-topbar .btn-outline-light {
  color: #b2b8bd;
  border-color: #333;
}

html.theme-atmmanager .fl-topbar .btn-outline-light:hover {
  color: #fff;
  background: #111;
  border-color: #444;
}

html.theme-atmmanager .fl-topbar .btn-light {
  background: #428bca;
  color: #fff;
  border-color: #428bca;
}

html.theme-atmmanager .fl-card > h2,
html.theme-atmmanager .fl-card > .fl-section-title {
  background: #f5f6f7;
}

html.theme-atmmanager .fl-card {
  border-radius: 0;
  border-color: #d9dee3;
}

html.theme-atmmanager .fl-card > h2,
html.theme-atmmanager .fl-card > .fl-section-title {
  border-bottom-color: #d9dee3;
}

html.theme-atmmanager .atm-box {
  border-color: #d9dee3;
}

html.theme-atmmanager .atm-box-header {
  background: #f5f6f7;
  border-bottom-color: #d9dee3;
}

html.theme-atmmanager .fl-card input[type="text"],
html.theme-atmmanager .fl-card input[type="email"],
html.theme-atmmanager .fl-card input[type="tel"],
html.theme-atmmanager .fl-card input[type="number"],
html.theme-atmmanager .fl-card input[type="password"],
html.theme-atmmanager .fl-card select,
html.theme-atmmanager .fl-card textarea {
  border-color: #c7ccd1;
  border-radius: 0;
}

@media (max-width: 991.98px) {
  body.bg-body-tertiary {
    padding-left: 0;
    padding-top: 48px;
  }
  .fl-sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 1041;
  }
  html[dir="rtl"] .fl-sidebar {
    transform: translateX(100%);
  }
  .fl-topbar {
    left: 0;
  }
  html[dir="rtl"] .fl-topbar {
    right: 0;
  }
  #flSidebarToggle {
    display: inline-block;
  }
  body.fl-sidebar-collapsed .fl-sidebar {
    transform: translateX(0);
  }

  body.fl-sidebar-collapsed::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1040;
  }

  main.container {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .fl-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fl-toolbar {
    align-items: stretch;
  }

  .fl-toolbar .fl-toolbar-actions {
    width: 100%;
  }

  .fl-toolbar .fl-toolbar-actions .btn {
    flex: 1 1 160px;
  }
}

@media (max-width: 575.98px) {
  .fl-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* Sortable grid headers (fl-grid-sort.js) */
th.fl-grid-th-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

th.fl-grid-th-sortable:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

html[data-bs-theme='dark'] th.fl-grid-th-sortable:hover {
  background-color: rgba(255, 255, 255, 0.06);
}

th.fl-grid-th-sortable:not(.fl-grid-sort-asc):not(.fl-grid-sort-desc)::after {
  content: '⇅';
  display: inline-block;
  margin-inline-start: 0.35em;
  font-size: 0.7em;
  opacity: 0.22;
  vertical-align: middle;
}

th.fl-grid-sort-asc::after {
  content: '▲';
  display: inline-block;
  margin-inline-start: 0.35em;
  font-size: 0.65em;
  opacity: 0.85;
  vertical-align: middle;
}

th.fl-grid-sort-desc::after {
  content: '▼';
  display: inline-block;
  margin-inline-start: 0.35em;
  font-size: 0.65em;
  opacity: 0.85;
  vertical-align: middle;
}

/* 2026 professional workspace refresh */
:root {
  --fl-accent: #2563eb;
  --fl-accent-hover: #1d4ed8;
  --fl-sidebar-width: 272px;
  --fl-navy: #0b1220;
  --fl-navy-soft: #111c30;
  --fl-surface: #ffffff;
  --fl-canvas: #f4f7fb;
  --fl-border: #e4e9f1;
  --fl-muted: #64748b;
  --fl-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}

body { font-family: Inter, "Segoe UI", Arial, sans-serif; color: #172033; }
body.bg-body-tertiary { background: var(--fl-canvas) !important; padding-top: 64px; }
main.container { padding: 1.75rem 2rem 3rem; }

.fl-sidebar { background: linear-gradient(180deg, #0b1425 0%, #0a101c 100%); border: 0; box-shadow: 10px 0 30px rgba(2, 8, 23, .12); }
.fl-sidebar-brand { min-height: 64px; padding: .8rem 1rem; display: flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; background: transparent; border-bottom: 1px solid rgba(255,255,255,.08); }
.fl-brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px; color: #fff; background: linear-gradient(145deg, #38bdf8, #2563eb); box-shadow: 0 8px 20px rgba(37,99,235,.32); }
.fl-brand-mark i { font-size: 1.2rem; }
.fl-brand-copy { display: flex; min-width: 0; flex-direction: column; line-height: 1.15; }
.fl-brand-copy strong { font-size: .97rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-brand-copy small { margin-top: .25rem; font-size: .63rem; font-weight: 500; color: #8fa0bb; letter-spacing: .035em; }
.fl-menu { padding: .75rem; }
.fl-menu li { margin: .12rem 0; }
.fl-menu li a { min-height: 42px; border: 0; border-radius: 9px; color: #aebbd0; font-size: .86rem; }
.fl-menu li a > i { width: 38px; height: 38px; line-height: 38px; margin-right: 6px; color: #7f90aa; font-size: .9rem; }
.fl-menu li a:hover { background: rgba(255,255,255,.06); color: #fff; }
.fl-menu li a.is-active { background: linear-gradient(135deg, #2563eb, #3b82f6); color: #fff; border: 0; box-shadow: 0 6px 18px rgba(37,99,235,.22); }
.fl-menu li.fl-has-submenu { border: 0; }
.fl-accordion-toggle { flex-basis: 34px; border: 0; border-radius: 8px; }
.fl-submenu, .fl-submenu.fl-submenu--erp { margin: .2rem 0 .35rem 1.15rem; padding: .2rem; border-left: 1px solid rgba(148,163,184,.2); background: transparent; }
.fl-submenu li a { min-height: 34px; padding: .4rem .6rem .4rem 1.15rem; border: 0; font-size: .78rem; color: #8494ad; }

.fl-topbar { left: var(--fl-sidebar-width); height: 64px; padding: 0 1.5rem; background: rgba(255,255,255,.93) !important; color: #334155; border-bottom: 1px solid var(--fl-border) !important; backdrop-filter: blur(16px); }
.fl-topbar .text-white-50 { color: #475569 !important; font-weight: 600; }
.fl-topbar .text-white { color: #475569 !important; }
.fl-topbar .btn-outline-light { color: #475569; border-color: #dbe2ea; }
.fl-topbar .btn-outline-light:hover { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.fl-topbar .btn-light { color: #fff; background: #2563eb; border-color: #2563eb; }
.fl-topbar .btn { border-radius: 8px; }

.fl-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.fl-eyebrow { margin: 0 0 .35rem; color: #718096; font-size: .68rem; font-weight: 800; letter-spacing: .14em; }
.page-title { color: #0f172a; font-weight: 800; letter-spacing: -.035em; }
.fl-heading-badge { padding: .55rem .8rem; border: 1px solid #dfe6ee; border-radius: 999px; background: #fff; color: #475569; font-size: .76rem; font-weight: 600; box-shadow: 0 4px 14px rgba(15,23,42,.04); }
.fl-heading-badge i { margin-right: .35rem; font-size: .62rem; }

.card.fl-card, .atm-box, main.container > .table-responsive { border: 1px solid var(--fl-border) !important; border-radius: 14px; background: var(--fl-surface); box-shadow: var(--fl-shadow) !important; overflow: hidden; }
.fl-card > h2, .fl-card > .fl-section-title, .atm-box-header { padding: 1rem 1.15rem; background: #fff; border-bottom: 1px solid var(--fl-border); }
.fl-card > .fl-section-body, .atm-box-content { padding: 1.15rem; }
.fl-card .btn, main.container > p > .btn-primary, main.container .row-actions .btn-primary { border-radius: 8px; font-weight: 600; }
.btn-primary { background: linear-gradient(135deg, #2563eb, #3b82f6); border-color: #2563eb; box-shadow: 0 5px 14px rgba(37,99,235,.18); }
.form-control, .form-select, .fl-card input[type="text"], .fl-card input[type="email"], .fl-card input[type="tel"], .fl-card input[type="number"], .fl-card input[type="password"], .fl-card select, .fl-card textarea { min-height: 42px; border-radius: 8px; border-color: #d8e0ea; }
.form-control:focus, .form-select:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.fl-card .table thead th { padding: .72rem .75rem; background: #f8fafc; border-bottom-color: #e5eaf0; color: #536176; font-size: .72rem; letter-spacing: .035em; text-transform: uppercase; }
.fl-card .table tbody td { padding: .72rem .75rem; border-color: #edf1f5; }
.fl-card .table tbody tr:hover { background: #f8fbff; }

.fl-stat-card { position: relative; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.fl-stat-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(15,23,42,.1) !important; }
.fl-stat-card .card-body { padding: 1.15rem; text-align: left !important; }
.fl-stat-card .display-6 { font-size: 1.65rem; color: #15213a; }
.fl-stat-card .small { font-size: .72rem; font-weight: 600; }
.fl-stat-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-bottom: .8rem; border-radius: 10px; font-size: .92rem; }
.fl-stat-blue .fl-stat-icon { color:#2563eb; background:#eaf2ff; } .fl-stat-violet .fl-stat-icon { color:#7c3aed; background:#f1ebff; }
.fl-stat-amber .fl-stat-icon { color:#d97706; background:#fff5df; } .fl-stat-cyan .fl-stat-icon { color:#0891b2; background:#e6f8fb; }
.fl-stat-red .fl-stat-icon { color:#dc2626; background:#feeeee; } .fl-stat-green .fl-stat-icon { color:#059669; background:#e6f8f1; }
.fl-quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .8rem; }
.fl-quick-link { position: relative; display: grid; grid-template-columns: 42px 1fr; grid-template-rows: auto auto; gap: .05rem .8rem; align-items: center; padding: 1rem; border: 1px solid #e4eaf1; border-radius: 11px; color: #172033 !important; text-decoration: none; transition: .2s ease; }
.fl-quick-link > i { grid-row: 1 / 3; display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 11px; color: #2563eb; background: #edf4ff; }
.fl-quick-link span { font-size: .86rem; font-weight: 700; }.fl-quick-link small { color: #8491a5; font-size: .7rem; }
.fl-quick-link:hover { transform: translateY(-2px); border-color: #bfdbfe; box-shadow: 0 10px 22px rgba(37,99,235,.08); }

.fl-login-page { padding: 0 !important; background: radial-gradient(circle at 15% 20%, #e8f2ff 0, transparent 32%), #f5f8fc !important; }
.fl-login-shell { display: grid; grid-template-columns: 1.08fr .92fr; width: min(960px, 96vw); min-height: 570px; overflow: hidden; border: 1px solid rgba(226,232,240,.8); border-radius: 24px; background: #fff; box-shadow: 0 28px 80px rgba(15,23,42,.14); }
.fl-login-visual { position: relative; display: flex; align-items: flex-end; overflow: hidden; padding: 3.2rem; color: #fff; background: linear-gradient(145deg, #0b1932 0%, #153567 55%, #2563eb 140%); }
.fl-login-visual::after { content:""; position:absolute; inset:0; opacity:.16; background-image: linear-gradient(rgba(255,255,255,.18) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.18) 1px,transparent 1px); background-size:42px 42px; mask-image:linear-gradient(to top,#000,transparent 90%); }
.fl-login-orbit { position:absolute; border:1px solid rgba(96,165,250,.28); border-radius:50%; }.fl-login-orbit-one{width:440px;height:440px;right:-180px;top:-170px}.fl-login-orbit-two{width:280px;height:280px;right:-80px;top:-90px}
.fl-login-visual-content { position: relative; z-index: 1; max-width: 390px; }.fl-login-emblem { display:flex;align-items:center;justify-content:center;width:54px;height:54px;margin-bottom:1.5rem;border-radius:16px;background:linear-gradient(145deg,#38bdf8,#2563eb);box-shadow:0 12px 30px rgba(14,165,233,.3);font-size:1.5rem; }
.fl-login-visual .fl-eyebrow { color:#7dd3fc; }.fl-login-visual h2 { margin-bottom:1rem;font-size:2.25rem;font-weight:800;letter-spacing:-.045em; }.fl-login-visual p:not(.fl-eyebrow){color:#bac9de;line-height:1.75}.fl-login-features{display:flex;flex-wrap:wrap;gap:.55rem;margin-top:1.6rem}.fl-login-features span{padding:.45rem .65rem;border:1px solid rgba(255,255,255,.13);border-radius:999px;background:rgba(255,255,255,.07);font-size:.7rem}.fl-login-features i{margin-right:.3rem;color:#7dd3fc}
.fl-login-panel { display:flex;flex-direction:column;justify-content:center;padding:3.5rem 3.25rem; }.fl-login-panel h1{font-weight:800;letter-spacing:-.035em;color:#111827}.fl-login-mobile-brand{display:none}.fl-login-form .form-label{font-size:.78rem;font-weight:700;color:#36445a}.fl-input-icon{position:relative;display:block}.fl-input-icon>i{position:absolute;z-index:2;left:14px;top:50%;transform:translateY(-50%);color:#94a3b8}.fl-input-icon .form-control{height:48px;padding-left:2.6rem;border-radius:10px}.fl-login-form .btn-lg{height:50px;border-radius:10px;font-size:.9rem}.fl-login-panel .btn-group .btn{font-size:.66rem;border-radius:7px}

html[dir="rtl"] .fl-topbar { right: var(--fl-sidebar-width); left: 0; } html[dir="rtl"] .fl-input-icon>i{left:auto;right:14px} html[dir="rtl"] .fl-input-icon .form-control{padding-left:.75rem;padding-right:2.6rem}
html.theme-dark body.bg-body-tertiary { background:#0d1421 !important; } html.theme-dark .fl-topbar{background:rgba(12,20,33,.94)!important;border-color:#263247!important} html.theme-dark .fl-topbar .text-white-50,html.theme-dark .fl-topbar .text-white{color:#dbe7f5!important} html.theme-dark .card.fl-card,html.theme-dark .atm-box{background:#141e2e;border-color:#29364a!important} html.theme-dark .fl-card>h2,html.theme-dark .fl-card>.fl-section-title{background:#141e2e} html.theme-dark .page-title{color:#f1f5f9}

@media (max-width: 991.98px) { body.bg-body-tertiary{padding-top:64px}.fl-topbar{left:0}.fl-login-shell{grid-template-columns:1fr;max-width:520px}.fl-login-visual{display:none}.fl-login-mobile-brand{display:flex;align-items:center;gap:.7rem;margin-bottom:2rem}.fl-quick-grid{grid-template-columns:1fr}.fl-page-heading{align-items:flex-start}.fl-heading-badge{display:none} }
@media (max-width: 575.98px) { main.container{padding:1.25rem .85rem 2rem}.fl-login-panel{padding:2.2rem 1.5rem}.fl-login-shell{min-height:auto;border-radius:18px}.fl-topbar{padding:0 .75rem}.fl-topbar-right .small span:last-child{display:none} }

.fl-error-page { padding: 2rem; background: radial-gradient(circle at 50% 0%, #e4efff 0, transparent 42%), #f5f8fc; }
.fl-error-shell { width: min(520px, 100%); padding: 3rem; border: 1px solid #e2e8f0; border-radius: 22px; background: rgba(255,255,255,.96); box-shadow: 0 24px 70px rgba(15,23,42,.12); }
.fl-error-shell h1 { margin-bottom: .8rem; color: #111827; font-size: 1.8rem; font-weight: 800; letter-spacing: -.035em; }
.fl-error-shell > p:not(.fl-eyebrow) { max-width: 420px; margin-inline: auto; line-height: 1.7; }
.fl-error-icon { display: flex; align-items: center; justify-content: center; width: 68px; height: 68px; margin: 0 auto 1.5rem; border-radius: 20px; color: #2563eb; background: #eaf2ff; box-shadow: inset 0 0 0 1px #dbeafe; font-size: 1.7rem; }
