*{box-sizing:border-box}
body{margin:0;font-family:Inter,"Apple SD Gothic Neo","Malgun Gothic",Arial,sans-serif;background:#f4f7fb;color:#18263b}
a{text-decoration:none;color:inherit}
.top{height:58px;background:#092d59;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 28px;font-weight:800}
.brand{letter-spacing:.5px}.top small{font-weight:500}.top a{margin-left:12px;text-decoration:underline}
.shell{display:flex;min-height:calc(100vh - 58px)}
.side{width:210px;background:#fff;border-right:1px solid #dfe6ef;padding:18px 10px;flex:none}
.nav{padding:11px 14px;border-radius:7px;margin:3px 0;color:#33465f;display:block}
.nav.active,.nav:hover{background:#e8f1ff;color:#075bc7}
.main{flex:1;padding:26px;max-width:1300px;min-width:0}
.panel{background:#fff;border:1px solid #dfe6ef;border-radius:9px;padding:18px;margin-bottom:16px;box-shadow:0 1px 2px #00000008}
.btn{display:inline-block;border:0;border-radius:6px;padding:9px 15px;background:#0967d8;color:#fff;font-weight:700;cursor:pointer;font-size:14px}
.btn.secondary{background:#fff;color:#234;border:1px solid #ccd6e2}.btn.danger{background:#ef476f}.btn.small{padding:5px 10px;font-size:12px}
.btn:disabled{opacity:.4;cursor:not-allowed}
h1{margin:0 0 16px;font-size:24px}h2{font-size:19px}h3{margin:0 0 10px}
.grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.table{width:100%;border-collapse:collapse}.table th,.table td{padding:10px;border-bottom:1px solid #e5eaf0;text-align:left;vertical-align:top;font-size:14px}
.table th{color:#5b6b80;font-size:12px;text-transform:uppercase}
.pill{display:inline-block;padding:3px 9px;border-radius:20px;background:#e9f7ed;color:#208341;font-size:12px;font-weight:700;white-space:nowrap}
.pill.NOT{background:#eef1f5;color:#6c7c90}.pill.IN{background:#fff4d6;color:#a06a00}.pill.SUBMITTED{background:#e3efff;color:#0b5bc0}.pill.SCORED{background:#e9f7ed;color:#208341}.pill.REVIEWED{background:#efe6fb;color:#6b3fb0}.pill.off{background:#fdeaec;color:#c33}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}
.chip{background:#fff;border:1px solid #cfe0f5;color:#075bc7;border-radius:20px;padding:6px 14px;font-weight:700;font-size:14px}.chip:hover{background:#e8f1ff}.chip.off{opacity:.5}
.loginbg{min-height:100vh;background:linear-gradient(145deg,#dbe9f8,#eef4fa);display:grid;place-items:center}
.login{width:390px;max-width:92vw;background:#fff;border-radius:12px;padding:36px;box-shadow:0 14px 40px #173a6330}
input[type=text],input[type=password],input[type=number],select,textarea{width:100%;padding:10px;margin:5px 0 12px;border:1px solid #cfd9e5;border-radius:6px;font:inherit}
textarea{min-height:90px;resize:vertical}
label.l{font-weight:700;font-size:13px;color:#33465f}
.muted{color:#6c7c90}.small{font-size:12px}
.flash{background:#e8f1ff;border:1px solid #b9d3f5;color:#0b4a9b;padding:10px 14px;border-radius:7px;margin-bottom:14px}
.warn{background:#fff4d6;border:1px solid #f0d58a;color:#7a5200;padding:10px 14px;border-radius:7px;margin-bottom:14px}
.studentmain{max-width:1050px;margin:0 auto;padding:30px 22px}
.cat{background:#fff;border:1px solid #dce4ed;border-radius:6px;padding:12px 14px;margin-bottom:8px}
.trow{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.good{background:#eaf8ee}.bad{background:#fff0f1}
.scorebox{text-align:center;padding:16px;border:1px solid #dfe6ef;border-radius:8px;background:#fff}
.bar{height:10px;background:#e5eaf0;border-radius:6px;overflow:hidden;min-width:120px}.bar i{display:block;height:100%;background:#0967d8}.bar i.low{background:#ef476f}.bar i.mid{background:#f2a516}
.answer{padding:10px;border-radius:6px}
.wrongrow{display:grid;grid-template-columns:1fr 1fr;gap:12px}
pre.essay{white-space:pre-wrap;font-family:inherit;background:#f8fafc;border:1px solid #e0e7ef;border-radius:6px;padding:12px;margin:6px 0}
/* exam screen */
.testbar{display:flex;justify-content:space-between;align-items:center;padding:10px 20px;background:#fff;border-bottom:1px solid #dce4ed}
.timer{color:#e04444;font-weight:800;font-size:18px}
.testwrap{display:grid;grid-template-columns:1fr 1fr;height:calc(100vh - 58px - 58px - 62px);background:#fff}
.passage,.questions{padding:22px;overflow:auto}.passage{border-right:1px solid #dce4ed;line-height:1.7}
.passage .txt{white-space:pre-wrap}.passage iframe{width:100%;height:100%;min-height:500px;border:0}
.q{padding:14px 0;border-bottom:1px solid #e5eaf0}.choice{display:block;padding:6px 4px}
.qtext{font-weight:700;margin-bottom:6px;white-space:pre-wrap}
.sortlist{list-style:none;padding:0;margin:8px 0}.sortlist li{display:flex;align-items:center;gap:8px;background:#f1f6fd;border:1px solid #cfe0f5;border-radius:6px;padding:8px 10px;margin:5px 0;cursor:grab}
.sortlist li span{flex:1}.sortlist button{border:1px solid #b9cde6;background:#fff;border-radius:4px;cursor:pointer}
.sortlist li.over{outline:2px dashed #0967d8}
.footbar{position:sticky;bottom:0;height:62px;background:#fff;border-top:1px solid #dce4ed;display:flex;justify-content:space-between;align-items:center;padding:0 20px;gap:10px}
.qpage{display:none}.qpage.on{display:block}
@media(max-width:800px){.side{display:none}.grid4,.grid3{grid-template-columns:1fr 1fr}.grid2{grid-template-columns:1fr}.testwrap{grid-template-columns:1fr;height:auto}.passage{border-right:0;border-bottom:1px solid #ddd}.main{padding:16px}.wrongrow{grid-template-columns:1fr}}

/* MASTER03 visual system — approved 7-screen direction */
:root{--navy:#062a57;--navy2:#0b3c78;--blue:#0c67dc;--gold:#c99a2e;--ink:#10213d;--soft:#f4f7fb}
.top{height:72px;background:var(--navy);padding:0 22px}.brand{font-family:Georgia,serif;font-size:18px;letter-spacing:1.2px}.side{width:230px;background:linear-gradient(180deg,#062a57,#08244a);border:0;padding:18px 12px}.nav{color:#eef5ff;padding:13px 14px}.nav.active,.nav:hover{background:#fff;color:#0a4f9e}.main{max-width:none;padding:32px}.panel{border-radius:12px}.grid4 .panel{min-height:128px}.studentmain{max-width:1180px}.testbar{min-height:64px}.questions{position:relative}.footbar{height:72px}.source-note{font-size:12px;color:#7a8798}.ve-mark{width:42px;height:42px;border-radius:50%;display:inline-grid;place-items:center;background:white;color:#082f63;font:700 20px Georgia,serif;border:2px solid #c99a2e;margin-right:10px}

/* Keep diagnostics reachable when the existing compact layout hides the sidebar. */
.ielts-report-shortcut{display:none}
@media(max-width:800px){.ielts-report-shortcut{display:block;padding:12px 16px;background:#f3f7fa}}

/* Teacher student management */
.sm .btn{background:var(--navy);border-bottom:2px solid var(--gold)}.sm .btn.secondary{background:white;color:var(--navy)}.sm summary{cursor:pointer;font-weight:700;color:var(--navy);padding:10px 0}.sm-table{overflow-x:auto}.sm-table table{min-width:620px}.sm-filters{display:flex;align-items:center;flex-wrap:wrap;gap:14px}.sm-filters label{flex:1;min-width:140px}.sm-form{margin-top:16px}.sm-record{padding:14px 0;border-top:1px solid #e4e8ef}.sm-due{color:#8b6515;font-weight:700}.sm-pre{white-space:pre-wrap;overflow-wrap:anywhere}.sm label{display:block;font-size:13px;font-weight:600}.sm input:not([type=hidden]):not([type=checkbox]),.sm textarea,.sm select{display:block;width:100%;padding:10px;border:1px solid #cfd9e5;border-radius:6px;margin:5px 0 12px;font:inherit}.sm-links{position:sticky;top:0;background:#f4f7fb;padding:8px 0;z-index:1}.sm section{scroll-margin-top:60px}@media(max-width:800px){.sm .grid4,.sm .grid3,.sm .grid2{grid-template-columns:1fr}.sm-filters{display:block}.sm-links{position:static}.sm-table table{min-width:580px}}
