/* =====================================================
   RTJ VIRTUAL ACADEMY - Student Portal Styles
   ===================================================== */
:root { --gold: #bc8e2d; --gold-light: #d9b25f; --gold-soft: #f8f1e2; --navy: #122e62; --navy-dark: #0b1e42; --navy-soft: #eaf0fa; }
body { overflow-x: hidden; }
::selection { background: var(--gold); color: #fff; }

/* ---------- Forms & buttons ---------- */
.s-label { display: block; font-size: .84rem; font-weight: 600; color: var(--navy); margin-bottom: .4rem; }
.s-input { width: 100%; height: 48px; padding: 0 1rem; border-radius: 12px; border: 1.5px solid #e2e8f0; background: #fff; color: #0f172a; outline: none; font-size: .92rem; transition: border-color .2s, box-shadow .2s; }
.s-input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(188, 142, 45, .14); }
.s-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .75rem 1.25rem; border-radius: 13px; font-weight: 700; font-size: .9rem; transition: all .2s; white-space: nowrap; cursor: pointer; }
.s-btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }
.s-btn-gold { background: linear-gradient(135deg, var(--gold-light), var(--gold) 60%, #a47a22); color: #fff; box-shadow: 0 10px 22px -12px rgba(188, 142, 45, .9); }
.s-btn-gold:hover:not(:disabled) { transform: translateY(-2px); }
.s-btn-navy { background: var(--navy); color: #fff; }
.s-btn-navy:hover { background: var(--navy-dark); }
.s-btn-light { background: #fff; color: var(--navy); border: 1.5px solid #e2e8f0; }
.s-btn-light:hover { border-color: var(--navy); }
.s-alert { display: flex; align-items: center; gap: .7rem; padding: .9rem 1.1rem; border-radius: 14px; font-size: .88rem; font-weight: 600; }
.s-alert-ok { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.s-alert-bad { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.s-card { background: #fff; border-radius: 20px; border: 1px solid #e9edf5; box-shadow: 0 4px 16px -10px rgba(18, 46, 98, .15); }
.s-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .8rem; border-radius: 10px; background: #fff; border: 1px solid #fde68a; font-weight: 600; color: #92400e; }

.s-toast { display: flex; align-items: center; gap: .7rem; padding: .9rem 1.1rem; border-radius: 14px; background: #fff; box-shadow: 0 16px 36px -12px rgba(18, 46, 98, .35); font-size: .88rem; font-weight: 600; border-left: 4px solid; transition: opacity .3s; animation: sIn .3s ease; }
.s-toast.success { border-color: #16a34a; } .s-toast.success i { color: #16a34a; }
.s-toast.error { border-color: #ef4444; } .s-toast.error i { color: #ef4444; }
@keyframes sIn { from { opacity: 0; transform: translateX(16px); } }

/* ---------- Login ---------- */
.s-login-art { position: absolute; inset: 0; background: radial-gradient(500px 380px at 85% 15%, rgba(188, 142, 45, .38), transparent 70%), radial-gradient(420px 420px at 0% 100%, rgba(29, 66, 144, .7), transparent 70%), radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px) 0 0 / 22px 22px; }

/* ---------- Topbar ---------- */
.s-topbar { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); border-bottom: 1px solid #e9edf5; }
.s-nav { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1rem; border-radius: 11px; font-size: .88rem; font-weight: 600; color: #64748b; }
.s-nav:hover { color: var(--navy); background: #f1f5f9; }
.s-nav.active { color: var(--navy); background: var(--navy-soft); }
.s-nav.active i { color: var(--gold); }
.s-icon-btn { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; color: #475569; }
.s-icon-btn:hover { background: #f1f5f9; color: var(--navy); }
.s-dot { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: #ef4444; color: #fff; font-size: .62rem; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.s-dd { position: absolute; top: calc(100% + 8px); background: #fff; border-radius: 16px; border: 1px solid #eef2f7; box-shadow: 0 20px 40px -15px rgba(18, 46, 98, .3); overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all .18s; z-index: 50; }
[data-dd].open .s-dd { opacity: 1; visibility: visible; transform: none; }
@media (max-width: 480px) { .s-dd.w-80 { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; } }
.s-dd-item { display: flex; align-items: center; gap: .7rem; padding: .7rem 1rem; font-size: .88rem; font-weight: 500; }
.s-dd-item:hover { background: #f8fafc; }
.s-dd-item i { width: 18px; text-align: center; color: #94a3b8; }

.s-bottom-nav { position: fixed; inset-inline: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; border-top: 1px solid #e9edf5; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -8px 24px -16px rgba(18, 46, 98, .3); }
.s-bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .65rem 0; font-size: .7rem; font-weight: 600; color: #94a3b8; }
.s-bottom-nav a i { font-size: 1.1rem; }
.s-bottom-nav a.active { color: var(--navy); }
.s-bottom-nav a.active i { color: var(--gold); }

/* ---------- Dashboard ---------- */
.s-hero { position: relative; overflow: hidden; padding: 2rem 1.5rem 3.5rem; border-radius: 24px; background: linear-gradient(120deg, var(--navy), var(--navy-dark)); }
.s-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(420px 200px at 90% 0%, rgba(188, 142, 45, .45), transparent 70%), radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px) 0 0 / 22px 22px; }
@media (min-width: 640px) { .s-hero { padding: 2.5rem 2.5rem 4rem; } }
.s-resume { display: flex; align-items: center; gap: .9rem; max-width: 360px; padding: .8rem 1.1rem .8rem .8rem; border-radius: 18px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); transition: background .2s; }
.s-resume:hover { background: rgba(255, 255, 255, .14); }
.s-stat { display: flex; align-items: center; gap: .8rem; padding: 1rem; border-radius: 18px; background: #fff; border: 1px solid #e9edf5; box-shadow: 0 10px 26px -16px rgba(18, 46, 98, .35); }
.s-course { display: flex; flex-direction: column; background: #fff; border-radius: 20px; border: 1px solid #e9edf5; box-shadow: 0 4px 16px -10px rgba(18, 46, 98, .15); transition: transform .3s, box-shadow .3s; }
.s-course:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -18px rgba(18, 46, 98, .35); }
.s-thumb-ph { width: 100%; height: 100%; display: grid; place-items: center; background: radial-gradient(circle at 80% 20%, rgba(188, 142, 45, .55), transparent 55%), linear-gradient(135deg, var(--navy), var(--navy-dark)); }
.s-thumb-ph span { font-family: Outfit, sans-serif; font-size: 3rem; font-weight: 900; color: var(--gold-light); }

/* ---------- Course player ---------- */
.learn-wrap { display: grid; grid-template-columns: 1fr; }
@media (min-width: 1024px) {
    .learn-wrap { grid-template-columns: 1fr 380px; height: calc(100vh - 65px); }
    .learn-main, .learn-side { overflow-y: auto; }
}
.learn-side { background: #fff; border-left: 1px solid #e9edf5; }
@media (max-width: 1023px) { .learn-side { border-left: 0; border-top: 1px solid #e9edf5; } }

.video-shell { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video-shell iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Google Drive ka "pop-out / open in new window" button chhupane ke liye */
.drive-guard { position: absolute; top: 0; right: 0; width: 80px; height: 64px; z-index: 2; background: transparent; }

.s-done-banner { display: flex; align-items: center; gap: 1rem; padding: 1.2rem 1.4rem; border-radius: 18px; color: #fff; background: linear-gradient(120deg, var(--gold), #a47a22); box-shadow: 0 16px 30px -16px rgba(188, 142, 45, .9); }
.s-panel { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1rem; padding: 1.25rem 1.4rem; border-radius: 18px; border: 1px solid; }
.s-panel-ok { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.s-panel-wait { background: #fffbeb; border-color: #fde68a; color: #92400e; }

.timer-ring { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.timer-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-ring .ring-bg { fill: none; stroke: #eef2f7; stroke-width: 6; }
.timer-ring .ring-fg { fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.timer-ring i { position: absolute; inset: 0; display: grid; place-items: center; color: #cbd5e1; font-size: 1.2rem; transition: color .3s; }
.timer-ring.ready i { color: #16a34a; }
.timer-ring.ready .ring-fg { stroke: #16a34a; }

.asg-drop { display: flex; align-items: center; justify-content: center; min-height: 130px; padding: 1.2rem; border: 2px dashed #cbd5e1; border-radius: 16px; background: #fafbfd; cursor: pointer; transition: all .2s; }
.asg-drop:hover, .asg-drop.drag { border-color: var(--gold); background: var(--gold-soft); }
.asg-drop.filled { min-height: 0; border-style: solid; border-color: var(--gold); background: #fff; }

.lesson-list { padding: .6rem; }
.ll-item { width: 100%; display: flex; align-items: center; gap: .8rem; padding: .8rem .85rem; border-radius: 14px; color: #334155; transition: background .2s; }
.ll-item:hover { background: #f8fafc; }
.ll-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; font-size: .9rem; }
.ll-item.completed .ll-icon { background: #dcfce7; color: #16a34a; }
.ll-item.current .ll-icon { background: var(--gold-soft); color: var(--gold); }
.ll-item.waiting .ll-icon { background: #fef3c7; color: #d97706; }
.ll-item.locked { color: #94a3b8; cursor: not-allowed; }
.ll-item.locked .ll-icon { background: #f1f5f9; color: #cbd5e1; }
.ll-item.active { background: var(--navy); color: #fff; }
.ll-item.active .ll-icon { background: rgba(255, 255, 255, .15); color: var(--gold-light); }
.ll-now { padding: .15rem .5rem; border-radius: 999px; background: var(--gold); color: #fff; font-size: .65rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }

.confetti { position: fixed; top: -12px; width: 10px; height: 14px; border-radius: 2px; z-index: 300; pointer-events: none; animation: fall 2.8s cubic-bezier(.2, .6, .4, 1) forwards; }
@keyframes fall { to { top: 105vh; transform: rotate(720deg) translateX(60px); opacity: .8; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
