/* Look & feel of the original exam portal (Bootstrap 3 + Font Awesome 4). */
:root {
  --navy: #1f3d8a;
  --blue: #3a99d8;
  --blue-dark: #2a7fc0;
  --side: #3b9ae1;
  --pal-nv: #8fcaf0;      /* palette: not visited */
  --pal-v: #f4f6f8;       /* palette: visited, not answered */
  --pal-a: #4cae4c;       /* palette: answered */
  --pal-cur: #1e3a5c;     /* palette: current */
  --pal-r: #e8573f;       /* palette: marked for review */
  --red-text: #b5342b;
}
html, body { background: #e9ebee; color: #333; font-family: Roboto, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans Devanagari", sans-serif; }
body { padding-bottom: 40px; -webkit-tap-highlight-color: transparent; }
a { cursor: pointer; }

/* ----- brand ----- */
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none !important; }
.brand img { width: 46px; height: 46px; object-fit: contain; }
.brand .bt { color: var(--navy); font-weight: 700; text-transform: uppercase; line-height: 1.02; letter-spacing: .6px; font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif; text-align: left; }
.brand .bt span { display: block; font-size: 17px; }
.brand.sm img { width: 30px; height: 30px; }
.brand.sm .bt span { font-size: 10.5px; letter-spacing: .4px; }

/* ----- top bar ----- */
.topbar { background: #fff; border-bottom: 1px solid #ddd; height: 52px; display: flex; align-items: center; justify-content: center; position: relative; }
.topbar .ham { position: absolute; left: 10px; top: 9px; width: 36px; height: 34px; border: 1px solid transparent; border-radius: 4px; background: none; color: #555; font-size: 18px; }
.topbar .ham.open { border-color: #999; }
.topbar .pwr { position: absolute; right: 12px; top: 14px; color: #777; font-size: 14px; background: none; border: 0; }
.crumbs { background: #f5f5f5; padding: 9px 15px; font-size: 13px; color: #777; border-bottom: 1px solid #e3e3e3; }
.crumbs a { color: #337ab7; }
.crumbs .sep { color: #bbb; padding: 0 5px; }
.crumbs .home { color: #555; }

.wrap { max-width: 760px; margin: 0 auto; padding: 14px 12px; }
.panel { border-radius: 3px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.panel-heading h3, .panel-title-lg { font-size: 19px; margin: 0; color: #333; }
.ttl-xl { font-size: 26px; font-weight: 400; color: #333; margin: 6px 0 16px; }

/* ----- login ----- */
.login-bg { min-height: 100vh; background: #fff; position: relative; overflow: hidden; padding: 70px 14px 40px; }
.login-bg:before { content: ""; position: absolute; right: -60px; top: -40px; width: 230px; height: 150px; background: var(--blue-dark); transform: skewX(-28deg); }
.login-bg:after { content: ""; position: absolute; left: -40px; bottom: -40px; width: 120%; height: 120px; background: var(--blue-dark); transform: skewY(-6deg); }
.login-card { position: relative; z-index: 2; background: #f8f8f8; max-width: 420px; margin: 0 auto; padding: 24px 22px 26px; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.login-card .head { text-align: center; padding-bottom: 14px; border-bottom: 1px solid #e3e3e3; margin-bottom: 18px; }
.login-card .head h4 { font-size: 21px; color: #444; margin: 10px 0 0; }
.login-card label { font-weight: 500; color: #444; }
.login-card .form-control { height: 38px; border-radius: 2px; box-shadow: none; }
.pw-wrap { position: relative; }
.pw-wrap .eye { position: absolute; right: 10px; top: 10px; color: #bbb; cursor: pointer; }
.helpline { color: var(--red-text); text-align: center; font-size: 12.5px; font-weight: 500; margin: 18px 0; padding-bottom: 16px; border-bottom: 1px solid #e3e3e3; }
.register { text-align: center; font-size: 19px; }
.register a { color: #2f73c9; font-weight: 500; }
.register .tag { background: #f5b524; color: #333; font-size: 12px; padding: 1px 4px; border-radius: 2px; vertical-align: middle; }
.login-card .btn-submit { display: block; margin: 22px auto 0; padding: 6px 14px; background: #2f8ef2; border-color: #2f8ef2; }

/* ----- home ----- */
.alert-welcome { background: #dff0d8; border-color: #d6e9c6; color: #3c763d; font-weight: 500; }
.req { font-size: 13px; line-height: 1.45; }
.req p { margin: 0 0 1px; }
.req .gap { height: 14px; }
.agree { color: var(--red-text); font-size: 14px; display: flex; gap: 8px; align-items: flex-start; margin-top: 20px; font-weight: 400; cursor: pointer; }
.agree input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.subj-item { display: block; padding: 12px 15px; border: 1px solid #ddd; margin-top: -1px; font-size: 16px; color: #555; background: #fff; text-decoration: none !important; }
.subj-item:hover { background: #f5f5f5; color: #333; }
.sched-item { padding: 10px 15px; border: 1px solid #ddd; margin-top: -1px; font-size: 13.5px; text-transform: uppercase; color: #444; background: #fff; }
.btn-refresh { padding: 3px 9px; }

/* ----- paper ----- */
.instr { font-size: 13.5px; line-height: 1.5; }
.instr ol { padding-left: 18px; }
.instr .o { padding-left: 4px; }
.instr .hi { margin-top: 24px; }
.avatar { width: 92px; height: 92px; border-radius: 50%; border: 4px solid #f7f7f7; box-shadow: 0 0 0 1px #ddd; background: #f0c330; object-fit: cover; display: block; margin: 26px auto 14px; }
.info-list .list-group-item { border-left: 0; border-right: 0; font-size: 13.5px; padding: 11px 15px; }
.paper-actions { padding: 14px 15px 18px; border-top: 1px solid #ddd; background: #f5f5f5; overflow: hidden; }
.btn-orange { background: #f5a623; border-color: #ec9b12; color: #fff; }
.btn-orange:hover, .btn-orange:focus { background: #ec9b12; color: #fff; }

/* ----- modals (bootstrap-like, no jQuery) ----- */
.mdl { position: fixed; inset: 0; z-index: 1050; display: none; overflow-y: auto; }
.mdl.show { display: block; }
.mdl .backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); }
.mdl .box { position: relative; background: #fff; margin: 70px auto; width: calc(100% - 20px); max-width: 520px; border-radius: 2px; box-shadow: 0 5px 15px rgba(0,0,0,.4); }
.mdl .box.full { margin: 8px auto; max-width: 760px; }
.mdl .hd { padding: 12px 15px; border-bottom: 1px solid #e5e5e5; font-size: 17px; position: relative; }
.mdl .hd .x { position: absolute; right: 14px; top: 10px; font-size: 21px; color: #999; background: none; border: 0; line-height: 1; }
.mdl .bd { padding: 15px; }
.mdl .ft { padding: 12px 15px; border-top: 1px solid #e5e5e5; text-align: right; }
.mdl.warn .box { background: #f39c4a; }
.mdl.warn .hd { color: #fff; border-color: rgba(0,0,0,.08); }
.mdl.warn .bd { background: #fff; display: flex; gap: 12px; align-items: center; font-size: 15px; color: #555; }
.mdl.warn .bd .ic { flex: none; width: 46px; height: 46px; border-radius: 50%; background: #f39c4a; color: #fff; font-size: 28px; text-align: center; line-height: 46px; font-weight: 700; }
.mdl.warn .ft { border: 0; text-align: center; }
.mdl.msg .box { background: #26b582; }
.mdl.msg .hd { color: #fff; border-color: rgba(0,0,0,.08); }
.mdl.msg .bd { background: #fff; display: flex; gap: 12px; align-items: center; font-size: 15px; }
.mdl.msg .bd .ic { color: #26b582; font-size: 40px; }
.mdl.msg .ft { border: 0; }
.mdl.wait .box { margin-top: 38vh; }
.mdl.wait .hd { background: #3c88b8; color: #fff; }
.mdl.wait .bd { padding: 12px 15px 16px; }
.progress { margin: 8px 0 0; height: 14px; }
.progress-bar { font-size: 9px; line-height: 14px; }
.mdl.confirm .box { margin-top: 10px; }
.mdl.confirm .bd { font-size: 14px; color: #444; }

/* ----- browser check ----- */
.chk-instr { color: var(--red-text); font-size: 13px; line-height: 1.5; }
.chk-instr ol { padding-left: 28px; }
.chk-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px 8px 14px; font-size: 13.5px; }
.tick { display: inline-block; width: 24px; height: 18px; border-radius: 3px; background: #2ebd59; color: #fff; text-align: center; font-size: 12px; line-height: 18px; margin-left: 6px; }
.tick.no { background: #d9534f; }
.tick.wait { background: #bbb; }
.loc { text-align: center; font-size: 13.5px; padding: 6px 0; }
.chk-btns .btn { margin: 4px 0; }
.camera-box video, .camera-box img { width: 100%; display: block; background: #eee; min-height: 200px; object-fit: cover; }
.btn-sky { background: #5bc0de; border-color: #46b8da; color: #fff; }
.alert-success-bar { background: #27ae60; color: #fff; border: 0; border-radius: 0; margin: 0; padding: 12px 40px 12px 15px; position: relative; }
.alert-success-bar .fa-check-circle { font-size: 22px; vertical-align: middle; margin-right: 10px; }
.alert-success-bar .close { position: absolute; right: 12px; top: 10px; color: #fff; opacity: .9; }

/* ----- exam ----- */
.ex-stats { padding: 10px 14px 4px; font-size: 12.5px; color: #555; }
.ex-stats div { margin-bottom: 2px; }
.badge-box { display: inline-block; border: 1px solid #999; border-radius: 3px; padding: 0 5px; margin-left: 2px; font-size: 12px; }
.badge-g { background: #43a047; color: #fff; border-color: #43a047; }
.badge-r { background: #e8573f; color: #fff; border-color: #e8573f; }
.badge-b { background: #5bb2e8; color: #102b46; border-color: #5bb2e8; }
.timebar { position: sticky; top: 0; z-index: 30; background: #fff; padding: 3px 14px 6px; font-size: 12.5px; color: #555; }
.cam-float { position: fixed; right: 4px; top: 150px; width: 70px; height: 92px; z-index: 3000; background: #ddd; border: 1px solid #eee; object-fit: cover; }
.screen-card { background: #fff; border: 1px solid #ddd; margin: 10px 12px; }
.screen-card .sh { padding: 12px 15px; font-size: 17px; color: #333; background: #f5f5f5; border-bottom: 1px solid #ddd; min-height: 80px; position: relative; }
.screen-card .sh .rf { position: absolute; right: 15px; bottom: 10px; }
.screen-card .sb { padding: 18px 14px 10px; }
.tabwarn { color: var(--red-text); font-size: 13.5px; background: #fbe9e9; padding: 4px 8px; margin: 8px 0 0; border-radius: 2px; }
.qpaper { font-family: "Times New Roman", "Noto Serif Devanagari", Times, serif; color: #111; }
.qpaper .sec { text-align: center; font-size: 11px; font-weight: 700; }
.qpaper .intro { font-size: 11px; line-height: 1.25; margin: 2px 0 6px; white-space: pre-line; }
.qpaper .qen { font-size: 13.5px; margin: 6px 0 2px; }
.qpaper .qhi { font-size: 14px; }
.qpaper img { max-width: 100%; margin: 6px 0; }
.ans-tag { display: inline-block; background: #5bb2e8; color: #fff; font-size: 12px; padding: 1px 4px; margin: 10px 0 4px; border-radius: 2px; }
.opts { border-right: 6px solid var(--blue); padding-right: 6px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; cursor: pointer; }
.opt .rd { flex: none; width: 21px; height: 21px; border-radius: 50%; background: #d5d5d5; margin-top: 4px; position: relative; }
.opt.sel .rd { background: #2ebd59; box-shadow: 0 0 0 3px #c9efd5; }
.opt.sel .rd:after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #fff; }
.opt .en { font-size: 11px; font-family: "Times New Roman", Times, serif; }
.opt .hi { font-size: 17px; font-family: "Times New Roman", "Noto Serif Devanagari", serif; }
.ex-foot { padding: 14px 14px 26px; display: flex; flex-direction: column; gap: 22px; }
.ex-foot .row1 { display: flex; justify-content: space-between; align-items: center; }
.btn-prev { background: #f5f5f5; color: #444; border: 0; font-size: 13px; padding: 6px 10px; border-radius: 4px; }
.btn-next { background: #2a8be0; color: #fff; border: 0; border-radius: 8px; padding: 7px 12px; font-size: 13px; }
.btn-mark { background: none; border: 0; color: #555; font-size: 13px; padding: 0; text-align: left; }
.btn-mark.on { color: var(--pal-r); font-weight: 600; }

.drawer-bg { position: fixed; inset: 52px 0 0 0; background: rgba(0,0,0,.45); z-index: 60; display: none; }
.drawer { position: fixed; left: 0; top: 52px; bottom: 0; width: 52vw; max-width: 270px; min-width: 180px; background: var(--side); z-index: 61; transform: translateX(-100%); transition: transform .2s; overflow-y: auto; color: #fff; }
body.drawer-open .drawer { transform: none; }
body.drawer-open .drawer-bg { display: block; }
.drawer .ph { width: min(116px, 30vw); height: min(116px, 30vw); border-radius: 50%; border: 1px solid #fff; margin: 10px auto; display: block; object-fit: cover; background: transparent; }
.drawer .who { text-align: center; font-size: 12px; border-top: 1px solid rgba(255,255,255,.4); border-bottom: 1px solid rgba(255,255,255,.4); padding: 6px 0; line-height: 1.6; }
.palette { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; padding: 8px 8px 6px; }
.palette button { border: 1px solid rgba(0,0,0,.08); background: var(--pal-nv); color: #345; font-size: 11px; height: 24px; padding: 0; border-radius: 2px; }
.palette button.v { background: var(--pal-v); color: #555; }
.palette button.a { background: var(--pal-a); color: #fff; }
.palette button.r { background: var(--pal-r); color: #fff; }
.palette button.cur { background: var(--pal-cur); color: #fff; }
.drawer .dbtn { display: block; width: calc(100% - 16px); margin: 4px 8px; background: #eef4f9; color: #555; border: 1px solid #d0dbe5; font-size: 11px; padding: 4px; border-radius: 2px; }
.drawer .dbtn.on { background: var(--pal-cur); color: #fff; }
.drawer .back { display: block; color: #fff; font-size: 12px; padding: 12px 8px; border-bottom: 1px solid rgba(255,255,255,.4); text-decoration: none; }
.legend { padding: 6px 14px 16px; font-size: 11px; }
.legend i { display: inline-block; width: 11px; height: 11px; vertical-align: -1px; margin-right: 4px; border-radius: 2px; }

.chatbar { position: fixed; left: 10px; bottom: 6px; width: 240px; max-width: calc(100vw - 20px); z-index: 70; background: #4a5568; color: #fff; border-radius: 3px; box-shadow: 0 2px 6px rgba(0,0,0,.3); font-size: 13px; }
.chatbar .ch { padding: 10px 12px; cursor: pointer; position: relative; }
.chatbar .ch .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #3fcf6a; margin-right: 6px; }
.chatbar .ch .x { position: absolute; right: 10px; top: 7px; color: #ddd; background: none; border: 0; font-size: 16px; }
.chatbar .ch .unread { background: #e8573f; border-radius: 8px; padding: 0 6px; font-size: 11px; margin-left: 6px; }
.chatbar .cb { display: none; background: #fff; color: #333; padding: 8px; }
.chatbar.open .cb { display: block; }
.chatbar .msgs { height: 200px; overflow-y: auto; font-size: 12.5px; }
.chatbar .m { margin: 4px 0; padding: 5px 8px; border-radius: 4px; background: #eef2f6; max-width: 85%; }
.chatbar .m.me { background: #d9f0e0; margin-left: auto; }
.upl-note { font-size: 13px; line-height: 1.5; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.thumbs .t { position: relative; background: #eee; aspect-ratio: 1; border: 1px solid #ccc; }
.thumbs .t img { width: 100%; height: 100%; object-fit: cover; }
.thumbs .t .rm { position: absolute; right: 4px; top: 4px; background: #333; color: #fff; border: 0; border-radius: 50%; width: 18px; height: 18px; font-size: 10px; line-height: 18px; padding: 0; }
.filelist { font-size: 12.5px; color: #666; padding-left: 26px; white-space: pre-line; word-break: break-all; }

/* ----- finished ----- */
.done-ico { width: 150px; height: 150px; display: block; margin: 20px auto 10px; }
.done-msg { font-size: 22px; text-align: center; color: #222; margin: 0 0 16px; }
.panel-blue > .panel-heading { background: #3a99d8; color: #fff; font-size: 17px; }

.spin { display: inline-block; animation: sp 1s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.blank-wait { min-height: calc(100vh - 52px); }
.btn-primary { background: #2c97de; border-color: #2589cc; }
.btn-primary:hover, .btn-primary:focus { background: #2589cc; border-color: #1f7ab8; }

/* page-load blank (simulated server latency) */
html.pl body > * { visibility: hidden; }
html.pl body:after { content: ""; position: fixed; left: 50%; top: 45%; width: 30px; height: 30px; margin-left: -15px; border: 3px solid #d6dbe0; border-top-color: #7a8794; border-radius: 50%; animation: sp .9s linear infinite; }
.scr-loading { min-height: 220px; display: flex; align-items: center; justify-content: center; color: #999; }
.btn-already { background: #f7c21a; border-color: #f0b800; color: #222; font-size: 16px; padding: 6px 12px; white-space: normal; max-width: 100%; }
.alert-already { background: #fdf3cd; border: 1px solid #f9e5a3; color: #8a6d00; font-weight: 600; font-size: 15.5px; line-height: 1.6; position: relative; padding-right: 36px; }
.alert-already .close { position: absolute; right: 12px; top: 10px; }
.facewarn { position: fixed; left: 8px; right: 8px; top: 58px; z-index: 80; background: #d9534f; color: #fff; padding: 8px 12px; border-radius: 3px; font-size: 13.5px; box-shadow: 0 2px 8px rgba(0,0,0,.3); display: none; }

/* live camera inside the Upload box, under "Choose files" */
.upl-cam { display: block; width: 110px; height: 140px; object-fit: cover; background: #ddd; border: 1px solid #ccc; margin-top: 10px; }
body.upl-open .cam-float { display: none !important; }
