:root {
  --navy: #16324f;
  --blue: #2e86de;
  --bg: #0f1b2a;
  --panel: #ffffff;
  --muted: #7b8a9a;
  --green: #27ae60;
  --amber: #f39c12;
  --red: #e74c3c;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: #eef2f7;
  color: #1f2d3d;
}

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 600px at 50% -10%, #1d3b5c, #0f1b2a);
}
.login-card {
  width: 360px; background: #fff; border-radius: 14px; padding: 36px 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.brand { font-size: 30px; font-weight: 800; color: var(--navy); text-align: center; letter-spacing: 1px; }
.brand span { color: var(--blue); }
.tagline { text-align: center; color: var(--muted); margin: 6px 0 22px; font-size: 13px; }

label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 6px; }
input, select {
  width: 100%; padding: 11px 12px; border: 1px solid #d4dde7; border-radius: 8px; font-size: 14px;
}
input:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(46,134,222,.15); }

.btn {
  display: inline-block; border: none; border-radius: 8px; padding: 11px 18px;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: .15s;
}
.btn-primary { background: var(--blue); color: #fff; width: 100%; margin-top: 18px; }
.btn-primary:hover { background: #2576c8; }
.btn-ghost { background: #eef3f8; color: var(--navy); }
.btn-ghost:hover { background: #e0e9f2; }
.btn-success { background: var(--green); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 13px; }

.error { color: var(--red); font-size: 13px; margin-top: 12px; min-height: 16px; }

/* ---------- App shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 230px; background: var(--navy); color: #cdd9e5; padding: 22px 16px; flex-shrink: 0;
}
.sidebar .brand { color: #fff; text-align: left; font-size: 24px; margin-bottom: 28px; }
.nav-item {
  display: block; padding: 11px 14px; border-radius: 8px; color: #cdd9e5;
  cursor: pointer; margin-bottom: 4px; font-size: 14px; text-decoration: none;
}
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,.1); color: #fff; }
.nav-logout { margin-top: 30px; }

.main { flex: 1; padding: 28px 36px; overflow-y: auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.topbar h1 { font-size: 22px; margin: 0; color: var(--navy); }
.user-chip { font-size: 13px; color: var(--muted); }

.card {
  background: var(--panel); border-radius: 12px; padding: 20px 22px;
  box-shadow: 0 4px 18px rgba(20,40,70,.06); margin-bottom: 20px;
}

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid #eef2f7; font-size: 14px; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
tr:hover td { background: #f8fafc; }

.badge { padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.badge.green { background: #eafaf1; color: var(--green); }
.badge.amber { background: #fef5e7; color: var(--amber); }
.badge.red { background: #fdecea; color: var(--red); }
.badge.grey { background: #eef2f7; color: var(--muted); }

/* ---------- Assessment ---------- */
.q-block { padding: 16px 0; border-bottom: 1px solid #eef2f7; }
.q-block:last-child { border-bottom: none; }
.q-text { font-weight: 600; margin-bottom: 10px; }
.q-meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.opts { display: flex; gap: 10px; flex-wrap: wrap; }
.opt {
  border: 1px solid #d4dde7; border-radius: 8px; padding: 9px 14px; cursor: pointer; font-size: 13px;
}
.opt.selected { border-color: var(--blue); background: #eaf3fd; color: var(--navy); font-weight: 600; }

.objective-head { font-size: 16px; font-weight: 700; color: var(--navy); margin: 22px 0 4px; }
.objective-desc { font-size: 12.5px; color: var(--muted); margin: 0 0 8px; line-height: 1.5; }
.principle-head { font-size: 14px; font-weight: 600; color: var(--blue); margin: 14px 0 2px; }
.principle-desc { font-size: 12px; color: var(--muted); margin: 0 0 6px; font-style: italic; line-height: 1.5; }
.q-context {
  font-size: 12px; color: #41536b; line-height: 1.55; background: #f4f8fc;
  border-left: 3px solid var(--blue); border-radius: 0 6px 6px 0;
  padding: 8px 12px; margin: 8px 0 10px;
}
.q-context b { color: var(--navy); }

/* ---------- Scores ---------- */
.score-grid { display: flex; gap: 16px; flex-wrap: wrap; }
.score-box { flex: 1; min-width: 130px; text-align: center; padding: 18px; border-radius: 10px; background: #f8fafc; }
.score-num { font-size: 30px; font-weight: 800; }
.score-label { color: var(--muted); font-size: 13px; margin-top: 4px; }

.roadmap-step { border-left: 4px solid var(--blue); background: #f6f9fc; padding: 12px 16px; border-radius: 0 8px 8px 0; margin-bottom: 10px; }
.roadmap-step .num { font-weight: 700; color: var(--blue); }

.modal-bg { position: fixed; inset: 0; background: rgba(15,27,42,.55); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { background: #fff; border-radius: 12px; padding: 26px; width: 420px; }
.modal h3 { margin-top: 0; color: var(--navy); }
.hidden { display: none !important; }
.row-actions { display: flex; gap: 8px; }
.muted { color: var(--muted); font-size: 13px; }
