/* ============================================================
   cissp.world — testing-center look & feel
   ============================================================ */
:root {
  --navy: #1e5b46;
  --navy-dark: #143d2f;
  --blue: #2f9e6b;
  --blue-soft: #e7f5ec;
  --ink: #1c2e26;
  --muted: #5c7d6b;
  --paper: #ffffff;
  --bg: #eff5f0;
  --line: #d3e0d6;
  --green: #1a7f4b;
  --red: #b3261e;
  --amber: #9a6700;
  --radius: 10px;
  --font: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 16px; }

.screen { display: none; min-height: 100vh; flex-direction: column; }
.screen.active { display: flex; }

/* ---------- buttons ---------- */
.btn {
  font-family: inherit; font-size: 15px; font-weight: 600;
  border: 1px solid transparent; border-radius: 6px;
  padding: 10px 22px; cursor: pointer; transition: background .15s, opacity .15s;
}
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: #268257; }
.btn.primary:disabled { background: #a3cdb6; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn.ghost:hover { background: var(--blue-soft); }
.btn.danger { color: var(--red); border-color: var(--red); }
.btn.danger:hover { background: #fbeae9; }
.btn.wide { width: 100%; }
.btn.sm { padding: 6px 14px; font-size: 13px; }

/* ---------- login ---------- */
#screen-login { background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 55%, #2a7a58 100%); }
.login-wrap {
  flex: 1; display: flex; gap: 60px; align-items: center; justify-content: center;
  padding: 60px 24px; flex-wrap: wrap;
}
.login-hero { max-width: 520px; color: #eaf5ee; }
.brand { font-size: 34px; font-weight: 800; letter-spacing: .5px; color: #fff; }
.brand span { color: #8fd8ac; font-weight: 400; }
.brand.small { font-size: 20px; }
.login-hero h1 { font-size: 26px; margin: 18px 0 12px; font-weight: 650; }
.login-hero p { line-height: 1.55; color: #cde5d6; }
.hero-points { margin: 18px 0 0 2px; list-style: none; }
.hero-points li { padding: 5px 0 5px 28px; position: relative; color: #ddeee3; }
.hero-points li::before {
  content: "✓"; position: absolute; left: 0; color: #8fd8ac; font-weight: 700;
}
.login-card {
  background: var(--paper); border-radius: var(--radius); padding: 32px;
  width: 360px; box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.login-card h2 { font-size: 20px; margin-bottom: 18px; color: var(--navy); }
.login-card label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 12px 0 4px; }
.login-card input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 15px; font-family: inherit;
}
.login-card input:focus { outline: 2px solid var(--blue); border-color: transparent; }
.login-card .btn.primary { margin-top: 20px; }
.auth-switch { font-size: 14px; text-align: center; margin-top: 14px; color: var(--muted); }
.auth-switch a { color: var(--blue); font-weight: 600; text-decoration: none; }
.auth-error {
  background: #fbeae9; color: var(--red); border: 1px solid #eec6c3;
  padding: 9px 12px; border-radius: 6px; font-size: 14px; margin-bottom: 6px;
}
.divider { display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.local-note { font-size: 12.5px; color: var(--amber); margin-top: 12px; line-height: 1.4; }
.site-footer {
  padding: 16px 24px; text-align: center; font-size: 12px; color: #9dbfab; line-height: 1.5;
}

/* ---------- dashboard ---------- */
.app-header {
  background: var(--navy); color: #fff; padding: 12px 28px;
  display: flex; justify-content: space-between; align-items: center;
}
.header-right { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.header-right .btn.ghost { color: #d6ecdc; border-color: #4e8a6f; }
.dash { max-width: 980px; margin: 0 auto; padding: 36px 24px 80px; width: 100%; }
.dash h1 { font-size: 26px; color: var(--navy); }
.dash-sub { color: var(--muted); margin: 8px 0 28px; }
.dash h2 { font-size: 19px; color: var(--navy); margin: 40px 0 12px; }
.muted { color: var(--muted); }

.mode-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.mode-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 8px;
  transition: box-shadow .15s, transform .15s;
}
.mode-card:hover { box-shadow: 0 6px 24px rgba(11,46,89,.12); transform: translateY(-2px); }
.mode-card h3 { color: var(--navy); font-size: 18px; }
.mode-card .mode-meta { color: var(--muted); font-size: 14px; line-height: 1.5; flex: 1; }
.mode-card .btn { margin-top: 12px; }

#history-table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: var(--radius); overflow: hidden; }
#history-table th, #history-table td { padding: 10px 14px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--line); }
#history-table th { background: var(--blue-soft); color: var(--navy); }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.tag.pass { background: #e3f3ea; color: var(--green); }
.tag.fail { background: #fbeae9; color: var(--red); }

/* ---------- exam chrome ---------- */
.exam-header {
  background: var(--navy); color: #fff; padding: 12px 28px;
  display: flex; justify-content: space-between; font-size: 15px; font-weight: 600;
}
.exam-subbar {
  background: #fff; border-bottom: 2px solid var(--line);
  display: flex; justify-content: space-between; padding: 10px 28px;
  font-size: 14.5px; font-weight: 600; color: var(--navy);
}
.timer { font-variant-numeric: tabular-nums; }
.timer.low { color: var(--red); }

.exam-body { flex: 1; display: flex; justify-content: center; padding: 36px 24px; }
.question-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  max-width: 860px; width: 100%; padding: 34px 40px; align-self: flex-start;
}
.q-domain { font-size: 12.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.q-text { font-size: 17.5px; line-height: 1.6; margin-bottom: 26px; }
.q-options { display: flex; flex-direction: column; gap: 10px; }
.q-option {
  display: flex; gap: 14px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 8px; padding: 13px 16px;
  cursor: pointer; transition: background .12s, border-color .12s; font-size: 15.5px; line-height: 1.5;
}
.q-option:hover { background: var(--blue-soft); }
.q-option.selected { border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); }
.q-option .opt-letter {
  flex: 0 0 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--muted);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--muted);
}
.q-option.selected .opt-letter { background: var(--blue); border-color: var(--blue); color: #fff; }

.exam-footer {
  background: #fff; border-top: 2px solid var(--line);
  display: flex; justify-content: space-between; padding: 14px 28px;
}

/* ---------- paper screens (instructions, results, review) ---------- */
.paper {
  background: var(--paper); max-width: 860px; width: calc(100% - 48px);
  margin: 36px auto 60px; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 40px 48px;
}
.paper h1 { color: var(--navy); font-size: 24px; margin-bottom: 20px; }
.paper h2 { color: var(--navy); font-size: 19px; margin: 30px 0 12px; }
.instructions ol { margin: 16px 0 16px 22px; line-height: 1.7; }
.instructions .fine { font-size: 13px; color: var(--muted); margin-top: 18px; line-height: 1.5; }
.paper-actions { display: flex; justify-content: space-between; margin-top: 34px; gap: 12px; }
.paper-actions .btn:only-child { margin-left: auto; }

.result-banner { font-size: 24px; font-weight: 750; padding: 22px 26px; border-radius: 8px; margin-bottom: 16px; }
.result-banner.pass { background: #e3f3ea; color: var(--green); }
.result-banner.fail { background: #fbeae9; color: var(--red); }
.result-detail { color: var(--muted); line-height: 1.6; }

.domain-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.domain-table th, .domain-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14.5px; }
.domain-table th { background: var(--blue-soft); color: var(--navy); }
.prof-above { color: var(--green); font-weight: 700; }
.prof-near  { color: var(--amber); font-weight: 700; }
.prof-below { color: var(--red);   font-weight: 700; }

/* ---------- review ---------- */
.review-filter { margin-bottom: 20px; font-size: 14.5px; color: var(--muted); }
.review-item { border: 1px solid var(--line); border-radius: 8px; padding: 20px 22px; margin-bottom: 16px; }
.review-item .rq { font-weight: 600; line-height: 1.55; margin-bottom: 12px; }
.review-item .ropt { padding: 6px 10px; border-radius: 6px; font-size: 14.5px; line-height: 1.5; }
.review-item .ropt.correct { background: #e3f3ea; color: var(--green); font-weight: 600; }
.review-item .ropt.chosen-wrong { background: #fbeae9; color: var(--red); text-decoration: line-through; }
.review-item .rexp { margin-top: 12px; font-size: 14px; color: var(--ink); background: var(--blue-soft); border-radius: 6px; padding: 12px 14px; line-height: 1.55; }
.review-item .rmeta { margin-top: 10px; font-size: 12px; color: var(--muted); }

@media (max-width: 640px) {
  .question-card, .paper { padding: 24px 20px; }
  .login-wrap { gap: 30px; padding: 40px 18px; }
}
