/* Clara Diagnostic. Light theme, Clara navy + green, Poppins + Roboto. */
:root {
  --navy: #163669; --navy-dark: #0e2347; --navy-light: #1e4a8a; --navy-soft: #eef3fa; --navy-tint: #f5f8fd;
  --green: #3dd68c; --green-dark: #1f9d61; --green-soft: #e7f9f0;
  --bg: #f5f7fb; --card: #ffffff; --border: #e3e8ef; --border-strong: #cdd6e2;
  --text: #0f1b2d; --muted: #5b6b80; --subtle: #8a97a8;
  --red: #d93f45; --red-soft: #fdeced; --amber: #b86a00; --amber-soft: #fef3e0; --blue: #2459c8; --blue-soft: #e9f0fd;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .05);
  --shadow-lg: 0 12px 32px rgba(14, 35, 71, .10), 0 2px 6px rgba(14, 35, 71, .05);
  --font-head: "Poppins", system-ui, sans-serif; --font-body: "Roboto", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font-body); color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--navy-light); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; letter-spacing: -.01em; margin: 0; line-height: 1.25; }
h1 { font-size: 26px; } h2 { font-size: 19px; } h3 { font-size: 16px; } h4 { font-size: 14px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); } .subtle { color: var(--subtle); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: var(--radius-sm);
  border: 1px solid transparent; font: 500 14.5px var(--font-body); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; text-decoration: none !important; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); }
.btn-green { background: var(--green); color: var(--navy-dark); }
.btn-green:hover { background: #33c47e; }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--border-strong); background: var(--navy-tint); }
.btn-danger { background: #fff; color: var(--red); border-color: #f2c4c6; }
.btn-danger:hover { background: var(--red-soft); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 9px; }
.btn-block { width: 100%; height: 46px; font-size: 15px; }
.btn[disabled], .btn.loading { opacity: .6; pointer-events: none; }
.btn.loading::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { background: none; border: 0; padding: 0; color: var(--navy-light); font: inherit; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 500; font-size: 13.5px; color: var(--text); }
.field .hint { font-size: 12.5px; color: var(--subtle); }
.input, select.input, textarea.input { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff;
  font: 15px var(--font-body); color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; padding: 12px 14px; resize: vertical; }
.input:focus { border-color: var(--navy-light); box-shadow: 0 0 0 3px rgba(30, 74, 138, .12); }
.input::placeholder { color: #a3aebd; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--navy); flex: none; }
.form-error { display: none; background: var(--red-soft); color: var(--red); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }
.form-error.show { display: block; animation: shake .35s ease; }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.form-ok { background: var(--green-soft); color: var(--green-dark); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }
.row { display: flex; gap: 12px; } .row > * { flex: 1; min-width: 0; }

/* Cards, chips */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500; background: #eef1f5; color: var(--muted); white-space: nowrap; }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-green { background: var(--green-soft); color: var(--green-dark); }
.chip-blue { background: var(--blue-soft); color: var(--blue); }
.chip-amber { background: var(--amber-soft); color: var(--amber); }
.chip-red { background: var(--red-soft); color: var(--red); }
.chip-navy { background: var(--navy-soft); color: var(--navy); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 600 13px var(--font-head);
  background: var(--navy-soft); color: var(--navy); flex: none; }
.avatar.green { background: var(--green-soft); color: var(--green-dark); }
.avatar.pending { background: #f1f3f7; color: var(--subtle); }
.avatars { display: flex; } .avatars .avatar { border: 2px solid #fff; margin-left: -8px; width: 30px; height: 30px; font-size: 11px; } .avatars .avatar:first-child { margin-left: 0; }
.progress { height: 8px; border-radius: 99px; background: #e9edf3; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--navy-light), var(--green)); transition: width .5s ease; }
.divider { height: 1px; background: var(--border); margin: 18px 0; }
.empty { text-align: center; padding: 48px 24px; }
.empty .icon-wrap { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; background: var(--navy-soft); color: var(--navy); }
.empty .icon-wrap .icon { width: 26px; height: 26px; }

/* Long AI-written labels wrap instead of widening the page */
.tags .chip, .wf-meta .chip, .steps .handoff, .reco .chip { white-space: normal; height: auto; min-height: 26px; padding: 4px 10px; line-height: 1.35; overflow-wrap: anywhere; }
.chip .icon { width: 14px; height: 14px; }
.card, .wf, .reco, .dept, .phase { min-width: 0; overflow-wrap: anywhere; }
.plan-table { table-layout: fixed; min-width: 760px; }
.plan-table td, .plan-table th { overflow-wrap: anywhere; }

/* AI insight card (sparkle + soft gradient), inspired by the research shots */
.insight { position: relative; border-radius: var(--radius); padding: 20px 22px; border: 1px solid #d9e5f5;
  background: radial-gradient(120% 140% at 100% 0%, rgba(61, 214, 140, .14), transparent 55%), linear-gradient(135deg, #f3f7fd, #eef6f3); }
.insight-label { display: inline-flex; align-items: center; gap: 6px; font: 600 12.5px var(--font-head); color: var(--navy); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.insight-label .icon { width: 16px; height: 16px; color: var(--green-dark); }

/* Toast */
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--navy-dark); color: #fff; padding: 11px 18px; border-radius: 10px;
  font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: all .2s; z-index: 100; display: flex; gap: 8px; align-items: center; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast .icon { color: var(--green); width: 16px; height: 16px; }

/* ===== Auth layout ===== */
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; }
.auth-top { display: flex; justify-content: space-between; align-items: center; padding: 22px 32px; }
.auth-top img { height: 30px; }
.lang-switch { font-size: 13px; color: var(--muted); } .lang-switch a { color: var(--muted); padding: 0 4px; } .lang-switch a.on { color: var(--navy); font-weight: 600; }
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 8px 20px 40px; }
.auth-card { width: 100%; max-width: 1040px; display: grid; grid-template-columns: 1fr 1fr; background: #fff; border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden; }
.auth-card.single { max-width: 460px; grid-template-columns: 1fr; }
.auth-form { padding: 46px 48px; }
.auth-form h1 { font-size: 28px; margin-bottom: 6px; }
.auth-form .lead { color: var(--muted); margin-bottom: 26px; }
.auth-foot { margin-top: 18px; text-align: center; font-size: 14px; color: var(--muted); }
.auth-panel { position: relative; padding: 46px 44px; color: #fff; overflow: hidden;
  background: radial-gradient(90% 70% at 85% 10%, rgba(61, 214, 140, .35), transparent 60%), radial-gradient(80% 80% at 0% 100%, rgba(30, 74, 138, .9), transparent 70%), linear-gradient(160deg, #163669, #0e2347); }
.auth-panel .kicker { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); padding: 5px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 500; color: #d6f7e6; }
.auth-panel h2 { font-size: 26px; line-height: 1.3; margin: 18px 0 26px; color: #fff; }
.auth-panel ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.auth-panel li { display: flex; gap: 12px; color: #dbe5f3; font-size: 15px; }
.auth-panel li .tick { width: 24px; height: 24px; border-radius: 50%; background: rgba(61, 214, 140, .2); color: var(--green); display: flex; align-items: center; justify-content: center; flex: none; }
.auth-panel li .tick .icon { width: 14px; height: 14px; }
.auth-orb { position: absolute; right: -60px; bottom: -60px; width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, .5), rgba(61, 214, 140, .35) 40%, rgba(30, 74, 138, 0) 70%); filter: blur(2px); opacity: .55; }
.auth-chat { position: relative; margin-top: 34px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 16px; padding: 14px 16px; font-size: 13.5px; color: #e6eef9; backdrop-filter: blur(6px); }
.auth-chat .who { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #fff; margin-bottom: 6px; font-size: 13px; }
.auth-chat .who img { width: 20px; height: 20px; border-radius: 6px; background: #fff; padding: 2px; }
.auth-legal { text-align: center; font-size: 12.5px; color: var(--subtle); padding: 0 20px 24px; }
.auth-legal a { color: var(--subtle); margin: 0 8px; }

/* ===== App layout ===== */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 248px; flex: none; background: #fff; border-right: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 4px; }
.sidebar .brand img { height: 30px; width: auto; align-self: flex-start; }
.sidebar .brand span { font: 600 11.5px var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--green-dark); padding-left: 2px; }
.nav { padding: 6px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 10px; color: var(--muted); font-weight: 500; text-decoration: none; }
.nav a:hover { background: var(--navy-tint); color: var(--text); }
.nav a.on { background: var(--navy-soft); color: var(--navy); }
.nav a.on .icon { color: var(--navy); }
.sidebar .cta { padding: 12px 16px; }
.side-foot { margin-top: auto; border-top: 1px solid var(--border); padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who b { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who span { display: block; font-size: 12.5px; color: var(--subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot form button { background: none; border: 0; color: var(--subtle); cursor: pointer; padding: 6px; border-radius: 8px; display: flex; }
.side-foot form button:hover { background: var(--navy-tint); color: var(--text); }
.main { flex: 1; min-width: 0; }
.page { max-width: 1120px; margin: 0 auto; padding: 30px 36px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head .crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; margin-bottom: 8px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: var(--amber-soft); color: #7a4a00; font-size: 14px; margin-bottom: 20px; border: 1px solid #f5dcb0; }
.banner .icon { color: var(--amber); }
.banner.ok { background: var(--green-soft); color: var(--green-dark); border-color: #bfeed6; }
.banner.ok .icon { color: var(--green-dark); }

/* Dashboard */
.greet h1 { font-size: 28px; }
.greet .sub { font-size: 16px; color: var(--muted); margin-top: 6px; max-width: 720px; }
.greet .sub b { color: var(--green-dark); font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }
.kpi { padding: 18px 20px; }
.kpi .lbl { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; }
.kpi .lbl .ic { width: 30px; height: 30px; border-radius: 9px; background: var(--navy-soft); color: var(--navy); display: flex; align-items: center; justify-content: center; }
.kpi .lbl .ic .icon { width: 16px; height: 16px; }
.kpi .num { font: 600 30px var(--font-head); margin-top: 12px; letter-spacing: -.02em; }
.kpi .num small { font-size: 15px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.kpi .note { font-size: 12.5px; color: var(--subtle); margin-top: 2px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.grid-2 > *, .stack > * { min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 20px; }

.how { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.how li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.how .n { width: 26px; height: 26px; border-radius: 8px; background: var(--navy-soft); color: var(--navy); font: 600 12.5px var(--font-head); display: flex; align-items: center; justify-content: center; flex: none; }
.how b { display: block; color: var(--text); font-weight: 500; }

/* Lists / tables */
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .meta { font-size: 13px; color: var(--subtle); }
a.list-row { text-decoration: none; color: inherit; } a.list-row:hover { background: var(--navy-tint); }
.mini-progress { width: 120px; } .mini-progress .tiny { margin-top: 4px; display: block; text-align: right; color: var(--muted); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; padding: 12px 16px; border-bottom: 1px solid var(--border); background: #fafbfd; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }

/* New diagnostic wizard */
.stepper { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.step { display: flex; align-items: center; gap: 8px; color: var(--subtle); font-weight: 500; font-size: 14px; }
.step .n { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border-strong); display: flex; align-items: center; justify-content: center; font-size: 12.5px; }
.step.on { color: var(--text); } .step.on .n { background: var(--navy); border-color: var(--navy); color: #fff; }
.step.done .n { background: var(--green); border-color: var(--green); color: var(--navy-dark); }
.stepper .sep { color: var(--border-strong); }
.people-head { display: grid; grid-template-columns: 1.1fr 1.4fr 1.1fr 90px 36px; gap: 10px; font-size: 12.5px; color: var(--muted); font-weight: 500; padding: 0 2px 6px; }
.person-row { display: grid; grid-template-columns: 1.1fr 1.4fr 1.1fr 90px 36px; gap: 10px; margin-bottom: 10px; }
.person-row .input { height: 42px; }
.icon-btn { width: 36px; height: 42px; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--subtle); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--red-soft); color: var(--red); }
.owner-box { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 12px; background: var(--navy-tint); border: 1px solid #dfe8f5; margin-bottom: 18px; }

/* Diagnostic detail */
.progress-card { padding: 22px; }
.progress-card .top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.progress-card .big { font: 600 22px var(--font-head); }
.team-row { display: grid; grid-template-columns: 36px 1fr auto auto; gap: 14px; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--border); }
.team-row:last-child { border-bottom: 0; }
.team-row .who b { font-weight: 500; } .team-row .who .you { color: var(--subtle); font-weight: 400; margin-left: 4px; }
.team-row .who .meta { font-size: 13px; color: var(--subtle); }
.team-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.add-row { display: grid; grid-template-columns: 1fr 1.3fr 1fr 80px auto; gap: 10px; padding: 16px 22px; background: #fafbfd; border-top: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); }
.add-row .input { height: 40px; }

/* Interview results */
.wf { border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; background: #fff; }
.wf-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.wf-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.steps { list-style: none; margin: 12px 0 0; padding: 0; counter-reset: s; }
.steps li { position: relative; padding: 8px 0 8px 36px; border-left: 2px solid #e6ebf2; margin-left: 12px; font-size: 14px; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: -13px; top: 7px; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid #d6deea; font: 600 11.5px var(--font-head); display: flex; align-items: center; justify-content: center; color: var(--navy); }
.steps li:last-child { border-left-color: transparent; }
.steps .actor { font-weight: 500; color: var(--navy); }
.steps .handoff { display: inline-flex; margin-left: 8px; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kv > div { background: #fafbfd; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.kv .k { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.bullets { margin: 0; padding-left: 18px; } .bullets li { margin-bottom: 6px; }
.transcript .msg { padding: 10px 0; border-bottom: 1px solid #f0f2f6; font-size: 14px; }
.transcript .msg b { font-weight: 500; color: var(--navy); }
.tabs { display: flex; gap: 4px; background: #eef1f6; padding: 4px; border-radius: 11px; width: fit-content; margin-bottom: 18px; }
.tabs button { border: 0; background: none; padding: 8px 14px; border-radius: 8px; font: 500 14px var(--font-body); color: var(--muted); cursor: pointer; }
.tabs button.on { background: #fff; color: var(--text); box-shadow: var(--shadow); }

/* ===== Report ===== */
.report-hero { padding: 28px 30px; border-radius: 18px; color: #fff; position: relative; overflow: hidden; margin-bottom: 20px;
  background: radial-gradient(70% 90% at 100% 0%, rgba(61, 214, 140, .32), transparent 60%), linear-gradient(150deg, #163669, #0e2347); }
.report-hero .eyebrow { font: 600 12.5px var(--font-head); letter-spacing: .06em; text-transform: uppercase; color: #9fe9c4; }
.report-hero h1 { color: #fff; font-size: 26px; margin: 10px 0 12px; max-width: 820px; line-height: 1.3; }
.report-hero .meta { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; color: #c9d6ea; font-size: 14px; }
.report-hero .avatars .avatar { border-color: #163669; }
.report-nav { position: sticky; top: 0; z-index: 5; background: rgba(245, 247, 251, .92); backdrop-filter: blur(8px); padding: 10px 0; margin-bottom: 8px; display: flex; gap: 6px; overflow-x: auto; }
.report-nav a { flex: none; padding: 7px 12px; border-radius: 99px; font-size: 13.5px; color: var(--muted); border: 1px solid var(--border); background: #fff; text-decoration: none; }
.report-nav a:hover { color: var(--navy); border-color: var(--border-strong); }
.r-section { margin-top: 26px; scroll-margin-top: 64px; }
.r-section > h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.r-section > h2 .num { width: 28px; height: 28px; border-radius: 8px; background: var(--navy-soft); color: var(--navy); font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.plan-table td.rank { width: 44px; font: 600 15px var(--font-head); color: var(--navy); }
.plan-table tr.top td { background: #f4fbf7; }
.plan-table tr.top td.rank { color: var(--green-dark); }
.plan-table .proc { font-weight: 500; }
.reco-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.reco { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.reco .first { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 13.5px; color: var(--muted); }
.reco .first b { color: var(--text); font-weight: 500; }
.dept-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dept { padding: 16px; } .dept h4 { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 8px; }
.dept.off { background: #fafbfd; } .dept.off p { color: var(--subtle); }
.persp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.next-card { padding: 26px; border-radius: 18px; border: 1px solid #cfe9dc; background: radial-gradient(90% 120% at 100% 0%, rgba(61, 214, 140, .18), transparent 60%), #fff; }
.next-card .path { display: inline-flex; align-items: center; gap: 8px; font: 600 13px var(--font-head); color: var(--green-dark); text-transform: uppercase; letter-spacing: .05em; }
.next-card h3 { font-size: 22px; margin: 8px 0 10px; }
.next-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.phase { padding: 16px; } .phase .tag { font: 600 12px var(--font-head); color: var(--navy); background: var(--navy-soft); padding: 3px 9px; border-radius: 6px; }
.phase ul { margin: 10px 0 0; padding-left: 18px; font-size: 14px; } .phase li { margin-bottom: 6px; }
.method { margin-top: 30px; font-size: 13px; color: var(--subtle); text-align: center; }

/* ===== Interview (participant) ===== */
.iv { min-height: 100vh; display: flex; flex-direction: column; background: linear-gradient(180deg, #f6f8fc 0%, #f5f7fb 100%); }
.iv-top { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.iv-top-in { max-width: 820px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 14px; }
.iv-top img.mark { width: 32px; height: 32px; }
.iv-top .co { flex: 1; min-width: 0; }
.iv-top .co b { display: block; font: 600 14.5px var(--font-head); }
.iv-top .co span { font-size: 12.5px; color: var(--subtle); display: inline-flex; align-items: center; gap: 4px; }
.iv-top .co span .icon { width: 12px; height: 12px; color: var(--green-dark); }
.iv-prog { width: 180px; } .iv-prog .tiny { display: flex; justify-content: space-between; color: var(--muted); margin-bottom: 5px; }
.iv-welcome { max-width: 720px; margin: 0 auto; padding: 48px 20px 60px; }
.iv-welcome .mark-lg { width: 56px; height: 56px; margin-bottom: 18px; }
.iv-welcome h1 { font-size: 30px; line-height: 1.25; margin: 6px 0 14px; }
.iv-welcome .intro { font-size: 16.5px; color: var(--muted); }
.iv-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 26px 0; }
.iv-cards .card { padding: 16px; } .iv-cards .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--green-soft); color: var(--green-dark); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.iv-cards b { display: block; font-family: var(--font-head); font-weight: 600; font-size: 14.5px; } .iv-cards span { font-size: 13.5px; color: var(--muted); }
.privacy-box { padding: 18px 20px; border-radius: 14px; background: #fff; border: 1px solid var(--border); margin-bottom: 18px; }
.privacy-box h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 15px; } .privacy-box h3 .icon { color: var(--navy); }
.privacy-box p { color: var(--muted); font-size: 14px; }
.chat { flex: 1; width: 100%; max-width: 820px; margin: 0 auto; padding: 28px 20px 180px; }
.msg { display: flex; gap: 12px; margin-bottom: 22px; animation: rise .25s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg .who { width: 32px; height: 32px; flex: none; border-radius: 10px; background: #fff; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.msg .who img { width: 20px; height: 20px; }
.msg .body { font-size: 15.5px; line-height: 1.65; color: var(--text); max-width: 640px; }
.msg .body p { margin: 0 0 8px; } .msg .body p:last-child { margin: 0; }
.msg .body strong { color: var(--navy); font-weight: 600; }
.msg .name { font: 600 13px var(--font-head); color: var(--navy); margin-bottom: 2px; }
.msg.me { justify-content: flex-end; }
.msg.me .body { background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 16px 16px 4px 16px; max-width: 560px; }
.typing { display: inline-flex; gap: 4px; align-items: center; padding: 8px 0; color: var(--muted); font-size: 13.5px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--subtle); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.composer-wrap { position: fixed; left: 0; right: 0; bottom: 0; padding: 14px 20px 18px; background: linear-gradient(180deg, rgba(245, 247, 251, 0), #f5f7fb 30%); }
.composer { max-width: 780px; margin: 0 auto; background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 10px 10px 10px 16px; display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { flex: 1; border: 0; outline: none; resize: none; font: 15.5px/1.5 var(--font-body); color: var(--text); padding: 8px 0; max-height: 200px; min-height: 26px; background: none; }
.composer .tools { display: flex; gap: 6px; align-items: center; }
.round { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: #fff; color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.round:hover { color: var(--navy); border-color: var(--border-strong); }
.round.send { background: var(--navy); border-color: var(--navy); color: #fff; } .round.send:hover { background: var(--navy-dark); }
.round.rec { background: var(--red); border-color: var(--red); color: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(217, 63, 69, .4); } 50% { box-shadow: 0 0 0 8px rgba(217, 63, 69, 0); } }
.round[disabled] { opacity: .45; pointer-events: none; }
.composer-hint { max-width: 780px; margin: 8px auto 0; display: flex; justify-content: space-between; font-size: 12px; color: var(--subtle); padding: 0 6px; }
.chat-error { max-width: 780px; margin: 0 auto 8px; }
.done-wrap { max-width: 560px; margin: 0 auto; padding: 80px 20px; text-align: center; }
.done-badge { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 20px; background: var(--green-soft); color: var(--green-dark); display: flex; align-items: center; justify-content: center; }
.done-badge .icon { width: 34px; height: 34px; }
.promo { margin-top: 36px; padding: 18px; border-radius: 14px; border: 1px dashed var(--border-strong); font-size: 14px; color: var(--muted); }

/* Legal */
.legal { max-width: 780px; margin: 0 auto; padding: 10px 20px 60px; }
.legal h1 { font-size: 30px; margin-bottom: 6px; }
.legal h2 { font-size: 18px; margin: 28px 0 8px; }
.legal p, .legal li { color: #334155; font-size: 15px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0; }
.legal th, .legal td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal th { background: #fafbfd; font-weight: 500; }

/* Responsive */
@media (max-width: 1000px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-2 { grid-template-columns: minmax(0, 1fr); } .dept-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--border); overflow-x: auto; }
  .sidebar .brand { padding: 12px 14px; } .sidebar .brand span { display: none; } .sidebar .brand img { height: 24px; }
  .nav { flex-direction: row; padding: 6px; } .nav a { height: 38px; padding: 0 10px; } .nav a span { display: none; }
  .sidebar .cta, .side-foot .who { display: none; } .side-foot { margin: 0 0 0 auto; border: 0; padding: 8px; }
  .page { padding: 22px 16px 60px; }
  .auth-card { grid-template-columns: 1fr; } .auth-panel { display: none; } .auth-form { padding: 32px 22px; }
  .reco-grid, .persp, .phases, .kv, .iv-cards { grid-template-columns: 1fr; }
  .people-head { display: none; } .person-row, .add-row { grid-template-columns: 1fr 1fr; } .person-row .icon-btn { width: 100%; }
  .team-row { grid-template-columns: 36px 1fr; } .team-row .team-actions, .team-row .chip { grid-column: 2; justify-content: flex-start; }
  .iv-prog { width: 110px; }
  .banner { flex-wrap: wrap; } .banner > span { flex-basis: calc(100% - 40px); }
  .list-row .mini-progress { display: none; } .list-row { padding: 12px 16px; }
  .report-hero { padding: 22px; } .report-hero h1 { font-size: 22px; } .report-hero .meta span:nth-child(even) { display: none; }
  .kpi .num { font-size: 26px; } .page-head { align-items: flex-start; }
}
@media (max-width: 520px) { .kpis { grid-template-columns: 1fr 1fr; } .dept-grid { grid-template-columns: 1fr; } .table { font-size: 13px; } .table th, .table td { padding: 10px; } }

/* Print (report) */
@media print {
  body { background: #fff; } .sidebar, .report-nav, .no-print, #toast { display: none !important; }
  .page { padding: 0; max-width: none; } .card { box-shadow: none; } .r-section { break-inside: avoid-page; }
  .report-hero { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
