/* ================================================================
   DarkPalm Mülakat Platformu — Ana CSS
   Tasarım: glassmorphism + sidebar + chart desteği
   ================================================================ */

:root {
  --bg: #f3ede2;
  --bg-soft: #faf7f2;
  --card: rgba(255, 252, 247, 0.92);
  --card-strong: rgba(255, 249, 239, 0.97);
  --text: #1a1d17;
  --muted: #5a6458;
  --line: rgba(26, 29, 23, 0.08);
  --line-med: rgba(26, 29, 23, 0.14);
  --line-strong: rgba(26, 29, 23, 0.22);
  --accent: #1a6347;
  --accent-hover: #155538;
  --accent-soft: #d4ede3;
  --accent-xsoft: rgba(26, 99, 71, 0.07);
  --alert: #b04420;
  --alert-soft: #fef0e8;
  --warn: #9a6b1c;
  --warn-soft: #fef8e8;
  --info: #1a5c8a;
  --info-soft: #e8f3fc;
  --success: #1a6347;
  --success-soft: #e8f5ee;
  --shadow-sm: 0 2px 8px rgba(26,29,23,0.06);
  --shadow: 0 8px 32px rgba(26,29,23,0.09);
  --shadow-lg: 0 20px 60px rgba(26,29,23,0.12);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --sidebar-width: 240px;
  --header-height: 64px;
  --font-head: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Avenir Next", "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace;
  --transition: 0.18s ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); color: var(--text); background: var(--bg); line-height: 1.55; }
p { margin: 0 0 1em; line-height: 1.65; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }

/* ── Ambient Background ─────────────────────────────────────── */
.ambient {
  position: fixed; border-radius: 50%; filter: blur(90px);
  opacity: 0.22; pointer-events: none; z-index: 0;
}
.ambient-one { top: -8rem; right: -6rem; width: 30rem; height: 30rem; background: rgba(26,99,71,0.35); }
.ambient-two { bottom: -10rem; left: -8rem; width: 28rem; height: 28rem; background: rgba(170,68,30,0.28); }

/* ================================================================
   ADMIN LAYOUT — Sidebar + Content
   ================================================================ */

.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-width); z-index: 100;
  background: linear-gradient(180deg, #111810 0%, #1a221a 100%);
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.04);
  overflow-y: auto;
}

.sidebar-brand {
  padding: 1.4rem 1.2rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.sidebar-brand .brand-name {
  font-family: var(--font-head); font-size: 1.05rem; font-weight: 700;
  color: #fff; display: block; line-height: 1.2;
}
.sidebar-brand .brand-sub {
  font-size: 0.72rem; color: rgba(255,255,255,0.42); margin-top: 3px; display: block;
}

.sidebar-nav {
  flex: 1; padding: 0.75rem 0;
}

.sidebar-section {
  padding: 0.5rem 0.8rem 0.3rem 1.1rem;
  font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: rgba(255,255,255,0.25); font-weight: 700;
}

.sidebar-link {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.62rem 1.1rem;
  color: rgba(255,255,255,0.62);
  font-size: 0.875rem; font-weight: 500;
  transition: background var(--transition), color var(--transition);
  border-radius: 0;
  position: relative;
}
.sidebar-link:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
}
.sidebar-link.active {
  background: rgba(26,99,71,0.25);
  color: #6fcca0;
}
.sidebar-link.active::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--accent);
  border-radius: 0 2px 2px 0;
}
.sidebar-link .icon { font-size: 1rem; width: 18px; flex-shrink: 0; }
.sidebar-live-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #4ecca3; margin-left: auto;
  animation: blink 1.5s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.sidebar-footer {
  padding: 1rem 1.1rem;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.sidebar-user {
  display: flex; align-items: center; gap: 0.7rem;
  font-size: 0.82rem; color: rgba(255,255,255,0.5);
}
.sidebar-user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(26,99,71,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; color: #6fcca0; font-weight: 700; flex-shrink: 0;
}
.sidebar-user-name { color: rgba(255,255,255,0.75); font-weight: 500; line-height: 1.2; }

/* ── Main Content Area ───────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex; flex-direction: column;
  position: relative; z-index: 1;
}

.content-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1rem;
  height: var(--header-height);
  padding: 0 2rem;
  background: rgba(243,237,226,0.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.content-header h1 {
  margin: 0; font-size: 1.1rem; font-weight: 600;
  font-family: var(--font-body); letter-spacing: -0.02em;
}
.content-header .header-actions { margin-left: auto; display: flex; gap: 0.6rem; }

.content-body {
  flex: 1; padding: 1.75rem 2rem 3rem;
  max-width: 1360px; width: 100%;
}

/* ── Breadcrumb ──────────────────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; color: var(--muted); margin-bottom: 1.25rem;
}
.breadcrumb a { color: var(--accent); }
.breadcrumb-sep { color: var(--line-strong); }

/* ── Page Title ──────────────────────────────────────────────── */
.page-title-row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.5rem;
}
.page-title-row h1 {
  margin: 0; font-family: var(--font-head);
  font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.1;
}
.page-subtitle { color: var(--muted); margin-top: 0.3rem; font-size: 0.925rem; }
.eyebrow {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--accent); font-weight: 700; margin-bottom: 0.4rem; display: block;
}

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-padded { padding: 1.4rem 1.6rem; }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.6rem;
  border-bottom: 1px solid var(--line);
}
.card-header h2, .card-header h3 {
  margin: 0; font-size: 0.95rem; font-weight: 600;
}
.card-body { padding: 1.4rem 1.6rem; }
.card-footer {
  padding: 0.9rem 1.6rem;
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,0.015);
}

/* ── Stats Grid ──────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: linear-gradient(160deg, rgba(255,255,255,0.82), rgba(255,252,242,0.96));
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.4rem;
}
.stat-label { font-size: 0.78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; }
.stat-value { font-size: 2.2rem; font-family: var(--font-head); font-weight: 700; line-height: 1.1; margin: 0.4rem 0 0; }
.stat-sub { font-size: 0.78rem; color: var(--muted); margin-top: 0.3rem; }
.stat-icon { font-size: 1.6rem; margin-bottom: 0.5rem; }

/* ── Grid Layouts ────────────────────────────────────────────── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.25rem; }
.content-split { display: grid; grid-template-columns: 1fr 360px; gap: 1.25rem; align-items: start; }

/* ── Stack List (dashboard items) ───────────────────────────── */
.stack-list { display: grid; gap: 0.6rem; }
.stack-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.5);
  transition: background var(--transition), border-color var(--transition);
}
.stack-item:hover { background: rgba(255,255,255,0.75); border-color: var(--line-med); }
.stack-item.stacked { align-items: flex-start; }
.stack-item-left { flex: 1; min-width: 0; }
.stack-item-left strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stack-item-left span { font-size: 0.83rem; color: var(--muted); }
.stack-item-right { text-align: right; flex-shrink: 0; }

/* ── Tables ──────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
thead th {
  padding: 0.7rem 0.9rem;
  background: rgba(0,0,0,0.025);
  border-bottom: 2px solid var(--line-med);
  font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted); text-align: left; white-space: nowrap;
}
tbody td { padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover > td { background: rgba(26,99,71,0.03); }
tbody tr:last-child > td { border-bottom: none; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  padding: 0.6rem 1.1rem; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; font-weight: 600;
  font-size: 0.875rem; line-height: 1; transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff; box-shadow: 0 6px 20px rgba(26,99,71,0.22);
}
.btn-primary:hover { box-shadow: 0 10px 28px rgba(26,99,71,0.3); }
.btn-secondary {
  background: rgba(255,255,255,0.72); color: var(--text);
  border-color: var(--line-med);
}
.btn-danger {
  background: var(--alert-soft); color: var(--alert); border-color: rgba(176,68,32,0.2);
}
.btn-danger:hover { background: rgba(176,68,32,0.12); }
.btn-ghost {
  background: transparent; color: var(--muted); border: none;
}
.btn-ghost:hover { background: rgba(0,0,0,0.05); color: var(--text); }
.btn-sm { padding: 0.42rem 0.8rem; font-size: 0.8rem; border-radius: var(--radius-xs); }
.btn-lg { padding: 0.85rem 1.6rem; font-size: 1rem; }
.btn-icon { padding: 0.5rem; }
.btn-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-grid { display: grid; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.form-group { display: grid; gap: 0.4rem; }
.form-label {
  font-size: 0.82rem; font-weight: 600; color: var(--text);
}
.form-hint { font-size: 0.78rem; color: var(--muted); }
.form-control {
  width: 100%; padding: 0.72rem 0.95rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.85); color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26,99,71,0.1);
}
textarea.form-control { resize: vertical; min-height: 120px; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235a6458' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.9rem center; padding-right: 2.2rem; }
.checkbox-row { display: flex; align-items: center; gap: 0.65rem; cursor: pointer; }
.checkbox-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* ── Option Editor (MCQ) ─────────────────────────────────────── */
.option-row {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--line); border-radius: var(--radius-xs);
}
.option-id-badge {
  min-width: 28px; height: 28px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; flex-shrink: 0;
}
#option-list { display: grid; gap: 0.5rem; }

/* ── Badges & Pills ──────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.25rem 0.6rem; border-radius: 999px;
  font-size: 0.74rem; font-weight: 700; white-space: nowrap;
}
.badge-green  { background: var(--accent-soft); color: var(--accent); }
.badge-red    { background: var(--alert-soft); color: var(--alert); }
.badge-yellow { background: var(--warn-soft); color: var(--warn); }
.badge-blue   { background: var(--info-soft); color: var(--info); }
.badge-gray   { background: rgba(0,0,0,0.06); color: var(--muted); }

.status-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
}
.dot-green   { background: #2ecc71; }
.dot-red     { background: #e74c3c; }
.dot-yellow  { background: #f39c12; }
.dot-blue    { background: #3498db; }
.dot-gray    { background: #95a5a6; }
.dot-pulse   { animation: blink 1.5s ease-in-out infinite; }

/* ── Risk Score Display ──────────────────────────────────────── */
.risk-score {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-weight: 700; font-size: 0.85rem;
}
.risk-0  { color: var(--muted); }
.risk-low  { color: var(--warn); }
.risk-high { color: var(--alert); }

/* ── Charts ──────────────────────────────────────────────────── */
.chart-container { position: relative; }
.chart-container canvas { max-width: 100%; }

/* ── Trait / Personality Bars ────────────────────────────────── */
.trait-bar-container { display: grid; gap: 1rem; }
.trait-bar-item { display: grid; gap: 0.4rem; }
.trait-bar-label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.82rem; font-weight: 600;
}
.trait-bar-track {
  height: 8px; border-radius: 999px;
  background: rgba(0,0,0,0.07); overflow: hidden;
}
.trait-bar-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}

/* ── Behavioral Metrics ──────────────────────────────────────── */
.metric-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.75rem;
}
.metric-cell {
  padding: 0.75rem; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.5); border: 1px solid var(--line);
  text-align: center;
}
.metric-cell .metric-val { font-size: 1.5rem; font-weight: 700; font-family: var(--font-head); }
.metric-cell .metric-lbl { font-size: 0.72rem; color: var(--muted); font-weight: 600; margin-top: 0.2rem; }
.metric-cell.alert-cell { background: var(--alert-soft); border-color: rgba(176,68,32,0.2); }
.metric-cell.alert-cell .metric-val { color: var(--alert); }

/* ── Code Display ────────────────────────────────────────────── */
.code-block {
  background: #1a1d17; color: #c8e6c9;
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.4rem;
  font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.6;
  overflow-x: auto; white-space: pre-wrap; word-break: break-word;
}
.code-editor-wrap {
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  overflow: hidden;
}
.code-editor-bar {
  background: rgba(0,0,0,0.04); padding: 0.5rem 0.9rem;
  font-size: 0.75rem; color: var(--muted); font-weight: 600;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 0.5rem;
}

/* ── Live Monitor ────────────────────────────────────────────── */
.monitor-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem;
}
.monitor-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.2rem; position: relative;
  transition: border-color var(--transition);
}
.monitor-card.in-progress { border-color: rgba(26,99,71,0.35); }
.monitor-card-header { display: flex; justify-content: space-between; margin-bottom: 0.75rem; }
.monitor-progress {
  width: 100%; height: 4px; background: var(--line-med);
  border-radius: 999px; overflow: hidden; margin: 0.6rem 0;
}
.monitor-progress-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.4s; }
#monitor-status { font-size: 0.82rem; color: var(--muted); padding: 0.5rem 0; }

/* ── Flash Messages ──────────────────────────────────────────── */
.flash-stack { display: grid; gap: 0.6rem; margin-bottom: 1.25rem; }
.flash {
  padding: 0.85rem 1rem; border-radius: var(--radius-sm);
  border: 1px solid transparent; font-size: 0.88rem;
}
.flash-error   { background: var(--alert-soft); border-color: rgba(176,68,32,0.25); color: var(--alert); }
.flash-success { background: var(--success-soft); border-color: rgba(26,99,71,0.2); color: var(--success); }
.flash-warning { background: var(--warn-soft); border-color: rgba(154,107,28,0.25); color: var(--warn); }
.flash-info    { background: var(--info-soft); border-color: rgba(26,92,138,0.2); color: var(--info); }

/* ── Filters / Search Bar ────────────────────────────────────── */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center;
  padding: 0.9rem 1.2rem;
  background: rgba(255,255,255,0.55); border-bottom: 1px solid var(--line);
}
.search-input-wrap { position: relative; flex: 1; min-width: 200px; }
.search-input { padding-left: 2.2rem; }
.search-icon {
  position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 0.9rem; pointer-events: none;
}
.filter-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filter-chip {
  padding: 0.38rem 0.8rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
  cursor: pointer; border: 1px solid var(--line-med);
  background: rgba(255,255,255,0.6); color: var(--muted);
  transition: all var(--transition);
}
.filter-chip:hover, .filter-chip.active {
  background: var(--accent-soft); color: var(--accent);
  border-color: rgba(26,99,71,0.25);
}

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 3rem 2rem; color: var(--muted);
}
.empty-state-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.empty-state-text { font-size: 0.95rem; }

/* ── Divider ─────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--line); margin: 1.25rem 0; }

/* ── Info Box ────────────────────────────────────────────────── */
.info-box {
  padding: 1rem 1.25rem; border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  background: var(--accent-xsoft); font-size: 0.875rem; line-height: 1.6;
}
.warn-box {
  padding: 1rem 1.25rem; border-radius: var(--radius-sm);
  border-left: 3px solid var(--warn);
  background: var(--warn-soft); font-size: 0.875rem;
}

/* ── Markdown Content ────────────────────────────────────────── */
.md-content h1,h2,h3,h4 { font-family: var(--font-head); margin: 1em 0 0.4em; }
.md-content code {
  font-family: var(--font-mono); font-size: 0.87em;
  background: rgba(0,0,0,0.06); padding: 0.15em 0.4em; border-radius: 4px;
}
.md-content pre {
  background: #1a1d17; border-radius: var(--radius-sm);
  padding: 1rem; overflow-x: auto;
}
.md-content pre code { background: none; color: #c8e6c9; }
.md-content table { font-size: 0.9em; }

/* ── Timeline / Events ───────────────────────────────────────── */
.event-list { display: grid; gap: 0.4rem; max-height: 320px; overflow-y: auto; }
.event-item {
  display: flex; gap: 0.75rem; align-items: flex-start;
  font-size: 0.8rem; padding: 0.45rem 0.6rem;
  border-radius: var(--radius-xs); border: 1px solid var(--line);
  background: rgba(255,255,255,0.45);
}
.event-type {
  flex-shrink: 0; font-weight: 700; min-width: 140px;
  font-size: 0.75rem; color: var(--accent);
}
.event-type.event-risk { color: var(--alert); }
.event-time { color: var(--muted); flex-shrink: 0; font-family: var(--font-mono); }

/* ── Link copy ───────────────────────────────────────────────── */
.copy-link-wrap { display: flex; gap: 0.5rem; }
.copy-link-input {
  font-family: var(--font-mono); font-size: 0.8rem; flex: 1;
}

/* ================================================================
   CANDIDATE INTERFACE
   ================================================================ */

.candidate-layout {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 20%, rgba(26,99,71,0.14) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(176,68,32,0.10) 0%, transparent 35%),
    linear-gradient(160deg, #faf7f0 0%, #f3ede2 60%, #ede4d4 100%);
}

.candidate-shell {
  width: min(calc(100% - 2rem), 900px);
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.candidate-topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(250,247,240,0.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  padding: 0 1rem;
  height: 56px;
  display: flex; align-items: center; gap: 1rem;
}
.candidate-brand {
  font-family: var(--font-head); font-weight: 700; font-size: 1rem;
  color: var(--accent);
}
.candidate-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.candidate-progress-bar {
  width: 140px; height: 4px; background: var(--line-med); border-radius: 999px; overflow: hidden;
}
.candidate-progress-fill {
  height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.4s;
}

/* ── Landing Card ────────────────────────────────────────────── */
.landing-card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: clamp(2rem, 6vw, 3.5rem);
  margin-top: 3rem;
}
.landing-icon { font-size: 3rem; margin-bottom: 1rem; }
.landing-card h1 { font-family: var(--font-head); font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.1; margin: 0 0 0.6rem; }

/* ── Question Card ───────────────────────────────────────────── */
.question-card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.question-card-header {
  padding: 1.25rem 2rem;
  background: rgba(26,99,71,0.05);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 1rem;
}
.question-number {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; flex-shrink: 0;
}
.question-card-body { padding: 2rem; }
.question-prompt { font-size: 1.05rem; line-height: 1.7; margin-bottom: 1.5rem; }
.question-help {
  padding: 0.85rem 1rem; border-radius: var(--radius-sm);
  background: var(--accent-xsoft); border: 1px solid rgba(26,99,71,0.12);
  font-size: 0.875rem; color: var(--muted); margin-bottom: 1.5rem;
}
.question-card-footer {
  padding: 1rem 2rem;
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,0.015);
  display: flex; justify-content: space-between; align-items: center;
}
.answer-textarea {
  width: 100%; min-height: 200px;
  padding: 1rem 1.1rem;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.9); resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
  font-size: 0.95rem; line-height: 1.65;
}
.answer-textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26,99,71,0.1);
}

/* ── MCQ ─────────────────────────────────────────────────────── */
.choice-list { display: grid; gap: 0.65rem; }
.choice-option {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.9rem 1.1rem;
  border: 1.5px solid var(--line-med); border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.65); cursor: pointer;
  transition: all var(--transition);
}
.choice-option:hover { border-color: var(--accent); background: rgba(26,99,71,0.04); }
.choice-option.selected { border-color: var(--accent); background: var(--accent-soft); }
.choice-option input { accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; }
.choice-option label { flex: 1; cursor: pointer; font-size: 0.95rem; }
.choice-id {
  width: 26px; height: 26px; border-radius: 6px;
  background: rgba(0,0,0,0.06); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; flex-shrink: 0;
  transition: all var(--transition);
}
.choice-option.selected .choice-id { background: var(--accent); color: #fff; }

/* ── Rating ──────────────────────────────────────────────────── */
.rating-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.rating-option { display: none; }
.rating-label {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--line-med); cursor: pointer;
  font-size: 1.1rem; font-weight: 700;
  transition: all var(--transition);
  background: rgba(255,255,255,0.7);
}
.rating-option:checked + .rating-label {
  background: var(--accent); color: #fff; border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(26,99,71,0.3);
}
.rating-label:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ── Timer Display ───────────────────────────────────────────── */
.timer-display {
  display: flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-mono); font-size: 0.85rem;
  color: var(--muted); padding: 0.3rem 0.7rem;
  background: rgba(0,0,0,0.05); border-radius: 999px;
}
.timer-display.warning { color: var(--warn); background: var(--warn-soft); }
.timer-display.danger  { color: var(--alert); background: var(--alert-soft); animation: blink 1s infinite; }

/* ── Personality Inventory ───────────────────────────────────── */
.personality-intro {
  background: var(--card); border: 1px solid rgba(255,255,255,0.75);
  border-radius: var(--radius); padding: 2rem; margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.inventory-section { margin-bottom: 2rem; }
.inventory-section-title {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted); font-weight: 700; margin-bottom: 0.75rem;
  padding-bottom: 0.5rem; border-bottom: 1px solid var(--line);
}
.inventory-item {
  background: rgba(255,255,255,0.55); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 1rem 1.25rem;
  margin-bottom: 0.6rem;
}
.inventory-item-prompt { font-size: 0.95rem; margin-bottom: 0.75rem; }
.likert-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.likert-opt { position: relative; }
.likert-opt input { position: absolute; opacity: 0; }
.likert-opt label {
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  padding: 0.5rem 0.8rem; border: 1.5px solid var(--line-med);
  border-radius: var(--radius-sm); cursor: pointer; min-width: 90px;
  font-size: 0.78rem; text-align: center; line-height: 1.3;
  transition: all var(--transition); background: rgba(255,255,255,0.6);
}
.likert-opt input:checked + label {
  background: var(--accent-soft); border-color: var(--accent); color: var(--accent);
}
.likert-opt label:hover { border-color: var(--accent); background: rgba(26,99,71,0.06); }
.likert-num { font-size: 1.1rem; font-weight: 700; }

/* ── Personality Results (Complete page) ─────────────────────── */
.trait-result-card {
  padding: 1.1rem 1.25rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: rgba(255,255,255,0.6);
}
.trait-name { font-weight: 700; font-size: 0.95rem; }
.trait-band-label { font-size: 0.78rem; font-weight: 600; margin-top: 0.2rem; }
.trait-summary { font-size: 0.82rem; color: var(--muted); margin-top: 0.5rem; }

/* ── Complete Page ───────────────────────────────────────────── */
.complete-hero {
  text-align: center; padding: 3rem 2rem;
}
.complete-icon { font-size: 4rem; }
.complete-hero h1 { font-family: var(--font-head); font-size: 2.4rem; margin: 0.75rem 0 0.5rem; }

/* ── Login Page ──────────────────────────────────────────────── */
.login-layout {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(26,99,71,0.18) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(26,29,23,0.12) 0%, transparent 35%),
    linear-gradient(135deg, #f3ede2 0%, #ebe3d4 100%);
}
.login-card {
  width: min(100% - 2rem, 420px);
  background: var(--card); border: 1px solid rgba(255,255,255,0.8);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 2.5rem;
}
.login-logo {
  font-family: var(--font-head); font-size: 1.5rem; font-weight: 700;
  color: var(--accent); margin-bottom: 0.3rem;
}
.login-sub { color: var(--muted); font-size: 0.875rem; margin-bottom: 2rem; }

/* ── Choice badge (alias for choice-id used in question.html) ── */
.choice-badge {
  width: 26px; height: 26px; border-radius: 6px;
  background: rgba(0,0,0,0.06); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; flex-shrink: 0;
  transition: all var(--transition);
}
.choice-badge-square { border-radius: 4px; }
.choice-option.selected .choice-badge { background: var(--accent); color: #fff; }
.choice-text { flex: 1; font-size: 0.95rem; }

/* Rating label used in question.html (column layout) */
.rating-label {
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  padding: 0.65rem 0.85rem; border: 1.5px solid var(--line-med);
  border-radius: var(--radius-sm); cursor: pointer; min-width: 72px;
  font-size: 0.78rem; text-align: center; line-height: 1.3;
  transition: all var(--transition); background: rgba(255,255,255,0.6);
  user-select: none;
}
.rating-label input { display: none; }
.rating-label:hover { border-color: var(--accent); background: rgba(26,99,71,0.06); }
.rating-label.selected { background: var(--accent-soft); border-color: var(--accent); }
.rating-num { font-size: 1.2rem; font-weight: 800; color: var(--fg); }

/* ── Code editor toolbar ──────────────────────────────────────── */
.code-editor-toolbar {
  background: rgba(0,0,0,0.05); padding: 0.45rem 0.9rem;
  font-size: 0.75rem; color: var(--muted); font-weight: 600;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--line);
}
.code-editor {
  width: 100%; background: #fafafa; resize: vertical;
  border: none; outline: none; padding: 1rem;
  font-family: var(--font-mono); font-size: 0.88rem; line-height: 1.6;
  min-height: 260px; display: block;
}
.code-editor:focus { background: #fff; }

/* ── Question navigation pills ───────────────────────────────── */
.question-nav-pill {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  font-size: 0.78rem; font-weight: 600;
  border: 1.5px solid var(--line-med); background: rgba(255,255,255,0.6);
  color: var(--muted); text-decoration: none;
  transition: all var(--transition);
}
.question-nav-pill:hover { border-color: var(--accent); color: var(--accent); }
.question-nav-pill.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(26,99,71,0.3);
}
.question-nav-pill.answered { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.question-nav-pill.active.answered { background: var(--accent); color: #fff; }

/* ── Misc Utilities ──────────────────────────────────────────── */
.text-muted  { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-alert  { color: var(--alert); }
.text-sm     { font-size: 0.83rem; }
.text-xs     { font-size: 0.75rem; }
.text-mono   { font-family: var(--font-mono); }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.fw-600      { font-weight: 600; }
.fw-700      { font-weight: 700; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.gap-1 { gap: 0.5rem; } .gap-2 { gap: 1rem; }
.d-flex { display: flex; } .align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); border-radius: 999px; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform var(--transition); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .two-col, .three-col, .content-split, .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .content-body { padding: 1.25rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .stats-grid { grid-template-columns: 1fr; }
  .likert-row { flex-direction: column; }
  .likert-opt label { min-width: auto; flex-direction: row; gap: 0.6rem; text-align: left; }
}
