/* ==========================================================================
   UMB FINANCE — Responsive Zero-Reload SPA Microfinance Company Panel
   Mobile (360px+) • Tablet (768px+) • Laptop (1280x720) • Desktop (1440px+)
   ========================================================================== */

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

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  background-color: #f4f6f9;
  color: #1f2937;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ---------- APP SHELL ---------- */
.erp-shell {
  min-height: 100vh;
  width: 100%;
  padding-top: 56px;
  position: relative;
}

/* ---------- FIXED FULL-WIDTH TOP HEADER ---------- */
.erp-topbar {
  height: 56px;
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  min-width: 0;
}

.topbar-brand {
  width: 220px;
  height: 56px;
  border-right: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  gap: 8px;
  background: #ffffff;
  flex-shrink: 0;
  transition: width 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.erp-shell.sidebar-hidden .topbar-brand {
  width: 184px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d91c24 0%, #991b1b 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 16px;
  box-shadow: 0 2px 6px rgba(217, 28, 36, 0.28);
  flex-shrink: 0;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text-top {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.4px;
  color: #111827;
}

.brand-text-bottom {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffffff;
  background: #d91c24;
  padding: 1px 6px;
  border-radius: 2px;
  margin-top: 2px;
  text-align: center;
}

.hamburger-btn {
  width: 44px;
  height: 56px;
  border: none;
  background: transparent;
  color: #374151;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.hamburger-btn:hover {
  background: #f3f4f6;
  color: #0284c7;
}

.topbar-right {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.topbar-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 13px;
  border-left: 1px solid #e5e7eb;
  font-size: 12px;
  font-weight: 700;
  color: #1f2937;
  white-space: nowrap;
  background: #ffffff;
  transition: background 0.15s ease, color 0.15s ease;
}

a.topbar-cell:hover {
  background: #f8fafc;
  color: #0284c7;
}

.session-select {
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  color: #1f2937;
  cursor: pointer;
  outline: none;
  padding-right: 2px;
}

.user-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a8a, #0284c7);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logout-form {
  display: flex;
  margin: 0;
}

.power-logout-btn {
  width: 46px;
  height: 56px;
  border: none;
  background: #dc2626;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.power-logout-btn:hover {
  background: #b91c1c;
}

/* ---------- SMOOTH OFF-CANVAS LEFT SIDEBAR ---------- */
.erp-sidebar {
  width: 220px;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  box-shadow: 2px 0 10px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 56px;
  left: 0;
  bottom: 0;
  z-index: 45;
  transform: translateX(0);
  transition: transform 0.55s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.55s ease;
}

.erp-shell.sidebar-hidden .erp-sidebar {
  transform: translateX(-100%);
  box-shadow: none;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 56px 0 0 0;
  background: rgba(15, 23, 42, 0.42);
  z-index: 42;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 24px;
}

.sidebar-scroll::-webkit-scrollbar {
  width: 5px;
}
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.sidebar-profile {
  padding: 14px 12px 12px;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
}

.profile-emblem {
  width: 44px;
  height: 44px;
  margin: 0 auto 6px;
  border-radius: 8px;
  border: 2px solid #eab308;
  background: linear-gradient(135deg, #fef9c3, #fde047);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
  color: #14532d;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.profile-company {
  font-size: 12px;
  font-weight: 800;
  color: #1f2937;
  letter-spacing: 0.4px;
  margin-top: 4px;
}

.profile-user {
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  margin-top: 3px;
}

.profile-role {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  color: #6b7280;
  margin-top: 4px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  display: inline-block;
}

/* Navigation & Silky Slow Accordion Submenus */
.nav-section-header {
  padding: 12px 16px 5px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #9ca3af;
  text-transform: uppercase;
}

.nav-item-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 700;
  color: #374151;
  letter-spacing: 0.2px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  text-align: left;
}

.nav-item-btn:hover {
  background: #f8fafc;
  color: #111827;
}

.nav-item-btn.active {
  background: #f1f5f9;
  color: #0f172a;
  border-left-color: #0284c7;
  font-weight: 800;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-chevron {
  width: 13px;
  height: 13px;
  color: #9ca3af;
  transition: transform 0.58s cubic-bezier(0.25, 0.8, 0.25, 1), color 0.4s ease;
  flex-shrink: 0;
}

.nav-group.open > .nav-item-btn .nav-chevron {
  transform: rotate(-90deg);
  color: #0284c7;
}

/* True AdminLTE / jQuery slideDown slow-motion vertical height animation */
.nav-submenu {
  height: 0;
  opacity: 0;
  overflow: hidden;
  background: #fafafa;
  will-change: height, opacity;
  transition:
    height 0.65s cubic-bezier(0.25, 0.8, 0.25, 1),
    opacity 0.55s ease;
}

.nav-group.open > .nav-submenu {
  opacity: 1;
}

.nav-submenu-inner {
  padding: 5px 0 8px;
  border-bottom: 1px solid #f1f5f9;
}

.nav-sublink {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7.5px 14px 7.5px 22px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: 0.25px;
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.25s ease;
}

.nav-sublink:hover {
  background: #eff6ff;
  color: #0369a1;
  padding-left: 26px;
}

.nav-sublink.active {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 800;
}

/* Hollow circular ring bullet exactly like client screenshot 3 */
.sub-ring {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid #9ca3af;
  background: transparent;
  flex-shrink: 0;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.nav-sublink:hover .sub-ring,
.nav-sublink.active .sub-ring {
  border-color: #0284c7;
  background: #bae6fd;
}

/* ---------- MAIN WORKSPACE WRAPPER ---------- */
.erp-main-wrap {
  margin-left: 220px;
  width: calc(100% - 220px);
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  transition: margin-left 0.55s cubic-bezier(0.25, 0.8, 0.25, 1), width 0.55s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.erp-shell.sidebar-hidden .erp-main-wrap {
  margin-left: 0;
  width: 100%;
}

.erp-content {
  padding: 8px 14px 20px;
  width: 100%;
  flex: 1;
}

/* Crisp Top Progress Bar + Compact Glass Pill Loader (Zero White Washout!) */
.spa-view-container {
  width: 100%;
}

.spa-view-container.spa-enter {
  animation: spaFadeSlide 0.2s ease-out;
}

.spa-top-progress {
  position: fixed;
  top: 56px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #5b21b6, #7c3aed, #a855f7);
  z-index: 90;
  opacity: 0;
  transition: width 0.35s ease, opacity 0.2s ease;
  pointer-events: none;
}

.spa-top-progress.active {
  width: 82%;
  opacity: 1;
}

.spa-top-progress.done {
  width: 100%;
  opacity: 0;
  transition: width 0.16s ease, opacity 0.25s ease 0.1s;
}

/* Full-body translucent overlay + centered Deep Purple ("oti beguni") 3-bar bouncing wave loader */
.spa-bars-overlay {
  position: fixed;
  inset: 56px 0 0 0;
  background: rgba(255, 255, 255, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 95;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.spa-bars-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.spa-bars-loader {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 54px;
}

.spa-bar {
  width: 9px;
  height: 46px;
  border-radius: 2px;
  background: linear-gradient(180deg, #6d28d9 0%, #4c1d95 100%);
  box-shadow: 0 3px 10px rgba(91, 33, 182, 0.32);
  animation: spaBarWave 0.9s ease-in-out infinite;
}

.spa-bar-1 { animation-delay: 0s; }
.spa-bar-2 { animation-delay: 0.16s; }
.spa-bar-3 { animation-delay: 0.32s; }

@keyframes spaBarWave {
  0%, 100% { transform: scaleY(0.32); opacity: 0.65; }
  45% { transform: scaleY(1); opacity: 1; }
}

@keyframes spaFadeSlide {
  from { opacity: 0.92; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.breadcrumb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}

.page-heading {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #374151;
  text-transform: uppercase;
}

.breadcrumb-trail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
}

/* ---------- RED TICKER BANNER ---------- */
.ticker-banner {
  display: flex;
  align-items: stretch;
  height: 44px;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 2px 5px rgba(220, 38, 38, 0.18);
}

.ticker-bell-box {
  width: 68px;
  background: #b91c1c;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ticker-track {
  flex: 1;
  background: #e11d25;
  color: #ffffff;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.ticker-text {
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.35px;
  padding-left: 100%;
  animation: erpMarquee 28s linear infinite;
}

.ticker-track:hover .ticker-text {
  animation-play-state: paused;
}

@keyframes erpMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ---------- ROW 1: QUICK ACTIONS (ALL 8 IN 1 ROW AT 1280px!) + BRANCH + CLOCK ---------- */
.top-widget-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px 132px;
  gap: 12px;
  margin-bottom: 14px;
  align-items: stretch;
}

.quick-actions-card {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  padding: 12px 10px;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
}

.quick-red-tile {
  height: 64px;
  border-radius: 8px;
  background: linear-gradient(180deg, #f1242b 0%, #dc1920 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 3px;
  text-align: center;
  box-shadow: 0 3px 6px rgba(220, 25, 32, 0.28);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.quick-red-tile:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #dc1920 0%, #b91c1c 100%);
  box-shadow: 0 5px 12px rgba(185, 28, 28, 0.35);
}

.quick-red-tile span {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.15px;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.branch-card {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  border-top: 2px solid #0284c7;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.branch-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #0284c7;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 6px;
}

.branch-label {
  font-size: 10.5px;
  font-weight: 800;
  color: #374151;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}

.branch-select {
  width: 100%;
  padding: 6px 7px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #1f2937;
  background: #ffffff;
  outline: none;
  cursor: pointer;
}

.branch-select:focus {
  border-color: #0284c7;
}

.clock-card {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- ROW 2: 3 BALANCE CARDS ---------- */
.balance-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.balance-card {
  background: #ffffff;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: stretch;
  min-height: 80px;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.balance-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.balance-icon-box {
  width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.bg-classic-green { background-color: #008000; }
.bg-classic-red { background-color: #e11d25; }
.bg-classic-navy { background-color: #003b5c; }
.bg-classic-purple { background-color: #8b00e8; }
.bg-classic-cyan { background-color: #00c0ef; }
.bg-classic-amber { background-color: #d97706; }

.balance-body {
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.balance-title {
  font-size: 11.5px;
  font-weight: 600;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.balance-value {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
  margin-top: 3px;
}

/* ---------- ROW 3: 4 BIG COLORED KPI CARDS ---------- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.kpi-box {
  border-radius: 5px;
  color: #ffffff;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 116px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.kpi-inner {
  padding: 14px 15px 12px;
  position: relative;
  z-index: 2;
}

.kpi-amount {
  font-size: 25px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.3px;
}

.kpi-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 8px;
  opacity: 0.96;
}

.kpi-watermark {
  position: absolute;
  right: 12px;
  top: 14px;
  opacity: 0.16;
  z-index: 1;
  pointer-events: none;
}

.kpi-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.14);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #ffffff;
  transition: background 0.15s ease;
  z-index: 2;
}

.kpi-footer:hover {
  background: rgba(0, 0, 0, 0.24);
}

/* ---------- ROW 4: 4 COLLECTION & DISBURSEMENT BREAKDOWN CARDS ---------- */
.breakdown-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.breakdown-card {
  background: #ffffff;
  border-radius: 5px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  transition: transform 0.15s ease;
}

.breakdown-card:hover {
  transform: translateY(-1px);
}

.breakdown-head {
  padding: 13px 15px;
  color: #ffffff;
}

.breakdown-head-title {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.4px;
  line-height: 1.1;
}

.breakdown-head-sub {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 4px;
  opacity: 0.94;
}

.breakdown-list {
  padding: 4px 0;
}

.breakdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 11.5px;
  font-weight: 700;
  color: #4b5563;
}

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

.breakdown-item-highlight {
  background: #f0fdf4;
  color: #14532d;
  font-weight: 800;
  border-bottom: 1px solid #dcfce7;
}

/* Tenant Entity Type Badges (MFI / Sec 8 / NBFC) */
.entity-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  line-height: 1.4;
}

.entity-mfi {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.entity-sec8 {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.entity-nbfc {
  background: #f3e8ff;
  color: #6b21a8;
  border: 1px solid #d8b4fe;
}

.pill-blue {
  background: #0284c7;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 999px;
}

.pill-cyan {
  background: #06b6d4;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 999px;
}

.pill-green {
  background: #16a34a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 999px;
}

.pill-gray {
  background: #6b7280;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 999px;
}

/* ---------- BACK TO HOME BUTTON ---------- */
.btn-back-dash {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #003b5c;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 59, 92, 0.25);
  transition: background 0.15s ease;
}

.btn-back-dash:hover {
  background: #0284c7;
}

/* ---------- LOGIN PAGE ---------- */
.login-page {
  min-height: 100vh;
  width: 100%;
  background: linear-gradient(135deg, #003b5c 0%, #0f172a 55%, #7f1d1d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.login-header {
  background: #ffffff;
  border-bottom: 3px solid #e11d25;
  padding: 24px 24px 18px;
  text-align: center;
}

.login-body {
  padding: 22px 24px 26px;
}

.login-field {
  margin-bottom: 14px;
}

.login-field label {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  color: #374151;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.login-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13.5px;
  outline: none;
}

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

.login-submit-btn {
  width: 100%;
  padding: 11px 16px;
  background: #e11d25;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  cursor: pointer;
  margin-top: 6px;
}

.login-submit-btn:hover {
  background: #b91c1c;
}

.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}

.login-hint {
  margin-top: 16px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 11.5px;
  color: #475569;
  line-height: 1.5;
}

/* Color utility classes for sidebar icons */
.ic-green { color: #16a34a; }
.ic-sky { color: #0284c7; }
.ic-amber { color: #854d0e; }
.ic-navy { color: #0f4c81; }
.ic-red { color: #dc2626; }
.ic-slate { color: #334155; }
.ic-blue { color: #1d4ed8; }
.ic-maroon { color: #991b1b; }

/* ==========================================================================
   FULL MULTI-DEVICE RESPONSIVE BREAKPOINTS (LAPTOP / TABLET / MOBILE)
   ========================================================================== */

/* Compact Laptop (1024px – 1220px): wrap quick actions to 4x2 neatly */
@media (max-width: 1219px) {
  .quick-actions-card {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .topbar-cell {
    padding: 0 10px;
    font-size: 11.5px;
  }
}

/* Tablet & Small Laptop (<= 991px): Overlay Drawer Sidebar + Adaptive Grids */
@media (max-width: 991px) {
  .topbar-brand {
    width: auto;
    padding: 0 12px;
  }
  .erp-shell.sidebar-hidden .topbar-brand {
    width: auto;
  }
  .topbar-hide-md {
    display: none;
  }
  /* On tablet/mobile, content ALWAYS spans 100% and sidebar overlays smoothly */
  .erp-main-wrap,
  .erp-shell.sidebar-hidden .erp-main-wrap {
    margin-left: 0;
    width: 100%;
  }
  .erp-shell:not(.sidebar-hidden) .sidebar-backdrop {
    display: block;
    opacity: 1;
  }
  .top-widget-row {
    grid-template-columns: 1fr 1fr;
  }
  .quick-actions-card {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .balance-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .balance-icon-box {
    width: 62px;
  }
  .kpi-row,
  .breakdown-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

/* Mobile Phones (<= 639px): Clean Touch-First Mobile ERP Layout (0px overflow!) */
@media (max-width: 639px) {
  .erp-content {
    padding: 10px 10px 22px;
  }
  .topbar-brand {
    padding: 0 8px;
    gap: 6px;
  }
  .brand-mark {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  .brand-text-top {
    font-size: 13px;
  }
  .brand-text-bottom {
    font-size: 9px;
    padding: 1px 4px;
  }
  .topbar-hide-sm,
  .topbar-session-prefix,
  .topbar-user-name {
    display: none;
  }
  .topbar-cell {
    padding: 0 8px;
  }
  .power-logout-btn {
    width: 42px;
  }
  .ticker-banner {
    height: 38px;
  }
  .ticker-bell-box {
    width: 46px;
  }
  .ticker-text {
    font-size: 12px;
  }
  .top-widget-row {
    grid-template-columns: 1fr 124px;
    gap: 10px;
  }
  .quick-actions-card {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
  }
  .quick-red-tile {
    height: 60px;
  }
  .quick-red-tile span {
    font-size: 10px;
  }
  .balance-row,
  .kpi-row,
  .breakdown-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .balance-icon-box {
    width: 72px;
  }
  .kpi-amount {
    font-size: 22px;
  }
  .coming-soon-card {
    padding: 28px 16px;
    margin: 12px auto;
  }
  .coming-soon-title {
    font-size: 18px;
  }
}

/* ==========================================================================
   MEMBER MODULE — SEARCH FILTER, GREEN TABLE LIST & FULL-PAGE 5-TAB FORM
   ========================================================================== */

.erp-alert-success {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #ecfdf5;
  border: 1px solid #86efac;
  color: #166534;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 12px;
}

.erp-alert-close {
  border: none;
  background: transparent;
  color: #166534;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.erp-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
  width: 100%;
}

.erp-card-head {
  padding: 8px 14px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 11.5px;
  font-weight: 800;
  color: #0f3d5e;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  background: #f8fafc;
}

.erp-card-head-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.erp-card-body {
  padding: 10px 14px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px 12px;
  align-items: end;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.filter-field label {
  font-size: 10.5px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.25px;
  text-transform: uppercase;
}

.filter-inline-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.erp-control {
  width: 100%;
  padding: 7px 10px;
  border: 1.5px solid #64748b;
  border-radius: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: #0f172a;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
  outline: none;
  font-family: inherit;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.erp-control::placeholder {
  color: #64748b;
  font-weight: 500;
  opacity: 0.92;
}

.erp-control:hover {
  border-color: #334155;
}

.erp-control:focus {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.18);
  background: #ffffff;
}

.erp-control-sm {
  padding: 6px 9px;
  border: 1.5px solid #64748b;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  background: #ffffff;
  color: #0f172a;
}

.erp-control-sm:focus {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.16);
  outline: none;
}

.uppercase-inp {
  text-transform: uppercase;
}

.filter-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-cyan {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #00b8e6;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 7px 15px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-cyan:hover {
  background: #009bc2;
}

.btn-green-add {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #00a65a;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-green-add:hover {
  background: #008d4c;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 6.5px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-outline:hover {
  background: #f3f4f6;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.showing-text {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
}

.quick-search-box {
  display: flex;
  align-items: stretch;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  overflow: hidden;
  background: #ffffff;
}

.quick-search-box input {
  border: none;
  outline: none;
  padding: 5.5px 10px;
  font-size: 12px;
  width: 195px;
}

.quick-search-box button {
  border: none;
  border-left: 1px solid #e5e7eb;
  background: #f8fafc;
  padding: 0 9px;
  cursor: pointer;
  color: #374151;
}

.pagination-strip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.pg-btn {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #374151;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  cursor: pointer;
}

.pg-btn:last-child {
  border-right: none;
}

.pg-btn.active {
  background: #0284c7;
  color: #ffffff;
}

.pg-btn.disabled {
  color: #9ca3af;
  cursor: default;
}

/* Responsive Scrollable Member Directory Table */
.table-scroll-box {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
}

.member-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  text-align: left;
}

.member-table thead th {
  background: #0f3d5e;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 8px 8px;
  border-bottom: 2px solid #0284c7;
  white-space: nowrap;
}

.member-table tbody td {
  padding: 7px 8px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
  color: #1e293b;
}

.member-table tbody tr.row-active {
  background: #ffffff;
}

.member-table tbody tr.row-active:nth-child(even) {
  background: #f8fafc;
}

.member-table tbody tr.row-active:hover {
  background: #eff6ff;
}

.member-table tbody tr.row-inactive {
  background: #fff5f5;
}

.empty-table-cell {
  text-align: center;
  padding: 28px 16px !important;
  color: #6b7280;
  background: #ffffff;
}

.nowrap-cell {
  white-space: nowrap;
}

.center-cell {
  text-align: center;
}

.member-name-link {
  color: #0369a1;
  font-weight: 800;
  display: inline-block;
}

.member-name-link:hover {
  text-decoration: underline;
}

.member-code-sub {
  font-weight: 800;
  color: #111827;
  font-size: 11px;
  margin-top: 2px;
}

.cibil-pill {
  font-weight: 700;
  color: #854d0e;
  white-space: nowrap;
}

.verify-ok {
  color: #15803d;
  font-weight: 900;
}

.verify-miss {
  color: #dc2626;
  font-weight: 900;
}

.muted-txt {
  color: #6b7280;
}

.kyc-badge-ok {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 3px;
  background: #16a34a;
  color: #ffffff;
  font-weight: 900;
  font-size: 12px;
}

.kyc-badge-pending {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 3px;
  background: #d97706;
  color: #ffffff;
  font-weight: 900;
  font-size: 12px;
}

.status-circle-ok {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #15803d;
  color: #ffffff;
  font-weight: 900;
  font-size: 11px;
}

.status-circle-off {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #dc2626;
  color: #ffffff;
  font-weight: 900;
  font-size: 11px;
}

/* Task Dropdown */
.task-dropdown {
  position: relative;
  display: inline-block;
}

.task-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #374151;
  cursor: pointer;
  white-space: nowrap;
}

.task-btn:hover {
  background: #f1f5f9;
}

.task-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 3px;
  min-width: 165px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
  z-index: 60;
  overflow: hidden;
}

.task-menu.open {
  display: block;
}

.task-menu-right {
  left: auto;
  right: 0;
}

.branch-status-active {
  display: inline-block;
  background: #00a65a;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 3px 9px;
  border-radius: 3px;
}

.branch-status-inactive {
  display: inline-block;
  background: #dc2626;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 3px 9px;
  border-radius: 3px;
}

.branch-action-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-eye-cyan {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 28px;
  height: 26px;
  padding: 0 8px;
  background: #00b8e6;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-eye-cyan:hover {
  background: #0095bd;
}

.table-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.task-menu a,
.task-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 11px;
  font-size: 11.5px;
  font-weight: 600;
  color: #1f2937;
  background: #ffffff;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
}

.task-menu a:hover,
.task-menu button:hover {
  background: #eff6ff;
  color: #0369a1;
}

.task-menu button.task-danger {
  color: #dc2626;
  border-bottom: none;
}

/* FULL-PAGE ADD / EDIT MEMBER FORM (100% Full Width — NOT a Popup!) */
.fullpage-form-shell {
  width: 100%;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.form-cyan-header {
  background: #00c4f0;
  color: #ffffff;
  padding: 13px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.form-cyan-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.form-cyan-back {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.form-cyan-back:hover {
  background: rgba(255, 255, 255, 0.34);
}

.form-body-wrap {
  padding: 16px 20px 20px;
}

.form-error-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 10px 14px;
  border-radius: 5px;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 14px;
}

.form-error-box.hidden {
  display: none;
}

.member-tab-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.member-tab-btn {
  padding: 10px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 5px 5px 0 0;
  font-size: 11.5px;
  font-weight: 700;
  color: #4b5563;
  cursor: pointer;
  letter-spacing: 0.3px;
  margin-bottom: -2px;
  transition: color 0.15s ease, background 0.15s ease;
}

.member-tab-btn:hover {
  color: #0284c7;
  background: #f8fafc;
}

.member-tab-btn.active {
  background: #ffffff;
  color: #0284c7;
  border-color: #e5e7eb;
  border-top: 2px solid #00c4f0;
  border-bottom: 2px solid #ffffff;
  font-weight: 800;
}

.member-tab-pane {
  display: none;
}

.member-tab-pane.active {
  display: block;
  animation: spaFadeSlide 0.22s ease-out;
}

.form-section-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: #0284c7;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.35px;
  margin: 18px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #cbd5e1;
}

.same-addr-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1f2937;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}

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

.form-pair {
  display: grid;
  grid-template-columns: 165px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.form-pair > label {
  font-size: 11px;
  font-weight: 800;
  color: #374151;
  text-transform: uppercase;
  line-height: 1.25;
}

.req {
  color: #dc2626;
}

.input-with-btn {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.input-with-btn .erp-control {
  border-radius: 4px 0 0 4px;
}

.btn-aadhar-send {
  border: none;
  background: #0284c7;
  color: #ffffff;
  padding: 0 12px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-size: 13px;
}

.btn-aadhar-send:hover {
  background: #0369a1;
}

.radio-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.radio-opt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: #374151;
  cursor: pointer;
}

.upload-tag {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #15803d;
}

.upload-tag a {
  color: #0284c7;
  text-decoration: underline;
}

.form-footer-bar {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.form-footer-left,
.form-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-save-green {
  background: #00a65a;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 9px 24px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  cursor: pointer;
}

.btn-save-green:hover {
  background: #008d4c;
}

.btn-save-green:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-close-red {
  background: #ef4444;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 9px 22px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.btn-close-red:hover {
  background: #dc2626;
}

/* Auto-Generated Locked Field (e.g. Immutable Branch Code) */
.locked-tag {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 3px;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  vertical-align: middle;
}

.locked-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.erp-control-locked {
  background: #f1f5f9 !important;
  color: #0f3d5e !important;
  font-weight: 800 !important;
  border-color: #cbd5e1 !important;
  padding-right: 34px !important;
  cursor: not-allowed !important;
  user-select: all;
}

.erp-control-locked:focus {
  border-color: #cbd5e1 !important;
  box-shadow: none !important;
}

.locked-input-icon {
  position: absolute;
  right: 10px;
  color: #6d28d9;
  display: inline-flex;
  align-items: center;
  pointer-events: none;
}

/* Inline Pincode / IFSC Auto-Fill Status Hint */
.lookup-field-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
}

.lookup-status {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  min-height: 0;
}

.lookup-status:empty {
  display: none;
}

.lookup-status.loading {
  color: #6d28d9;
}

.lookup-status.ok {
  color: #15803d;
}

.lookup-status.err {
  color: #dc2626;
}

.po-select.hidden,
input.hidden {
  display: none !important;
}

.po-select-ready {
  border-color: #6d28d9 !important;
  background-color: #faf5ff !important;
  box-shadow: 0 0 0 2px rgba(109, 40, 217, 0.14);
}

/* SaaS Role Chips */
.role-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.role-super_admin {
  background: #ede9fe;
  color: #5b21b6;
}

.role-company_admin {
  background: #dbeafe;
  color: #1e40af;
}

.role-branch_admin {
  background: #dcfce7;
  color: #166534;
}

.role-staff {
  background: #fef3c7;
  color: #92400e;
}

.role-investor {
  background: #fce7f3;
  color: #9d174d;
}

/* Super Admin API Setup Hub — Crisp Full-Width Cards */
.api-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.api-fields-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
}

.api-cat-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 3px;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.api-key-code {
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 3px;
}

.api-enable-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #f8fafc;
  font-size: 11.5px;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
}

.api-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #eef2f6;
  flex-wrap: wrap;
}

.api-card-note {
  font-size: 11.5px;
  color: #64748b;
  flex: 1;
  min-width: 200px;
}

@media (max-width: 991px) {
  .api-fields-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .api-fields-grid {
    grid-template-columns: 1fr;
  }
}

/* Dev Mode Quick-Login Credentials Box on Login Page */
.dev-creds-box {
  margin-top: 16px;
  background: #f8fafc;
  border: 1.5px dashed #8b5cf6;
  border-radius: 7px;
  padding: 11px 12px;
}

.dev-creds-title {
  font-size: 10px;
  font-weight: 800;
  color: #5b21b6;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
}

.dev-cred-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  margin-bottom: 7px;
}

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

.dev-cred-text {
  font-size: 11px;
  color: #334155;
  margin-top: 3px;
  word-break: break-word;
}

.dev-fill-btn {
  background: #6d28d9;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.dev-fill-btn:hover {
  background: #5b21b6;
}

.dev-cred-note {
  font-size: 10.5px;
  color: #64748b;
  line-height: 1.4;
}

/* ==========================================================================
   MODERN SWEETALERT TOASTS & CONFIRM MODAL (Replaces Old Inline Green Banners)
   ========================================================================== */
.erp-alert-success {
  display: none !important;
}

.erp-toast-host {
  position: fixed;
  top: 66px;
  right: 18px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}

.erp-toast {
  pointer-events: auto;
  width: 370px;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(15, 23, 42, 0.08);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateX(115%) scale(0.96);
  opacity: 0;
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.erp-toast.show {
  transform: translateX(0) scale(1);
  opacity: 1;
}

.erp-toast.hide {
  transform: translateX(110%) scale(0.95);
  opacity: 0;
}

.erp-toast-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px 12px;
}

.erp-toast-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.erp-toast.toast-success .erp-toast-icon {
  background: #dcfce7;
  color: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.erp-toast.toast-error .erp-toast-icon {
  background: #fee2e2;
  color: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.erp-toast.toast-info .erp-toast-icon {
  background: #ede9fe;
  color: #6d28d9;
  box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.12);
}

.erp-toast-content {
  flex: 1;
  min-width: 0;
}

.erp-toast-title {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.erp-toast-msg {
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  margin-top: 3px;
  line-height: 1.4;
  word-break: break-word;
}

.erp-toast-close {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
  border-radius: 4px;
  flex-shrink: 0;
}

.erp-toast-close:hover {
  background: #f1f5f9;
  color: #334155;
}

.erp-toast-bar {
  height: 3.5px;
  width: 100%;
  transform-origin: left center;
  animation: erpToastProgress 4.2s linear forwards;
}

.erp-toast.toast-success .erp-toast-bar {
  background: linear-gradient(90deg, #16a34a, #22c55e);
}

.erp-toast.toast-error .erp-toast-bar {
  background: linear-gradient(90deg, #dc2626, #ef4444);
}

.erp-toast.toast-info .erp-toast-bar {
  background: linear-gradient(90deg, #6d28d9, #8b5cf6);
}

@keyframes erpToastProgress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* SweetAlert-Style Confirm Dialog */
.erp-swal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.erp-swal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.erp-swal-modal {
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  border-radius: 14px;
  padding: 24px 22px 20px;
  text-align: center;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
  transform: scale(0.92) translateY(8px);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.erp-swal-backdrop.open .erp-swal-modal {
  transform: scale(1) translateY(0);
}

.erp-swal-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  margin: 0 auto 12px;
  background: #fef2f2;
  color: #dc2626;
  border: 3px solid #fecaca;
  display: flex;
  align-items: center;
  justify-content: center;
}

.erp-swal-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.erp-swal-message {
  font-size: 12.5px;
  color: #475569;
  margin-top: 6px;
  line-height: 1.5;
}

.erp-swal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.erp-swal-btn-cancel {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 8px 18px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.erp-swal-btn-cancel:hover {
  background: #e2e8f0;
}

.erp-swal-btn-confirm {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #ffffff;
  border: none;
  border-radius: 7px;
  padding: 8px 20px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.28);
}

.erp-swal-btn-confirm:hover {
  filter: brightness(1.06);
}

@media (max-width: 991px) {
  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 639px) {
  .filter-grid {
    grid-template-columns: 1fr;
  }
  .form-pair {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .quick-search-box input {
    width: 140px;
  }
  .form-body-wrap {
    padding: 12px;
  }
}

/* ==========================================================================
   PANEL 01 (SUPER ADMIN) — SINGLE-LINE ROYAL BLUE TOP BAR + HEADER HOME BUTTON
   Slim Capital Bold Straight Dropdowns (No LIVE pill, Keeps 01-09 numbers)
   ========================================================================== */
.erp-shell.topnav-shell {
  padding-top: 96px;
}

.erp-shell.topnav-shell .topbar-brand {
  width: 210px;
}

.erp-shell.topnav-shell .hamburger-btn {
  display: none;
}

.erp-shell.topnav-shell .erp-sidebar.topnav-mobile-drawer {
  display: none;
}

.erp-shell.topnav-shell .erp-main-wrap,
.erp-shell.topnav-shell.sidebar-hidden .erp-main-wrap {
  margin-left: 0;
  width: 100%;
  min-height: calc(100vh - 96px);
}

.erp-shell.topnav-shell .erp-content {
  padding: 10px 16px 24px;
}

.erp-shell.topnav-shell .spa-top-progress {
  top: 96px;
}

.erp-shell.topnav-shell .spa-bars-overlay {
  inset: 96px 0 0 0;
}

.erp-shell.topnav-shell .erp-toast-host {
  top: 106px;
}

/* Header HOME Button (Opens Super Admin Dashboard) */
.topbar-home-btn {
  color: #1e3a8a;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.topbar-home-btn:hover,
.topbar-home-btn.active {
  background: #eff6ff;
  color: #1d4ed8;
}

/* Super Admin 14-Panel Switcher Dropdown & Return Pill */
.sa-preview-back-btn {
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.3px;
  gap: 4px;
}

.sa-preview-back-btn:hover {
  background: #1d4ed8;
  color: #ffffff;
}

.sa-panel-switcher {
  position: relative;
  height: 100%;
  display: flex;
  align-items: stretch;
}

.sa-panel-switch-btn {
  border: none;
  background: #ffffff;
  color: #1e3a8a;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  gap: 6px;
}

.sa-panel-switch-btn:hover,
.sa-panel-switcher.open .sa-panel-switch-btn {
  background: #eff6ff;
  color: #1d4ed8;
}

.sa-switch-caret {
  transition: transform 0.16s ease;
}

.sa-panel-switcher.open .sa-switch-caret {
  transform: rotate(180deg);
}

.sa-panel-switch-menu {
  position: absolute;
  top: 100%;
  right: 0;
  width: 274px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  z-index: 3200;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.14s ease, visibility 0.14s ease;
}

.sa-panel-switcher.open .sa-panel-switch-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.sa-panel-switch-list {
  max-height: 76vh;
  overflow-y: auto;
  padding: 2px 0;
}

.sa-panel-switch-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7.5px 11px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: #111827;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.12s ease, color 0.12s ease;
}

.sa-panel-switch-item:last-child {
  border-bottom: none;
}

.sa-panel-switch-item:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.sa-panel-switch-item.active {
  background: #dbeafe;
  color: #1e3a8a;
}

.sa-panel-switch-item:hover .blue-dd-code,
.sa-panel-switch-item.active .blue-dd-code {
  background: #1d4ed8;
  color: #ffffff;
}

@media (max-width: 639px) {
  .sa-preview-back-btn span {
    display: none;
  }
  .sa-panel-switch-menu {
    right: -46px;
    width: 256px;
  }
}

/* Super Admin Row 1: 8 Compact Red Quick-Action Tiles + Live Analog Clock */
.sa-top-widget-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 12px;
  margin-bottom: 14px;
  align-items: stretch;
}

/* Full-width Royal Blue Single-Line 7-Menu Horizontal Bar */
.erp-blue-topnav {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  height: 40px;
  background: #1d4ed8;
  border-bottom: 2px solid #172554;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.22);
  z-index: 49;
  overflow: visible;
}

.blue-topnav-grid {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 100%;
}

.blue-topnav-item {
  position: relative;
  flex: 1 1 auto;
  height: 100%;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
}

.blue-topnav-item:last-child {
  border-right: none;
}

.blue-topnav-trigger {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  color: #ffffff;
  padding: 0 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.2px;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.14s ease;
}

.blue-topnav-label {
  color: #ffffff;
  white-space: nowrap;
}

.blue-topnav-caret {
  flex-shrink: 0;
  color: #ffffff;
  transition: transform 0.18s ease;
}

.blue-topnav-item.open > .blue-topnav-trigger .blue-topnav-caret {
  transform: rotate(180deg);
}

.blue-topnav-trigger:hover,
.blue-topnav-item.open > .blue-topnav-trigger {
  background: #1e3a8a;
}

.blue-topnav-trigger.active,
.blue-topnav-item.active > .blue-topnav-trigger {
  background: #172554;
  box-shadow: inset 0 -3px 0 #ffffff;
}

/* Slim, Compact White Dropdown (Keeps 01-09 numbers, Capital Bold Straight text) */
.blue-topnav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 248px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-top: none;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  z-index: 2500;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.14s ease, visibility 0.14s ease;
}

.blue-topnav-item.align-right .blue-topnav-dropdown {
  left: auto;
  right: 0;
}

.blue-topnav-item.open > .blue-topnav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.blue-dd-head {
  background: #1e3a8a;
  color: #ffffff;
  padding: 7px 11px;
  display: flex;
  align-items: center;
}

.blue-dd-title {
  font-size: 10.5px;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #ffffff;
}

.blue-dd-list {
  padding: 2px 0;
  max-height: 70vh;
  overflow-y: auto;
}

.blue-dd-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7.5px 10px;
  font-size: 10.5px;
  font-weight: 700;
  font-style: normal;
  text-transform: uppercase;
  color: #111827;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.12s ease, color 0.12s ease;
}

.blue-dd-link:last-child {
  border-bottom: none;
}

.blue-dd-link:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.blue-dd-link.active {
  background: #dbeafe;
  color: #1e3a8a;
}

.blue-dd-code {
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  color: #1e3a8a;
  background: #eef2ff;
  padding: 2px 5px;
  border-radius: 3px;
  flex-shrink: 0;
}

.blue-dd-link:hover .blue-dd-code,
.blue-dd-link.active .blue-dd-code {
  background: #1d4ed8;
  color: #ffffff;
}

.blue-dd-text {
  flex: 1;
  min-width: 0;
  line-height: 1.28;
  text-transform: uppercase;
  font-weight: 700;
  font-style: normal;
}

.sa-drawer-code {
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  color: #1d4ed8;
  background: #eff6ff;
  padding: 1px 5px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Super Admin English-Only Coming Soon Card */
.sa-coming-soon-card {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #dbeafe;
  border-top: 4px solid #1d4ed8;
  box-shadow: 0 6px 20px rgba(30, 58, 138, 0.08);
  padding: 38px 24px;
  text-align: center;
  max-width: 720px;
  margin: 22px auto;
}

.sa-cs-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  color: #1e3a8a;
  border: 1px solid #bfdbfe;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  flex-wrap: wrap;
  justify-content: center;
}

.sa-cs-icon {
  width: 64px;
  height: 64px;
  margin: 18px auto 14px;
  border-radius: 14px;
  background: #eff6ff;
  color: #1d4ed8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sa-cs-title {
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  color: #0f172a;
  margin: 0 0 10px;
  line-height: 1.3;
}

.sa-cs-status {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px dashed #93c5fd;
  padding: 6px 16px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.sa-cs-desc {
  font-size: 13px;
  color: #475569;
  max-width: 540px;
  margin: 0 auto 22px;
  line-height: 1.55;
}

.sa-cs-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sa-cs-secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 10px 16px;
  border-radius: 6px;
  transition: background 0.14s ease, color 0.14s ease;
}

.sa-cs-secondary-btn:hover {
  background: #1d4ed8;
  color: #ffffff;
}

/* ==========================================================================
   PANEL 02 (COMPANY PANEL) — 2-ROW 19-MENU ROYAL BLUE TOP HORIZONTAL BAR
   10 Menus on Row 1 + 9 Menus on Row 2 (All 19 Menus 1-Line Straight!)
   ========================================================================== */
.erp-shell.topnav-shell.topnav-2row {
  padding-top: 126px;
}

.erp-shell.topnav-shell.topnav-2row .erp-main-wrap,
.erp-shell.topnav-shell.topnav-2row.sidebar-hidden .erp-main-wrap {
  min-height: calc(100vh - 126px);
}

.erp-shell.topnav-shell.topnav-2row .spa-top-progress {
  top: 126px;
}

.erp-shell.topnav-shell.topnav-2row .spa-bars-overlay {
  inset: 126px 0 0 0;
}

.erp-shell.topnav-shell.topnav-2row .erp-toast-host {
  top: 136px;
}

.erp-blue-topnav-2row {
  height: 70px;
  display: flex;
  flex-direction: column;
}

.blue-topnav-row {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 35px;
  position: relative;
}

.blue-topnav-row-1 {
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  z-index: 52;
}

.blue-topnav-row-2 {
  background: #1e40af;
  z-index: 50;
}

.erp-blue-topnav-2row .blue-topnav-trigger {
  font-size: 10px;
  font-weight: 700;
  padding: 0 6px;
  gap: 3px;
  letter-spacing: 0.15px;
}

.erp-blue-topnav-2row .blue-topnav-dropdown {
  width: 256px;
}

/* Compact Laptop (992px-1240px): Keep all tabs straight on 1 line */
@media (max-width: 1240px) and (min-width: 992px) {
  .blue-topnav-trigger {
    font-size: 9.8px;
    padding: 0 6px;
    gap: 3px;
  }
  .erp-blue-topnav-2row .blue-topnav-trigger {
    font-size: 9.2px;
    padding: 0 4px;
    gap: 2px;
  }
}

/* Tablet & Mobile (< 992px): Responsive Drawer + Adaptive Widgets */
@media (max-width: 991px) {
  .erp-shell.topnav-shell,
  .erp-shell.topnav-shell.topnav-2row {
    padding-top: 56px;
  }
  .erp-shell.topnav-shell .erp-blue-topnav {
    display: none;
  }
  .erp-shell.topnav-shell .hamburger-btn {
    display: inline-flex;
  }
  .erp-shell.topnav-shell .erp-sidebar.topnav-mobile-drawer {
    display: flex;
    width: 274px;
  }
  .erp-shell.topnav-shell .spa-top-progress,
  .erp-shell.topnav-shell.topnav-2row .spa-top-progress {
    top: 56px;
  }
  .erp-shell.topnav-shell .spa-bars-overlay,
  .erp-shell.topnav-shell.topnav-2row .spa-bars-overlay {
    inset: 56px 0 0 0;
  }
  .erp-shell.topnav-shell .erp-toast-host,
  .erp-shell.topnav-shell.topnav-2row .erp-toast-host {
    top: 66px;
  }
  .erp-shell.topnav-shell .erp-content {
    padding: 10px 12px 22px;
  }
  .sa-top-widget-row {
    grid-template-columns: 1fr;
  }
  .sa-top-widget-row .clock-card {
    display: none;
  }
  .sa-coming-soon-card {
    padding: 28px 16px;
    margin: 14px auto;
  }
  .sa-cs-title {
    font-size: 17px;
  }
}

/* ==========================================================================
   HR & EMPLOYEE MANAGEMENT MODULE — COMPACT STAT STRIP, FORMS & ORG LADDER
   ========================================================================== */
.hr-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.hr-stat-box {
  border-radius: 6px;
  padding: 11px 14px;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.hr-stat-val {
  font-size: 21px;
  font-weight: 900;
  line-height: 1.15;
}

.hr-stat-lbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  opacity: 0.94;
  margin-top: 3px;
  text-transform: uppercase;
}

.hr-form-card {
  background: #f8fafc;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.hr-sub-title {
  font-size: 11px;
  font-weight: 800;
  color: #1e3a8a;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hr-form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px 12px;
  align-items: end;
}

.hr-span-2 {
  grid-column: span 2;
}

.hr-span-3 {
  grid-column: span 3;
}

.hr-span-4 {
  grid-column: span 4;
}

/* ==========================================================================
   COMPANY & MASTER MODULE — BRANDING CARDS, LIVE SIMULATORS & TEMPLATE STUDIO
   ========================================================================== */
.cm-brand-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.cm-upload-box {
  background: #f8fafc;
  border: 1.5px solid #94a3b8;
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cm-upload-title {
  font-size: 10.5px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.3px;
}

.cm-brand-preview {
  height: 76px;
  max-width: 100%;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 6px;
}

.cm-brand-placeholder {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1.5px dashed #94a3b8;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
}

.cm-sim-strip {
  margin-top: 12px;
  padding: 11px 14px;
  background: #eff6ff;
  border: 1.5px solid #93c5fd;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cm-sim-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cm-sim-input-wrap label {
  font-size: 10.5px;
  font-weight: 800;
  color: #1e3a8a;
  white-space: nowrap;
}

.cm-sim-input-wrap input {
  width: 135px;
}

.cm-sim-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cm-sim-metric span {
  font-size: 9.5px;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.3px;
}

.cm-sim-metric strong {
  font-size: 13px;
  font-weight: 900;
  color: #0f172a;
}

.cm-sim-total strong {
  color: #1d4ed8;
  font-size: 14.5px;
}

.cm-cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.cm-cat-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 5px;
  border: 1.5px solid #94a3b8;
  background: #ffffff;
  color: #0f172a;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.25px;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.cm-cat-pill:hover {
  background: #eff6ff;
  border-color: #1d4ed8;
  color: #1d4ed8;
}

.cm-cat-pill.active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

.cm-foir-result {
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  letter-spacing: 0.3px;
}

.cm-foir-result.pass {
  background: #dcfce7;
  color: #166534;
  border: 1.5px solid #22c55e;
}

.cm-foir-result.fail {
  background: #fee2e2;
  color: #991b1b;
  border: 1.5px solid #ef4444;
}

.cm-token-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 8px;
}

.cm-token-lbl {
  font-size: 10px;
  font-weight: 800;
  color: #1e3a8a;
  letter-spacing: 0.3px;
}

.cm-token-chip {
  border: 1px solid #93c5fd;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.cm-token-chip:hover {
  background: #1d4ed8;
  color: #ffffff;
}

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

.cm-tpl-preview-box {
  min-height: 98px;
  background: #f8fafc;
  border: 1.5px solid #64748b;
  border-radius: 5px;
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.55;
  color: #0f172a;
  white-space: pre-wrap;
}

@media (max-width: 991px) {
  .cm-brand-upload-grid,
  .cm-tpl-split {
    grid-template-columns: 1fr;
  }
  .hr-span-4 {
    grid-column: span 2;
  }
}

@media (max-width: 639px) {
  .hr-span-4 {
    grid-column: span 1;
  }
}

.hr-btn-end {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.hr-check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 5px 0;
  font-size: 11.5px;
  font-weight: 700;
  color: #1e293b;
}

.hr-check-row label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  text-transform: none;
  font-size: 11.5px;
}

.hr-xs-btn {
  padding: 4px 9px !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  white-space: nowrap;
}

.hr-ladder-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.hr-ladder-node {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #1d4ed8;
  border-radius: 6px;
  padding: 7px 11px;
  min-width: 155px;
}

.hr-ladder-order {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  color: #ffffff;
  background: #1d4ed8;
  padding: 1px 6px;
  border-radius: 3px;
  margin-bottom: 3px;
}

.hr-ladder-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #0f172a;
}

.hr-ladder-meta {
  font-size: 10px;
  font-weight: 700;
  color: #475569;
  margin-top: 2px;
}

/* Branch & Area EOD Denomination Tally Box & Amber Pill */
.ba-denom-box {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1.5px solid #94a3b8;
  border-radius: 6px;
}

.ba-denom-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}

.pill-amber {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
}

@media (max-width: 1024px) {
  .ba-denom-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .ba-denom-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .hr-form-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hr-span-2,
  .hr-span-3 {
    grid-column: span 2;
  }
  .hr-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .hr-form-grid-4,
  .hr-stat-strip {
    grid-template-columns: 1fr;
  }
  .hr-span-2,
  .hr-span-3 {
    grid-column: span 1;
  }
  .hr-btn-end {
    justify-content: flex-start;
  }
}

.hidden,
.filter-field.hidden {
  display: none !important;
}

/* ==================== ACCOUNTS & TREASURY 4-COLUMN KPI STRIP ==================== */
.hr-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.hr-kpi-card {
  border-radius: 7px;
  padding: 14px 16px;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 76px;
}

.hr-kpi-card.bg-classic-green { background: linear-gradient(135deg, #15803d 0%, #166534 100%); }
.hr-kpi-card.bg-classic-red { background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%); }
.hr-kpi-card.bg-classic-navy { background: linear-gradient(135deg, #0f3d73 0%, #1e3a8a 100%); }
.hr-kpi-card.bg-classic-purple { background: linear-gradient(135deg, #7e22ce 0%, #581c87 100%); }
.hr-kpi-card.bg-classic-cyan { background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%); }
.hr-kpi-card.bg-classic-amber { background: linear-gradient(135deg, #d97706 0%, #b45309 100%); }

.hr-kpi-val {
  font-size: 21px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.15;
  letter-spacing: -0.2px;
  font-variant-numeric: tabular-nums;
}

.hr-kpi-lbl {
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  text-transform: uppercase;
  letter-spacing: 0.45px;
  margin-top: 5px;
}

@media (max-width: 1024px) {
  .hr-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .hr-kpi-row {
    grid-template-columns: 1fr;
  }
}

/* ==================== MEMBER KYC DOCUMENT VAULT & VIEW/CROP MODAL ==================== */
.kyc-slot-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px;
}

.kyc-thumb-wrap {
  width: 64px;
  height: 74px;
  border-radius: 5px;
  border: 1.5px dashed #94a3b8;
  background: #eef2f7;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.kyc-thumb-wrap.kyc-thumb-sig {
  width: 96px;
  height: 56px;
}

.kyc-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kyc-thumb-sig .kyc-thumb-img {
  object-fit: contain;
  background: #ffffff;
}

.kyc-slot-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.kyc-uploader-panel {
  background: #f0f9ff;
  border: 1.5px solid #bae6fd;
  border-radius: 7px;
  padding: 12px 14px;
}

.umb-crop-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(15, 23, 42, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.umb-crop-overlay.hidden {
  display: none !important;
}

.umb-crop-dialog {
  width: 100%;
  max-width: 820px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 92vh;
}

.umb-crop-head {
  background: linear-gradient(90deg, #0f3d73 0%, #0369a1 100%);
  color: #ffffff;
  padding: 12px 16px;
  font-weight: 800;
  font-size: 13.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.umb-crop-close {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 5px;
  font-weight: 900;
  cursor: pointer;
}

.umb-crop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.umb-crop-group {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.umb-crop-lbl {
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  margin-right: 3px;
}

.js-crop-ratio.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}

.umb-crop-stage {
  background: #0f172a;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: auto;
  min-height: 320px;
  max-height: 60vh;
}

#umbCropCanvas {
  max-width: 100%;
  border: 1px solid #334155;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}

.umb-crop-hint {
  color: #cbd5e1;
  font-size: 11px;
  margin-top: 8px;
  text-align: center;
}

.umb-crop-foot {
  padding: 11px 16px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* ==================== LENDBOX-STYLE INVESTOR PROFILE (2-COLUMN 4-TAB) ==================== */
.inv-lb-shell {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.inv-lb-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 13px 22px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.inv-lb-topbar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
  color: #1e293b;
}

.inv-lb-title-icon {
  font-size: 17px;
}

.inv-lb-code-chip {
  background: #eff6ff;
  color: #0b5ed7;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 11.5px;
  font-weight: 800;
}

.inv-lb-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inv-lb-btn-primary {
  background: #1d4ed8;
  color: #ffffff !important;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.25);
}

.inv-lb-btn-primary:hover {
  background: #1e40af;
}

.inv-lb-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  min-height: 440px;
}

.inv-lb-sidebar {
  padding: 24px 22px;
  border-right: 1px solid #e2e8f0;
  background: #fafcff;
}

.inv-lb-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.inv-lb-avatar {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0b5ed7 0%, #0369a1 100%);
  color: #ffffff;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(11, 94, 215, 0.28);
}

.inv-lb-ident-text {
  min-width: 0;
}

.inv-lb-name {
  font-size: 15.5px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  word-break: break-word;
}

.inv-lb-loc {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.inv-lb-status-row {
  display: flex;
  justify-content: flex-end;
  margin: 14px 0 8px;
}

.inv-lb-status {
  font-size: 12px;
  font-weight: 800;
}

.inv-lb-status.is-active {
  color: #16a34a;
}

.inv-lb-status.is-inactive {
  color: #dc2626;
}

.inv-lb-meta-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 6px;
}

.inv-lb-meta-item {
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
}

.inv-lb-meta-lbl {
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 3px;
}

.inv-lb-meta-val-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.inv-lb-meta-val {
  font-size: 12.5px;
  color: #64748b;
  font-weight: 600;
  word-break: break-word;
}

.inv-lb-email {
  font-size: 11.5px;
}

.inv-lb-verified {
  font-size: 11px;
  font-weight: 800;
  color: #16a34a;
  white-space: nowrap;
}

.inv-lb-pending {
  font-size: 11px;
  font-weight: 700;
  color: #d97706;
  white-space: nowrap;
}

.inv-lb-badge-roi {
  background: #dcfce7;
  color: #15803d;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.inv-lb-kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 16px;
}

.inv-lb-mini-kpi {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  padding: 8px 6px;
  text-align: center;
}

.inv-lb-mini-lbl {
  font-size: 9px;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.3px;
}

.inv-lb-mini-val {
  font-size: 12px;
  font-weight: 900;
  margin-top: 3px;
}

.inv-lb-main {
  padding: 18px 26px 26px;
  background: #ffffff;
  min-width: 0;
}

.inv-lb-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1.5px solid #e2e8f0;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.inv-lb-tab {
  background: transparent;
  border: none;
  border-top: 3px solid transparent;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: -1.5px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.inv-lb-tab:hover {
  color: #0b5ed7;
}

.inv-lb-tab.active {
  color: #0b5ed7;
  font-weight: 800;
  border-top-color: #0b5ed7;
  border-bottom-color: #ffffff;
  background: #f8fafc;
  border-radius: 4px 4px 0 0;
}

.inv-lb-tab-count {
  background: #e2e8f0;
  color: #334155;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 10.5px;
  font-weight: 800;
}

.inv-lb-tab.active .inv-lb-tab-count {
  background: #dbeafe;
  color: #0b5ed7;
}

.inv-lb-warn-tri {
  color: #dc2626;
  font-size: 11px;
}

.inv-lb-pane {
  display: none;
}

.inv-lb-pane.active {
  display: block;
  animation: spaFadeSlide 0.2s ease-out;
}

.inv-lb-pane-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.inv-lb-heading {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.inv-lb-subheading {
  font-size: 15px;
  font-weight: 700;
  color: #334155;
  margin: 24px 0 14px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.inv-lb-detail-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
}

.inv-lb-detail-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 24px;
}

.inv-lb-field-lbl {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 4px;
}

.inv-lb-field-val {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  line-height: 1.45;
  word-break: break-word;
}

.inv-lb-edit-box {
  margin-top: 20px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.inv-lb-edit-box.hidden {
  display: none;
}

@media (max-width: 920px) {
  .inv-lb-grid {
    grid-template-columns: 1fr;
  }
  .inv-lb-sidebar {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
  .inv-lb-detail-grid-2,
  .inv-lb-detail-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ==================== AUTO-SCANNED VERIFIED DOCUMENT CARDS & PER-DOC RE-KYC ==================== */
.ocr-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ocr-doc-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.ocr-doc-card.is-scanned,
.ocr-doc-card.is-approved {
  background: #f0fdf4;
  border-color: #86efac;
}

.ocr-doc-card.is-rejected {
  background: #fef2f2;
  border-color: #fca5a5;
}

.ocr-doc-card.is-pending {
  background: #fffbeb;
  border-color: #fcd34d;
}

.ocr-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.ocr-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ocr-card-icon {
  font-size: 18px;
  line-height: 1;
}

.ocr-card-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #15803d;
  text-decoration: none;
  display: inline-block;
}

.ocr-doc-card.is-rejected .ocr-card-title {
  color: #b91c1c;
}

.ocr-card-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 1px;
}

.ocr-card-body {
  padding: 12px 14px;
  flex: 1;
}

.ocr-card-media-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.ocr-card-thumb {
  width: 68px;
  height: 54px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ocr-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ocr-pdf-tile {
  font-size: 11px;
  font-weight: 900;
  color: #0369a1;
  text-decoration: none;
  text-align: center;
  line-height: 1.2;
}

.ocr-card-primary {
  flex: 1;
  min-width: 0;
}

.ocr-primary-name {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  word-break: break-word;
}

.ocr-primary-num {
  font-size: 12.5px;
  font-weight: 800;
  color: #0f3d73;
  font-family: Consolas, monospace;
  letter-spacing: 0.4px;
  margin-top: 2px;
}

.ocr-mini-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.ocr-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 6px;
  padding: 9px 11px;
}

.ocr-fld {
  font-size: 12px;
  line-height: 1.4;
  word-break: break-word;
}

.ocr-fld-full {
  grid-column: span 2;
}

.ocr-fld-lbl {
  font-weight: 800;
  color: #334155;
}

.ocr-fld-val {
  color: #1e293b;
  font-weight: 500;
}

.ocr-empty-hint {
  font-size: 11.5px;
  color: #64748b;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 5px;
}

.ocr-rekyc-box {
  margin-top: 10px;
  padding: 10px 12px;
  background: #fee2e2;
  border: 1px dashed #ef4444;
  border-radius: 6px;
}

.ocr-rekyc-reason {
  font-size: 12px;
  color: #991b1b;
  margin-bottom: 6px;
}

.ocr-rekyc-upload-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ocr-locked-note {
  margin-top: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: #166534;
}

.ocr-pending-note {
  margin-top: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: #92400e;
}

.ocr-card-foot {
  padding: 9px 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .ocr-cards-grid {
    grid-template-columns: 1fr;
  }
  .ocr-fields-grid {
    grid-template-columns: 1fr;
  }
  .ocr-fld-full {
    grid-column: span 1;
  }
}

/* ==================== LIVE DUPLICATE ALERT & INLINE MOBILE OTP WIDGET ==================== */
.dup-alert-box {
  background: #fef2f2;
  border: 1.5px solid #ef4444;
  color: #991b1b;
  border-radius: 7px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 12.5px;
  line-height: 1.45;
}

.dup-alert-box.hidden {
  display: none;
}

.otp-widget {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.otp-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.otp-input-row .erp-control {
  flex: 1;
  min-width: 0;
}

.otp-verify-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px 8px;
  background: #f0fdfa;
  border: 1px dashed #0d9488;
  border-radius: 6px;
}

.otp-verify-row.hidden {
  display: none;
}

.otp-badge {
  display: inline-flex;
  align-items: center;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.otp-badge.hidden {
  display: none;
}
