/* DebtFix Solutions v2.0 - Unified Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #12374E;         /* Deep Navy */
  --primary-light: #1A4A68;
  --secondary: #087F83;       /* Teal */
  --secondary-light: #0B9FA4;
  --accent: #36B99A;          /* Mint Green */
  --accent-soft: rgba(54, 185, 154, 0.12);
  --bg-main: #F6F9FB;         /* Light Canvas */
  --bg-card: #FFFFFF;
  --text-main: #182B3A;
  --text-muted: #6B7C8A;
  --border-color: #E2E8F0;
  --warning: #D97706;         /* Amber */
  --error: #DC2626;           /* Red */
  --success: #16A34A;         /* Green */
  --shadow-sm: 0 1px 3px rgba(18, 55, 78, 0.06);
  --shadow-md: 0 4px 12px rgba(18, 55, 78, 0.08);
  --shadow-lg: 0 10px 25px -3px rgba(18, 55, 78, 0.1);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

/* Layout */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.text-center p,
.hero .text-center p {
  margin-left: auto;
  margin-right: auto;
}

.section-padding {
  padding: 72px 0;
}

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
}

code {
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
}

/* Compliance Top Bar */
.compliance-bar {
  background-color: var(--primary);
  color: #CBD5E1;
  padding: 6px 0;
  font-size: 0.78rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.compliance-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 16px;
}

/* Navigation Header */
.site-header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.site-header .nav-wrap {
  max-width: 1340px;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 12px;
  position: relative;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 1.12rem;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-badge {
  background: var(--primary);
  color: white;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
  flex-wrap: nowrap;
}

.nav-links a {
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--secondary);
  font-weight: 600;
}

.nav-auth-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.nav-auth-buttons .btn {
  white-space: nowrap;
  padding: 7px 13px;
  font-size: 0.82rem;
}

.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #FFFFFF;
  color: var(--primary);
  cursor: pointer;
  font-size: 1rem;
}
.mobile-menu-toggle:hover {
  border-color: var(--secondary);
  color: var(--secondary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1.3;
}

.btn-primary {
  background-color: var(--secondary);
  color: white;
}
.btn-primary:hover {
  background-color: var(--secondary-light);
  box-shadow: 0 4px 12px rgba(8, 127, 131, 0.25);
}

.btn-secondary {
  background-color: var(--primary);
  color: white;
}
.btn-secondary:hover {
  background-color: var(--primary-light);
  box-shadow: 0 4px 12px rgba(18, 55, 78, 0.2);
}

.btn-navy {
  background-color: var(--primary);
  color: white;
}
.btn-navy:hover {
  background-color: var(--primary-light);
}

.btn-outline {
  border-color: var(--border-color);
  background: white;
  color: var(--text-main);
}
.btn-outline:hover {
  border-color: var(--secondary);
  color: var(--secondary);
}

.btn-whatsapp {
  background-color: #1DA851;
  color: white;
}
.btn-whatsapp:hover {
  background-color: #178F43;
  box-shadow: 0 4px 12px rgba(29, 168, 81, 0.25);
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* Hero Section */
.hero {
  padding: 80px 0;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--bg-main) 100%);
  border-bottom: 1px solid var(--border-color);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  color: var(--secondary);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 2.75rem;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.12rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 580px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Program Cards Grid */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.program-card {
  border-top: 5px solid var(--secondary);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.program-card.emi {
  border-top-color: var(--primary);
}

/* Stats Counter Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.stat-box {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
}

.stat-val {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-val.teal {
  color: var(--secondary);
}

.stat-lbl {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  margin-top: 6px;
}

/* Process Steps */
.step-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.step-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
}

.step-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--secondary);
  opacity: 0.35;
  margin-bottom: 12px;
}

/* Legal Lock Alert Banner */
.legal-lock-banner {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E40AF;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  margin-bottom: 24px;
}

/* Footer */
.site-footer {
  background: var(--primary);
  color: #E2E8F0;
  padding: 64px 0 24px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-col h4 {
  color: white;
  font-size: 1.05rem;
  margin-bottom: 18px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: #94A3B8;
  font-size: 0.88rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-size: 0.82rem;
  color: #94A3B8;
}

/* Shared Responsive Grids & Components Across All Pages */
.grid-2-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: stretch;
}

.grid-3-col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.grid-4-kpi {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.draws-grid,
.winners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.draw-card,
.winner-card {
  border-top: 4px solid var(--secondary);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.draw-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.draw-cat-pill {
  background: var(--accent-soft);
  color: var(--secondary);
  font-weight: 800;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.draw-ref-text {
  font-size: 0.73rem;
  font-weight: 600;
  font-family: 'SF Mono', 'Menlo', monospace;
  color: var(--text-muted);
  text-align: right;
  word-break: break-all;
}

.draw-timer-box {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
  margin-top: auto;
  margin-bottom: 16px;
}

.countdown-widget {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.countdown-unit-box {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 6px 8px;
  min-width: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-unit-box .num {
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

.countdown-unit-box .lbl {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-top: 3px;
}

.countdown-colon {
  font-weight: 800;
  color: #94A3B8;
  font-size: 1.05rem;
  padding-bottom: 10px;
}

.filter-bar {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}

.filter-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.check-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-main);
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.55;
}

.check-list li i {
  margin-top: 4px;
  flex-shrink: 0;
}

.fund-pool-row {
  background: var(--bg-main);
  padding: 16px 18px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.process-step-card {
  display: flex;
  gap: 22px;
  align-items: flex-start;
}

.process-step-badge {
  color: white;
  font-size: 1.3rem;
  font-weight: 800;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 1220px) {
  .mobile-menu-toggle {
    display: inline-flex;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    padding: 16px 24px;
    z-index: 999;
  }
  .site-nav.open {
    display: block;
  }
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .nav-links li,
  .nav-links a {
    width: 100%;
    display: block;
  }
  .nav-links a {
    padding: 6px 0;
    font-size: 0.95rem;
  }
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .programs-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3-col { grid-template-columns: 1fr; }
  .grid-2-col { grid-template-columns: 1fr; }
  .step-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 580px) {
  .section-padding { padding: 48px 0; }
  .hero { padding: 48px 0 !important; }
  .hero h1 { font-size: 2rem; }
  .stats-grid,
  .grid-4-kpi,
  .draws-grid,
  .winners-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .process-step-card {
    flex-direction: column;
    gap: 14px;
  }
  .compliance-inner {
    justify-content: center;
    text-align: center;
  }
  .nav-auth-buttons .btn {
    padding: 7px 10px;
    font-size: 0.78rem;
  }
  .brand-logo {
    font-size: 1.02rem;
    gap: 8px;
  }
  .brand-badge {
    width: 32px;
    height: 32px;
    font-size: 0.92rem;
  }
  .step-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   BORROWER PORTAL, FORMS, STATUS BADGES & DASHBOARD LAYOUT
   ========================================================================== */
.borrower-shell {
  padding-top: 36px;
  padding-bottom: 56px;
}

.alert-banner {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.alert-banner i {
  margin-top: 3px;
  flex-shrink: 0;
}
.alert-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}
.alert-success {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #166534;
}
.alert-info {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E40AF;
}
.alert-warning {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #92400E;
}

/* Wizard Cards & Stepper */
.wizard-card {
  margin: 0 auto;
  padding: 36px 40px;
}

.wizard-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.wizard-step-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #E2E8F0;
  color: #64748B;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
}

.wizard-step.done {
  color: var(--secondary);
}
.wizard-step.done .wizard-step-dot {
  background: #CCFBF1;
  color: #0F766E;
}
.wizard-step.active {
  color: var(--primary);
  font-weight: 700;
}
.wizard-step.active .wizard-step-dot {
  background: var(--secondary);
  color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(8, 127, 131, 0.16);
}

.wizard-step-line {
  flex: 1;
  min-width: 14px;
  height: 2px;
  background: #E2E8F0;
}
.wizard-step-line.done {
  background: var(--secondary);
}

/* Form Elements */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.form-span-full {
  grid-column: 1 / -1;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--text-main);
  background-color: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(8, 127, 131, 0.14);
}

.form-control::placeholder {
  color: #94A3B8;
}

input[type="file"].form-control {
  padding: 7px 10px;
  font-size: 0.84rem;
  background: #FFFFFF;
}
input[type="file"].form-control::file-selector-button {
  background: #F1F5F9;
  color: var(--primary);
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  padding: 5px 12px;
  margin-right: 10px;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
}
input[type="file"].form-control::file-selector-button:hover {
  background: #E2E8F0;
}

.form-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

.upload-bar-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(200px, 1.5fr) auto;
  gap: 14px;
  align-items: end;
}

/* Status Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.status-success { background: #DCFCE7; color: #166534; border: 1px solid #BBF7D0; }
.status-warning { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.status-info    { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }
.status-danger  { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.status-neutral { background: #F1F5F9; color: #475569; border: 1px solid #E2E8F0; }

/* Dashboard Top Bar & KPI Cards */
.borrower-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.borrower-topbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.borrower-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.borrower-kpi-card {
  padding: 20px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.borrower-kpi-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.borrower-kpi-value {
  font-size: 1.32rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
  word-break: break-word;
}

/* Connected Lifecycle Progress Timeline */
.timeline-scroll {
  overflow-x: auto;
  padding: 6px 2px 10px 2px;
  -webkit-overflow-scrolling: touch;
}

.case-timeline {
  display: grid;
  grid-template-columns: repeat(8, minmax(108px, 1fr));
  gap: 0;
  position: relative;
  min-width: 780px;
}

.case-timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 0 6px;
}

.case-timeline-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 16px;
  left: calc(50% + 18px);
  width: calc(100% - 36px);
  height: 3px;
  background: #E2E8F0;
  border-radius: 2px;
  z-index: 1;
}

.case-timeline-step.done:not(:last-child)::after {
  background: var(--secondary);
}

.case-timeline-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #F1F5F9;
  border: 2px solid #CBD5E1;
  color: #64748B;
  font-size: 0.78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  position: relative;
  z-index: 2;
  transition: all 0.2s ease;
}

.case-timeline-step.done .case-timeline-dot {
  background: var(--secondary);
  border-color: var(--secondary);
  color: #FFFFFF;
}

.case-timeline-step.current .case-timeline-dot {
  background: var(--primary);
  border-color: var(--secondary);
  color: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(8, 127, 131, 0.18);
}

.case-timeline-label {
  font-size: 0.75rem;
  line-height: 1.3;
  font-weight: 500;
  color: var(--text-muted);
}

.case-timeline-step.done .case-timeline-label {
  color: var(--primary);
  font-weight: 600;
}

.case-timeline-step.current .case-timeline-label {
  color: var(--primary);
  font-weight: 800;
}

/* Dashboard Modules Grid & Key-Value Lists */
.borrower-modules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.borrower-modules-grid > .card,
.borrower-modules-grid > .dfx-countdown-banner {
  min-width: 0;
}

.module-span-full {
  grid-column: 1 / -1;
}

.kv-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  font-size: 0.88rem;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #F1F5F9;
  flex-wrap: wrap;
}

.kv-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.kv-label {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.83rem;
}

.kv-val {
  color: var(--text-main);
  font-weight: 700;
  text-align: right;
  word-break: break-word;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.data-table th {
  background: #F8FAFC;
  padding: 11px 14px;
  text-align: left;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--primary);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #F1F5F9;
  color: var(--text-main);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Referral Share Bar */
.referral-share-bar {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  padding: 18px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.referral-link-code {
  display: inline-block;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--primary);
  word-break: break-all;
  margin-top: 4px;
}

.referral-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

@media (max-width: 860px) {
  .borrower-modules-grid {
    grid-template-columns: 1fr;
  }
  .upload-bar-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .borrower-shell {
    padding-top: 24px;
    padding-bottom: 40px;
  }
  .card {
    padding: 22px 18px;
  }
  .wizard-card {
    padding: 24px 18px;
  }
  .wizard-step-text {
    display: none;
  }
  .wizard-step.active .wizard-step-text {
    display: inline;
  }
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
  .borrower-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .borrower-kpi-grid .borrower-kpi-card:last-child {
    grid-column: 1 / -1;
  }
  .kv-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .kv-val {
    text-align: left;
  }
  .referral-share-actions {
    width: 100%;
  }
  .referral-share-actions .btn {
    flex: 1;
  }
}



/* ==========================================================================
   AUTHENTIC FINTECH TICKET PASS DESIGN & VERIFICATION
   ========================================================================== */
.dfx-ticket-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 16px 0;
}

.dfx-ticket-pass {
  display: flex;
  position: relative;
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 10px 30px -8px rgba(18, 55, 78, 0.1);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dfx-ticket-pass:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -8px rgba(18, 55, 78, 0.14);
}

/* Category Accent Strip */
.dfx-ticket-pass::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 7px;
  background: var(--cat-accent, var(--secondary));
}

.cat-theme-A { --cat-accent: #087F83; }
.cat-theme-B { --cat-accent: #2563EB; }
.cat-theme-C { --cat-accent: #7C3AED; }
.cat-theme-D { --cat-accent: #D97706; }
.cat-theme-E { --cat-accent: #12374E; }

/* Main Ticket Section (Left) */
.dfx-ticket-main {
  flex: 1;
  min-width: 0;
  padding: 24px 28px 24px 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  background: radial-gradient(circle at 100% 50%, rgba(248, 250, 252, 0.8) 0%, #FFFFFF 100%);
}

.dfx-ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.dfx-ticket-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dfx-ticket-logo-mark {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.95rem;
}

.dfx-ticket-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.cat-badge-A { background: #CCFBF1; color: #0F766E; border: 1px solid #99F6E4; }
.cat-badge-B { background: #DBEAFE; color: #1E40AF; border: 1px solid #BFDBFE; }
.cat-badge-C { background: #F3E8FF; color: #6B21A8; border: 1px solid #E9D5FF; }
.cat-badge-D { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.cat-badge-E { background: #E2E8F0; color: #1E293B; border: 1px solid #CBD5E1; }

.dfx-ticket-id-section {
  margin: 8px 0 16px 0;
}

.dfx-ticket-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
}

.dfx-ticket-number {
  font-family: 'SF Mono', 'Courier New', Courier, monospace;
  font-size: clamp(1.18rem, 2.4vw, 1.65rem);
  font-weight: 900;
  color: var(--primary);
  letter-spacing: 1.5px;
  margin-top: 2px;
  word-break: break-word;
}

.dfx-ticket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px 18px;
  background: #F8FAFC;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid #F1F5F9;
}

.dfx-grid-item-val {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 2px;
  word-break: break-word;
}

.dfx-ticket-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #F1F5F9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Perforation Divider with Circular Notches */
.dfx-ticket-perforation {
  width: 0;
  position: relative;
  border-left: 2px dashed #CBD5E1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dfx-notch-top, .dfx-notch-bottom {
  position: absolute;
  width: 24px;
  height: 24px;
  background: var(--ticket-cutout-bg, #FFFFFF);
  border: 1px solid #E2E8F0;
  border-radius: 50%;
  left: -13px;
  z-index: 3;
}

.dfx-notch-top {
  top: -13px;
}

.dfx-notch-bottom {
  bottom: -13px;
}

/* Ticket Verification Stub (Right) */
.dfx-ticket-stub {
  width: 220px;
  flex-shrink: 0;
  padding: 24px 20px;
  background: #F8FAFC;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  border-left: 1px solid #F1F5F9;
}

.dfx-qr-box {
  background: white;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dfx-barcode {
  height: 28px;
  width: 100%;
  display: flex;
  gap: 2px;
  align-items: stretch;
  justify-content: center;
  margin: 8px 0 4px 0;
}

.dfx-bar {
  background: #1E293B;
  border-radius: 1px;
}

.dfx-stub-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
}

.dfx-btn-verify {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s;
  text-decoration: none;
}

.dfx-btn-verify:hover {
  background: var(--secondary);
  color: white;
}

.dfx-btn-print {
  width: 100%;
  background: white;
  color: var(--text-main);
  border: 1px solid #CBD5E1;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.dfx-btn-print:hover {
  background: #F1F5F9;
}

/* ==========================================================================
   REVERSE COUNTDOWN TIMER (FIXED 15th 2:00 PM SCHEDULE)
   ========================================================================== */
.dfx-countdown-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #1A4B69 100%);
  color: white;
  border-radius: 14px;
  padding: 24px 28px;
  box-shadow: 0 10px 25px -5px rgba(18, 55, 78, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
}

.dfx-countdown-title {
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dfx-countdown-meta {
  font-size: 0.82rem;
  color: #94A3B8;
  margin-top: 4px;
}

.dfx-countdown-display {
  display: flex;
  gap: 10px;
  align-items: center;
}

.dfx-countdown-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 68px;
  text-align: center;
}

.dfx-countdown-num {
  font-size: 1.8rem;
  font-weight: 900;
  font-family: 'SF Mono', monospace;
  color: #FFFFFF;
  line-height: 1;
}

.dfx-countdown-unit {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-top: 6px;
}

.dfx-countdown-sep {
  font-size: 1.5rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   MODAL: INSTANT TICKET VERIFICATION OVERLAY
   ========================================================================== */
.dfx-modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(18, 55, 78, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.dfx-modal-backdrop[hidden] {
  display: none !important;
}

.dfx-modal-backdrop.active {
  display: flex;
}

.dfx-modal-box {
  background: white;
  width: 100%;
  max-width: 620px;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  0% { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

.dfx-modal-header {
  background: #F8FAFC;
  padding: 20px 24px;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dfx-modal-body {
  padding: 24px;
  max-height: 78vh;
  overflow-y: auto;
}

.dfx-modal-banner {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.dfx-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  font-size: 0.86rem;
  margin-bottom: 20px;
}

.dfx-modal-footer {
  background: #F8FAFC;
  padding: 16px 24px;
  border-top: 1px solid #E2E8F0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   REFERRAL HUB: 5-LEVEL CASCADING DOWNLINE & COMMISSIONS
   ========================================================================== */
.referral-stat-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.referral-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.referral-table th {
  background: #F8FAFC;
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  color: var(--primary);
  border-bottom: 1px solid #E2E8F0;
  white-space: nowrap;
}

.referral-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #F1F5F9;
  color: var(--text-main);
}

/* ==========================================================================
   USDT TICKET CHECKOUT, ALL-WALLET QR CODES & STRICT DEPOSIT VALIDATION
   ========================================================================== */
.usdt-checkout-panel {
  background: linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 100%);
  border: 1.5px solid #CBD5E1;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
}

.usdt-checkout-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: start;
}

.usdt-price-hero {
  background: linear-gradient(135deg, #12374E 0%, #087F83 100%);
  color: #FFFFFF;
  padding: 18px 20px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.usdt-price-big {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.usdt-wallet-box {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.usdt-wallet-addr {
  font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--primary);
  word-break: break-all;
  background: #F1F5F9;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #E2E8F0;
  margin-top: 6px;
}

.qr-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.qr-tab-btn {
  padding: 6px 12px;
  border-radius: 50px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: var(--text-main);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.qr-tab-btn:hover {
  border-color: var(--secondary);
  color: var(--secondary);
}

.qr-tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

.qr-display-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.qr-svg-frame {
  display: inline-flex;
  padding: 10px;
  background: #FFFFFF;
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  margin: 10px auto;
}

.qr-all-grid {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.qr-all-grid.active {
  display: grid;
}

.qr-mini-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
}

.qr-mini-card svg {
  width: 128px;
  height: 128px;
  margin: 6px auto;
  display: block;
}

.wallet-compat-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.wallet-compat-pill {
  font-size: 0.69rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: #F1F5F9;
  color: #334155;
  border: 1px solid #E2E8F0;
}

.strict-rules-box {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.79rem;
  color: #92400E;
  margin-bottom: 16px;
}

@media (max-width: 920px) {
  .usdt-checkout-grid {
    grid-template-columns: 1fr;
  }
}

/* Print Pass Formatter */
@media print {
  body * { visibility: hidden; }
  .dfx-ticket-container, .dfx-ticket-container * { visibility: visible; }
  .dfx-ticket-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
  .dfx-ticket-pass {
    border: 1px solid #000;
    box-shadow: none !important;
    break-inside: avoid;
    margin-bottom: 16px;
  }
  .dfx-stub-actions { display: none !important; }
}

@media (max-width: 768px) {
  .dfx-ticket-pass {
    flex-direction: column;
  }
  .dfx-ticket-main {
    padding: 20px 20px 20px 24px;
  }
  .dfx-ticket-perforation {
    width: 100%;
    height: 0;
    border-left: none;
    border-top: 2px dashed #CBD5E1;
  }
  .dfx-notch-top {
    left: -13px;
    top: -13px;
  }
  .dfx-notch-bottom {
    right: -13px;
    top: -13px;
    bottom: auto;
    left: auto;
  }
  .dfx-ticket-stub {
    width: 100%;
    border-left: none;
    border-top: 1px solid #F1F5F9;
  }
  .dfx-countdown-banner {
    flex-direction: column;
    text-align: center;
    padding: 20px 18px;
  }
  .dfx-countdown-title {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .dfx-modal-grid {
    grid-template-columns: 1fr;
  }
  .dfx-modal-header,
  .dfx-modal-body,
  .dfx-modal-footer {
    padding: 16px;
  }
  .dfx-countdown-display {
    gap: 6px;
  }
  .dfx-countdown-card {
    min-width: 56px;
    padding: 8px 10px;
  }
  .dfx-countdown-num {
    font-size: 1.35rem;
  }
  .dfx-countdown-sep {
    font-size: 1.15rem;
  }
}
