
:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-2: #eef3f8;
    --text: #172033;
    --muted: #68758a;
    --line: #dfe6ef;
    --primary: #173f6d;
    --primary-2: #0d2d50;
    --success: #13745d;
    --danger: #b42318;
    --warning: #a15c00;
    --radius: 16px;
    --shadow: 0 14px 40px rgba(23, 32, 51, .08);
}
* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
body { margin: 0; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
.brand { display:flex; gap:12px; align-items:center; color:var(--text); }
.brand span:last-child { display:flex; flex-direction:column; line-height:1.15; }
.brand small { color:var(--muted); margin-top:3px; font-size:12px; }
.brand-mark { width:42px; height:42px; border-radius:12px; display:grid; place-items:center; background:var(--primary); color:white; font-weight:800; letter-spacing:.03em; }
.btn { border:0; border-radius:10px; padding:11px 16px; font-weight:700; }
.btn-primary { background:var(--primary); color:white; }
.btn-primary:hover { background:var(--primary-2); }
.btn-ghost { background:transparent; color:inherit; border:1px solid var(--line); }
.btn-sm { padding:8px 12px; font-size:13px; }
.btn-block { width:100%; }
.alert { padding:12px 14px; border-radius:12px; margin-bottom:16px; font-size:14px; }
.alert-error { background:#fff0ef; color:var(--danger); border:1px solid #ffd3cf; }
.alert-success { background:#ecfdf7; color:var(--success); border:1px solid #bcebd9; }
.eyebrow { display:inline-block; font-size:12px; font-weight:800; letter-spacing:.13em; text-transform:uppercase; color:#4f759e; margin-bottom:12px; }
.auth-body { background:#eff4f9; }
.auth-shell { min-height:100vh; display:grid; grid-template-columns:minmax(0,1.15fr) minmax(420px,.85fr); }
.auth-visual { min-height:100vh; display:flex; align-items:flex-end; padding:72px; background:linear-gradient(145deg,#0b2747,#174c7c); position:relative; overflow:hidden; color:white; }
.auth-visual::before, .auth-visual::after { content:""; position:absolute; border:1px solid rgba(255,255,255,.12); border-radius:999px; }
.auth-visual::before { width:540px; height:540px; top:-170px; right:-120px; }
.auth-visual::after { width:360px; height:360px; top:60px; right:40px; }
.auth-copy { position:relative; z-index:1; max-width:700px; }
.auth-copy .eyebrow { color:#bcd7ee; }
.auth-copy h1 { font-size:clamp(38px,5vw,68px); line-height:1.02; max-width:760px; margin:0 0 20px; }
.auth-copy p { color:#cfe0ef; font-size:18px; line-height:1.7; max-width:620px; }
.auth-panel { display:grid; place-items:center; padding:40px; background:white; }
.auth-card { width:min(430px,100%); }
.auth-heading { margin:54px 0 24px; }
.auth-heading h2 { margin:0 0 8px; font-size:30px; }
.auth-heading p { margin:0; color:var(--muted); }
.form-stack { display:grid; gap:18px; }
.form-stack label { display:grid; gap:8px; font-size:14px; font-weight:700; }
.form-stack input { width:100%; border:1px solid var(--line); border-radius:10px; padding:13px 14px; outline:none; background:white; color:var(--text); }
.form-stack input:focus { border-color:#6f9ac2; box-shadow:0 0 0 3px rgba(23,63,109,.09); }
.app-shell { min-height:100vh; display:flex; }
.sidebar { width:260px; background:#102a49; color:#dbe9f7; padding:24px 18px; position:fixed; inset:0 auto 0 0; overflow:auto; z-index:20; }
.sidebar .brand { color:white; padding:0 8px 26px; }
.sidebar .brand small { color:#a9bfd4; }
.sidebar .brand-mark { background:white; color:#173f6d; }
.nav-list { display:grid; gap:6px; }
.nav-link { padding:11px 13px; border-radius:10px; color:#bfd0e1; font-weight:650; font-size:14px; }
.nav-link:hover, .nav-link.active { background:rgba(255,255,255,.1); color:white; }
.main-area { margin-left:260px; width:calc(100% - 260px); min-height:100vh; }
.topbar { height:72px; background:white; border-bottom:1px solid var(--line); display:flex; align-items:center; gap:14px; padding:0 28px; position:sticky; top:0; z-index:10; }
.topbar > div:nth-child(2) { display:flex; flex-direction:column; }
.topbar small { font-size:11px; color:var(--muted); margin-top:2px; }
.topbar-user { margin-left:auto; display:flex; align-items:center; gap:14px; font-size:14px; }
.menu-button { display:none; border:0; background:var(--surface-2); border-radius:8px; width:38px; height:38px; }
.content-wrap { padding:28px; max-width:1500px; margin:0 auto; }
.page-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:22px; }
.page-heading h1 { margin:0; font-size:28px; }
.page-heading p { margin:7px 0 0; color:var(--muted); line-height:1.55; }
.stat-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-bottom:20px; }
.stat-card { background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow); border-radius:var(--radius); padding:20px; display:flex; flex-direction:column; gap:8px; }
.stat-card span { color:var(--muted); font-size:13px; }
.stat-card strong { font-size:30px; }
.panel-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.panel { background:white; border:1px solid var(--line); border-radius:var(--radius); padding:22px; box-shadow:var(--shadow); }
.panel-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:16px; }
.panel h2 { margin:0; font-size:19px; }
.panel p { color:var(--muted); line-height:1.7; }
.badge { display:inline-flex; width:max-content; align-items:center; min-height:26px; padding:4px 9px; border-radius:999px; background:#eef2f6; color:#556579; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.badge-success { background:#e8f8f1; color:var(--success); }
.check-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 16px; color:#3e4d61; font-size:14px; }
.empty-state { min-height:260px; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; max-width:900px; }
.participant-body { background:#f5f8fc; }
.participant-topbar { min-height:72px; background:white; border-bottom:1px solid var(--line); display:flex; align-items:center; gap:30px; padding:0 max(24px,calc((100vw - 1240px)/2)); position:sticky; top:0; z-index:10; }
.participant-nav { display:flex; align-items:center; gap:22px; color:#526175; font-size:14px; font-weight:700; }
.participant-nav a:hover { color:var(--primary); }
.participant-main { max-width:1240px; margin:0 auto; padding:32px 24px 60px; }
.participant-hero { border-radius:24px; padding:40px; color:white; background:linear-gradient(135deg,#12385f,#1a5b8d); margin-bottom:22px; }
.participant-hero h1 { margin:0 0 10px; font-size:34px; }
.participant-hero p { margin:0; color:#d6e5f3; }
.participant-hero .eyebrow { color:#bad6ed; }
.feature-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.feature-card { min-height:220px; padding:22px; background:white; border:1px solid var(--line); border-radius:18px; display:flex; flex-direction:column; transition:.18s ease; box-shadow:0 8px 30px rgba(23,32,51,.05); }
.feature-card:hover { transform:translateY(-2px); box-shadow:var(--shadow); }
.feature-card > span { color:#8ea0b4; font-size:12px; font-weight:900; letter-spacing:.08em; }
.feature-card h2 { margin:26px 0 10px; font-size:20px; }
.feature-card p { color:var(--muted); line-height:1.55; margin:0 0 18px; }
.feature-card .badge { margin-top:auto; }
.feature-card.primary { border-color:#c8dae9; }
.feature-card.premium { border-color:#ddcfaa; background:linear-gradient(180deg,#fff,#fffcf4); }
.feature-card.coming { opacity:.76; }
@media (max-width: 1000px) {
    .auth-shell { grid-template-columns:1fr; }
    .auth-visual { min-height:340px; padding:44px 28px; }
    .auth-panel { padding:44px 24px; }
    .auth-heading { margin-top:36px; }
    .stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .feature-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .participant-nav { display:none; }
}
@media (max-width: 760px) {
    .sidebar { transform:translateX(-100%); transition:.2s ease; box-shadow:20px 0 50px rgba(0,0,0,.18); }
    .sidebar.open { transform:translateX(0); }
    .main-area { margin-left:0; width:100%; }
    .menu-button { display:inline-grid; place-items:center; }
    .topbar { padding:0 16px; }
    .topbar-user > span { display:none; }
    .content-wrap { padding:20px 16px; }
    .panel-grid, .check-list { grid-template-columns:1fr; }
    .participant-topbar { padding:12px 18px; }
    .participant-topbar .topbar-user > span { display:none; }
    .participant-main { padding:22px 16px 48px; }
    .participant-hero { padding:28px 22px; border-radius:18px; }
    .feature-grid { grid-template-columns:1fr; }
}
@media (max-width: 520px) {
    .stat-grid { grid-template-columns:1fr; }
    .auth-copy h1 { font-size:38px; }
    .auth-visual { min-height:300px; }
}

/* Phase 2 — Question Bank */
button:disabled, .btn:disabled { opacity:.48; cursor:not-allowed; }
select, textarea { font:inherit; color:var(--text); }
.alert-warning { background:#fff8e8; color:#8a5200; border:1px solid #f0d9a7; }
.badge-danger { background:#fff0ef; color:var(--danger); border-color:#ffd3cf; }
.btn-danger { background:#fff0ef; color:var(--danger); border:1px solid #ffd3cf; }
.btn-danger:hover { background:#ffe3df; }
.danger-text { color:var(--danger) !important; }
.muted-text { color:var(--muted); font-size:13px; }
.heading-actions, .inline-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.inline-form { display:inline; margin:0; }
.link-button { border:0; background:transparent; padding:0; text-decoration:underline; font:inherit; cursor:pointer; }
.stat-grid-compact { margin-bottom:22px; }
.stat-grid-compact .stat-card { padding:18px 20px; }
.stat-grid-compact .stat-card strong { font-size:28px; }
.stat-text { font-size:21px !important; line-height:1.2; }
.filter-grid { display:grid; grid-template-columns:2fr repeat(3,minmax(150px,1fr)) auto; gap:14px; align-items:end; }
.filter-grid label, .field { display:grid; gap:7px; }
.filter-grid label > span, .field > span, .form-stack label > span { font-size:13px; font-weight:750; }
.filter-grid input, .filter-grid select, .field input, .field select, .field textarea, .approval-form textarea { width:100%; border:1px solid var(--line); border-radius:10px; padding:11px 12px; outline:none; background:white; }
.filter-grid input:focus, .filter-grid select:focus, .field input:focus, .field select:focus, .field textarea:focus, .approval-form textarea:focus { border-color:#6f9ac2; box-shadow:0 0 0 3px rgba(23,63,109,.08); }
.field textarea { resize:vertical; line-height:1.55; }
.field small { color:var(--muted); font-size:12px; font-weight:500; }
.filter-actions, .form-actions { display:flex; align-items:center; gap:10px; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.field-span-2 { grid-column:span 2; }
.narrow-panel { max-width:920px; }
.structure-preview { padding:16px; background:var(--surface-2); border-radius:12px; }
.structure-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-top:12px; }
.structure-grid span { padding:10px 12px; background:white; border:1px solid var(--line); border-radius:9px; font-size:13px; }
.table-panel { padding:0; overflow:hidden; }
.table-panel .panel-head { padding:20px 22px; margin:0; border-bottom:1px solid var(--line); }
.table-scroll { overflow:auto; }
.data-table { width:100%; border-collapse:collapse; min-width:760px; }
.data-table th, .data-table td { padding:15px 18px; text-align:left; border-bottom:1px solid var(--line); vertical-align:middle; font-size:14px; }
.data-table th { background:#f8fafc; color:#526074; font-size:12px; text-transform:uppercase; letter-spacing:.04em; }
.data-table tbody tr:last-child td { border-bottom:0; }
.cell-subtitle { color:var(--muted); font-size:12px; margin-top:4px; }
.table-actions { white-space:nowrap; }
.status-pill { display:inline-flex; align-items:center; padding:6px 9px; border-radius:999px; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; border:1px solid var(--line); background:#f7f9fc; }
.status-draft { color:#5e6878; }
.status-building { color:#0f5d8c; background:#edf7ff; border-color:#c8e6f8; }
.status-review { color:#8a5200; background:#fff8e8; border-color:#f0d9a7; }
.status-approved { color:var(--success); background:#ecfdf7; border-color:#bcebd9; }
.builder-layout { display:grid; grid-template-columns:230px minmax(0,1fr); gap:22px; align-items:start; }
.builder-nav { padding:14px; position:sticky; top:94px; max-height:calc(100vh - 118px); overflow:auto; }
.builder-skill { padding:13px 10px 6px; color:#3c4d61; font-size:12px; text-transform:uppercase; letter-spacing:.08em; }
.builder-step { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 10px; border-radius:8px; color:#5f6d7e; font-size:13px; }
.builder-step small { font-size:10px; color:#8793a3; }
.builder-step:hover, .builder-step.active { background:#eef5fb; color:var(--primary); }
.builder-step.active { font-weight:800; }
.builder-review-link { display:block; margin-top:13px; padding:12px 10px; border-top:1px solid var(--line); color:var(--primary); font-weight:800; font-size:13px; }
.builder-main { display:grid; gap:22px; min-width:0; }
.builder-main .panel { margin:0; }
.panel-copy { margin:5px 0 0; color:var(--muted); font-size:13px; }
.media-current { background:#f8fafc; border:1px solid var(--line); border-radius:10px; padding:12px; display:block; }
.media-current a { color:var(--primary); text-decoration:underline; }
.group-list { display:grid; gap:10px; }
.group-card, .add-box { border:1px solid var(--line); border-radius:12px; background:#fbfcfe; overflow:hidden; }
.group-card summary, .add-box summary { cursor:pointer; list-style:none; display:flex; justify-content:space-between; gap:12px; padding:14px 16px; }
.group-card summary::-webkit-details-marker, .add-box summary::-webkit-details-marker { display:none; }
.group-card summary span { color:var(--muted); font-size:12px; }
.compact-form { padding:16px; border-top:1px solid var(--line); }
.add-box { margin-top:12px; }
.add-box summary { color:var(--primary); font-weight:800; }
.question-list { display:grid; gap:12px; }
.question-card { border:1px solid var(--line); border-radius:12px; padding:16px; background:#fff; }
.question-card-head { display:flex; justify-content:space-between; gap:14px; align-items:flex-start; }
.question-card-head > div:first-child { display:flex; align-items:center; gap:10px; }
.question-number { width:38px; height:30px; border-radius:8px; background:#eef5fb; color:var(--primary); display:grid; place-items:center; font-weight:850; }
.question-card p { margin:14px 0 0; line-height:1.55; }
.answer-box { margin-top:10px; padding:9px 11px; border-radius:8px; background:#f7f9fc; color:#526074; font-size:12px; }
.answer-box.correct { background:#ecfdf7; color:#17634f; }
.empty-inline { padding:18px; color:var(--muted); background:#f8fafc; border:1px dashed #cad4df; border-radius:10px; }
.question-editor { margin-top:22px; padding-top:20px; border-top:1px solid var(--line); scroll-margin-top:100px; }
.review-overview { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-bottom:22px; }
.validation-panel { border-color:#efd6d3; }
.validation-list { margin:0; padding-left:20px; color:#7f312a; display:grid; gap:8px; }
.approval-form { max-width:760px; }
.timeline { display:grid; gap:14px; }
.timeline-item { border-left:3px solid #c8dae9; padding:3px 0 3px 15px; }
.timeline-item strong { display:block; }
.timeline-item span { color:var(--muted); font-size:12px; }
.timeline-item p { margin:7px 0 0; line-height:1.5; }
@media (max-width: 1100px) {
    .filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .filter-actions { grid-column:span 2; }
    .structure-grid { grid-template-columns:repeat(2,1fr); }
}
@media (max-width: 900px) {
    .builder-layout { grid-template-columns:1fr; }
    .builder-nav { position:static; max-height:none; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; }
    .builder-skill { grid-column:1/-1; }
    .builder-review-link { grid-column:1/-1; }
    .review-overview { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 680px) {
    .page-heading { align-items:flex-start; flex-direction:column; }
    .heading-actions { width:100%; }
    .filter-grid, .form-grid { grid-template-columns:1fr; }
    .field-span-2, .filter-actions { grid-column:span 1; }
    .structure-grid, .review-overview { grid-template-columns:1fr; }
    .builder-nav { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .question-card-head { flex-direction:column; }
}
