/* Bharat IC — new look: motion, depth and new components on top of app.css.
   Everything animated is switched off for people who ask for reduced motion. */
:root {
  --glow: 0 0 0 1px rgba(255, 200, 21, .35), 0 10px 40px -10px rgba(255, 200, 21, .45);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --live: #ef4444;
  --bg: #f3f4f7;
}
body { background:
  radial-gradient(1200px 600px at 100% -10%, rgba(255, 200, 21, .10), transparent 60%),
  radial-gradient(900px 500px at -10% 110%, rgba(12, 14, 19, .05), transparent 60%), var(--bg);
  background-attachment: fixed; }

/* ── page load bar + page fade ── */
#nav-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 3000;
  background: linear-gradient(90deg, var(--brand), #fff3b0, var(--brand)); box-shadow: 0 0 12px var(--brand);
  transition: width .4s var(--ease), opacity .3s; }
.app-main { animation: page-in .45s var(--ease) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── sidebar ── */
.app-side { background: linear-gradient(180deg, #0c0e13 0%, #11141b 60%, #0c0e13 100%); }
.app-side::after { content: ""; position: absolute; top: 0; right: 0; width: 1px; height: 100%;
  background: linear-gradient(180deg, transparent, rgba(255, 200, 21, .55), transparent);
  background-size: 100% 200%; animation: side-line 6s linear infinite; }
@keyframes side-line { from { background-position: 0 -100%; } to { background-position: 0 100%; } }
.app-nav-link { position: relative; overflow: hidden; transition: background .2s, color .2s, padding-left .25s var(--ease); }
.app-nav-link:hover { padding-left: 16px; }
.app-nav-link.active { background: linear-gradient(90deg, rgba(255, 200, 21, .16), rgba(255, 200, 21, .02)); box-shadow: inset 3px 0 0 var(--brand); }
.brand-mark { box-shadow: 0 0 0 0 rgba(255, 200, 21, .6); animation: brand-pulse 3.2s ease-in-out infinite; }
@keyframes brand-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 200, 21, .0); } 50% { box-shadow: 0 0 22px 2px rgba(255, 200, 21, .35); } }
.app-nav-link .count { animation: pop .5s var(--ease) both; }
.app-top { background: rgba(243, 244, 247, .72); }

/* ── hero header ── */
.hero { position: relative; overflow: hidden; border-radius: 22px; padding: 34px 34px 30px; margin-bottom: 28px;
  background: #0c0e13; color: #fff; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: -40%; z-index: -1;
  background: conic-gradient(from 0deg at 50% 50%, rgba(255, 200, 21, .0), rgba(255, 200, 21, .28), rgba(255, 200, 21, .0) 30%,
    rgba(255, 255, 255, .06) 55%, rgba(255, 200, 21, .0) 70%);
  animation: spin 18s linear infinite; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 28px 28px; mask-image: radial-gradient(70% 90% at 80% 20%, #000, transparent); }
@keyframes spin { to { transform: rotate(360deg); } }
.hero .eyebrow { color: var(--brand); }
.hero h1 { color: #fff; font-size: clamp(26px, 3vw, 38px); font-weight: 800; letter-spacing: -.025em; margin: 8px 0 8px; }
.hero h1 .hl { background: linear-gradient(90deg, var(--brand), #fff1a6, var(--brand)); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine-text 4s linear infinite; }
@keyframes shine-text { to { background-position: 200% center; } }
.hero p { color: #aab1bf; margin: 0; max-width: 640px; }
.hero .hero-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero .hero-stats span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); font-weight: 600; font-size: 13.5px; color: #e5e7eb; }
.hero .hero-stats b { color: var(--brand); }
@media (max-width: 640px) { .hero { padding: 24px 20px; border-radius: 18px; } }

/* ── segmented tabs ── */
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow); margin-bottom: 20px; position: relative; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; height: 40px; padding: 0 16px; border-radius: 10px; font: inherit; font-weight: 700;
  font-size: 14px; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: color .2s, background .25s var(--ease); }
.seg button.on { background: var(--ink); color: #fff; box-shadow: 0 6px 18px -6px rgba(12, 14, 19, .6); }
.seg button .n { font-size: 12px; background: var(--line-2); color: var(--text); border-radius: 999px; padding: 2px 8px; }
.seg button.on .n { background: var(--brand); color: var(--ink); }
.tab-pane { display: none; }
.tab-pane.on { display: block; animation: page-in .35s var(--ease) both; }
.section-label { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; font-size: 18px; font-weight: 800; }
.section-label small { color: var(--muted); font-weight: 500; font-size: 13.5px; }

/* ── course cards v2 ── */
.app-main .course-card { position: relative; border-radius: 18px; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s; will-change: transform; }
.app-main .course-card:hover { transform: translateY(-6px); box-shadow: 0 22px 44px -18px rgba(16, 24, 40, .35); border-color: rgba(255, 200, 21, .7); }
.app-main .course-card .cc-thumb img { transition: transform .8s var(--ease), opacity .5s; }
.app-main .course-card:hover .cc-thumb img { transform: scale(1.06); }
.app-main .course-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .45) 45%, transparent 60%); transform: translateX(-120%); }
.app-main .course-card:hover::after { transform: translateX(120%); transition: transform .9s var(--ease); }
.cc-thumb::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(12, 14, 19, .55)); z-index: 1; pointer-events: none; }
.cc-badges { position: absolute; left: 12px; top: 12px; right: 12px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 2; }
.cc-date { position: absolute; left: 12px; bottom: 10px; z-index: 2; color: #fff; font-weight: 700; font-size: 13px; display: flex; gap: 6px; align-items: center; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.chip.live { background: rgba(239, 68, 68, .95); color: #fff; }
.chip.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .3; transform: scale(.7); } }
.chip.soon { background: var(--brand); color: var(--ink); }
.chip.arch { background: rgba(12, 14, 19, .82); color: #fff; backdrop-filter: blur(4px); }
.chip.wait { background: #fff7ed; color: #9a3412; }
.chip.wait i { animation: spin 3s linear infinite; display: inline-block; }
.price-stack { display: flex; flex-direction: column; line-height: 1.1; }
.price-stack small { color: var(--muted); font-size: 12px; font-weight: 600; margin-top: 3px; }

/* ── skeleton while thumbnails load ── */
.cc-thumb.loading { background: linear-gradient(100deg, #1b1f29 30%, #2a3040 50%, #1b1f29 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.cc-thumb.loading img { opacity: 0; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── buttons ── */
.ui-btn, .app-main .btn-enroll, .app-main .btn-continue { position: relative; overflow: hidden; transition: background .2s, transform .15s var(--ease), box-shadow .25s; }
.ui-btn:not(.ghost):not(.dark):hover, .app-main .btn-enroll:hover { box-shadow: var(--glow); }
.ui-btn:active { transform: scale(.97); }
.ui-btn .ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255, 255, 255, .55); animation: ripple .6s ease-out; pointer-events: none; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
.ui-btn.xl { height: 54px; font-size: 16px; border-radius: 14px; padding: 0 24px; }
.ui-btn.shine::before { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent); transform: skewX(-20deg); animation: btn-shine 3.2s ease-in-out infinite; }
@keyframes btn-shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.ui-btn[disabled], .ui-btn.busy { opacity: .7; pointer-events: none; }
.ui-btn .spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(12, 14, 19, .25); border-top-color: var(--ink); animation: spin .7s linear infinite; }

/* ── checkout card ── */
.buy-card { position: sticky; top: 84px; background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 18px 50px -24px rgba(16, 24, 40, .35); }
.buy-card .cc-thumb { border-radius: 0; }
.buy-body { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.bill { border: 1px dashed #d6dae1; border-radius: 14px; padding: 14px 16px; background: #fcfcfd; }
.bill-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 14.5px; color: #374151; }
.bill-row s { color: var(--muted); margin-right: 6px; }
.bill-row.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; font-size: 18px; font-weight: 800; color: var(--text); }
.bill-note { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; line-height: 1.45; }
.bill-note i { color: var(--brand-600); margin-top: 1px; }
.pay-methods { display: flex; flex-wrap: wrap; gap: 6px; }
.pay-methods span { font-size: 11.5px; font-weight: 700; padding: 4px 8px; border-radius: 7px; background: var(--line-2); color: #374151; }
.secure { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.state-box { border-radius: 14px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; }
.state-box i { font-size: 20px; }
.state-box.ok { background: var(--ok-50); color: #14532d; }
.state-box.wait { background: #fff7ed; color: #7c2d12; }
.state-box.info { background: #eff6ff; color: #1e3a8a; }
.state-box b { display: block; margin-bottom: 2px; }
.test-ribbon { background: repeating-linear-gradient(45deg, #fde68a, #fde68a 10px, #fef3c7 10px, #fef3c7 20px); color: #78350f;
  font-weight: 700; font-size: 12.5px; text-align: center; padding: 6px; border-radius: 9px; }

/* ── facts row on course page ── */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.fact { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.fact small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.fact b { display: block; font-size: 16px; margin-top: 4px; }

/* ── pending / success screens ── */
.center-card { max-width: 620px; margin: 30px auto; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 40px 30px; box-shadow: 0 24px 60px -30px rgba(16, 24, 40, .4); }
.center-card h1 { font-size: 26px; margin: 18px 0 8px; }
.center-card p { color: var(--muted); }
.orb { width: 92px; height: 92px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; font-size: 40px; position: relative; }
.orb.wait { background: #fff7ed; color: #ea580c; }
.orb.ok { background: var(--ok-50); color: var(--ok); }
.orb.fail { background: var(--danger-50); color: var(--danger); }
.orb::before, .orb::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid currentColor; opacity: .25; animation: ring 2.4s var(--ease) infinite; }
.orb::after { animation-delay: 1.2s; }
@keyframes ring { from { transform: scale(.85); opacity: .45; } to { transform: scale(1.35); opacity: 0; } }
.steps { display: flex; justify-content: center; gap: 0; margin: 26px 0 8px; flex-wrap: wrap; }
.step { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 130px; font-size: 12.5px; font-weight: 600; color: var(--muted); position: relative; }
.step i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); color: var(--muted); font-size: 15px; z-index: 1; }
.step.done i { background: var(--ok); color: #fff; }
.step.now i { background: var(--brand); color: var(--ink); animation: brand-pulse 1.8s infinite; }
.step + .step::before { content: ""; position: absolute; top: 17px; right: 50%; width: 100%; height: 2px; background: var(--line); }
.step.done + .step::before, .step.done + .step.done::before { background: var(--ok); }
.check-draw { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .7s .2s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ── stats / tables ── */
.stat { transition: transform .3s var(--ease), box-shadow .3s; }
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.app-main tbody tr { transition: background .15s, transform .2s; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12.5px; }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-dot.paid { color: var(--ok); } .status-dot.failed { color: var(--danger); } .status-dot.created { color: var(--muted); }
.approve-card { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; background: #fff;
  border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); }
.approve-card + .approve-card { margin-top: 10px; }
.approve-card .who b { display: block; } .approve-card .who small { color: var(--muted); }
.approve-card form { display: flex; gap: 8px; margin: 0; }
@media (max-width: 720px) { .approve-card { grid-template-columns: 1fr; } }

/* ── toasts (flash messages) ── */
.toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 2500; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 40px)); }
.toast-wrap .flash { margin: 0; box-shadow: 0 18px 40px -16px rgba(16, 24, 40, .45); animation: toast-in .5s var(--ease) both; display: flex; gap: 10px; align-items: flex-start; }
.toast-wrap .flash.out { animation: toast-out .4s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }

/* ── scroll reveal ── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── sign-in page motion ── */
.auth-art::before { animation: aurora 14s ease-in-out infinite alternate; }
@keyframes aurora { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-4%, 3%, 0) scale(1.08); } }
.auth-art svg.circuit path, .auth-art svg.circuit line, .auth-art svg.circuit polyline { stroke-dasharray: 6 10; animation: flow 3s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -32; } }
.auth-card { animation: page-in .6s var(--ease) both; }
.auth-points li { animation: page-in .6s var(--ease) both; }
.auth-points li:nth-child(2) { animation-delay: .1s; } .auth-points li:nth-child(3) { animation-delay: .2s; } .auth-points li:nth-child(4) { animation-delay: .3s; }
.auth-submit { position: relative; overflow: hidden; }
.auth-submit:hover { box-shadow: 0 10px 30px -10px rgba(12, 14, 19, .7); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ── checkout extras: installments, coupon, state ── */
.plan-pick { display: flex; width: 100%; margin-bottom: 14px; }
.plan-pick button { flex: 1; }
.bill.updating { opacity: .55; transition: opacity .15s; }
.bill.flash-in { animation: billIn .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes billIn { from { transform: scale(.985); box-shadow: 0 0 0 4px rgba(255, 200, 21, .35); } }
.emi-parts { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 13.5px; }
.emi-parts .bill-row { padding: 4px 0; }
.coupon-box { display: flex; gap: 8px; margin: 14px 0 4px; }
.coupon-box input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .5px; }
.coupon-msg { min-height: 18px; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.coupon-msg.ok { color: #15803d; animation: billIn .4s; }
.coupon-msg.bad { color: #b91c1c; }
.state-pick { display: block; font-weight: 600; font-size: 13.5px; margin: 6px 0 12px; }
.state-pick small { color: var(--muted); font-weight: 500; }
.state-pick select { margin-top: 6px; width: 100%; }
.emi-tag { color: #15803d; }
.chip.late { background: #fef2f2; color: #b91c1c; }

/* ── installment plan ── */
.plan { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 12px 0; background: #fff; }
.plan.wide { margin: 0 0 18px; box-shadow: var(--shadow); }
.plan-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.plan-head span { color: var(--muted); font-weight: 600; font-size: 13px; }
.plan-bar { height: 8px; border-radius: 99px; background: var(--line-2, #eef0f3); margin: 10px 0 8px; overflow: hidden; }
.plan-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #ffe27a); border-radius: inherit;
  animation: grow 1s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.plan-row { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; font-size: 14px; }
.plan-row small { display: block; color: var(--muted); font-size: 12px; }
.plan-row .dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #c3c8d1; }
.plan-row.done .dot { background: #16a34a; border-color: #16a34a; }
.plan-row.late .dot { background: #dc2626; border-color: #dc2626; animation: pulse 1.6s infinite; }
.plan-row.late small { color: #b91c1c; font-weight: 600; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, .15); } }

/* ── receipt: proof for WhatsApp ── */
.receipt-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 24px; align-items: start; max-width: 1040px; margin: 0 auto; }
.receipt-grid.single { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
.receipt-grid .center-card { margin: 0; max-width: none; }
.bill-row.meta { font-size: 13px; color: var(--muted); }
.proof-card { background: var(--ink); color: #fff; border-radius: 22px; padding: 24px; position: sticky; top: 84px;
  box-shadow: 0 24px 60px -24px rgba(12, 14, 19, .7); }
.proof-card.pop { animation: proofIn .7s .25s cubic-bezier(.2, .9, .25, 1.2) both; }
@keyframes proofIn { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.proof-card .eyebrow { color: var(--brand); }
.proof-card h2 { font-size: 21px; margin: 4px 0 6px; }
.proof-card p { color: #b8bfcc; font-size: 14px; margin: 0 0 14px; }
.proof-shot { border-radius: 14px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .12); margin-bottom: 14px; }
.proof-shot canvas { display: block; width: 100%; height: auto; }
.proof-actions { display: grid; gap: 8px; }
.proof-actions .ui-btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .25); }
.ui-btn.wa { background: #25d366; color: #fff; border-color: #25d366; }
.ui-btn.wa:hover { background: #1ebe5a; color: #fff; }
.proof-hint { font-size: 12.5px; color: #9aa3b2; margin-top: 10px; min-height: 18px; }
@media (max-width: 900px) {
  .receipt-grid { grid-template-columns: minmax(0, 1fr); }
  .proof-card { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  .bill.flash-in, .plan-bar i, .proof-card.pop, .plan-row.late .dot, .coupon-msg.ok { animation: none; }
}
@media print { .proof-card { display: none; } .receipt-grid { grid-template-columns: 1fr; } }
.proof-card h2 { color: #fff; }
.proof-card .proof-actions .ui-btn.ghost { background: transparent !important; color: #fff !important; border: 1px solid rgba(255, 255, 255, .28) !important; }
.proof-card .proof-actions .ui-btn.ghost:hover { background: rgba(255, 255, 255, .08) !important; }
.proof-card .proof-actions .ui-btn.dark { background: #fff; color: var(--ink); }
