@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
  --ink: #162b2b;
  --muted: #718181;
  --line: #e4ece9;
  --paper: #f7faf9;
  --panel: #ffffff;
  --teal: #0f766e;
  --teal-dark: #0a5b55;
  --teal-soft: #e5f4f0;
  --orange: #d97735;
  --orange-soft: #fff1e7;
  --green: #2f8f69;
  --green-soft: #e8f6ee;
  --blue: #4d78a8;
  --blue-soft: #edf4fc;
  --red: #cc5c55;
  --shadow: 0 14px 38px rgba(34, 72, 67, 0.08);
  font-family: 'DM Sans', 'Noto Sans SC', sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { display: flex; min-height: 100vh; }

.sidebar { width: 244px; background: #102e2c; color: #c5d6d2; padding: 25px 16px 18px; display: flex; flex-direction: column; flex-shrink: 0; }
.brand { display: flex; align-items: center; gap: 11px; color: #fff; padding: 0 12px 29px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #d6f28e; color: #193c37; font-size: 18px; font-weight: 700; }
.brand-text { font-size: 16px; line-height: 1.2; font-weight: 700; }
.brand-text small { display: block; color: #86aba5; font-size: 10px; font-weight: 500; letter-spacing: .06em; margin-top: 3px; }
.nav-label { color: #6f9691; text-transform: uppercase; letter-spacing: .09em; font-size: 10px; padding: 0 12px 9px; }
.nav { display: grid; gap: 4px; }
.nav-btn { border: 0; background: transparent; color: #a9c2be; border-radius: 9px; display: flex; align-items: center; gap: 11px; padding: 10px 12px; text-align: left; font-size: 13px; transition: .18s ease; }
.nav-btn:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-btn.active { color: #fff; background: #1b4b46; box-shadow: inset 3px 0 #d6f28e; }
.nav-icon { width: 19px; text-align: center; font-size: 15px; color: #83a8a2; }
.nav-btn.active .nav-icon { color: #d6f28e; }
.sidebar-spacer { flex: 1; }
.storage-note { border-top: 1px solid rgba(255,255,255,.1); padding: 17px 12px 0; font-size: 11px; line-height: 1.55; color: #84a39f; }
.storage-note strong { display: block; color: #d8e8e4; font-size: 12px; margin-bottom: 4px; }

.main { min-width: 0; flex: 1; }
.topbar { height: 74px; background: rgba(255,255,255,.9); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 34px; gap: 20px; }
.breadcrumb { color: var(--muted); font-size: 12px; }
.breadcrumb strong { color: var(--ink); font-size: 14px; margin-left: 9px; }
.top-actions { display: flex; align-items: center; gap: 13px; }
.role-switch { display: inline-flex; background: #eef4f2; border-radius: 8px; padding: 3px; gap: 2px; }
.role-switch button { border: 0; background: transparent; padding: 6px 11px; border-radius: 6px; color: #6b827f; font-size: 11px; }
.role-switch button.active { background: #fff; color: var(--teal-dark); box-shadow: 0 2px 5px rgba(30,67,62,.1); font-weight: 600; }
.icon-button { width: 32px; height: 32px; border: 1px solid var(--line); background: #fff; border-radius: 8px; color: #78918d; font-size: 16px; }
.avatar { width: 33px; height: 33px; border-radius: 50%; background: #f0ca99; display: grid; place-items: center; color: #734722; font-weight: 700; font-size: 12px; }
.content { max-width: 1360px; padding: 31px 34px 42px; margin: 0 auto; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 25px; }
.eyebrow { color: var(--teal); font-size: 11px; letter-spacing: .08em; font-weight: 700; margin-bottom: 8px; text-transform: uppercase; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 27px; line-height: 1.25; letter-spacing: -.03em; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
.subheading { color: var(--muted); font-size: 12px; margin-top: 7px; }
.btn { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 7px; padding: 9px 14px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: .18s ease; }
.btn:hover { border-color: #b9cfca; transform: translateY(-1px); }
.btn-primary { color: #fff; background: var(--teal); border-color: var(--teal); }
.btn-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.btn-quiet { background: transparent; }
.btn-danger { color: var(--red); border-color: #f0d9d6; }
.btn-small { padding: 7px 10px; font-size: 11px; }
.share-link-button { color: var(--teal-dark); background: var(--teal-soft); border-color: #b8ded4; }
.btn-block { width: 100%; }

.hero-card { background: var(--teal); color: #fff; border-radius: 12px; min-height: 185px; padding: 27px 29px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 30px; box-shadow: var(--shadow); }
.hero-card::after { content: ''; position: absolute; right: -46px; top: -68px; width: 235px; height: 235px; border: 30px solid rgba(214,242,142,.14); border-radius: 50%; }
.hero-card::before { content: ''; position: absolute; right: 76px; bottom: -105px; width: 190px; height: 190px; border: 23px solid rgba(255,255,255,.07); border-radius: 50%; }
.hero-copy { position: relative; z-index: 1; max-width: 615px; }
.hero-copy .eyebrow { color: #b8e1a5; }
.hero-copy h2 { font-size: 23px; margin-bottom: 9px; }
.hero-copy p { color: #c6e0dc; font-size: 12px; line-height: 1.65; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 19px; }
.hero-meta span { color: #d7ebe8; font-size: 11px; }
.hero-meta b { display: block; color: #fff; font-size: 14px; margin-bottom: 3px; }
.hero-action { position: relative; z-index: 2; flex-shrink: 0; background: #d6f28e; color: #173c36; border: 0; border-radius: 8px; padding: 12px 18px; font-size: 12px; font-weight: 700; }
.hero-action:hover { background: #e3f9ac; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin: 18px 0 28px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 17px 18px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.stat-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; font-size: 15px; }
.stat-icon.green { color: var(--green); background: var(--green-soft); }
.stat-icon.orange { color: var(--orange); background: var(--orange-soft); }
.stat-icon.blue { color: var(--blue); background: var(--blue-soft); }
.stat-icon.teal { color: var(--teal); background: var(--teal-soft); }
.stat-value { font-size: 24px; font-weight: 700; margin-top: 12px; letter-spacing: -.04em; }
.stat-detail { font-size: 10px; color: var(--muted); margin-top: 4px; }
.trend { color: var(--green); font-weight: 600; }

.section-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; align-items: start; }
.section { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 20px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 15px; }
.section-head .link { color: var(--teal); font-size: 11px; font-weight: 600; border: 0; background: transparent; padding: 0; }
.exam-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid #edf2f0; }
.exam-row:first-of-type { border-top: 0; padding-top: 0; }
.exam-main { min-width: 0; display: flex; align-items: center; gap: 12px; }
.exam-avatar { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; font-size: 17px; }
.exam-avatar.teal { background: var(--teal-soft); color: var(--teal); }
.exam-avatar.orange { background: var(--orange-soft); color: var(--orange); }
.exam-avatar.blue { background: var(--blue-soft); color: var(--blue); }
.exam-title { font-size: 12px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.exam-info { display: flex; gap: 12px; color: var(--muted); font-size: 10px; margin-top: 5px; }
.pill { border-radius: 5px; padding: 4px 7px; font-size: 10px; white-space: nowrap; font-weight: 600; }
.pill.green { color: var(--green); background: var(--green-soft); }
.pill.orange { color: var(--orange); background: var(--orange-soft); }
.pill.blue { color: var(--blue); background: var(--blue-soft); }
.pill.gray { color: #738785; background: #eef3f2; }

.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; margin-top: 8px; }
.calendar-head { color: var(--muted); font-size: 10px; text-align: center; padding-bottom: 4px; }
.day { min-height: 44px; padding: 7px 5px; background: #f9fbfa; border-radius: 6px; text-align: center; color: #6e8380; font-size: 11px; position: relative; }
.day.muted { color: #c0cecb; background: transparent; }
.day.current { color: #fff; background: var(--teal); font-weight: 700; }
.day.exam::after { content: ''; width: 4px; height: 4px; background: var(--orange); border-radius: 50%; position: absolute; bottom: 6px; left: calc(50% - 2px); }
.day.current::after { background: #d6f28e; }
.calendar-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 17px; padding-top: 13px; border-top: 1px solid #edf2f0; color: var(--muted); font-size: 10px; }
.legend { display: flex; gap: 12px; }
.legend i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); margin: 0 4px 1px 0; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { color: var(--muted); font-size: 10px; font-weight: 500; text-align: left; padding: 0 12px 11px; white-space: nowrap; }
td { padding: 13px 12px; border-top: 1px solid #edf2f0; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 0; }
.person-cell { display: flex; align-items: center; gap: 9px; }
.mini-avatar { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: #f0ca99; color: #754b2b; font-weight: 700; font-size: 9px; }
.mini-avatar.teal { background: #bfe6dc; color: #246b64; }
.score { color: var(--green); font-weight: 700; }

.chart { height: 175px; display: flex; gap: 14px; padding-top: 12px; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; color: #9aadaa; font-size: 9px; padding-bottom: 18px; }
.bars { flex: 1; display: flex; align-items: stretch; justify-content: space-around; gap: 8px; border-bottom: 1px solid #dde8e4; background: repeating-linear-gradient(to bottom, transparent 0, transparent 42px, #edf3f1 43px); }
.bar-col { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; color: var(--muted); font-size: 9px; min-width: 28px; }
.bar { width: 23px; max-height: 125px; background: #a6d8c5; border-radius: 4px 4px 0 0; position: relative; }
.bar.current { background: var(--teal); }
.bar-value { position: absolute; top: -15px; width: 100%; text-align: center; color: var(--teal-dark); font-size: 9px; font-weight: 600; }

.admin-kpi { display: grid; grid-template-columns: repeat(4,1fr); gap: 13px; margin-bottom: 19px; }
.admin-kpi .stat { padding: 16px; }
.admin-layout { display: grid; grid-template-columns: 1.4fr .8fr; gap: 18px; }
.action-list { display: grid; gap: 3px; }
.action-item { display: flex; align-items: center; gap: 11px; padding: 13px 0; border-top: 1px solid #edf2f0; }
.action-item:first-child { border-top: 0; padding-top: 0; }
.action-dot { width: 8px; height: 8px; background: var(--orange); border-radius: 50%; flex-shrink: 0; }
.action-item:nth-child(2) .action-dot { background: var(--teal); }
.action-item:nth-child(3) .action-dot { background: var(--blue); }
.action-item p { font-size: 11px; line-height: 1.45; }
.action-item span { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }

.page-tabs { display: flex; gap: 5px; border-bottom: 1px solid var(--line); margin: -2px 0 20px; }
.tab { border: 0; background: transparent; color: var(--muted); padding: 0 2px 12px; margin-right: 17px; font-size: 12px; position: relative; }
.tab.active { color: var(--teal); font-weight: 700; }
.tab.active::after { content: ''; position: absolute; height: 2px; left: 0; right: 0; bottom: -1px; background: var(--teal); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 15px; }
.search { border: 1px solid var(--line); border-radius: 7px; background: #fff; padding: 9px 11px; min-width: 215px; font-size: 11px; outline-color: var(--teal); }
.empty { text-align: center; color: var(--muted); padding: 38px 15px; font-size: 12px; }
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state h2 { margin: 13px 0 7px; }
.empty-state p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.empty-icon { width: 50px; height: 50px; display: grid; place-items: center; margin: auto; border-radius: 14px; background: var(--teal-soft); color: var(--teal); font-size: 24px; }
.number { font-variant-numeric: tabular-nums; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(18, 43, 41, .44); display: grid; place-items: center; z-index: 10; padding: 20px; }
.modal { width: min(710px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 13px; box-shadow: 0 24px 70px rgba(20,52,48,.24); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; padding: 23px 24px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 18px; }
.modal-body { padding: 23px 24px; }
.modal-foot { padding: 15px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; }
.close-btn { border: 0; background: transparent; font-size: 20px; color: var(--muted); line-height: 1; }
.question-list { display: grid; gap: 22px; }
.question h3 { font-size: 14px; line-height: 1.55; font-weight: 600; margin-bottom: 11px; }
.question h3 span { color: var(--muted); font-weight: 500; margin-right: 4px; }
.question h3 em { color: var(--muted); font-size: 10px; font-style: normal; font-weight: 500; margin-left: 6px; }
.option-list { display: grid; gap: 7px; }
.option { border: 1px solid var(--line); background: #fbfdfc; border-radius: 7px; padding: 10px 12px; display: flex; gap: 9px; align-items: center; text-align: left; color: var(--ink); font-size: 12px; }
.option:hover { border-color: #a4c9c1; }
.option.selected { color: var(--teal-dark); background: var(--teal-soft); border-color: #88c4b7; }
.option-key { width: 20px; height: 20px; border: 1px solid #cddbd7; border-radius: 50%; display: grid; place-items: center; font-size: 10px; color: var(--muted); flex-shrink: 0; }
.option.selected .option-key { color: #fff; background: var(--teal); border-color: var(--teal); }
.exam-progress { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; }
.progress-track { flex: 1; height: 6px; border-radius: 4px; background: #e7efec; overflow: hidden; }
.progress-bar { height: 100%; background: var(--teal); border-radius: inherit; transition: width .2s; }
.exam-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 18px; align-items: start; }
.exam-paper { min-width: 0; }
.exam-side { position: sticky; top: 84px; display: flex; min-height: 310px; flex-direction: column; justify-content: space-between; gap: 24px; }
.exam-side-head { margin-bottom: 12px; }
.question-nav { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.question-nav-btn { aspect-ratio: 1; min-width: 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--muted); font-size: 11px; font-weight: 600; }
.question-nav-btn:hover { border-color: #8bbeb3; color: var(--teal); }
.question-nav-btn.answered { border-color: var(--teal); background: var(--teal); color: #fff; }
.answer-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; color: var(--muted); font-size: 10px; }
.answer-legend span { display: flex; align-items: center; gap: 5px; }
.legend-dot { width: 9px; height: 9px; border: 1px solid var(--line); border-radius: 3px; background: #fff; }
.legend-dot.answered { border-color: var(--teal); background: var(--teal); }
.exam-side-actions { display: grid; gap: 8px; }
.question { scroll-margin-top: 88px; }
.text-answer, .subjective-answer { width: 100%; border: 1px solid var(--line); border-radius: 7px; background: #fbfdfc; color: var(--ink); padding: 11px 12px; font-size: 12px; outline-color: var(--teal); }
.subjective-answer { min-height: 108px; resize: vertical; line-height: 1.6; }
.fill-answer-list { display: grid; gap: 9px; }
.fill-answer-row { display: flex; align-items: center; gap: 10px; }
.fill-answer-row > span { width: 58px; flex-shrink: 0; color: var(--muted); font-size: 11px; }
.fill-answer-row .text-answer { flex: 1; }
.form-help { color: var(--muted); font-size: 10px; line-height: 1.5; margin-top: 6px; }
.symbol-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; }
.symbol-toolbar > span { color: var(--muted); font-size: 10px; margin-right: 2px; }
.symbol-toolbar button { border: 1px solid var(--line); border-radius: 5px; background: #f7faf9; color: var(--teal-dark); padding: 5px 8px; font-size: 10px; cursor: pointer; }
.symbol-toolbar button:hover { border-color: #8bbeb3; background: var(--teal-soft); }
.image-answer { display: grid; gap: 11px; }
.upload-tile { min-height: 92px; border: 1px dashed #9cc9bf; border-radius: 9px; background: #f4fbf8; color: var(--teal-dark); display: flex; align-items: center; justify-content: center; gap: 11px; cursor: pointer; text-align: left; transition: .18s ease; }
.upload-tile:hover { border-color: var(--teal); background: var(--teal-soft); }
.upload-tile input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-tile strong, .upload-tile small { display: block; }
.upload-tile strong { font-size: 12px; }
.upload-tile small { color: var(--muted); font-size: 10px; margin-top: 4px; }
.upload-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--teal); color: #fff; font-size: 22px; font-weight: 400; }
.image-preview { display: flex; align-items: flex-start; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.image-preview img { width: 126px; height: 94px; object-fit: contain; border-radius: 5px; background: #eef3f1; }
.image-preview > div { display: grid; align-content: space-between; min-height: 94px; gap: 10px; color: var(--muted); font-size: 10px; }
.answer-image-wrap { display: flex; align-items: center; gap: 10px; margin-top: 10px; color: var(--muted); font-size: 10px; }
.answer-image { width: 150px; height: 110px; object-fit: contain; border-radius: 6px; background: #eef3f1; border: 1px solid var(--line); }
.review-list { display: grid; gap: 0; }
.review-row { display: flex; align-items: flex-start; gap: 13px; padding: 16px 0; border-top: 1px solid #edf2f0; }
.review-row:first-child { border-top: 0; padding-top: 0; }
.review-mark { width: 34px; min-height: 30px; display: grid; place-items: center; flex-shrink: 0; }
.review-body { flex: 1; min-width: 0; }
.review-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.review-title strong { font-size: 12px; line-height: 1.6; }
.review-answer { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 10px; margin-top: 9px; }
.review-answer b { color: var(--ink); }
.mark { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; font-size: 25px; line-height: 1; font-family: 'Segoe Print', 'Comic Sans MS', cursive; font-weight: 700; transform: rotate(-9deg); }
.mark.correct, .mark.wrong, .mark.partial { color: #d22f2f; }
.mark.wrong { font-size: 23px; transform: rotate(8deg); }
.mark.partial { position: relative; }
.mark.partial i { position: absolute; top: -4px; left: 14px; font-size: 13px; font-style: normal; }
.mark.pending { color: var(--muted); background: #eef3f1; border-radius: 5px; width: 34px; height: 24px; font: 600 10px 'DM Sans', sans-serif; transform: none; }
.grade-row { display: flex; align-items: center; gap: 13px; padding: 15px 0; border-top: 1px solid #edf2f0; }
.grade-no { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 7px; background: var(--orange-soft); color: var(--orange); font-size: 11px; font-weight: 700; flex-shrink: 0; }
.grade-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.grade-main strong { font-size: 12px; line-height: 1.5; }
.score-input { width: 72px; border: 1px solid var(--line); border-radius: 7px; padding: 9px; text-align: center; font-size: 12px; outline-color: var(--teal); }
.settings-summary { display: flex; flex-wrap: wrap; gap: 11px 24px; margin-top: 20px; padding: 14px; border-radius: 8px; background: #f7faf9; color: var(--muted); font-size: 11px; }
.settings-summary b { color: var(--ink); margin-left: 3px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 13px; }
.form-label { display: block; margin: 0 0 7px; }
.timer { background: var(--orange-soft); color: var(--orange); border-radius: 6px; padding: 7px 9px; font-size: 11px; font-weight: 700; }
.result-score { display: flex; align-items: center; gap: 18px; padding: 15px 0 23px; border-bottom: 1px solid var(--line); }
.score-ring { width: 80px; height: 80px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--teal) 0 86%, #e1eeeb 86% 100%); position: relative; }
.score-ring::after { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: #fff; }
.score-ring strong { position: relative; z-index: 1; font-size: 21px; color: var(--teal-dark); }
.result-copy h3 { font-size: 16px; margin-bottom: 5px; }
.result-copy p { color: var(--muted); font-size: 11px; }
.result-detail { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; padding-top: 18px; }
.result-detail div { background: #f7faf9; padding: 11px; border-radius: 7px; font-size: 10px; color: var(--muted); }
.result-detail b { display: block; color: var(--ink); font-size: 15px; margin-top: 3px; }
.entry-notice { display: flex; align-items: flex-start; gap: 11px; border-radius: 8px; padding: 13px; margin-bottom: 20px; font-size: 11px; line-height: 1.5; }
.entry-notice.locked { background: var(--orange-soft); color: #875029; }
.entry-notice.ready { background: var(--green-soft); color: #276c50; }
.entry-notice strong { display: block; font-size: 12px; margin-bottom: 3px; }
.entry-notice p { color: inherit; opacity: .82; }
.notice-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; background: rgba(255,255,255,.55); flex-shrink: 0; font-size: 15px; }
.entry-form input:disabled { color: #9aabaa; background: #f1f5f3; cursor: not-allowed; }
.btn:disabled { color: #9aabaa; background: #edf2f0; border-color: #e1eae7; cursor: not-allowed; transform: none; }
.timer-muted { color: #7c918e; background: #eef3f1; }
.gate-section { max-width: 720px; margin: 4px auto 0; text-align: center; padding: 34px 38px 38px; }
.gate-icon { width: 53px; height: 53px; display: grid; place-items: center; margin: 0 auto 17px; border-radius: 15px; background: var(--orange-soft); color: var(--orange); font-size: 25px; }
.gate-section h2 { font-size: 20px; }
.gate-copy { color: var(--muted); font-size: 12px; margin-top: 8px; }
.gate-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 27px 0 22px; }
.gate-meta div { background: #f7faf9; border-radius: 8px; padding: 12px 8px; }
.gate-meta span { display: block; color: var(--muted); font-size: 10px; margin-bottom: 5px; }
.gate-meta b { font-size: 12px; }
.gate-form { max-width: 430px; margin: 0 auto; text-align: left; }
.gate-form .btn { margin-top: 2px; }
.toast { position: fixed; right: 25px; bottom: 24px; color: #fff; background: #173c38; border-radius: 8px; padding: 11px 15px; box-shadow: var(--shadow); font-size: 12px; z-index: 20; animation: toast-in .2s ease-out; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (max-width: 1050px) {
  .sidebar { width: 210px; }
  .content, .topbar { padding-left: 24px; padding-right: 24px; }
  .section-grid, .admin-layout { grid-template-columns: 1fr; }
  .exam-workspace { grid-template-columns: minmax(0, 1fr) 190px; }
}
@media (max-width: 760px) {
  .sidebar { width: 63px; padding: 20px 9px; }
  .brand { padding: 0 5px 27px; justify-content: center; }
  .brand-text, .nav-label, .nav-btn span:not(.nav-icon), .storage-note { display: none; }
  .nav-btn { justify-content: center; padding: 11px 7px; }
  .nav-icon { width: auto; }
  .topbar { height: 65px; padding: 0 16px; }
  .breadcrumb { display: none; }
  .content { padding: 24px 16px 35px; }
  .page-heading { align-items: flex-start; }
  h1 { font-size: 23px; }
  .stat-grid, .admin-kpi { grid-template-columns: repeat(2, 1fr); }
  .hero-card { align-items: flex-start; flex-direction: column; padding: 22px; }
  .hero-copy h2 { font-size: 19px; }
  .hero-action { width: 100%; }
  .gate-section { padding-left: 21px; padding-right: 21px; }
  .gate-meta { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .exam-workspace { grid-template-columns: 1fr; }
  .exam-side { position: static; min-height: 0; order: -1; }
  .question-nav { grid-template-columns: repeat(8, 1fr); }
  .exam-side-actions { grid-template-columns: 1fr 1fr; }
  .grade-row { align-items: flex-start; }
  .review-title { flex-wrap: wrap; }
  .image-preview { flex-direction: column; }
  .image-preview img { width: 100%; height: auto; max-height: 240px; }
  .search { min-width: 0; width: 100%; }
  .toolbar { flex-wrap: wrap; }
  .modal-body, .modal-head, .modal-foot { padding-left: 17px; padding-right: 17px; }
}

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #f4f8f6; }
.auth-card { width: min(100%, 430px); padding: 34px; background: #fff; border: 1px solid #dfe9e5; box-shadow: 0 18px 50px rgba(28, 71, 62, .12); border-radius: 8px; }
.auth-card .brand-mark { margin-bottom: 24px; }
.auth-card h1 { margin: 8px 0 10px; }
.auth-card .form-label { display: block; margin: 18px 0 7px; }
.auth-card .form-control { width: 100%; }
.auth-back { display: block; margin: 18px auto 0; }
.import-label { position: relative; cursor: pointer; }
.settings-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; align-items: end; }
.toggle-control { display: flex; gap: 8px; align-items: center; min-height: 42px; color: #345650; font-size: 14px; }
@media (max-width: 760px) { .settings-form-grid { grid-template-columns: 1fr 1fr; } .auth-card { padding: 26px 22px; } }
@media (max-width: 440px) {
  .role-switch button { padding: 6px 7px; }
  .top-actions { gap: 7px; }
  .avatar { display: none; }
  .stat { padding: 14px; }
  .stat-value { font-size: 21px; }
  .result-detail { grid-template-columns: 1fr; }
  .question-nav { grid-template-columns: repeat(6, 1fr); }
  .exam-side-actions { grid-template-columns: 1fr; }
}
