/* ══════════════════════════════════════════════════════════════════
   Dhan Research — Unified Design System
   Covers: Customer pages + Admin panel
   ══════════════════════════════════════════════════════════════════ */

/* ── Design Tokens ──────────────────────────────────────────────── */
:root {
  /* Brand */
  --c-primary:        #1a3c6e;
  --c-primary-mid:    #2563a8;
  --c-primary-light:  #dbeafe;
  --c-primary-xlight: #eff6ff;

  /* Semantic */
  --c-success:        #16a34a;
  --c-success-light:  #dcfce7;
  --c-warning:        #d97706;
  --c-warning-light:  #fef3c7;
  --c-danger:         #dc2626;
  --c-danger-light:   #fee2e2;
  --c-info:           #0284c7;
  --c-info-light:     #e0f2fe;

  /* Neutrals */
  --c-text:           #111827;
  --c-text-2:         #374151;
  --c-text-3:         #6b7280;
  --c-text-4:         #9ca3af;
  --c-border:         #e5e7eb;
  --c-border-light:   #f3f4f6;
  --c-bg:             #f1f5f9;
  --c-surface:        #ffffff;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.1), 0 4px 8px rgba(0,0,0,.05);

  /* Radius */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  14px;
  --r-xl:  20px;
  --r-full:9999px;

  /* Typography */
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Transitions */
  --t-fast: .12s ease;
  --t-base: .2s ease;
  --t-slow: .35s cubic-bezier(.4,0,.2,1);

  /* Typography scale */
  --text-xs:   11px; --text-sm:   12px; --text-base: 14px;
  --text-md:   15px; --text-lg:   17px; --text-xl:   20px;
  --text-2xl:  24px; --text-3xl:  30px;
  --lh-tight: 1.25;  --lh-snug:   1.4;  --lh-base:   1.6;
  --fw-medium: 500;  --fw-semi:   600;  --fw-bold:   700;  --fw-black: 800;

  /* 8px spacing grid */
  --sp-1: 4px; --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px;

  /* Elevation tiers */
  --e1: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --e2: 0 4px 12px rgba(0,0,0,.09), 0 2px 4px rgba(0,0,0,.04);
  --e3: 0 8px 28px rgba(0,0,0,.11), 0 4px 8px rgba(0,0,0,.05);
  --e4: 0 16px 48px rgba(0,0,0,.14), 0 8px 16px rgba(0,0,0,.06);
  --e-inset: inset 0 2px 8px rgba(0,0,0,.06);

  /* Admin sidebar */
  --sidebar-w:      240px;
  --sidebar-bg:     #1e2a3a;
  --sidebar-hover:  rgba(255,255,255,.07);
  --sidebar-active: rgba(255,255,255,.13);
  --topbar-h:       56px;
}

/* ── Reset & Base ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex; flex-direction: column; min-height: 100vh;
}
.site-footer { margin-top: auto; }

a { color: var(--c-primary-mid); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--c-primary); }

img { max-width: 100%; height: auto; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CUSTOMER — NAVBAR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.site-nav {
  background: var(--c-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  position: sticky; top: 0; z-index: 1040;
}
.site-nav .container-fluid { padding: 0 24px; }
.site-nav .navbar-brand {
  font-size: 17px; font-weight: 800; color: #fff !important;
  letter-spacing: -.3px; padding: 16px 0;
  display: flex; align-items: center; gap: 10px;
}
.site-nav .navbar-brand img { height: 32px; width: auto; }
.site-nav .brand-reg {
  font-size: 10px; font-weight: 400; opacity: .6;
  display: block; line-height: 1;
}
.site-nav .nav-link {
  color: rgba(255,255,255,.75) !important;
  font-size: 13px; font-weight: 500;
  padding: 18px 14px !important;
  border-bottom: 2px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast);
  display: flex; align-items: center; gap: 6px;
}
.site-nav .nav-link:hover { color: #fff !important; border-bottom-color: rgba(255,255,255,.4); }
.site-nav .nav-link.active { color: #fff !important; border-bottom-color: #fff; }
.site-nav .nav-link i { font-size: 14px; }

/* Profile dropdown */
.site-nav .nav-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.15); border: 2px solid rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  cursor: pointer; transition: background var(--t-fast);
}
.site-nav .nav-avatar:hover { background: rgba(255,255,255,.25); }
.site-nav .dropdown-menu {
  border: none; box-shadow: var(--shadow-lg);
  border-radius: var(--r-md); min-width: 200px;
  margin-top: 8px !important; padding: 6px;
}
.site-nav .dropdown-item {
  border-radius: var(--r-sm); font-size: 13px; padding: 8px 12px;
  display: flex; align-items: center; gap: 8px; color: var(--c-text);
  transition: background var(--t-fast);
}
.site-nav .dropdown-item:hover { background: var(--c-primary-xlight); color: var(--c-primary); }
.site-nav .dropdown-item.text-danger:hover { background: var(--c-danger-light); color: var(--c-danger); }
.site-nav .dropdown-divider { margin: 4px 0; border-color: var(--c-border); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CUSTOMER — PAGE WRAPPER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.page-wrap { min-height: calc(100vh - var(--topbar-h)); }
.page-container { max-width: 1200px; margin: 0 auto; padding: 28px 20px 60px; }
.page-container-sm { max-width: 760px; margin: 0 auto; padding: 28px 20px 60px; }
.page-container-md { max-width: 920px; margin: 0 auto; padding: 28px 20px 60px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ADMIN — LAYOUT (AdminLTE-inspired)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
body.admin-body {
  background: #f1f5f9;
  overflow-x: hidden;
}
.adm-wrapper {
  display: flex; min-height: 100vh; width: 100%;
}

/* Sidebar */
.adm-sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex; flex-direction: column;
  flex-shrink: 0;
  position: sticky; top: 0;
  max-height: 100vh; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
  transition: width var(--t-slow);
  z-index: 1035;
}
.adm-sidebar::-webkit-scrollbar { width: 4px; }
.adm-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

/* Sidebar brand */
.adm-brand {
  padding: 18px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  position: relative; z-index: 1;
}
.adm-brand-logo {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  background: var(--c-primary-mid); display: flex;
  align-items: center; justify-content: center;
  font-size: 18px; color: #fff; flex-shrink: 0;
}
.adm-brand-text { min-width: 0; }
.adm-brand-name { color: #fff; font-size: 15px; font-weight: 700; line-height: 1.2; display: block; }
.adm-brand-role { color: rgba(255,255,255,.45); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }

/* Sidebar nav */
.adm-nav { flex: 1; padding: 10px 0; position: relative; z-index: 1; }
.adm-nav-section {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: rgba(255,255,255,.3);
  padding: 14px 20px 5px; margin-top: 4px;
}
.adm-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; margin: 2px 10px;
  border-radius: 50px;
  color: rgba(255,255,255,.6);
  font-size: 13px; font-weight: 500;
  text-decoration: none;
  transition: color var(--t-fast);
  position: relative; white-space: nowrap; overflow: visible;
}
.adm-nav-item i { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; position: relative; z-index: 1; }
.adm-nav-item:hover { background: transparent; color: #fff; text-decoration: none; }
.adm-nav-item.active { background: transparent; color: #fff; box-shadow: none; }
.adm-nav-item .nav-badge {
  margin-left: auto; background: var(--c-danger);
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: var(--r-full); flex-shrink: 0;
}

/* Sidebar user footer */
.adm-sidebar-foot {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.07);
  position: relative; z-index: 1;
}
.adm-user-info { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.adm-user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--c-primary-mid); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.adm-user-name  { color: #fff; font-size: 12px; font-weight: 600; line-height: 1.2; }
.adm-user-role  { color: rgba(255,255,255,.4); font-size: 10px; }

/* Main content area */
.adm-main { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow-x: auto; }

/* Top bar */
.adm-topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 1030;
  box-shadow: var(--shadow-xs);
}
.adm-topbar-left { display: flex; align-items: center; gap: 16px; }
.adm-topbar-title { font-size: 16px; font-weight: 700; color: var(--c-text); }
.adm-topbar-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--c-text-4);
}
.adm-topbar-breadcrumb a { color: var(--c-text-4); }
.adm-topbar-breadcrumb a:hover { color: var(--c-primary-mid); }
.adm-topbar-breadcrumb .sep { opacity: .5; }
.adm-topbar-right { display: flex; align-items: center; gap: 12px; }
.adm-topbar-time { font-size: 12px; color: var(--c-text-4); }
.adm-topbar-role {
  padding: 3px 10px; border-radius: var(--r-full); font-size: 11px; font-weight: 600;
}
.adm-topbar-role.role-admin   { background: var(--c-danger-light); color: var(--c-danger); }
.adm-topbar-role.role-manager { background: var(--c-primary-light); color: var(--c-primary); }

/* Content wrapper */
.adm-content { padding: 24px; flex: 1; }

/* Stat cards */
.stat-card {
  padding: 18px 20px;
  border: none;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  background: var(--c-surface);
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-icon {
  width: 48px; height: 48px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.stat-value {
  font-size: 26px; font-weight: 800;
  color: var(--c-text); line-height: 1.1;
}
.stat-label {
  font-size: 12px; font-weight: 500;
  color: var(--c-text-3); margin-top: 2px;
}

/* Mobile sidebar toggle */
.adm-sidebar-toggle {
  display: none; background: none; border: none;
  color: var(--c-text); font-size: 20px; cursor: pointer; padding: 4px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ADMIN — SMALL BOX (stat cards)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.small-box {
  border-radius: var(--r-lg);
  padding: 20px 24px;
  position: relative; overflow: hidden;
  color: #fff; display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-md);
  transition: transform var(--t-base), box-shadow var(--t-base);
  text-decoration: none;
}
.small-box:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.small-box::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.08), transparent);
  pointer-events: none;
}
.small-box-body .value { font-size: 32px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.small-box-body .label { font-size: 12px; font-weight: 500; opacity: .85; text-transform: uppercase; letter-spacing: .05em; }
.small-box-icon { font-size: 52px; opacity: .2; flex-shrink: 0; }
.small-box-footer {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 6px 16px; font-size: 11px;
  background: rgba(0,0,0,.12); color: rgba(255,255,255,.85);
  display: flex; align-items: center; justify-content: space-between;
  text-decoration: none; transition: background var(--t-fast);
}
.small-box-footer:hover { background: rgba(0,0,0,.22); color: #fff; }
.small-box.has-footer { padding-bottom: 36px; }

.sb-primary  { background: linear-gradient(135deg, #1a3c6e, #2563a8); }
.sb-success  { background: linear-gradient(135deg, #14532d, #16a34a); }
.sb-warning  { background: linear-gradient(135deg, #78350f, #d97706); }
.sb-danger   { background: linear-gradient(135deg, #7f1d1d, #dc2626); }
.sb-info     { background: linear-gradient(135deg, #0c4a6e, #0284c7); }
.sb-purple   { background: linear-gradient(135deg, #4c1d95, #7c3aed); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SHARED — CARD
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ui-card {
  background: var(--c-surface);
  border-radius: var(--r-lg); border: none;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.ui-card:hover { box-shadow: var(--shadow-md); }

.ui-card-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--c-border-light);
}
.ui-card-title {
  font-size: 13px; font-weight: 700; color: var(--c-primary);
  display: flex; align-items: center; gap: 8px;
}
.ui-card-title i { font-size: 15px; }
.ui-card-actions { display: flex; align-items: center; gap: 6px; }
.ui-card-body { padding: 20px; }
.ui-card-footer {
  padding: 12px 20px;
  background: var(--c-border-light);
  border-top: 1px solid var(--c-border);
  font-size: 12px; color: var(--c-text-3);
}

/* Card accent borders */
.ui-card-accent-primary { border-left: 4px solid var(--c-primary); }
.ui-card-accent-success { border-left: 4px solid var(--c-success); }
.ui-card-accent-warning { border-left: 4px solid var(--c-warning); }
.ui-card-accent-danger  { border-left: 4px solid var(--c-danger); }
.ui-card-accent-info    { border-left: 4px solid var(--c-info); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SHARED — BUTTONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.btn { border-radius: var(--r-sm); font-weight: 500; transition: all var(--t-base); }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-xs); }
.btn:active { transform: translateY(0); }

.btn-brand {
  background: var(--c-primary); border-color: var(--c-primary);
  color: #fff; font-weight: 600;
}
.btn-brand:hover, .btn-brand:focus {
  background: var(--c-primary-mid); border-color: var(--c-primary-mid); color: #fff;
  box-shadow: 0 4px 14px rgba(26,60,110,.3);
}
.btn-xs { padding: 3px 10px; font-size: 11px; }
.btn-icon { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SHARED — FORMS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.form-control, .form-select {
  border-radius: var(--r-sm); border-color: var(--c-border);
  font-size: 14px; padding: 9px 12px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-control:focus, .form-select:focus {
  border-color: var(--c-primary-mid);
  box-shadow: 0 0 0 3px rgba(37,99,168,.12); outline: none;
}
.form-label { font-weight: 500; font-size: 13px; color: var(--c-text-2); margin-bottom: 5px; }
.form-text { font-size: 12px; color: var(--c-text-4); }
.invalid-feedback { font-size: 12px; }
.form-check-input:checked { background-color: var(--c-primary); border-color: var(--c-primary); }
.section-divider {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--c-text-4);
  border-bottom: 1px solid var(--c-border); padding-bottom: 7px; margin: 0 0 18px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CUSTOMER — AUTH PAGES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.auth-wrap {
  min-height: calc(100vh - 56px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 16px;
  background: linear-gradient(160deg, var(--c-primary-xlight) 0%, var(--c-bg) 60%);
}
.auth-card {
  width: 100%; max-width: 460px;
  background: var(--c-surface); border: none;
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.auth-card-header {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-mid) 100%);
  color: #fff; padding: 28px 32px 24px;
}
.auth-card-header h1, .auth-card-header h2,
.auth-card-header h4 { font-size: 20px; font-weight: 700; margin: 0 0 4px; color: #fff; }
.auth-card-header p { margin: 0; opacity: .8; font-size: 13px; }
.auth-card-body { padding: 30px 32px; }

/* Admin login standalone page */
.admin-login-body {
  background: #0d1b2a; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
}
.admin-login-wrap { width: 100%; max-width: 420px; padding: 0 16px; }
.admin-login-card {
  background: #fff; border-radius: var(--r-xl);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  overflow: hidden;
}
.admin-login-card-header {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-mid) 100%);
  padding: 28px 32px 24px; text-align: center;
}
.admin-login-card-header h2 { font-size: 20px; font-weight: 700; color: #fff; margin: 0 0 4px; }
.admin-login-card-header p  { color: rgba(255,255,255,.75); font-size: 13px; margin: 0; }
.admin-login-card-body { padding: 28px 32px 32px; }
.auth-card-footer {
  padding: 14px 32px 20px;
  border-top: 1px solid var(--c-border-light);
  font-size: 13px; text-align: center; color: var(--c-text-3);
}
.otp-input {
  letter-spacing: 10px; font-size: 26px; font-weight: 700;
  text-align: center; max-width: 240px; font-family: var(--font-mono);
  border-radius: var(--r-md);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CUSTOMER — KYC STEPPER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.kyc-stepper-wrap {
  background: var(--c-surface); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); padding: 16px 24px;
  margin-bottom: 24px; overflow-x: auto;
}
.kyc-stepper { display: flex; align-items: flex-start; min-width: 540px; }
.kyc-step {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; position: relative; text-align: center;
}
.kyc-step + .kyc-step::before {
  content: ''; position: absolute; top: 16px; right: 50%; left: -50%;
  height: 2px; background: var(--c-border); z-index: 0; transition: background var(--t-slow);
}
.kyc-step.done + .kyc-step::before { background: var(--c-success); }
.kyc-step-circle {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--c-border); color: var(--c-text-3);
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
  transition: background var(--t-base), color var(--t-base), box-shadow var(--t-base);
}
.kyc-step.done   .kyc-step-circle { background: var(--c-success); color: #fff; }
.kyc-step.active .kyc-step-circle {
  background: var(--c-primary); color: #fff;
  box-shadow: 0 0 0 4px var(--c-primary-light);
}
.kyc-step-label { font-size: 11px; font-weight: 500; color: var(--c-text-4); margin-top: 7px; white-space: nowrap; }
.kyc-step.done   .kyc-step-label { color: var(--c-success); font-weight: 600; }
.kyc-step.active .kyc-step-label { color: var(--c-primary); font-weight: 700; }

/* KYC Card */
.kyc-card {
  max-width: 820px; margin: 0 auto;
  border-radius: var(--r-lg); border: none;
  box-shadow: var(--shadow-md); background: var(--c-surface);
}
.card-header-kyc {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-mid) 100%);
  color: #fff; padding: 22px 28px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  font-size: 17px; font-weight: 700;
}
.card-header-kyc i { margin-right: 8px; }
.card-header-kyc p { margin: 6px 0 0; opacity: .75; font-size: 13px; font-weight: 400; }

/* Section title inside KYC forms */
.section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--c-text-4);
  border-bottom: 1px solid var(--c-border); padding-bottom: 6px; margin-bottom: 16px;
}

/* Upload zones */
.upload-drop-zone {
  border: 2px dashed var(--c-border); border-radius: var(--r-md);
  padding: 20px 14px; text-align: center; cursor: pointer;
  background: var(--c-border-light);
  transition: border-color var(--t-base), background var(--t-base);
}
.upload-drop-zone:hover { border-color: var(--c-primary-mid); background: var(--c-primary-xlight); }
.upload-drop-zone.dragover { border-color: var(--c-primary); background: var(--c-primary-xlight); }
.upload-preview { max-height: 80px; border-radius: var(--r-sm); margin-top: 8px; }

/* YN toggle */
.yn-toggle-group { display: flex; gap: 8px; }
.yn-opt {
  padding: 6px 18px; border: 2px solid var(--c-border); border-radius: var(--r-sm);
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all var(--t-fast); display: flex; align-items: center; gap: 5px;
}
.yn-opt input[type=radio] { display: none; }
.yn-opt.active-yes { background: var(--c-success-light); border-color: var(--c-success); color: var(--c-success); }
.yn-opt.active-no  { background: var(--c-border-light); border-color: var(--c-border); color: var(--c-text-3); }
.compliance-check {
  padding: 12px 16px; margin-bottom: 8px;
  background: #fffbf0; border: 1px solid #fde68a; border-radius: var(--r-md);
}
.compliance-check.is-invalid-wrap { border-color: var(--c-danger); background: var(--c-danger-light); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SHARED — INFO TABLE (profile / review)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.info-table { width: 100%; border-collapse: collapse; }
.info-table tr { border-bottom: 1px solid var(--c-border-light); }
.info-table tr:last-child { border-bottom: none; }
.info-table td { padding: 10px 20px; font-size: 13px; vertical-align: top; }
.info-table td.lbl {
  width: 38%; color: var(--c-text-3); font-weight: 500; font-size: 12px;
  text-transform: uppercase; letter-spacing: .04em;
  background: var(--c-border-light);
}
.info-table td.val { font-weight: 600; color: var(--c-text); }

/* Detail grid (2-col) */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; }
.detail-cell { padding: 11px 20px; border-bottom: 1px solid var(--c-border-light); }
.detail-cell:nth-child(odd) { border-right: 1px solid var(--c-border-light); }
.detail-cell:last-child:nth-child(odd) { border-right: none; grid-column: 1 / -1; }
.detail-label { font-size: 11px; color: var(--c-text-4); text-transform: uppercase; letter-spacing: .04em; }
.detail-value { font-size: 13px; font-weight: 600; color: var(--c-text); margin-top: 3px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SHARED — BADGE / STATUS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--r-full);
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.pill-success  { background: var(--c-success-light); color: var(--c-success); }
.pill-warning  { background: var(--c-warning-light); color: var(--c-warning); }
.pill-danger   { background: var(--c-danger-light);  color: var(--c-danger); }
.pill-info     { background: var(--c-info-light);    color: var(--c-info); }
.pill-primary  { background: var(--c-primary-light); color: var(--c-primary); }
.pill-neutral  { background: var(--c-border-light);  color: var(--c-text-3); }

/* Bootstrap subtle override */
.bg-success-subtle { background: var(--c-success-light) !important; }
.text-success      { color: var(--c-success) !important; }
.text-primary      { color: var(--c-primary) !important; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SHARED — TIMELINE (audit log / activity)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.timeline { position: relative; padding: 8px 0; }
.timeline::before {
  content: ''; position: absolute; left: 20px; top: 0; bottom: 0;
  width: 2px; background: var(--c-border);
}
.tl-item { position: relative; padding: 0 0 16px 52px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: 12px; top: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--c-surface); border: 2.5px solid var(--c-border);
  display: flex; align-items: center; justify-content: center; font-size: 9px;
  z-index: 1;
}
.tl-dot-primary { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-primary-xlight); }
.tl-dot-success { border-color: var(--c-success); color: var(--c-success); background: var(--c-success-light); }
.tl-dot-warning { border-color: var(--c-warning); color: var(--c-warning); background: var(--c-warning-light); }
.tl-dot-danger  { border-color: var(--c-danger);  color: var(--c-danger);  background: var(--c-danger-light); }
.tl-body   { font-size: 13px; color: var(--c-text-2); line-height: 1.4; }
.tl-action { font-weight: 600; color: var(--c-text); }
.tl-time   { font-size: 11px; color: var(--c-text-4); margin-top: 2px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SHARED — TOAST NOTIFICATIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 99998; display: flex; flex-direction: column; gap: 8px;
  max-width: 360px; width: calc(100vw - 48px); pointer-events: none;
}
.toast-item {
  background: rgba(10,14,26,.94);
  border: 1px solid rgba(255,255,255,.11);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 8px 32px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.07);
  padding: 12px 16px; border-radius: 12px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: #e2e8f0; line-height: 1.4;
  border-left: 3px solid rgba(255,255,255,.18);
  animation: toastIn .3s cubic-bezier(0.34,1.56,0.64,1) both;
  pointer-events: all;
}
.toast-item.toast-success { border-left-color: #22c55e; }
.toast-item.toast-danger  { border-left-color: #ef4444; }
.toast-item.toast-warning { border-left-color: #f59e0b; }
.toast-item.toast-info    { border-left-color: #3b82f6; }
.toast-item i { font-size: 16px; flex-shrink: 0; }
.toast-item.toast-success i { color: #22c55e; }
.toast-item.toast-danger  i { color: #ef4444; }
.toast-item.toast-warning i { color: #f59e0b; }
.toast-item.toast-info    i { color: #60a5fa; }
.toast-item .toast-close {
  margin-left: auto; background: none; border: none; color: rgba(255,255,255,.4);
  cursor: pointer; font-size: 14px; padding: 0 0 0 8px; flex-shrink: 0;
  transition: color .15s ease;
}
.toast-item .toast-close:hover { color: #fff; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(24px) scale(.95); }
  to   { opacity: 1; transform: none; }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(24px) scale(.95); }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SHARED — TOOLTIPS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.info-tip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--c-primary-light); color: var(--c-primary);
  font-size: 9px; font-weight: 700; cursor: help;
  vertical-align: middle; margin-left: 4px;
  transition: background var(--t-fast);
}
.info-tip:hover { background: var(--c-primary); color: #fff; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SHARED — EMPTY STATE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.empty-state {
  padding: 40px 20px; text-align: center;
}
.empty-state-icon {
  font-size: 48px; color: var(--c-border);
  display: block; margin-bottom: 14px;
}
.empty-state-title { font-size: 16px; font-weight: 700; color: var(--c-text-2); margin-bottom: 6px; }
.empty-state-desc  { font-size: 13px; color: var(--c-text-4); margin-bottom: 20px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SHARED — SKELETON LOADER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.skeleton {
  background: linear-gradient(90deg, var(--c-border-light) 25%, #e9ecef 50%, var(--c-border-light) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--r-sm);
}
.skeleton-dark {
  background: linear-gradient(90deg, rgba(255,255,255,.05) 25%, rgba(255,255,255,.09) 50%, rgba(255,255,255,.05) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--r-sm);
}
.sk-text    { height: 14px; margin-bottom: var(--sp-2); }
.sk-text-sm { height: 11px; margin-bottom: 6px; }
.sk-text-lg { height: 20px; margin-bottom: var(--sp-2); }
.sk-circle  { border-radius: 50%; }
.sk-pill    { border-radius: var(--r-full); }
.sk-btn     { height: 34px; border-radius: var(--r-full); }
.sk-badge   { height: 20px; width: 56px; border-radius: var(--r-full); }
.sk-row     { height: 44px; border-radius: var(--r-sm); margin-bottom: 4px; }
.sk-card    { height: 120px; border-radius: var(--r-md); }
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CUSTOMER — FOOTER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.site-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: 20px 24px;
  margin-top: auto;
}
.site-footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 10px;
}
.site-footer-brand { font-size: 13px; font-weight: 700; color: var(--c-text-2); }
.site-footer-sebi  { font-size: 12px; color: var(--c-text-4); }
.site-footer-links { display: flex; gap: 16px; font-size: 12px; }
.site-footer-links a { color: var(--c-text-4); }
.site-footer-links a:hover { color: var(--c-primary-mid); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ADMIN — BOOTSTRAP CARD NORMALIZER
   Makes all Bootstrap .card inside .adm-content match the design system
   without touching individual PHP page files.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.adm-content .card {
  border: none;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t-base);
}
.adm-content .card:hover { box-shadow: var(--shadow-md); }

/* Card header — neutral default */
.adm-content .card-header {
  font-size: 13px; font-weight: 700;
  padding: 12px 20px;
  border-bottom: 1px solid var(--c-border-light);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: var(--c-border-light);
  color: var(--c-primary);
}
/* Coloured card headers retain identity via design tokens */
.adm-content .card-header.bg-primary {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-mid));
  color: #fff; border-color: transparent;
}
.adm-content .card-header.bg-success {
  background: var(--c-success); color: #fff; border-color: transparent;
}
.adm-content .card-header.bg-warning {
  background: var(--c-warning); color: #fff; border-color: transparent;
}
.adm-content .card-header.bg-info {
  background: var(--c-info); color: #fff; border-color: transparent;
}
.adm-content .card-header.bg-danger {
  background: var(--c-danger); color: #fff; border-color: transparent;
}

/* Uniform inline border-radius overrides from PHP pages */
.adm-content .card[style*="border-radius"] { border-radius: var(--r-lg) !important; }
.adm-content .card-header[style*="border-radius"] { border-radius: var(--r-lg) var(--r-lg) 0 0 !important; }

/* Card titles inside admin cards */
.adm-content .card-body h6.fw-bold {
  font-size: 13px; font-weight: 700;
  color: var(--c-primary); display: flex; align-items: center; gap: 8px;
}
/* White text in coloured headers must not be overridden */
.adm-content .card-header.bg-primary *,
.adm-content .card-header.bg-success *,
.adm-content .card-header.bg-warning *,
.adm-content .card-header.bg-info    *,
.adm-content .card-header.bg-danger  * { color: inherit; }

/* Report stat numbers */
.adm-content .display-6 { font-size: 28px; font-weight: 800; line-height: 1.1; }
.adm-content .display-6.text-success { color: var(--c-success) !important; }
.adm-content .display-6.text-primary { color: var(--c-primary) !important; }
.adm-content .display-6.text-warning { color: var(--c-warning) !important; }
.adm-content .display-6.text-danger  { color: var(--c-danger)  !important; }

/* Table dark head → design system primary */
.adm-content thead.table-dark th {
  background: var(--c-primary) !important;
  color: #fff !important;
  font-size: 11px !important; font-weight: 700 !important;
  text-transform: uppercase !important; letter-spacing: .05em !important;
  border-color: var(--c-primary) !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ADMIN — DATATABLES OVERRIDES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.dataTables_wrapper .dataTables_filter input {
  border-radius: var(--r-sm); border: 1px solid var(--c-border);
  padding: 6px 10px; font-size: 13px;
}
.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--c-primary-mid); box-shadow: 0 0 0 2px rgba(37,99,168,.12); outline: none;
}
table.dataTable thead th {
  background: var(--c-border-light);
  border-bottom: 2px solid var(--c-border) !important;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--c-text-3);
}
table.dataTable tbody tr { transition: background var(--t-fast); }
table.dataTable tbody tr:hover { background: var(--c-primary-xlight) !important; }
table.dataTable tbody td { font-size: 13px; vertical-align: middle; }





/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Micro-interactions
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */


/* Micro-interactions & Animations */
.form-control:focus {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 60, 110, 0.1);
    transition: all 0.3s ease;
}

/* Pulsating Error for Checkboxes/Inputs */
@keyframes pulsate-red {
    0% { box-shadow: 0 0 0 0px rgba(220, 53, 69, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0px rgba(220, 53, 69, 0); }
}

.pulsate-error {
    animation: pulsate-red 1.5s infinite;
    border-color: #dc3545 !important;
}

/* Visual Headings */
.form-section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f3f5;
}

.form-section-header i {
    width: 40px;
    height: 40px;
    background: var(--brand-blue);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}









/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Z-INDEX LAYER SYSTEM
   backdrop: 1040 | modal: 1055 | custom popups: 1060+ | overlays: 9999+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* All custom popups above Bootstrap modal backdrop (1040) and modal (1055) */
.cust-dd,
.cal-popup,
.svc-row-cal,
[id$="-dropdown"][style*="position:absolute"],
[id$="-dropdown"][style*="position: absolute"],
#bankDd,
#add_customer_dropdown,
.autocomplete-items,
.tsw-pop,
.ui-autocomplete,
.select2-dropdown       { z-index: 1060 !important; }

/* Elements that must always be topmost */
#toast-container,
#cmd-palette,
#page-bar,
.d9ov,
#d9fPrev                { z-index: 99999 !important; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 768px) {
  .adm-sidebar { position: fixed; left: -100%; top: 0; z-index: 1050; transition: left var(--t-slow); }
  .adm-sidebar.open { left: 0; }
  .adm-sidebar-toggle { display: block; }
  .adm-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.5); z-index: 1049;
  }
  .adm-overlay.show { display: block; }
  .adm-topbar { padding: 0 16px; }
  .adm-content { padding: 16px; }
  .page-container, .page-container-md { padding: 16px 14px 40px; }
  .auth-card-body { padding: 20px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-cell:nth-child(odd) { border-right: none; }

  /* Responsive table → card view */
  .table-card-mobile thead { display: none !important; }
  .table-card-mobile tbody tr {
    display: block;
    background: var(--c-surface);
    border-radius: var(--r-md);
    margin-bottom: 10px;
    box-shadow: var(--e1);
    border: 1px solid var(--c-border);
    padding: 10px 14px;
  }
  .table-card-mobile tbody td {
    display: flex; align-items: flex-start;
    padding: 5px 0; border: none;
    font-size: 13px; gap: 8px;
    border-bottom: 1px solid var(--c-border-light);
  }
  .table-card-mobile tbody td:last-child { border-bottom: none; }
  .table-card-mobile tbody td::before {
    content: attr(data-label);
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: var(--c-text-4);
    min-width: 100px; flex-shrink: 0; padding-top: 2px;
  }
  .table-card-mobile tbody td:empty { display: none; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PRINT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media print {
  .adm-sidebar, .adm-topbar, .site-nav, .site-footer,
  .no-print, .btn, nav { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .ui-card { box-shadow: none !important; border: 1px solid #ddd !important; }
  .adm-main { margin: 0 !important; }
}



