*{box-sizing:border-box}body{margin:0;font-family:Segoe UI,Arial,sans-serif;background:#f3f6fb;color:#172033}.topbar{background:linear-gradient(135deg,#0d1b3e,#163b77);color:#fff;padding:18px 0;box-shadow:0 3px 14px rgba(0,0,0,.15)}.wrap{width:min(1100px,94%);margin:auto}.brand{display:flex;justify-content:space-between;align-items:center;gap:20px}.brand h1{margin:0;font-size:24px}.brand small{opacity:.8}.card{background:#fff;border-radius:18px;box-shadow:0 10px 35px rgba(22,59,119,.10);padding:28px;margin:28px auto}.hero{max-width:780px;text-align:center;padding:42px}.hero h2{font-size:34px;margin:0 0 10px;color:#0d2d5d}.hero p{color:#65708a}.info-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:22px 0}.info{background:#f7f9fd;border:1px solid #e4eaf4;border-radius:12px;padding:14px}.info b{display:block;color:#0d2d5d;font-size:18px}label{font-weight:600;display:block;margin-bottom:7px}.input{width:100%;padding:13px 14px;border:1px solid #ccd5e3;border-radius:10px;font-size:16px;outline:none}.input:focus{border-color:#1d67d5;box-shadow:0 0 0 3px rgba(29,103,213,.1)}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:16px;text-align:left}.btn{display:inline-block;border:0;border-radius:10px;padding:12px 20px;font-weight:700;font-size:15px;cursor:pointer}.btn-primary{background:#1769e0;color:#fff}.btn-secondary{background:#e9eef6;color:#1a2f55}.btn-danger{background:#d9363e;color:#fff}.exam-head{display:grid;grid-template-columns:1fr auto;align-items:center;gap:20px}.timer{background:#102a56;color:#fff;border-radius:12px;padding:12px 18px;font-weight:800;font-size:22px;letter-spacing:1px}.progress{height:9px;background:#e9eef5;border-radius:20px;overflow:hidden;margin:14px 0}.progress span{display:block;height:100%;background:#1d67d5}.q-meta{display:flex;justify-content:space-between;color:#63708a;font-size:14px}.question{font-size:23px;line-height:1.45;margin:24px 0;color:#13284a}.option{display:block;border:1px solid #dbe3ef;border-radius:13px;padding:15px 16px;margin:11px 0;cursor:pointer;background:#fff}.option:hover{border-color:#7ca7e5;background:#f7fbff}.option input{margin-right:12px;transform:scale(1.15)}.nav{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:26px}.palette{display:grid;grid-template-columns:repeat(10,1fr);gap:6px;margin-top:18px}.pill{border-radius:7px;padding:8px 0;text-align:center;background:#edf1f7;color:#38506d;font-size:12px}.pill.done{background:#dff4e5;color:#147138}.pill.current{background:#1769e0;color:#fff}.alert{padding:12px 14px;border-radius:10px;margin:12px 0}.alert-danger{background:#fff0f0;color:#b0202a}.result-score{font-size:64px;font-weight:800;color:#153f7e}.pass{color:#138a42}.fail{color:#c2343b}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:24px 0}.stat{padding:18px;border-radius:14px;background:#f6f8fc;text-align:center}.stat b{font-size:28px;display:block}table{width:100%;border-collapse:collapse;margin-top:18px}th,td{padding:12px;border-bottom:1px solid #e5eaf2;text-align:left}th{background:#f3f6fb}.footer{text-align:center;color:#7b8496;padding:25px}@media(max-width:760px){.form-row,.info-grid,.stats{grid-template-columns:1fr}.exam-head{grid-template-columns:1fr}.palette{grid-template-columns:repeat(5,1fr)}.question{font-size:20px}.hero{padding:26px}.brand{align-items:flex-start;flex-direction:column}}.top-link,.admin-nav a{color:#fff;text-decoration:none;font-weight:700;margin-left:16px}.top-link:hover,.admin-nav a:hover{text-decoration:underline}
.login-card{max-width:460px;margin:55px auto;text-align:center;padding:38px}.login-card .field{text-align:left;margin:16px 0}.admin-icon{width:64px;height:64px;border-radius:18px;background:#1769e0;color:#fff;display:flex;align-items:center;justify-content:center;font-size:30px;font-weight:800;margin:0 auto 18px}.btn-block{width:100%;margin-top:8px}
.admin-stats{margin-top:28px}.admin-card{margin-top:18px}.admin-title-row{display:flex;justify-content:space-between;align-items:center;gap:15px}.admin-title-row h2{margin:0}.admin-title-row p{margin:5px 0;color:#72809a}.filter-grid{display:grid;grid-template-columns:2fr 1fr auto;gap:14px;align-items:end;margin:22px 0}.filter-button{padding-bottom:1px}.table-scroll{overflow-x:auto}.admin-table{width:100%;border-collapse:collapse;font-size:14px}.admin-table th{background:#102a56;color:#fff;padding:12px;white-space:nowrap}.admin-table td{padding:11px 12px;border-bottom:1px solid #e5eaf2;vertical-align:top}.admin-table tr:nth-child(even) td{background:#fafbfd}.report-link{display:inline-block;padding:6px 11px;border-radius:7px;background:#e8f1ff;color:#1358ad;text-decoration:none;font-weight:700}.report-link:hover{background:#d9e8ff}.admin-table .pager td{background:#fff}.admin-table table{width:auto;margin:auto}.admin-table table td{border:0;padding:7px}
.attempt-head{display:flex;justify-content:space-between;gap:20px;align-items:center}.attempt-head h2{margin:0 0 5px}.attempt-head p{margin:0;color:#6e7a91}.status-badge{padding:10px 16px;border-radius:999px;font-weight:800}.status-pass{background:#daf3e2;color:#14733a}.status-fail{background:#ffe1e3;color:#ad2730}.status-running{background:#fff1c9;color:#8a6000}.attempt-times{display:flex;gap:30px;flex-wrap:wrap;background:#f7f9fd;padding:13px;border-radius:10px}.answer-table td:nth-child(3){min-width:360px}.footer a{color:#1769e0;text-decoration:none;font-weight:700}
@media(max-width:760px){.filter-grid{grid-template-columns:1fr}.admin-title-row,.attempt-head{align-items:flex-start;flex-direction:column}.admin-nav a{margin-left:0;margin-right:12px}}

/* Exam V2: compact, fit-to-screen layout */
.exam-body{min-height:100vh;background:#eef3f9;overflow-y:auto}.exam-topbar{padding:10px 0}.exam-topbar .brand h1{font-size:20px}.exam-top-actions{display:flex;align-items:center;gap:14px}.exam-top-actions .top-link{margin-left:0}.exam-wrap{max-width:1180px}.exam-card{margin:14px auto;padding:20px 28px;min-height:calc(100vh - 105px);display:flex;flex-direction:column}.exam-card .question{font-size:21px;margin:16px 0 14px}.exam-card .progress{margin:9px 0 8px}.option-list{display:grid;gap:10px}.option-list>span{display:flex;align-items:center;border:1px solid #dbe3ef;border-radius:12px;padding:0;background:#fff;min-height:52px;transition:.15s}.option-list>span:hover{border-color:#7ca7e5;background:#f7fbff}.option-list input{margin:0 12px 0 15px;transform:scale(1.15);flex:0 0 auto}.option-list label{display:block;flex:1;padding:14px 14px 14px 0;margin:0;cursor:pointer;font-weight:500}.option-list label b{color:#102a56;margin-right:6px}.exam-bottom{margin-top:auto}.nav{margin-top:16px}.nav-right{display:flex;gap:9px;align-items:center}.btn-exit{background:#fff3e8;color:#a54b00;border:1px solid #f0c99d}.btn-exit:hover{background:#ffe8d1}.navigator{margin-top:12px;border-top:1px solid #e7ecf3;padding-top:10px}.navigator summary{cursor:pointer;color:#335070;font-weight:700;font-size:13px;user-select:none}.navigator summary span{font-weight:400;color:#7a8798}.palette{grid-template-columns:repeat(20,1fr);gap:4px;margin-top:10px}.pill{display:block;text-decoration:none;padding:5px 0;font-size:11px}.completion-badge{display:inline-block;background:#eef4ff;color:#174f9b;border-radius:999px;padding:8px 14px;font-size:13px;font-weight:800}.result-card{max-width:1000px}
@media(max-height:760px) and (min-width:761px){.exam-topbar{padding:7px 0}.timer{padding:8px 14px;font-size:18px}.exam-card{margin:8px auto;padding:14px 24px;min-height:calc(100vh - 78px)}.exam-card .question{font-size:19px;margin:10px 0}.option-list{gap:7px}.option-list>span{min-height:44px}.option-list label{padding:10px 12px 10px 0}.nav{margin-top:10px}.navigator{margin-top:8px}}
@media(max-width:760px){.exam-top-actions{width:100%;justify-content:space-between}.exam-card{min-height:auto;padding:18px;margin:10px auto}.nav{align-items:stretch;flex-direction:column}.nav-right{width:100%;display:grid;grid-template-columns:1fr 1fr}.nav .btn{width:100%}.palette{grid-template-columns:repeat(10,1fr)}}

/* KBC-style instant answer lock */
.option-list>span.answer-correct{border:2px solid #169447!important;background:#e9f9ef!important;box-shadow:0 0 0 3px rgba(22,148,71,.08)}
.option-list>span.answer-correct label,.option-list>span.answer-correct label b{color:#087638!important;font-weight:800}
.option-list>span.answer-wrong{border:2px solid #db3743!important;background:#fff0f1!important;box-shadow:0 0 0 3px rgba(219,55,67,.07)}
.option-list>span.answer-wrong label,.option-list>span.answer-wrong label b{color:#b51f2c!important;font-weight:800}
.option-list.aspNetDisabled>span{opacity:.72;cursor:not-allowed}.option-list.aspNetDisabled>span.answer-correct,.option-list.aspNetDisabled>span.answer-wrong{opacity:1}
.answer-feedback{margin:13px 0 2px;padding:12px 15px;border-radius:10px;font-weight:800;font-size:15px}
.feedback-correct{background:#e8f8ee;border:1px solid #9bd8ae;color:#087738}
.feedback-wrong{background:#fff0f1;border:1px solid #f0aab0;color:#b5212d}
.btn-disabled,.btn[disabled]{opacity:.45;cursor:not-allowed}
.navigator .pill{cursor:default}


/* V4 PROFESSIONAL ONE-SCREEN EXAM LAYOUT */
@media (min-width: 761px){
  html,body.exam-body{height:100%;overflow:hidden}
  .exam-body{background:#edf2f8}
  .exam-topbar{height:64px;padding:7px 0}
  .exam-topbar .wrap{height:100%}
  .exam-topbar .brand{height:100%}
  .exam-title h1{font-size:18px!important;line-height:1.05}
  .exam-title small{font-size:11px}
  .exam-top-actions{gap:10px}
  .exam-top-actions .timer{font-size:17px;padding:7px 12px;border-radius:9px}
  .exam-top-actions .top-link{font-size:12px}
  .exam-wrap{height:calc(100vh - 64px);max-width:1120px;width:94%;display:flex;align-items:stretch}
  .exam-card{
    width:100%;height:calc(100vh - 78px);min-height:0;
    margin:7px auto;padding:14px 24px 12px;
    border-radius:14px;overflow:hidden;display:flex;flex-direction:column
  }
  .exam-card .q-meta{font-size:12px;line-height:1.2}
  .exam-card .progress{height:6px;margin:7px 0 8px}
  .exam-card .question{
    flex:0 0 auto;font-size:19px;line-height:1.3;
    margin:9px 0 10px;max-height:74px;overflow:auto
  }
  .option-list{display:grid!important;grid-template-columns:1fr 1fr;gap:9px 12px;flex:0 0 auto}
  .option-list>span{
    min-height:58px;max-height:74px;border-radius:10px;
    display:flex!important;align-items:center;overflow:hidden
  }
  .option-list input{margin:0 10px 0 13px;transform:scale(1.08)}
  .option-list label{
    padding:10px 12px 10px 0!important;margin:0!important;
    font-size:14px;line-height:1.25;max-height:72px;overflow:auto
  }
  .answer-feedback{margin:8px 0 0;padding:8px 12px;font-size:13px;line-height:1.2}
  .exam-bottom{margin-top:auto;flex:0 0 auto}
  .nav{margin-top:9px;min-height:39px}
  .nav .btn{padding:9px 16px;font-size:13px;border-radius:8px}
  .nav-right{gap:7px}
  .navigator{margin-top:7px;padding-top:6px}
  .navigator summary{font-size:11px}
  .palette{grid-template-columns:repeat(25,1fr);gap:3px;margin-top:6px}
  .pill{padding:3px 0;font-size:9px;border-radius:5px}
}
@media (min-width:761px) and (max-height:680px){
  .exam-topbar{height:56px;padding:5px 0}
  .exam-wrap{height:calc(100vh - 56px)}
  .exam-card{height:calc(100vh - 66px);margin:5px auto;padding:10px 20px 8px}
  .exam-card .question{font-size:17px;margin:6px 0 7px;max-height:56px}
  .option-list{gap:6px 10px}
  .option-list>span{min-height:48px;max-height:58px}
  .option-list label{font-size:13px;padding:7px 10px 7px 0!important}
  .answer-feedback{padding:6px 10px;margin-top:5px;font-size:12px}
  .nav{margin-top:6px}
  .nav .btn{padding:7px 13px;font-size:12px}
  .navigator{margin-top:5px;padding-top:4px}
}
/* Previous is a review control. Locked answers cannot be changed. */
.option-list.aspNetDisabled input{pointer-events:none}
