:root{ --orange:#ee5a24; --orange2:#f97316; --navy:#0f172a; --navy2:#1e293b; }

/* ---------- Buttons ---------- */
.btn{display:inline-flex;align-items:center;gap:.4rem;padding:.55rem 1.1rem;border-radius:.6rem;font-weight:600;font-size:.9rem;border:none;cursor:pointer;text-decoration:none;transition:.15s;}
.btn-primary{background:linear-gradient(135deg,var(--orange),var(--orange2));color:#fff;}
.btn-primary:hover{filter:brightness(1.05);}
.btn-secondary{background:#fff;color:var(--navy);border:1px solid #e2e8f0;}
.btn-secondary:hover{background:#f8fafc;}
.btn-danger{background:#ef4444;color:#fff;}
.btn-danger:hover{filter:brightness(1.05);}
.btn-sm{padding:.35rem .7rem;font-size:.8rem;}

/* ---------- Inputs ---------- */
.input{width:100%;padding:.6rem .8rem;border:1px solid #cbd5e1;border-radius:.6rem;font-size:.92rem;background:#fff;}
.input:focus{outline:none;border-color:var(--orange);box-shadow:0 0 0 3px rgba(238,90,36,.12);}
label.lbl{display:block;font-size:.82rem;font-weight:600;color:#334155;margin-bottom:.3rem;}

/* ---------- Cards ---------- */
.card{background:#fff;border-radius:.9rem;box-shadow:0 1px 3px rgba(0,0,0,.08);padding:1.3rem;}
.card.p-0{padding:0;}

/* ---------- Badges ---------- */
.badge{display:inline-block;padding:.2rem .6rem;border-radius:999px;font-size:.72rem;font-weight:700;}
.badge-green{background:#dcfce7;color:#166534;}
.badge-red{background:#fee2e2;color:#991b1b;}
.badge-yellow{background:#fef9c3;color:#854d0e;}
.badge-blue{background:#dbeafe;color:#1e40af;}
.badge-gray{background:#e2e8f0;color:#334155;}
.badge-orange{background:#ffedd5;color:#9a3412;}

/* ---------- Tables ---------- */
.data-table{width:100%;border-collapse:collapse;}
.data-table th{background:#f8fafc;text-align:left;padding:.7rem .9rem;font-size:.75rem;text-transform:uppercase;letter-spacing:.03em;color:#64748b;border-bottom:1px solid #e2e8f0;}
.data-table td{padding:.7rem .9rem;border-bottom:1px solid #f1f5f9;font-size:.9rem;color:#1e293b;}
.data-table tr:hover td{background:#fafafa;}

/* ---------- Alerts ---------- */
.alert{padding:.8rem 1rem;border-radius:.6rem;margin-bottom:1rem;font-size:.9rem;font-weight:500;}
.alert-success{background:#dcfce7;color:#166534;}
.alert-error{background:#fee2e2;color:#991b1b;}

/* ---------- Stat cards ---------- */
.stat{border-radius:.9rem;padding:1.1rem 1.2rem;color:#fff;}
.stat .n{font-size:1.9rem;font-weight:800;line-height:1;}
.stat .l{font-size:.8rem;opacity:.9;margin-top:.35rem;}
.stat-orange{background:linear-gradient(135deg,#ee5a24,#f97316);}
.stat-navy{background:linear-gradient(135deg,#0f172a,#334155);}
.stat-green{background:linear-gradient(135deg,#16a34a,#22c55e);}
.stat-blue{background:linear-gradient(135deg,#2563eb,#3b82f6);}
.stat-purple{background:linear-gradient(135deg,#7c3aed,#a855f7);}

/* ---------- Sidebar ---------- */
.sidebar{width:248px;background:var(--navy);color:#cbd5e1;display:flex;flex-direction:column;flex-shrink:0;}
.sidebar-brand{display:flex;gap:.6rem;align-items:center;padding:1.1rem 1.1rem;border-bottom:1px solid rgba(255,255,255,.08);}
.brand-badge{width:38px;height:38px;border-radius:.6rem;background:linear-gradient(135deg,var(--orange),var(--orange2));display:flex;align-items:center;justify-content:center;font-weight:800;color:#fff;}
.brand-name{font-weight:700;color:#fff;font-size:.95rem;}
.brand-tag{font-size:.7rem;color:#94a3b8;}
.sidebar-nav{flex:1;padding:.8rem .6rem;overflow-y:auto;}
.nav-link{display:flex;align-items:center;gap:.6rem;padding:.6rem .8rem;border-radius:.55rem;color:#cbd5e1;text-decoration:none;font-size:.9rem;font-weight:500;margin-bottom:.15rem;}
.nav-link:hover{background:rgba(255,255,255,.06);color:#fff;}
.nav-active{background:linear-gradient(135deg,var(--orange),var(--orange2));color:#fff;}
.nav-ico{width:20px;text-align:center;}
.nav-sec{font-size:.68rem;text-transform:uppercase;letter-spacing:.06em;color:#64748b;padding:.8rem .8rem .3rem;}
.sidebar-foot{padding:1rem;border-top:1px solid rgba(255,255,255,.08);}
.who{font-weight:600;color:#fff;font-size:.88rem;}
.who-role{margin:.35rem 0;}
.logout{display:block;margin-top:.5rem;color:#fca5a5;font-size:.85rem;text-decoration:none;}
.logout:hover{color:#fff;}

/* ---------- Main ---------- */
.main{flex:1;display:flex;flex-direction:column;min-width:0;}
.topbar{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.5rem;background:#fff;border-bottom:1px solid #e2e8f0;}
.page-title{font-size:1.25rem;font-weight:700;color:var(--navy);}
.topbar-right{font-size:.82rem;color:#64748b;}
.content{padding:1.5rem;flex:1;}
.foot{padding:1rem 1.5rem;font-size:.78rem;color:#94a3b8;text-align:center;}

/* ---------- Drive bars (result view) ---------- */
.drive{margin-bottom:1rem;}
.drive-top{display:flex;justify-content:space-between;font-size:.85rem;font-weight:600;color:#334155;margin-bottom:.3rem;}
.bar{height:14px;background:#e2e8f0;border-radius:999px;overflow:hidden;}
.bar > span{display:block;height:100%;background:linear-gradient(90deg,var(--orange),var(--orange2));}

/* ---------- Public test page ---------- */
.test-wrap{max-width:760px;margin:0 auto;padding:1.5rem;}
.word-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:.55rem;}
.word{display:block;border:1px solid #cbd5e1;border-radius:.6rem;padding:.6rem .5rem;text-align:center;font-size:.9rem;font-weight:500;cursor:pointer;user-select:none;background:#fff;}
.word input{display:none;}
.word.sel{background:linear-gradient(135deg,var(--orange),var(--orange2));color:#fff;border-color:transparent;}
.fit-pill{display:inline-block;padding:.4rem 1rem;border-radius:999px;font-weight:700;font-size:.9rem;color:#fff;box-shadow:0 2px 6px rgba(0,0,0,.12);}
.fit-strong{background:linear-gradient(135deg,#16a34a,#22c55e);}
.fit-moderate{background:linear-gradient(135deg,#d97706,#f59e0b);}
.fit-weak{background:linear-gradient(135deg,#dc2626,#f43f5e);}

/* ---------- Scored question options (mobile-friendly) ---------- */
.sec-head{display:flex;align-items:center;gap:.6rem;margin-bottom:.2rem;}
.sec-badge{font-size:.7rem;font-weight:700;padding:.2rem .6rem;border-radius:999px;}
.sec-apt{background:#eef2ff;color:#3730a3;} .sec-sit{background:#f3edff;color:#5b21b6;} .sec-beh{background:#e6f5f1;color:#0f5132;}
.qblock{margin-bottom:1.1rem;}
.qtext{font-weight:600;color:#0f172a;font-size:.95rem;margin-bottom:.5rem;line-height:1.5;}
.opt{display:flex;gap:.6rem;align-items:flex-start;border:1px solid #e2e8f0;border-radius:.7rem;padding:.75rem .9rem;margin-bottom:.5rem;cursor:pointer;font-size:.92rem;color:#1e293b;background:#fff;transition:.12s;}
.opt input{margin-top:.15rem;accent-color:#ee5a24;}
.opt.sel{border-color:#ee5a24;background:#fff5f0;}
.progress{height:8px;background:#eef2f7;border-radius:999px;overflow:hidden;margin:.4rem 0 .2rem;}
.progress > span{display:block;height:100%;background:#ee5a24;}
@media (max-width:640px){ .test-wrap{padding:1rem .8rem;} .card{padding:1rem;} }

/* ---------- Result: section score chips ---------- */
.scorebox{border-radius:.85rem;padding:1rem 1.1rem;color:#fff;box-shadow:0 3px 10px rgba(0,0,0,.10);}
.sb-apt{background:linear-gradient(135deg,#4f46e5,#3b82f6);}
.sb-sit{background:linear-gradient(135deg,#7c3aed,#d946ef);}
.sb-beh{background:linear-gradient(135deg,#0d9488,#22c55e);}
.sb-num{font-size:1.5rem;font-weight:800;line-height:1;}
.suggest{background:linear-gradient(135deg,#fff7ed,#fef2f2);border:1px solid #fed7aa;border-radius:.8rem;padding:1rem 1.1rem;}
.test-hero{background:linear-gradient(135deg,#ee5a24,#f97316);color:#fff;border-radius:.9rem;padding:1.2rem 1.3rem;margin-bottom:1rem;box-shadow:0 4px 14px rgba(238,90,36,.30);}
.opt.sel{border-color:#7c3aed;background:linear-gradient(135deg,#faf5ff,#f5f3ff);}
.suggest li{display:flex;gap:.5rem;margin-bottom:.45rem;font-size:.9rem;color:#7c2d12;line-height:1.5;}
.suggest li b{color:#9a3412;}
.strength{background:linear-gradient(135deg,#f0fdf4,#ecfdf5);border:1px solid #bbf7d0;border-radius:.8rem;padding:1rem 1.1rem;}
.strength li{display:flex;gap:.5rem;margin-bottom:.4rem;font-size:.9rem;color:#14532d;line-height:1.5;}

/* ---------- Pure-CSS selection fallback (works without JS) ---------- */
.word:has(input:checked){background:linear-gradient(135deg,#ee5a24,#f97316);color:#fff;border-color:transparent;}
.opt:has(input:checked){border-color:#7c3aed;background:linear-gradient(135deg,#faf5ff,#f5f3ff);}

/* ---------- Bilingual (Hindi) lines ---------- */
.qtext-hi{font-weight:400;color:#64748b;font-size:.85rem;margin-top:.15rem;line-height:1.45;}
.opt-hi{display:block;color:#94a3b8;font-size:.82rem;margin-top:.1rem;line-height:1.4;}
.word-hi{display:block;font-size:.72rem;color:#94a3b8;margin-top:.12rem;}
.word.sel .word-hi{color:rgba(255,255,255,.88);}
.opt.sel .opt-hi{color:#7c3aed;}

/* ---------- Timed one-at-a-time quiz ---------- */
.test-wrap{-webkit-user-select:none;-moz-user-select:none;user-select:none;}
.test-wrap input{user-select:text;}
.timerbar{height:9px;background:#eef2f7;border-radius:999px;overflow:hidden;margin:.35rem 0 .1rem;}
.timerbar > span{display:block;height:100%;width:100%;background:#ee5a24;transition:width 1s linear,background .3s;}
.blurwarn{position:fixed;inset:0;background:rgba(15,23,42,.93);color:#fff;display:flex;align-items:center;justify-content:center;text-align:center;z-index:9999;font-size:1.3rem;font-weight:700;line-height:1.6;padding:2rem;}
.flag-warn{background:#fef2f2;border:1px solid #fecaca;color:#991b1b;border-radius:.7rem;padding:.7rem 1rem;font-size:.88rem;font-weight:600;margin-top:.8rem;}
