:root {
    --blue: #0f766e;
    --blue-dark: #115e59;
    --blue-soft: #ccfbf1;
    --gold: #d97706;
    --gold-dark: #b45309;
    --gold-soft: #fff7ed;
    --ink: #1f2937;
}
.brand-mark {
    display:inline-flex; align-items:center; justify-content:center;
    min-width:72px; height:40px; padding:0 .6rem; border-radius:.45rem;
    background:linear-gradient(135deg, var(--blue), var(--blue-dark));
    color:#fff; font-weight:800; font-size:.78rem; letter-spacing:.04em;
}
.path-card { border-top:4px solid var(--blue); }
.path-card:hover { box-shadow:0 8px 24px rgba(15,118,110,.12); }
body { font-family: 'Inter', 'Segoe UI', system-ui, sans-serif; color: var(--ink); background: #f4f6fb; }
a { color: var(--blue); }
.btn-primary { background: var(--blue); border-color: var(--blue-dark); }
.btn-primary:hover, .btn-primary:focus { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-outline-primary { color: var(--blue); border-color: var(--blue); }
.btn-outline-primary:hover { background: var(--blue); border-color: var(--blue); }
.btn-gold { background: var(--gold); border-color: var(--gold-dark); color: #fff; font-weight: 600; }
.btn-gold:hover { background: var(--gold-dark); color: #fff; }
.form-control:focus, .form-select:focus { border-color: var(--blue); box-shadow: 0 0 0 .2rem rgba(30,64,175,.15); }
.form-check-input:checked { background-color: var(--blue); border-color: var(--blue); }
.text-gold { color: var(--gold-dark) !important; }
.card { border: 1px solid #e5e7eb; border-radius: .75rem; }

/* ---------- Public ---------- */
.pub-header { background: #fff; border-bottom: 3px solid var(--gold); }
.pub-header .logos img { height: 48px; width: auto; object-fit: contain; }
.pub-header .logo-sep { width: 1px; height: 40px; background: #d1d5db; }
.pub-title { font-weight: 700; color: var(--blue); line-height: 1.2; font-size: 1rem; }
.pub-sub { font-size: .75rem; color: #6b7280; letter-spacing: .03em; }
.pub-footer { color: #6b7280; font-size: .8rem; }
.hero { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 70%); color: #fff; border-radius: 1rem; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(197,160,89,.45), transparent 70%); }
.hero .badge-gold { background: var(--gold); color: #fff; }

/* ---------- Form stepper ---------- */
.stepper { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .35rem; }
.stepper .pill { flex: 0 0 auto; font-size: .75rem; padding: .35rem .7rem; border-radius: 2rem; background: #e5e7eb; color: #4b5563; cursor: pointer; white-space: nowrap; border: 0; }
.stepper .pill.active { background: var(--blue); color: #fff; font-weight: 600; }
.stepper .pill.done { background: var(--gold-soft); color: var(--gold-dark); border: 1px solid var(--gold); }
.stepper .pill.has-error { background: #fee2e2; color: #991b1b; }
.stepper .pill.skipped { display: none; }
.step-progress { height: 6px; background: #e5e7eb; border-radius: 3px; }
.step-progress > div { height: 100%; background: var(--gold); border-radius: 3px; transition: width .25s; }
.survey-step { display: none; }
.survey-step.active { display: block; }
.q-card { background: #fff; border: 1px solid #e5e7eb; border-left: 4px solid var(--blue); border-radius: .6rem; padding: 1rem 1.1rem; margin-bottom: .9rem; }
.q-card.missing { border-left-color: #dc2626; background: #fff7f7; }
.q-id { display: inline-block; background: var(--blue-soft); color: var(--blue); font-weight: 700; font-size: .75rem; border-radius: .35rem; padding: .1rem .45rem; margin-right: .4rem; }
.q-text { font-weight: 600; margin-bottom: .6rem; }
.q-help { font-size: .78rem; color: #6b7280; margin-top: -.3rem; margin-bottom: .6rem; }
.opt { display: block; border: 1px solid #e5e7eb; border-radius: .5rem; padding: .5rem .75rem; margin-bottom: .35rem; cursor: pointer; background: #fff; }
.opt:hover { border-color: var(--gold); background: var(--gold-soft); }
.opt input { margin-right: .5rem; }
.opt:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.scale-table th, .scale-table td { text-align: center; vertical-align: middle; font-size: .8rem; }
.scale-table td:first-child, .scale-table th:first-child { text-align: left; }
.scale-table input { width: 1.15rem; height: 1.15rem; }
.stop-box { display: none; border: 2px solid #dc2626; background: #fef2f2; color: #991b1b; border-radius: .6rem; padding: .8rem 1rem; margin-bottom: .9rem; font-weight: 600; }
.stop-box.show { display: block; }
.skip-note { background: var(--gold-soft); border: 1px dashed var(--gold); border-radius: .6rem; padding: .8rem 1rem; color: var(--gold-dark); }
.v1-card { border: 1px solid #e5e7eb; border-radius: .6rem; padding: .8rem; margin-bottom: .8rem; background: #fff; }
.v1-card h6 { color: var(--blue); }
.save-ind { font-size: .78rem; color: #6b7280; }
.save-ind.saving { color: var(--gold-dark); }
.save-ind.err { color: #dc2626; }
.nav-sticky { position: sticky; bottom: 0; background: rgba(244,246,251,.95); backdrop-filter: blur(4px); padding: .7rem 0; border-top: 1px solid #e5e7eb; margin-top: 1rem; z-index: 5; }

/* ---------- Admin ---------- */
.sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 250px; background: linear-gradient(180deg, var(--blue) 0%, var(--blue-dark) 100%); color: #fff; display: flex; flex-direction: column; z-index: 100; transition: transform .2s; }
.sidebar-brand { padding: 1rem; border-bottom: 2px solid var(--gold); background: #fff; }
.sidebar-brand img { height: 36px; }
.sidebar-nav { flex: 1; padding: 1rem .75rem; overflow-y: auto; }
.sidebar-nav .nav-link { color: rgba(255,255,255,.8); border-radius: .5rem; padding: .6rem .85rem; display: flex; align-items: center; gap: .6rem; font-size: .92rem; }
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar-nav .nav-link.active { background: var(--gold); color: #fff; font-weight: 600; }
.sidebar-nav .nav-heading { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.45); padding: .8rem .85rem .3rem; }
.sidebar-footer { padding: 1rem; border-top: 1px solid rgba(255,255,255,.15); }
.main-content { margin-left: 250px; min-height: 100vh; }
.topbar { background: #fff; border-bottom: 1px solid #e5e7eb; padding: .8rem 1.5rem; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 50; }
.content-area { padding: 1.5rem; }
.btn-sidebar-toggle { display: none; background: none; border: 0; font-size: 1.5rem; color: var(--blue); }
.kpi { border-radius: .75rem; padding: 1rem 1.1rem; background: #fff; border: 1px solid #e5e7eb; border-top: 4px solid var(--blue); height: 100%; }
.kpi.gold { border-top-color: var(--gold); }
.kpi.red { border-top-color: #dc2626; }
.kpi.gray { border-top-color: #6b7280; }
.kpi .num { font-size: 1.8rem; font-weight: 700; color: var(--blue); line-height: 1.1; }
.kpi .lbl { font-size: .78rem; color: #6b7280; text-transform: uppercase; letter-spacing: .04em; }
.table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: #6b7280; font-weight: 600; white-space: nowrap; }
.bar-bg { background: #e5e7eb; border-radius: 3px; height: 8px; min-width: 80px; }
.bar-fill { background: var(--blue); height: 8px; border-radius: 3px; }
.bar-fill.gold { background: var(--gold); }
.answer-box { white-space: pre-line; font-size: .85rem; }
.pagination .page-item.active .page-link { background: var(--blue); border-color: var(--blue); }
.pagination .page-link { color: var(--blue); }
.login-page { min-height: 100vh; background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 60%, #0f1c52 100%); }
@media (max-width: 768px) {
    .btn-sidebar-toggle { display: inline-block; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .content-area { padding: 1rem; }
    .pub-header .logos img { height: 38px; }
}
