/* ============================================================
   KYC Verification System — Main Stylesheet
   Light Professional Theme
   ============================================================ */

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  --primary:        #2563eb;
  --primary-dark:   #1d4ed8;
  --primary-light:  #eff6ff;
  --primary-muted:  #dbeafe;
  --secondary:      #64748b;
  --success:        #16a34a;
  --success-light:  #f0fdf4;
  --warning:        #d97706;
  --warning-light:  #fffbeb;
  --danger:         #dc2626;
  --danger-light:   #fef2f2;
  --info:           #0891b2;
  --info-light:     #ecfeff;
  --purple:         #7c3aed;
  --purple-light:   #f5f3ff;

  --sidebar-w:      260px;
  --topbar-h:       64px;
  --sidebar-bg:     #0f172a;
  --sidebar-text:   #94a3b8;
  --sidebar-active: #2563eb;

  --bg:             #f8fafc;
  --bg-card:        #ffffff;
  --bg-hover:       #f1f5f9;
  --border:         #e2e8f0;
  --border-focus:   #93c5fd;

  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;

  --radius:         10px;
  --radius-sm:      6px;
  --radius-lg:      14px;
  --shadow-sm:      0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:         0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.04);
  --shadow-lg:      0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.04);

  --font:           'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition:     all .18s ease;
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body { font-family: var(--font); background: var(--bg); color: var(--text-primary); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; height: 100vh; width: var(--sidebar-w);
  background: var(--sidebar-bg); display: flex; flex-direction: column;
  z-index: 1000; transition: transform .25s ease; overflow: hidden;
}
.sidebar-brand {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 18px 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  min-height: var(--topbar-h); position: relative;
}
.brand-icon {
  width: 40px; height: 40px; background: var(--primary); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; flex-shrink: 0;
}
.sidebar-logo-img { max-height: 40px; max-width: 110px; object-fit: contain; }
.brand-text { text-align: center; }
.brand-name { font-size: 13px; font-weight: 700; color: #fff; display: block; line-height: 1.3; }
.brand-name strong { color: #60a5fa; }
.brand-sub { font-size: 9px; color: var(--sidebar-text); text-transform: uppercase; letter-spacing: .5px; display: block; }
.sidebar-toggle-btn { background: none; border: none; color: #94a3b8; font-size: 16px; cursor: pointer; position: absolute; top: 10px; right: 10px; }

.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.06);
}
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 600; flex-shrink: 0; overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-name { font-size: 13px; font-weight: 600; color: #e2e8f0; }
.user-role { font-size: 11px; color: var(--sidebar-text); }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 0; }
.nav-list { list-style: none; }
.nav-divider {
  padding: 14px 20px 4px; font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .8px; color: #475569;
}
.nav-item .nav-link {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 20px; color: var(--sidebar-text); font-size: 13.5px;
  font-weight: 450; border-radius: 0; transition: var(--transition);
  position: relative; white-space: nowrap;
}
.nav-item .nav-link:hover { background: rgba(255,255,255,.05); color: #e2e8f0; }
.nav-item.active .nav-link {
  background: rgba(37,99,235,.2); color: #60a5fa;
  border-left: 3px solid var(--primary);
}
.nav-icon { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }
.nav-badge {
  margin-left: auto; background: var(--primary); color: #fff;
  font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 10px;
  letter-spacing: .5px;
}
.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 10px 0;
}
.logout-link {
  display: flex !important;
  align-items: center;
  gap: 11px;
  padding: 10px 20px !important;
  color: #f87171 !important;
  font-size: 13.5px;
  font-weight: 450;
  transition: var(--transition);
  text-decoration: none;
}
.logout-link:hover {
  background: rgba(239,68,68,.1) !important;
  color: #fca5a5 !important;
}
/* ── Sidebar logo image ──────────────────────────────────── */
.sidebar-logo-img {
  max-height: 36px;
  max-width: 140px;
  object-fit: contain;
}

/* ── Main Wrapper ─────────────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-w); min-height: 100vh;
  display: flex; flex-direction: column; transition: margin .25s ease;
}

/* ── Topbar ───────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h); background: var(--bg-card);
  border-bottom: 1px solid var(--border); display: flex; align-items: center;
  justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 200;
  box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-toggle {
  background: none; border: none; color: var(--text-secondary);
  font-size: 18px; cursor: pointer; padding: 6px; border-radius: var(--radius-sm);
  transition: var(--transition);
}
.topbar-toggle:hover { background: var(--bg-hover); color: var(--primary); }
.breadcrumb { font-size: 13px; }
.breadcrumb-item a { color: var(--text-secondary); }
.breadcrumb-item.active { color: var(--text-primary); font-weight: 500; }

.topbar-right { display: flex; align-items: center; gap: 10px; }
.mock-badge {
  background: #fef3c7; color: #92400e; font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px; border: 1px solid #fde68a;
}
.topbar-action {
  width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); cursor: pointer; transition: var(--transition);
}
.topbar-action:hover { background: var(--primary-muted); color: var(--primary); }
.topbar-user-btn {
  display: flex; align-items: center; gap: 8px; background: none; border: none;
  padding: 4px 8px; border-radius: var(--radius-sm); cursor: pointer;
  color: var(--text-primary); font-size: 13.5px; font-weight: 500;
  transition: var(--transition);
}
.topbar-user-btn:hover { background: var(--bg); }
.topbar-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--primary);
  color: #fff; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.topbar-user-btn::after { display: none; }

/* ── Page Content ─────────────────────────────────────────── */
.page-content { flex: 1; padding: 24px; }
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.page-header-title h1 { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.page-header-title p { font-size: 13px; color: var(--text-secondary); margin: 0; }
.flash-container { padding: 0 24px; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  background: transparent; display: flex; align-items: center; justify-content: space-between;
}
.card-header-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.card-body { padding: 20px; }
.card-footer { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--bg); }

/* ── Stat Cards ───────────────────────────────────────────── */
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; display: flex;
  align-items: center; gap: 14px; box-shadow: var(--shadow-sm);
  transition: var(--transition); height: 100%;
  min-height: 90px; overflow: hidden;
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-icon {
  width: 48px; height: 48px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.stat-icon.blue   { background: var(--primary-light); color: var(--primary); }
.stat-icon.green  { background: var(--success-light); color: var(--success); }
.stat-icon.orange { background: var(--warning-light); color: var(--warning); }
.stat-icon.red    { background: var(--danger-light); color: var(--danger); }
.stat-icon.purple { background: var(--purple-light); color: var(--purple); }
.stat-icon.cyan   { background: var(--info-light); color: var(--info); }
.stat-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .5px; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--text-primary); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.stat-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn { font-size: 13px; font-weight: 500; border-radius: var(--radius-sm); transition: var(--transition); }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-sm { font-size: 12px; padding: 4px 10px; }
.btn-xs { font-size: 11px; padding: 2px 8px; }
.btn-icon { width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); }

/* ── Forms ────────────────────────────────────────────────── */
.form-control, .form-select {
  font-size: 13.5px; border-color: var(--border); border-radius: var(--radius-sm);
  color: var(--text-primary); transition: var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.form-label { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); margin-bottom: 5px; }
.form-text { font-size: 11.5px; }

/* ── Tables ───────────────────────────────────────────────── */
.table { font-size: 13.5px; }
.table thead th {
  background: #f8fafc; font-size: 11.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .4px; color: var(--text-secondary); border-bottom: 1px solid var(--border);
  padding: 10px 14px; white-space: nowrap;
}
.table tbody td { padding: 11px 14px; vertical-align: middle; border-color: var(--border); }
.table tbody tr:hover { background: var(--bg-hover); }
.dataTables_wrapper .dataTables_filter input { border-radius: var(--radius-sm); border-color: var(--border); font-size: 13px; }
.dataTables_wrapper .dataTables_length select { border-radius: var(--radius-sm); border-color: var(--border); font-size: 13px; }

/* ── Badges / Status Pills ────────────────────────────────── */
.badge { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 20px; }
.status-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-success { background: var(--success-light); color: var(--success); }
.status-failed  { background: var(--danger-light); color: var(--danger); }
.status-pending { background: var(--warning-light); color: var(--warning); }
.status-processing { background: var(--info-light); color: var(--info); }
.status-manual  { background: var(--purple-light); color: var(--purple); }

/* ── Verification Category Cards ─────────────────────────── */
.ver-category-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; cursor: pointer; transition: var(--transition);
  background: var(--bg-card); position: relative; overflow: hidden;
}
.ver-category-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.ver-category-card.selected { border-color: var(--primary); background: var(--primary-light); }
.ver-category-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; margin-bottom: 10px;
}
.ver-category-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.ver-category-count { font-size: 11.5px; color: var(--text-muted); }

/* ── Contact Avatar ───────────────────────────────────────── */
.contact-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: #fff; flex-shrink: 0;
}
.avatar-blue   { background: var(--primary); }
.avatar-green  { background: var(--success); }
.avatar-orange { background: var(--warning); }
.avatar-purple { background: var(--purple); }

/* ── Action Buttons in Table ──────────────────────────────── */
.action-btn {
  width: 28px; height: 28px; border: none; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; cursor: pointer; transition: var(--transition);
}
.action-btn-verify  { background: var(--primary-light);  color: var(--primary); }
.action-btn-view    { background: var(--info-light);     color: var(--info); }
.action-btn-edit    { background: var(--warning-light);  color: var(--warning); }
.action-btn-delete  { background: var(--danger-light);   color: var(--danger); }
.action-btn-docs    { background: var(--purple-light);   color: var(--purple); }
.action-btn-notes   { background: var(--success-light);  color: var(--success); }
.action-btn:hover   { filter: brightness(.9); transform: scale(1.05); }

/* ── Modals ───────────────────────────────────────────────── */
.modal-header {
  background: var(--primary); color: #fff;
  border-radius: var(--radius) var(--radius) 0 0; padding: 16px 20px;
}
.modal-header .btn-close { filter: brightness(0) invert(1); }
.modal-title { font-size: 15px; font-weight: 600; }
.modal-body { padding: 22px; }
.modal-footer { padding: 14px 22px; border-color: var(--border); }

/* ── Tabs ─────────────────────────────────────────────────── */
.nav-tabs { border-color: var(--border); }
.nav-tabs .nav-link {
  color: var(--text-secondary); font-size: 13px; font-weight: 500;
  padding: 8px 16px; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.nav-tabs .nav-link.active { color: var(--primary); border-color: var(--border) var(--border) #fff; font-weight: 600; }
.tab-content { padding-top: 16px; }

/* ── Verification Result Panel ────────────────────────────── */
.result-field-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.result-field-row:last-child { border-bottom: none; }
.result-field-label { color: var(--text-secondary); font-weight: 500; flex: 1; }
.result-field-value { font-weight: 600; text-align: right; flex: 1; }
.match-icon-ok   { color: var(--success); font-size: 13px; }
.match-icon-fail { color: var(--danger);  font-size: 13px; }
.match-icon-warn { color: var(--warning); font-size: 13px; }

/* ── File Upload Zone ─────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 30px; text-align: center; cursor: pointer; transition: var(--transition);
  background: var(--bg);
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary); background: var(--primary-light);
}
.upload-zone i { font-size: 32px; color: var(--text-muted); margin-bottom: 10px; }
.upload-zone p { color: var(--text-secondary); font-size: 13px; margin: 0; }

/* ── Document Grid ────────────────────────────────────────── */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.doc-card {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 10px; text-align: center; position: relative;
  background: var(--bg-card); transition: var(--transition);
}
.doc-card:hover { box-shadow: var(--shadow); }
.doc-card-icon { font-size: 30px; color: var(--primary); margin-bottom: 6px; }
.doc-card-name { font-size: 11px; font-weight: 500; color: var(--text-primary); word-break: break-all; }
.doc-card-type { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.doc-card-del {
  position: absolute; top: 4px; right: 4px; background: var(--danger-light);
  color: var(--danger); border: none; width: 20px; height: 20px; border-radius: 4px;
  font-size: 10px; display: none; align-items: center; justify-content: center; cursor: pointer;
}
.doc-card:hover .doc-card-del { display: flex; }

/* ── KYC Bot ──────────────────────────────────────────────── */
.bot-chat {
  height: 420px; overflow-y: auto; padding: 16px;
  background: #f8fafc; border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px;
}
.chat-msg { display: flex; gap: 10px; max-width: 80%; }
.chat-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg.bot  { align-self: flex-start; }
.chat-bubble {
  padding: 10px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.5;
}
.chat-msg.user .chat-bubble { background: var(--primary); color: #fff; border-radius: 12px 12px 2px 12px; }
.chat-msg.bot  .chat-bubble { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-primary); border-radius: 12px 12px 12px 2px; }
.chat-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.chat-msg.bot  .chat-avatar { background: var(--primary); color: #fff; }
.chat-msg.user .chat-avatar { background: var(--success); color: #fff; }
.bot-input-row {
  display: flex; gap: 8px; padding: 12px;
  border: 1px solid var(--border); border-top: none;
  border-radius: 0 0 var(--radius) var(--radius); background: var(--bg-card);
}

/* ── Comparison Panel ─────────────────────────────────────── */
.compare-table th { background: #f1f5f9; font-size: 12px; }
.compare-match    { background: #f0fdf4; }
.compare-mismatch { background: #fef2f2; }
.compare-partial  { background: #fffbeb; }

/* ── Sidebar Overlay ──────────────────────────────────────── */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 999;
}

/* ── Progress Steps ───────────────────────────────────────── */
.step-wizard { display: flex; align-items: center; gap: 0; margin-bottom: 24px; }
.step-item { display: flex; align-items: center; flex: 1; }
.step-dot {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  background: var(--bg-card); flex-shrink: 0; z-index: 1;
}
.step-item.active .step-dot  { border-color: var(--primary); color: var(--primary); }
.step-item.done .step-dot    { border-color: var(--success); background: var(--success); color: #fff; }
.step-line { flex: 1; height: 2px; background: var(--border); }
.step-item.done + .step-item .step-line { background: var(--success); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-wrapper { margin-left: 0; }
}
@media (max-width: 576px) {
  .page-content { padding: 14px; }
  .topbar { padding: 0 14px; }
  .stat-value { font-size: 20px; }
}

/* ── Login Page ───────────────────────────────────────────── */
.login-wrapper {
  min-height: 100vh; background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #0f172a 100%);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-box {
  background: #fff; border-radius: 16px; width: 420px; max-width: 100%;
  padding: 40px 36px; box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.login-logo {
  width: 52px; height: 52px; background: var(--primary); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #fff; margin: 0 auto 16px;
}
.login-title { font-size: 22px; font-weight: 700; text-align: center; color: var(--text-primary); }
.login-sub { font-size: 13px; color: var(--text-muted); text-align: center; margin-bottom: 28px; }

/* ── Misc Utilities ───────────────────────────────────────── */
.text-truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cursor-pointer { cursor: pointer; }
.border-start-primary { border-left: 3px solid var(--primary) !important; }
.border-start-success { border-left: 3px solid var(--success) !important; }
.border-start-warning { border-left: 3px solid var(--warning) !important; }
.border-start-danger  { border-left: 3px solid var(--danger) !important; }
.fw-600 { font-weight: 600; }
.fs-12  { font-size: 12px !important; }
.fs-13  { font-size: 13px !important; }

/* ── Loading Spinner ──────────────────────────────────────── */
.spinner-overlay {
  position: fixed; inset: 0; background: rgba(255,255,255,.7);
  display: flex; align-items: center; justify-content: center; z-index: 9999;
}
.page-loader { display: none; }
.page-loader.active { display: flex; }

/* ── Notes Timeline ───────────────────────────────────────── */
.notes-timeline { position: relative; padding-left: 20px; }
.notes-timeline::before {
  content: ''; position: absolute; left: 7px; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
.note-item { position: relative; margin-bottom: 16px; }
.note-dot {
  position: absolute; left: -20px; top: 4px;
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--primary); background: #fff;
}
.note-body {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
}
.note-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.note-text { font-size: 13px; color: var(--text-primary); }

/* Dashboard Charts */
.chart-container { position: relative; height: 260px; }

/* ── Form Link action button ──────────────────────────────── */
.action-btn-share { background: #ecfeff; color: #0891b2; }
.action-btn-share:hover { filter: brightness(.9); }

/* ── Form submission status badges ───────────────────────── */
.badge.bg-warning-subtle  { background: #fffbeb !important; }
.badge.bg-info-subtle     { background: #ecfeff !important; }

/* ── Stat Card Complete Fix ───────────────────────────────── */
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 16px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-sm); transition: var(--transition);
  height: 100%; min-height: 90px; overflow: hidden; width: 100%;
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-card > div:last-child { min-width: 0; flex: 1; overflow: hidden; }
.stat-label {
  font-size: 11px !important; font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: .4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;
}
.stat-value {
  font-size: 22px !important; font-weight: 700; color: var(--text-primary);
  line-height: 1.2; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; display: block;
}
.stat-sub {
  font-size: 11px !important; color: var(--text-muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;
}
.stat-icon {
  width: 46px !important; height: 46px !important; flex-shrink: 0;
  border-radius: var(--radius); display: flex; align-items: center;
  justify-content: center; font-size: 19px;
}
/* Col sizing for stat cards */
.col-6.col-md-4.col-xl-2,
.col-6.col-md-3.col-lg-2 {
  min-width: 160px;
}

/* ── DataTable Width Fix ──────────────────────────────────── */
table.dataTable {
  width: 100% !important;
}
.dataTables_wrapper {
  width: 100%;
}
div.dataTables_scrollBody {
  width: 100% !important;
}
