/* =============================================================================
   ICOF Enterprise Design System
   Official product identity — use everywhere. Do not introduce alternate themes.
   ============================================================================= */

/* Fonts loaded via non-blocking <link> in ent_shell_start / ent_auth_head.
   Do NOT @import Google Fonts here — a hung @import blocks ALL subsequent
   body scripts (jQuery / DataTables) until the network times out. */

:root {
  --brand-primary: #FF7A00;
  --brand-secondary: #FF9F1C;
  --brand-deep: #E56A00;
  --exec-dark: #0B1220;
  --exec-navy: #111827;
  --slate: #152033;
  --slate-elevated: #1C2A3F;
  --bg: #F4F6FA;
  --bg-elevated: #EEF2F7;
  --card: #FFFFFF;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --text: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --success: #059669;
  --warning: #D97706;
  --danger: #DC2626;
  --info: #2563EB;
  --accent: #7C3AED;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;

  --radius-btn: 12px;
  --radius-input: 12px;
  --radius-dropdown: 14px;
  --radius-card: 16px;
  --radius-table: 16px;
  --radius-modal: 20px;

  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 4px 12px rgba(15, 23, 42, 0.08), 0 16px 40px rgba(15, 23, 42, 0.10);
  --shadow-auth: 0 24px 64px rgba(0, 0, 0, 0.35);

  --font: 'Montserrat', Inter, 'Segoe UI', sans-serif;
  --sidebar-w: 280px;
  --header-h: 72px;
  --ease: 180ms cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Stacking hierarchy — chrome below modals; modals always win */
  --z-topbar: 1020;
  --z-sidebar: 1030;
  --z-overlay: 1035;
  --z-whatsapp: 1040;
  --z-modal-backdrop: 1050;
  --z-modal: 1060;
  --z-modal-popper: 1070;
}

/* ---------------------------------------------------------------------------
   Base
--------------------------------------------------------------------------- */
html { scroll-behavior: smooth; }

body.enterprise-app,
body.enterprise-auth,
body:has(.ent-sidebar) {
  font-family: var(--font) !important;
  background: var(--bg) !important;
  color: var(--text) !important;
  -webkit-font-smoothing: antialiased;
}

body.enterprise-app,
body:has(.ent-sidebar) {
  margin: 0;
  min-height: 100vh;
}

*, *::before, *::after { box-sizing: border-box; }

a { color: var(--brand-primary); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--brand-secondary); }

h1, h2, h3, h4, h5, h6,
.page-title, .block-title, .h1, .h2, .h3 {
  font-family: var(--font) !important;
  color: var(--text) !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
}

.text-muted, .fw-medium.text-muted { color: var(--text-secondary) !important; }

/* Hide legacy Dashmix chrome when enterprise shell is active */
body.enterprise-app #page-loader,
body.enterprise-auth #page-loader,
body:has(.ent-sidebar) #page-loader { display: none !important; }

body.enterprise-app #page-container.page-container2,
body.enterprise-app #page-container,
body:has(.ent-sidebar) #page-container.page-container2,
body:has(.ent-sidebar) #page-container {
  padding: 0 !important;
  background: var(--bg) !important;
  min-height: 100vh;
  display: block !important;
}

body.enterprise-app #sidebar,
body.enterprise-app #page-header,
body.enterprise-app .page-header-dark,
body.enterprise-app .bg-header-dark,
body.enterprise-app .content-header,
body.enterprise-app .js-sidebar-scroll,
body.enterprise-app .nav-main,
body.enterprise-app .side-scroll > #sidebar,
body:has(.ent-sidebar) > #page-container > #sidebar,
body:has(.ent-sidebar) #page-header {
  display: none !important;
}

body.enterprise-app #main-container,
body:has(.ent-sidebar) #main-container {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  background: transparent !important;
}

body.enterprise-app .content,
body:has(.ent-sidebar) #main-container > .content {
  padding: 0 0 var(--space-3) !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: none !important;
}

/* Legacy title row → enterprise page head feel */
body:has(.ent-sidebar) #main-container > .content > .d-md-flex h1,
body:has(.ent-sidebar) .block-title {
  font-size: 22px !important;
  letter-spacing: -0.02em;
}

/* Ensure main content sits in the enterprise content column */
.ent-content #main-container,
.ent-main #main-container {
  padding: 0 !important;
}

/* When legacy pages nest #main-container inside .ent-content, keep spacing */
.ent-content > #main-container > .content:first-child {
  padding-top: 0 !important;
}

/* Force enterprise layout even if body class is late */
.ent-sidebar ~ .ent-main {
  margin-left: calc(var(--sidebar-w) + 20px);
}

@media (max-width: 992px) {
  .ent-sidebar ~ .ent-main { margin-left: 0; }
}


/* ---------------------------------------------------------------------------
   Enterprise App Shell
--------------------------------------------------------------------------- */
.ent-shell {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

.ent-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: linear-gradient(180deg, #070B14 0%, var(--exec-dark) 40%, #0E1626 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 14px;
  left: 14px;
  bottom: 14px;
  height: auto;
  inset: 14px auto 14px 14px;
  z-index: var(--z-sidebar, 1030);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 22px;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.ent-sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 122, 0, 0.22), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 28%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 55%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 55%);
  z-index: 0;
}

.ent-sidebar > * {
  position: relative;
  z-index: 1;
}

.ent-sidebar-brand {
  padding: var(--space-3) var(--space-3) var(--space-2);
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}

.ent-sidebar-brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  padding: 6px;
  border: 1px solid rgba(255, 159, 28, 0.25);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.08);
}

.ent-sidebar-brand .brand-name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  margin-top: 12px;
  color: #fff;
  letter-spacing: 0.02em;
}

.ent-sidebar-brand .brand-alias {
  font-size: 10px;
  font-weight: 600;
  color: #94A3B8;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ent-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.28) transparent;
}

.ent-sidebar-nav::-webkit-scrollbar { width: 6px; }
.ent-sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.28);
  border-radius: 999px;
}

.ent-nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748B;
  padding: 14px 12px 8px;
}

.ent-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  margin-bottom: 4px;
  border-radius: 14px;
  color: rgba(226, 232, 240, 0.78) !important;
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background var(--ease), color var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.ent-nav-link:hover {
  background: rgba(255, 255, 255, 0.045);
  color: #fff !important;
  border-color: rgba(148, 163, 184, 0.10);
}

.ent-nav-link.active {
  background: linear-gradient(90deg, rgba(255, 122, 0, 0.16), rgba(255, 122, 0, 0.03));
  color: #FF9F1C !important;
  border-color: rgba(255, 122, 0, 0.22);
  box-shadow:
    inset 3px 0 0 #FF7A00,
    0 8px 20px rgba(0, 0, 0, 0.18);
}

.ent-nav-link .ent-nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 16px;
  flex-shrink: 0;
  color: #94A3B8;
}

.ent-nav-link.active .ent-nav-icon,
.ent-nav-link:hover .ent-nav-icon {
  background: rgba(255, 122, 0, 0.14);
  color: #FF7A00;
  border-color: rgba(255, 122, 0, 0.2);
}

.ent-sidebar-foot {
  padding: 10px 12px 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.10);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.22), transparent);
}

.ent-main {
  flex: 1;
  margin-left: calc(var(--sidebar-w) + 20px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.ent-topbar {
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4);
  position: sticky;
  top: 0;
  z-index: var(--z-topbar, 1020);
}

.ent-topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.ent-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  z-index: 5;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.ent-breadcrumb {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.ent-breadcrumb strong {
  color: var(--text);
  font-weight: 600;
}

.ent-user-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 6px 6px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: box-shadow var(--ease), border-color var(--ease);
}

.ent-user-btn:hover {
  box-shadow: var(--shadow);
  border-color: #d1d5db;
}

.ent-user-btn img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
}

.ent-user-meta {
  text-align: left;
  line-height: 1.2;
}

.ent-user-meta .name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.ent-user-meta .role {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

.ent-dropdown {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-dropdown) !important;
  box-shadow: var(--shadow-hover) !important;
  padding: 8px !important;
  min-width: 220px;
}

.ent-dropdown .dropdown-item {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.ent-dropdown .dropdown-item:hover {
  background: #FFF7ED;
  color: var(--brand-primary);
}

.ent-content {
  padding: var(--space-4);
  flex: 1;
}

.ent-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: var(--z-overlay, 1035);
  pointer-events: none;
}

body.ent-sidebar-open .ent-overlay {
  display: block;
  pointer-events: auto;
}
body.ent-sidebar-open .ent-sidebar { transform: translateX(0); }

/* ---------------------------------------------------------------------------
   Page header
--------------------------------------------------------------------------- */
.ent-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.ent-page-head h1 {
  font-size: 28px;
  margin: 0 0 6px;
  line-height: 1.2;
}

.ent-page-head p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

/* ---------------------------------------------------------------------------
   Cards / KPIs
--------------------------------------------------------------------------- */
.ent-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: var(--space-3);
  transition: box-shadow var(--ease), transform var(--ease), border-color var(--ease);
}

.ent-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--border-strong);
}

.ent-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.ent-card-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.ent-card-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 4px 0 0;
  font-weight: 500;
}

.ent-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.ent-kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: var(--space-3);
  position: relative;
  overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.ent-kpi:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-strong);
}

.ent-kpi::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--brand-primary);
}

.ent-kpi::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle at top right, rgba(255, 122, 0, 0.08), transparent 68%);
  pointer-events: none;
}

.ent-kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.ent-kpi-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
}

.ent-kpi-meta {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.ent-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FFF7ED;
  color: var(--brand-primary);
  font-size: 22px;
  margin-bottom: 14px;
}

.ent-kpi.dark {
  background: var(--exec-dark);
  border-color: transparent;
  color: #fff;
}

.ent-kpi.dark .ent-kpi-label,
.ent-kpi.dark .ent-kpi-meta { color: rgba(255, 255, 255, 0.65); }
.ent-kpi.dark .ent-kpi-value { color: #fff; }
.ent-kpi.dark .ent-kpi-icon {
  background: rgba(255, 122, 0, 0.18);
  color: var(--brand-primary);
}

/* ---------------------------------------------------------------------------
   Badges / Status
--------------------------------------------------------------------------- */
.ent-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.ent-badge.success { background: #ECFDF5; color: #047857; }
.ent-badge.warning { background: #FFFBEB; color: #B45309; }
.ent-badge.danger  { background: #FEF2F2; color: #B91C1C; }
.ent-badge.info    { background: #EFF6FF; color: #1D4ED8; }
.ent-badge.neutral { background: #F3F4F6; color: #4B5563; }
.ent-badge.orange  { background: #FFF7ED; color: #C2410C; }

/* ---------------------------------------------------------------------------
   Buttons
--------------------------------------------------------------------------- */
.btn,
.ent-btn {
  font-family: var(--font) !important;
  font-weight: 600 !important;
  border-radius: var(--radius-btn) !important;
  padding: 10px 18px !important;
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease), border-color var(--ease) !important;
}

.btn-primary,
.ent-btn-primary,
.app_btn.btn-primary,
.btn-hero.btn-primary {
  background: linear-gradient(180deg, #FF8A1A 0%, var(--brand-primary) 55%, var(--brand-deep) 100%) !important;
  border-color: var(--brand-deep) !important;
  color: #fff !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 8px 20px rgba(229, 106, 0, 0.28);
}

.btn-primary:hover,
.ent-btn-primary:hover,
.app_btn.btn-primary:hover {
  background: linear-gradient(180deg, #FF9A33 0%, var(--brand-secondary) 45%, var(--brand-primary) 100%) !important;
  border-color: var(--brand-primary) !important;
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 12px 28px rgba(229, 106, 0, 0.34);
  color: #fff !important;
}

.btn-alt-secondary,
.ent-btn-secondary {
  background: #fff !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

.btn-alt-secondary:hover,
.ent-btn-secondary:hover {
  background: #F9FAFB !important;
  border-color: #d1d5db !important;
  color: var(--text) !important;
}

.btn-success { background: var(--success) !important; border-color: var(--success) !important; }
.btn-danger  { background: var(--danger) !important; border-color: var(--danger) !important; }
.btn-warning { background: var(--warning) !important; border-color: var(--warning) !important; color: #111 !important; }

/* ---------------------------------------------------------------------------
   Forms
--------------------------------------------------------------------------- */
.form-control,
.form-select,
.select2-container--default .select2-selection--single {
  border-radius: var(--radius-input) !important;
  border: 1px solid var(--border) !important;
  min-height: 48px !important;
  padding: 10px 14px !important;
  font-family: var(--font) !important;
  font-size: 14px !important;
  color: var(--text) !important;
  background: #fff !important;
  box-shadow: none !important;
  transition: border-color var(--ease), box-shadow var(--ease) !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--brand-primary) !important;
  box-shadow: 0 0 0 4px rgba(255, 122, 0, 0.12) !important;
}

.form-label {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  margin-bottom: 8px !important;
}

.input-group-text {
  border-radius: var(--radius-input) 0 0 var(--radius-input) !important;
  border-color: var(--border) !important;
  background: #F9FAFB !important;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-group .form-control {
  border-radius: 0 var(--radius-input) var(--radius-input) 0 !important;
}

/* ---------------------------------------------------------------------------
   Tables
--------------------------------------------------------------------------- */
.ent-table-wrap,
.block.block-rounded,
.block {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-table) !important;
  box-shadow: var(--shadow) !important;
  overflow: visible;
}

.block-header,
.block-header-default {
  background: transparent !important;
  border-bottom: 1px solid var(--border) !important;
  padding: var(--space-2) var(--space-3) !important;
}

.block-content,
.block-content-full {
  padding: var(--space-3) !important;
}

.table {
  margin-bottom: 0 !important;
  font-size: 13.5px;
}

.table thead th {
  background: #F9FAFB !important;
  color: var(--text-secondary) !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border) !important;
  padding: 14px 16px !important;
  white-space: nowrap;
}

.table tbody td {
  padding: 14px 16px !important;
  border-color: #F3F4F6 !important;
  vertical-align: middle !important;
  color: var(--text);
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  background: #FCFCFD !important;
}

.table-hover > tbody > tr:hover > * {
  background: #FFF7ED !important;
}

.table-bordered { border: 0 !important; }
.table-bordered > :not(caption) > * > * { border-width: 0 0 1px !important; }

div.dataTables_wrapper {
  padding: 0 var(--space-2) var(--space-2);
}

.dataTables_filter input,
.dataTables_length select {
  border-radius: 12px !important;
  border: 1px solid var(--border) !important;
  min-height: 40px;
  padding: 6px 12px !important;
}

/* ---------------------------------------------------------------------------
   Progress / Wizard
--------------------------------------------------------------------------- */
.ent-progress {
  height: 10px;
  background: #F3F4F6;
  border-radius: 999px;
  overflow: hidden;
}

.ent-progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
  border-radius: 999px;
  transition: width 250ms ease;
}

.ent-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.ent-step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-2);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: border-color var(--ease), box-shadow var(--ease);
}

.ent-step.done { border-color: rgba(16, 185, 129, 0.35); background: #F0FDF4; }
.ent-step.current { border-color: rgba(255, 122, 0, 0.45); box-shadow: 0 0 0 4px rgba(255, 122, 0, 0.08); }
.ent-step.pending { opacity: 0.85; }

.ent-step-num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  background: #F3F4F6;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.ent-step.done .ent-step-num { background: #D1FAE5; color: #047857; }
.ent-step.current .ent-step-num { background: #FFEDD5; color: #C2410C; }

.ent-step-title { font-size: 13px; font-weight: 700; color: var(--text); margin: 0; }
.ent-step-desc { font-size: 12px; color: var(--text-secondary); margin: 4px 0 0; font-weight: 500; }

.ent-checklist { list-style: none; padding: 0; margin: 0; }
.ent-checklist li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #F3F4F6;
}
.ent-checklist li:last-child { border-bottom: 0; }

.ent-timeline {
  position: relative;
  padding-left: 28px;
}

.ent-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: #E5E7EB;
}

.ent-timeline-item {
  position: relative;
  padding-bottom: var(--space-2);
}

.ent-timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand-primary);
}

.ent-timeline-item .time {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.ent-timeline-item .event {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.ent-timeline-item .note {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ---------------------------------------------------------------------------
   Auth — premium executive glass
--------------------------------------------------------------------------- */
.ent-auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  background: var(--exec-dark);
}

.ent-auth-visual {
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(255, 122, 0, 0.16), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 100%, rgba(37, 99, 235, 0.10), transparent 50%),
    linear-gradient(165deg, #070B14 0%, #0B1220 42%, #111827 100%);
  color: #fff;
  padding: var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.ent-auth-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 30% 40%, black 20%, transparent 75%);
  pointer-events: none;
  opacity: 0.7;
}

.ent-auth-visual::after {
  content: '';
  position: absolute;
  width: 480px;
  height: 480px;
  right: -120px;
  bottom: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 0, 0.14), transparent 65%);
  pointer-events: none;
}

.ent-auth-visual > * { position: relative; z-index: 1; }

.ent-auth-visual .logo-wrap img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}

.ent-auth-visual h1 {
  font-size: 42px;
  line-height: 1.12;
  margin: 24px 0 12px;
  color: #fff !important;
  max-width: 540px;
  font-weight: 800 !important;
  letter-spacing: -0.03em;
}

.ent-auth-visual p {
  color: rgba(255, 255, 255, 0.68);
  font-size: 15px;
  font-weight: 500;
  max-width: 460px;
  line-height: 1.65;
}

.ent-auth-points {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
}

.ent-auth-points li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
}

.ent-auth-points i {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(255, 122, 0, 0.14);
  border: 1px solid rgba(255, 122, 0, 0.22);
  color: #FFB347;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.ent-auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  background:
    radial-gradient(ellipse at 70% 20%, rgba(255, 122, 0, 0.08), transparent 45%),
    linear-gradient(180deg, #0E1626 0%, #0B1220 100%);
  position: relative;
}

.ent-auth-panel::before {
  content: '';
  position: absolute;
  inset: 24px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.ent-auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 24px;
  box-shadow: var(--shadow-auth);
  padding: 40px;
  position: relative;
  z-index: 1;
}

.ent-auth-card h2 {
  font-size: 28px;
  margin: 0 0 8px;
  letter-spacing: -0.03em;
  color: var(--text) !important;
}

.ent-auth-card .lead {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: var(--space-3);
  line-height: 1.5;
}

.ent-auth-links {
  margin-top: var(--space-3);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.7;
}

.ent-auth-links a { font-weight: 700; }

.ent-pay-note {
  margin-top: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border);
  text-align: center;
}

.ent-pay-note img { height: 40px; margin-bottom: 8px; }
.ent-pay-note small { color: var(--text-muted); font-weight: 500; display: block; }

/* ---------------------------------------------------------------------------
   Alerts / Empty / Quick actions
--------------------------------------------------------------------------- */
.alert {
  border-radius: 14px !important;
  border: 1px solid transparent !important;
  font-weight: 500;
}

.alert-success { background: #ECFDF5 !important; color: #047857 !important; border-color: #A7F3D0 !important; }
.alert-warning { background: #FFFBEB !important; color: #B45309 !important; border-color: #FDE68A !important; }
.alert-danger  { background: #FEF2F2 !important; color: #B91C1C !important; border-color: #FECACA !important; }
.alert-info    { background: #EFF6FF !important; color: #1D4ED8 !important; border-color: #BFDBFE !important; }

.ent-empty {
  text-align: center;
  padding: var(--space-5) var(--space-3);
}

.ent-empty i {
  font-size: 40px;
  color: var(--brand-primary);
  background: #FFF7ED;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.ent-empty h3 { font-size: 18px; margin-bottom: 8px; }
.ent-empty p { color: var(--text-secondary); margin-bottom: 20px; font-weight: 500; }

.ent-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ent-quick-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--text) !important;
  font-weight: 600;
  font-size: 13px;
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.ent-quick-action:hover {
  border-color: rgba(255, 122, 0, 0.35);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  color: var(--text) !important;
}

.ent-quick-action i {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #FFF7ED;
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.ent-grid-2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.ent-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.ent-next-action {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  color: #fff;
  border-radius: var(--radius-card);
  padding: var(--space-3);
  box-shadow: var(--shadow);
}

.ent-next-action h3 { color: #fff !important; font-size: 18px; margin: 0 0 8px; }
.ent-next-action p { color: rgba(255, 255, 255, 0.72); margin: 0 0 20px; font-weight: 500; font-size: 14px; }

/* ---------------------------------------------------------------------------
   Modals
--------------------------------------------------------------------------- */
.modal-content {
  border: 0 !important;
  border-radius: var(--radius-modal) !important;
  box-shadow: var(--shadow-hover) !important;
  overflow: visible;
}

.modal-header {
  border-bottom: 1px solid var(--border) !important;
  padding: 20px 24px !important;
}

.modal-body { padding: 24px !important; }
.modal-footer {
  border-top: 1px solid var(--border) !important;
  padding: 16px 24px !important;
}

/* Do NOT blur the whole UI behind modals — causes "inaccessible / frosted" regressions */
.modal-backdrop.show {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  opacity: 0.62 !important;
}

/* ---------------------------------------------------------------------------
   Nav tabs (application detail etc.)
--------------------------------------------------------------------------- */
.nav-tabs-block .nav-link,
.nav-tabs .nav-link {
  border-radius: 12px !important;
  font-weight: 600 !important;
  color: var(--text-secondary) !important;
  margin-bottom: 6px;
}

.nav-tabs-block .nav-link.active,
.nav-tabs .nav-link.active {
  background: #FFF7ED !important;
  color: var(--brand-primary) !important;
  border-color: transparent !important;
}

/* ---------------------------------------------------------------------------
   WhatsApp button keep, loader hide polish
--------------------------------------------------------------------------- */
#whatsappButton { z-index: var(--z-whatsapp, 1040); }

.ent-skeleton {
  background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 37%, #F3F4F6 63%);
  background-size: 400% 100%;
  animation: entShimmer 1.2s ease infinite;
  border-radius: 10px;
}

@keyframes entShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* Opacity-only: a retained transform on .ent-content creates a containing block
   that traps Bootstrap position:fixed modals relative to the content pane. */
@keyframes entFadeUp {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ent-fade-up { animation: entFadeUp 220ms ease both; }

/* ---------------------------------------------------------------------------
   Responsive
--------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .ent-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ent-grid-2, .ent-grid-3 { grid-template-columns: 1fr; }
  .ent-steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 992px) {
  .ent-auth { grid-template-columns: 1fr; }
  .ent-auth-visual { display: none; }
  .ent-auth-panel {
    background:
      radial-gradient(ellipse at 50% 0%, rgba(255, 122, 0, 0.14), transparent 50%),
      linear-gradient(180deg, #070B14 0%, #0B1220 100%);
    min-height: 100vh;
    padding: var(--space-3);
  }
  .ent-auth-panel::before { display: none; }
  .ent-sidebar {
    transform: translateX(calc(-100% - 28px));
    left: 14px;
  }
  body.ent-sidebar-open .ent-sidebar {
    transform: translateX(0) !important;
    z-index: 1060 !important;
  }
  body.ent-sidebar-open .ent-overlay {
    z-index: 1055 !important;
  }
  .ent-main { margin-left: 0; }
  .ent-menu-toggle {
    display: inline-flex !important;
    pointer-events: auto !important;
    z-index: 1065 !important;
  }
  .ent-topbar { z-index: 1045 !important; }
  .ent-content { padding: var(--space-2); }
  .ent-page-head h1 { font-size: 22px; }
}

@media (max-width: 640px) {
  .ent-kpi-grid,
  .ent-steps,
  .ent-quick-grid { grid-template-columns: 1fr; }
  .ent-user-meta { display: none; }
  .ent-auth-card { padding: var(--space-3); border-radius: 20px; }
}
