/* =============================================
   KG FINVEST – WHITE & BLUE THEME
   Same variables/classes as original
   ============================================= */

:root {
  --navy:      #1e3a6e;
  --navy2:     #1e40af;
  --navy3:     #1d4ed8;
  --navy4:     #2563eb;
  --gold:      #1d4ed8;
  --gold2:     #2563eb;
  --gold3:     #3b82f6;
  --gold-pale: #eff6ff;
  --glass:        rgba(255,255,255,0.7);
  --glass2:       rgba(255,255,255,0.85);
  --glass-border: #dbeafe;
  --text:   #0f172a;
  --text2:  #1e3a6e;
  --text3:  #64748b;
  --success: #059669; --success-bg: #ecfdf5;
  --warning: #d97706; --warning-bg: #fffbeb;
  --danger:  #dc2626; --danger-bg:  #fef2f2;
  --info:    #0284c7; --info-bg:    #f0f9ff;
  --r8:8px; --r12:12px; --r16:16px; --r20:20px;
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #f1f5f9;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before { display: none; }

/* ── TOPBAR ───────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 200;
  background: #fff;
  border-bottom: 2px solid #dbeafe;
  padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
  box-shadow: 0 1px 8px rgba(30,58,110,0.08);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 17px; color: #fff;
  letter-spacing: -1px;
  box-shadow: 0 4px 18px rgba(37,99,235,0.35);
}
.brand-info h1 { font-size: 18px; font-weight: 700; color: #0f172a; }
.brand-info p  { font-size: 10.5px; color: #1d4ed8; letter-spacing: 0.4px; }
.topbar-right  { text-align: right; font-size: 11.5px; color: #64748b; }
.topbar-right strong { display: block; color: #1d4ed8; font-size: 12.5px; }

/* ── STEPPER ──────────────────────────────── */
.stepper-bar {
  background: #fff;
  border-bottom: 1px solid #dbeafe;
  padding: 18px 32px;
  position: sticky; top: 64px; z-index: 150;
  box-shadow: 0 1px 4px rgba(30,58,110,0.05);
}
.stepper { display: flex; align-items: center; max-width: 900px; margin: 0 auto; }
.step-item { display: flex; align-items: center; flex: 1; }
.step-dot {
  width: 34px; height: 34px; border-radius: 50%;
  background: #f1f5f9; border: 2px solid #cbd5e1;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #94a3b8;
  flex-shrink: 0; transition: all .35s;
}
.step-item.active .step-dot {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  border-color: #2563eb; color: #fff;
  box-shadow: 0 0 0 4px rgba(37,99,235,0.18);
}
.step-item.done .step-dot { background: var(--success); border-color: var(--success); color: #fff; }
.step-label { margin-left: 7px; font-size: 11.5px; color: #94a3b8; font-weight: 500; white-space: nowrap; }
.step-item.active .step-label { color: #1d4ed8; font-weight: 700; }
.step-item.done  .step-label  { color: #64748b; }
.step-line { flex: 1; height: 1.5px; background: #dbeafe; margin: 0 8px; transition: background .4s; }
.step-item.done ~ .step-line  { background: var(--success); }

/* ── MAIN LAYOUT ──────────────────────────── */
.main {
  max-width: 940px; margin: 0 auto;
  padding: 28px 20px 80px;
  position: relative; z-index: 1;
}

/* ── GLASS CARDS ──────────────────────────── */
.gcard {
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: var(--r20);
  margin-bottom: 20px; overflow: hidden;
  transition: border-color .25s, box-shadow .25s;
  box-shadow: 0 1px 6px rgba(30,58,110,0.06);
}
.gcard:hover { border-color: #93c5fd; box-shadow: 0 4px 16px rgba(30,58,110,0.1); }
.gcard.gold-border { border-color: #93c5fd; border-top: 3px solid #1d4ed8; }
.gcard-hdr {
  padding: 18px 24px;
  border-bottom: 1px solid #dbeafe;
  display: flex; align-items: center; gap: 12px;
  background: #f8faff;
}
.gcard-hdr h3 { font-size: 15px; font-weight: 700; color: #0f172a; letter-spacing: 0.2px; }
.gcard.gold-border .gcard-hdr.gold-hdr { background: #eff6ff; border-bottom-color: #bfdbfe; }
.gcard.gold-border .gcard-hdr.gold-hdr h3 { color: #1e3a6e; }
.gcard-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: #eff6ff; border: 1px solid #bfdbfe;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.gcard-icon.gold-icon { background: #dbeafe; }
.gcard-body { padding: 24px; }

/* ── FORMS ────────────────────────────────── */
.fgrid  { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fgrid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.ffull  { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 11px; font-weight: 700;
  color: #1d4ed8; text-transform: uppercase; letter-spacing: 0.8px;
}
.field input, .field select, .field textarea {
  padding: 11px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--r8);
  font-size: 14px; color: #0f172a;
  background: #fff;
  font-family: inherit; transition: all .2s;
}
.field input::placeholder { color: #94a3b8; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.field select option { background: #fff; color: #0f172a; }
.field textarea { resize: vertical; min-height: 80px; }

/* ── GOALS CHIPS ──────────────────────────── */
.goals-wrap { display: flex; flex-wrap: wrap; gap: 10px; }
.goal-chip {
  padding: 8px 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: 30px; cursor: pointer;
  font-size: 13px; color: #475569;
  transition: all .2s; user-select: none;
  background: #fff;
}
.goal-chip:hover { border-color: #2563eb; color: #1d4ed8; background: #eff6ff; }
.goal-chip.sel { background: #eff6ff; border-color: #2563eb; color: #1d4ed8; font-weight: 600; }

/* ── RISK QUESTIONS ───────────────────────── */
.rq-card {
  background: #f8faff; border: 1.5px solid #dbeafe;
  border-radius: var(--r12); padding: 18px; margin-bottom: 14px;
}
.rq-card p { font-size: 14px; font-weight: 600; color: #0f172a; margin-bottom: 13px; line-height: 1.5; }
.rq-opts { display: flex; flex-direction: column; gap: 8px; }
.rq-opt {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 14px;
  border: 1.5px solid #cbd5e1; border-radius: var(--r8);
  cursor: pointer; font-size: 13.5px; color: #475569;
  transition: all .2s; user-select: none;
  background: #fff;
}
.rq-opt:hover { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; }
.rq-opt.sel { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; font-weight: 600; }
.rq-opt input { accent-color: #2563eb; width: 16px; height: 16px; flex-shrink: 0; }

/* ── BUTTONS ──────────────────────────────── */
.btn {
  padding: 12px 26px; border-radius: var(--r8);
  font-size: 14px; font-weight: 700; cursor: pointer; border: none;
  transition: all .25s; letter-spacing: 0.3px; font-family: inherit;
}
.btn-gold {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff; box-shadow: 0 4px 20px rgba(37,99,235,0.3);
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(37,99,235,0.45); }
.btn-outline { background: transparent; color: #1d4ed8; border: 1.5px solid #1d4ed8; }
.btn-outline:hover { background: #eff6ff; }
.btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
}
.btn-ghost { background: #f1f5f9; border: 1px solid #cbd5e1; color: #475569; }
.btn-ghost:hover { border-color: #2563eb; color: #1d4ed8; background: #eff6ff; }
.btn-lg  { padding: 15px 36px; font-size: 15px; border-radius: var(--r12); }
.btn-sm  { padding: 7px 14px; font-size: 12.5px; border-radius: 6px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }
.btn-row {
  display: flex; gap: 12px; justify-content: flex-end;
  flex-wrap: wrap; margin-top: 8px;
}

/* ── METRIC CARDS ─────────────────────────── */
.mrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 12px; margin-bottom: 16px; }
.mc {
  background: #f8faff; border: 1px solid #dbeafe;
  border-radius: var(--r12); padding: 16px; transition: border .2s;
}
.mc:hover { border-color: #93c5fd; }
.mc-label { font-size: 11px; color: #64748b; text-transform: uppercase; letter-spacing: 0.7px; font-weight: 600; margin-bottom: 5px; }
.mc-val   { font-size: 21px; font-weight: 800; color: #0f172a; }
.mc-sub   { font-size: 11px; color: #94a3b8; margin-top: 3px; }
.mc.gold  .mc-val { color: #1d4ed8; }
.mc.green .mc-val { color: var(--success); }

/* ── ALLOC TABLE ──────────────────────────── */
.atable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.atable th { padding: 11px 14px; text-align: left; font-size: 11px; font-weight: 700; color: #1d4ed8; text-transform: uppercase; letter-spacing: 0.7px; border-bottom: 2px solid #dbeafe; }
.atable td { padding: 11px 14px; border-bottom: 1px solid #f1f5f9; color: #0f172a; }
.atable tr:hover td { background: #f8faff; }
.abar { height: 7px; border-radius: 4px; display: inline-block; vertical-align: middle; }

/* ── FUND TABLE ───────────────────────────── */
.ftable { width: 100%; border-collapse: collapse; font-size: 13px; }
.ftable th { padding: 10px 12px; text-align: left; font-size: 11px; font-weight: 700; color: #1d4ed8; text-transform: uppercase; letter-spacing: 0.7px; border-bottom: 2px solid #dbeafe; }
.ftable td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; color: #334155; }
.ftable tr:hover td { background: #f8faff; }
.fbadge { display: inline-block; padding: 3px 10px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.feq   { background: #eff6ff;  color: #1d4ed8; }
.fdebt { background: #ecfdf5;  color: #059669; }
.fgold { background: #fffbeb;  color: #b45309; }
.fhyb  { background: #f5f3ff;  color: #7c3aed; }
.fintl { background: #fef2f2;  color: #dc2626; }

/* ── RISK BADGE ───────────────────────────── */
.rbadge { display: inline-block; padding: 8px 28px; border-radius: 30px; font-size: 15px; font-weight: 700; letter-spacing: 0.5px; }
.rb-cons { background: #ecfdf5; color: #059669; border: 1.5px solid #6ee7b7; }
.rb-mod  { background: #fffbeb; color: #d97706; border: 1.5px solid #fcd34d; }
.rb-agg  { background: #fef2f2; color: #dc2626; border: 1.5px solid #fca5a5; }

/* ── INSIGHT BOX ──────────────────────────── */
.ins-box { background: #f0f9ff; border-left: 3px solid #0284c7; border-radius: 0 var(--r8) var(--r8) 0; padding: 13px 16px; margin-bottom: 10px; font-size: 13.5px; color: #334155; }
.ins-box strong { display: block; font-size: 11px; color: #0284c7; text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 4px; }

/* ── FEE BOX ──────────────────────────────── */
.fee-box { background: #eff6ff; border: 2px solid #bfdbfe; border-radius: var(--r16); padding: 24px; text-align: center; }
.fee-amount { font-size: 34px; font-weight: 800; color: #1d4ed8; margin: 8px 0; }
.fee-label  { font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: 0.8px; }
.fee-pkg    { display: inline-block; padding: 4px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; background: #dbeafe; color: #1d4ed8; margin-bottom: 8px; }

/* ── PAYMENT GATE ─────────────────────────── */
.pay-gate { background: #f8faff; border: 1px solid #dbeafe; border-radius: var(--r20); padding: 36px; text-align: center; margin-top: 8px; }
.pay-gate h2 { font-size: 22px; font-weight: 800; color: #0f172a; margin-bottom: 8px; }
.pay-gate p  { color: #475569; font-size: 14px; margin-bottom: 24px; }
.qr-wrap { background: #fff; border-radius: var(--r16); padding: 14px; display: inline-block; margin: 0 auto 20px; box-shadow: 0 8px 40px rgba(37,99,235,0.15); border: 2px solid #dbeafe; }
.qr-wrap img { width: 200px; height: 200px; display: block; }
.upi-info  { margin-bottom: 18px; }
.upi-name  { font-size: 16px; font-weight: 800; color: #0f172a; }
.upi-id    { font-size: 14px; color: #1d4ed8; font-weight: 600; margin-top: 4px; }
.upi-bank  { font-size: 12px; color: #64748b; margin-top: 2px; }
.pay-summary {
  background: #fff; border: 1px solid #dbeafe;
  border-radius: var(--r12); padding: 16px; max-width: 340px; margin: 0 auto 20px;
}
.pay-summary .pr { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid #f1f5f9; font-size: 14px; color: #475569; }
.pay-summary .pr:last-child { border-bottom: none; font-weight: 700; color: #1d4ed8; font-size: 16px; }
.pay-verify { display: flex; flex-direction: column; gap: 10px; align-items: center; margin-top: 20px; }
.verify-hint { font-size: 13px; color: #475569; }
.pay-input {
  padding: 12px 18px; border: 1.5px solid #cbd5e1; border-radius: var(--r8);
  font-size: 15px; font-weight: 700; color: #0f172a;
  background: #fff; text-align: center; width: 240px;
  font-family: inherit; letter-spacing: 3px;
}
.pay-input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.paid-badge {
  background: #ecfdf5; border: 1.5px solid #6ee7b7;
  border-radius: var(--r12); padding: 12px 24px;
  color: #059669; font-weight: 700; font-size: 15px;
}

/* ── ADVISOR TIP ──────────────────────────── */
.advisor-tip {
  background: #eff6ff; border: 1px solid #bfdbfe;
  border-radius: var(--r8); padding: 12px 16px; margin-bottom: 20px;
  font-size: 13px; color: #1e3a6e;
}

/* ── EDITABLE FIELDS ──────────────────────── */
.edit-wrap { border: 2px dashed #bfdbfe; border-radius: var(--r12); padding: 18px; background: #f8faff; margin-bottom: 14px; }
.edit-title { font-size: 11.5px; font-weight: 700; color: #1d4ed8; text-transform: uppercase; letter-spacing: 0.7px; margin-bottom: 13px; display: flex; align-items: center; gap: 6px; }
.edit-field {
  width: 100%; padding: 10px 13px;
  border: 1.5px solid #cbd5e1; border-radius: var(--r8);
  font-size: 13.5px; color: #0f172a;
  background: #fff; font-family: inherit;
  transition: all .2s; resize: vertical;
}
.edit-field:focus { outline: none; border-color: #2563eb; background: #eff6ff; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

/* ── INVOICE TABLE ────────────────────────── */
.inv-table { width: 100%; border-collapse: collapse; font-size: 13px; border-radius: var(--r8); overflow: hidden; }
.inv-table th { background: #1d4ed8; color: #fff; padding: 9px 12px; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.inv-table td { padding: 9px 12px; border-bottom: 1px solid #f1f5f9; color: #334155; }
.inv-table .inv-total { font-weight: 700; color: #1d4ed8; font-size: 15px; }

/* ── REPORT PREVIEW ───────────────────────── */
.rpt-wrap { background: #fff; color: #1a2440; border-radius: 0 0 var(--r20) var(--r20); }
.rpt-hdr  { background: linear-gradient(135deg, #1e3a6e, #1d4ed8); color: #fff; padding: 22px 28px; display: flex; justify-content: space-between; align-items: center; }
.rpt-sec  { padding: 18px 24px; border-bottom: 1px solid #e8eaf0; }
.rpt-sec:last-child { border-bottom: none; }
.rpt-sec h4 { font-size: 12.5px; font-weight: 800; color: #0f172a; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 12px; display: flex; align-items: center; gap: 7px; }
.rpt-sec h4::before { content: ''; display: inline-block; width: 4px; height: 13px; background: #2563eb; border-radius: 2px; }
.rpt-row { display: flex; justify-content: space-between; padding: 4.5px 0; font-size: 12.5px; border-bottom: 1px dotted #e2e8f0; }
.rpt-row:last-child { border-bottom: none; }
.rpt-key { color: #64748b; font-weight: 500; }
.rpt-val { font-weight: 700; color: #0f172a; }
.rpt-ftr { background: #1e3a6e; color: rgba(255,255,255,0.7); font-size: 11px; padding: 14px 24px; text-align: center; line-height: 1.9; }

/* ── MISC ─────────────────────────────────── */
.sdiv { display: flex; align-items: center; gap: 10px; margin: 20px 0 14px; font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.9px; }
.sdiv::after { content: ''; flex: 1; height: 1px; background: #dbeafe; }
.notif { position: fixed; top: 24px; right: 24px; background: #0f172a; border: 1px solid #2563eb; color: #fff; padding: 14px 22px; border-radius: var(--r12); font-size: 14px; z-index: 999; display: none; box-shadow: 0 8px 40px rgba(0,0,0,0.2); }
.spinner { width: 32px; height: 32px; border: 3px solid #dbeafe; border-top: 3px solid #2563eb; border-radius: 50%; animation: spin .75s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.pg { display: none; } .pg.on { display: block; }
.hidden { display: none !important; }
.chip-hni { margin-top: 10px; padding: 8px 18px; background: #dbeafe; border-radius: 20px; font-size: 13px; color: #1d4ed8; font-weight: 700; display: inline-block; }
.chip-ultra { background: #fef2f2; color: #dc2626; }

/* ── PRINT ────────────────────────────────── */
@media print {
  .topbar, .stepper-bar, .btn-row, .btn, .notif, #pay-section { display: none !important; }
  body { background: #fff; color: #000; }
  .main { padding: 0; }
  .rpt-wrap { box-shadow: none; border: none; }
}

/* ── RESPONSIVE ───────────────────────────── */
@media (max-width: 640px) {
  .fgrid, .fgrid3 { grid-template-columns: 1fr; }
  .topbar { padding: 12px 16px; }
  .main { padding: 16px 12px 80px; }
  .gcard-body { padding: 16px; }
  .step-label { display: none; }
  .mrow { grid-template-columns: 1fr 1fr; }
  .btn-lg { padding: 13px 24px; font-size: 14px; }
  .rpt-hdr { flex-direction: column; gap: 12px; text-align: center; }
}
