.exam-shell { min-height: 100vh; }
.exam-topbar { position: sticky; top: 0; z-index: 30; gap: 24px; }
.global-nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.global-nav a { display: inline-flex; min-height: 40px; align-items: center; padding: 8px 14px; border: 1px solid transparent; border-radius: 10px; color: var(--muted); font-weight: 800; text-decoration: none; white-space: nowrap; }
.global-nav a:hover, .global-nav a.active { color: var(--text); border-color: var(--line-strong); background: rgba(23, 217, 255, .09); }
.topbar-account { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.exam-main { width: min(1500px, calc(100% - 48px)); margin: 0 auto; padding: 36px 0 56px; }
.exam-hero { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: stretch; gap: 22px; margin-bottom: 22px; }
.exam-hero > div:first-child { padding: 24px 4px; }
.exam-hero h1 { margin: 8px 0 10px; font-size: clamp(36px, 5vw, 64px); line-height: 1; }
.exam-hero p { margin: 0; color: var(--muted); line-height: 1.7; }
.exam-hero .eyebrow { color: var(--brand); font-size: 13px; font-weight: 900; letter-spacing: .08em; }
.rule-chip { display: grid; align-content: center; gap: 8px; padding: 24px; border: 1px solid var(--line-strong); border-radius: 18px; background: linear-gradient(145deg, rgba(23, 217, 255, .12), rgba(123, 92, 255, .11)), var(--panel); box-shadow: var(--shadow); }
.rule-chip span, .rule-chip small { color: var(--muted); }
.rule-chip strong { color: var(--brand); font-size: 20px; }
.exam-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.exam-metrics button { min-height: 102px; display: grid; gap: 7px; padding: 18px; text-align: left; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--text); box-shadow: 0 14px 42px rgba(0,0,0,.2); }
.exam-metrics button:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.exam-metrics span { color: var(--muted); font-size: 13px; }
.exam-metrics strong { font-size: 32px; }
.exam-toolbar { display: flex; align-items: end; gap: 12px; padding: 16px; margin-bottom: 16px; }
.exam-toolbar label:not(.mine-only) { min-width: 190px; display: grid; gap: 7px; }
.exam-toolbar label > span { color: var(--muted); font-size: 12px; font-weight: 800; }
.exam-toolbar input[type=search], .exam-toolbar select { min-height: 42px; }
.mine-only { display: inline-flex; min-height: 42px; align-items: center; gap: 8px; padding: 0 10px; white-space: nowrap; }
.mine-only input { width: 18px; height: 18px; }
.exam-workspace { display: grid; grid-template-columns: minmax(320px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.profile-panel, .exam-detail-panel { min-height: 670px; }
.profile-panel { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow: hidden; }
.exam-profile-list { display: grid; gap: 10px; max-height: calc(100vh - 220px); padding: 0 16px 18px; overflow: auto; }
.exam-profile-card { width: 100%; display: grid; gap: 10px; padding: 15px; text-align: left; color: var(--text); border: 1px solid var(--line); border-radius: 14px; background: rgba(9, 15, 25, .66); }
.exam-profile-card:hover, .exam-profile-card.active { border-color: var(--line-strong); background: rgba(23, 217, 255, .07); }
.profile-card-head, .profile-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.profile-card-head strong { font-size: 16px; }
.profile-card-meta { color: var(--muted); font-size: 12px; line-height: 1.65; }
.status-badge { display: inline-flex; min-height: 28px; align-items: center; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 900; white-space: nowrap; }
.status-recommendable, .status-recommendable_confirmed { color: var(--green); border-color: rgba(43, 224, 128, .42); background: rgba(43, 224, 128, .1); }
.status-strengthen_then_review, .status-preparing, .status-ready_for_review { color: var(--amber); border-color: rgba(255, 173, 51, .42); background: rgba(255, 173, 51, .1); }
.status-not_recommended { color: var(--red); border-color: rgba(255, 91, 120, .45); background: rgba(255, 91, 120, .1); }
.status-insufficient_data { color: #b6c7da; border-color: rgba(145, 164, 189, .48); background: rgba(145, 164, 189, .1); }
.status-awaiting_confirmation { color: var(--brand); border-color: var(--line-strong); background: rgba(23, 217, 255, .1); }
.status-no_target, .status-draft { color: var(--muted); }
.exam-detail-panel { padding: 0; overflow: hidden; }
.exam-empty { min-height: 670px; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--muted); text-align: center; padding: 30px; }
.exam-empty strong { color: var(--text); font-size: 22px; }
.detail-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, rgba(23,217,255,.08), rgba(123,92,255,.08)); }
.detail-top h2 { margin: 0 0 8px; font-size: 26px; }
.detail-top p { margin: 0; color: var(--muted); line-height: 1.65; }
.detail-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.primary-button, .secondary-button, .danger-button { min-height: 40px; padding: 8px 14px; border-radius: 10px; font-weight: 900; white-space: nowrap; }
.primary-button { border: 1px solid var(--brand); background: var(--brand); color: #03131a; }
.secondary-button { border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text); }
.danger-button { border: 1px solid rgba(255,91,120,.5); background: rgba(255,91,120,.1); color: var(--red); }
.primary-button:disabled, .secondary-button:disabled { cursor: not-allowed; opacity: .45; }
.detail-content { display: grid; gap: 16px; padding: 18px; }
.notice { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); line-height: 1.7; }
.notice.manual { border-color: rgba(255,173,51,.42); background: rgba(255,173,51,.08); color: #ffd69a; }
.notice.error { border-color: rgba(255,91,120,.48); background: rgba(255,91,120,.09); color: #ffb4c1; }
.recommendation-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 14px; }
.exam-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(9,15,25,.54); }
.exam-card h3 { margin: 0 0 13px; font-size: 17px; }
.recommendation-result { display: grid; gap: 14px; }
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.result-head strong { font-size: 22px; }
.score-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.score-box { padding: 13px; border-radius: 11px; background: rgba(255,255,255,.035); }
.score-box span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; }
.score-box strong { font-size: 23px; }
.evidence-list, .task-list, .history-list { display: grid; gap: 9px; }
.evidence-row, .task-row, .history-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 11px 12px; border: 1px solid rgba(122,159,204,.15); border-radius: 10px; background: rgba(255,255,255,.025); }
.evidence-row span, .history-row span { color: var(--muted); font-size: 12px; }
.manual-form { display: grid; gap: 14px; }
.manual-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.manual-form label { display: grid; gap: 6px; }
.manual-form label > span { color: var(--muted); font-size: 12px; font-weight: 800; }
.manual-form input, .manual-form select, .manual-form textarea { width: 100%; min-height: 40px; }
.paper-picker { display: grid; gap: 9px; max-height: 460px; overflow: auto; padding-right: 4px; }
.paper-option { display: grid !important; grid-template-columns: 22px minmax(0, 1fr); align-items: start; gap: 10px !important; padding: 12px; border: 1px solid rgba(122,159,204,.2); border-radius: 11px; background: rgba(255,255,255,.025); cursor: pointer; }
.paper-option:hover { border-color: var(--line-strong); background: rgba(23,217,255,.05); }
.paper-option:has(input:checked) { border-color: var(--brand); background: rgba(23,217,255,.08); }
.paper-option input { width: 19px; min-height: 19px; height: 19px; margin-top: 2px; }
.paper-option span { display: grid; gap: 5px; min-width: 0; }
.paper-option strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paper-option small { color: var(--muted); line-height: 1.5; }
.knowledge-results { display: grid; gap: 8px; }
.knowledge-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid rgba(122,159,204,.16); border-radius: 10px; background: rgba(255,255,255,.025); }
.knowledge-result > div { display: grid; gap: 4px; }
.knowledge-result small { color: var(--muted); }
.knowledge-status { display: inline-flex; min-width: 76px; min-height: 28px; align-items: center; justify-content: center; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 900; white-space: nowrap; }
.knowledge-mastered { color: var(--green); border-color: rgba(43,224,128,.42); background: rgba(43,224,128,.1); }
.knowledge-partial { color: var(--amber); border-color: rgba(255,173,51,.42); background: rgba(255,173,51,.1); }
.knowledge-unmastered { color: var(--red); border-color: rgba(255,91,120,.45); background: rgba(255,91,120,.1); }
.knowledge-insufficient { color: var(--muted); }
.manual-paper { display: grid; grid-template-columns: minmax(190px, 1.4fr) 110px 130px repeat(3, 90px); gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; }
.manual-paper .paper-title { grid-column: 1 / -1; color: var(--brand); font-weight: 900; }
.knowledge-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.knowledge-item { display: grid; grid-template-columns: minmax(120px, 1fr) 130px; align-items: center; gap: 8px; padding: 9px; border: 1px solid rgba(122,159,204,.15); border-radius: 9px; }
.knowledge-item span { color: var(--text); }
.manual-actions, .decision-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.task-row { align-items: center; }
.task-row label { display: flex; align-items: center; gap: 10px; }
.task-row input { width: 20px; height: 20px; }
.history-row { display: grid; grid-template-columns: 130px minmax(0,1fr); }
.history-row > div { display: grid; gap: 4px; }
.history-row small { color: var(--muted); line-height: 1.5; }
.exam-modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 24px; background: rgba(0,0,0,.7); }
.exam-modal.show { display: grid; }
.exam-modal-card { position: relative; width: min(620px, 100%); max-height: calc(100vh - 48px); overflow: auto; padding: 26px; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--bg-2); box-shadow: var(--shadow); }
.exam-modal-card h2 { margin: 0 40px 8px 0; }
.exam-modal-card > p { color: var(--muted); }
.modal-close { position: absolute; right: 16px; top: 14px; width: 36px; height: 36px; border: 0; border-radius: 9px; background: rgba(255,255,255,.06); color: var(--text); font-size: 24px; }
.level-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.level-options label { display: grid; grid-template-columns: 24px 1fr; gap: 6px 8px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; }
.level-options input { grid-row: 1 / 3; width: 20px; height: 20px; }
.level-options span { color: var(--muted); font-size: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; z-index: 200; right: 24px; bottom: 24px; max-width: min(420px, calc(100% - 48px)); padding: 13px 16px; border: 1px solid var(--line-strong); border-radius: 11px; background: #101a29; color: var(--text); box-shadow: var(--shadow); transform: translateY(24px); opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { transform: translateY(0); opacity: 1; }
@media (max-width: 1100px) {
  .exam-workspace { grid-template-columns: 300px minmax(0,1fr); }
  .exam-hero { grid-template-columns: 1fr; }
  .recommendation-grid, .manual-grid { grid-template-columns: 1fr; }
  .manual-paper { grid-template-columns: 1fr 1fr 1fr; }
  .manual-paper .paper-title { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .exam-topbar { position: static; flex-wrap: wrap; padding: 14px; }
  .global-nav { order: 3; width: 100%; margin: 0; overflow: auto; }
  .topbar-account { margin-left: auto; }
  .exam-main { width: 100%; padding: 20px 12px 40px; }
  .exam-metrics { grid-template-columns: 1fr 1fr; }
  .exam-toolbar { align-items: stretch; flex-direction: column; }
  .exam-toolbar label:not(.mine-only) { width: 100%; }
  .exam-workspace { grid-template-columns: 1fr; }
  .profile-panel { position: static; max-height: none; min-height: 0; }
  .exam-profile-list { max-height: 380px; }
  .detail-top { flex-direction: column; }
  .detail-actions { width: 100%; justify-content: stretch; }
  .detail-actions button { flex: 1; }
  .recommendation-grid, .score-grid, .knowledge-form { grid-template-columns: 1fr; }
  .manual-paper { grid-template-columns: 1fr 1fr; }
  .exam-modal { padding: 0; align-items: end; }
  .exam-modal-card { width: 100%; max-height: 94vh; border-radius: 18px 18px 0 0; }
  .level-options { grid-template-columns: 1fr; }
}
