/* Huvot design system — uCoach Talent Assessment Suite */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --navy: #0B2A5B;
  --navy-deep: #061A3A;
  --navy-2: #163D7A;
  --gold: #C9A24E;
  --gold-soft: #F4E7C5;
  --gold-grad: linear-gradient(135deg, #F1D58E 0%, #C9A24E 45%, #A87B30 100%);
  --cream: #F7F4EC;
  --paper: #FFFDF8;
  --ink: #0F1B2D;
  --ink-2: #44506A;
  --ink-3: #7A8499;
  --line: #E6E1D3;
  --line-2: #EFEBE0;
  --ok: #2F6B45;
  --warn: #B7791F;
  --bad: #A3262A;
  /* DISC colours (from the report example) */
  --d: #A3262A; --i: #C8962E; --s: #2F6B45; --c: #1F3F8F;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .05), 0 8px 24px rgba(15, 27, 45, .06);
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); color: var(--ink); background: var(--cream); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--navy-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0 0 .8em; }
img { max-width: 100%; }
.mono { font-family: var(--mono); }
.eyebrow { font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 500; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none !important; }
.brand img { width: 34px; height: 34px; }
.brand img.logo { width: auto; height: 46px; display: block; }
.brand img.logo.sm { height: 30px; }
.brand.stack { flex-direction: column; align-items: flex-start; gap: 8px; }
.tagpill { font: 600 9.5px var(--mono); letter-spacing: .16em; color: #E3C27A; background: rgba(201, 162, 78, .14); border-radius: 99px; padding: 3px 9px; }
.brand b { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.brand small { display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-top: -2px; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 9px 16px; border-radius: 10px; font: 600 14px var(--sans); cursor: pointer; transition: .15s; white-space: nowrap; text-decoration: none !important; }
.btn:hover { border-color: #cfc8b4; background: #fffcf3; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); }
.btn.gold { background: var(--gold-grad); border-color: #B8893A; color: var(--navy-deep); }
.btn.gold:hover { filter: brightness(1.04); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(11, 42, 91, .06); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.lg { padding: 13px 22px; font-size: 15.5px; border-radius: 12px; }
.btn.block { width: 100%; }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=date], input[type=search], select, textarea {
  width: 100%; font: 15px var(--sans); color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none; transition: .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(22, 61, 122, .12); }
textarea { min-height: 90px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--navy); }

/* ---------- cards ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card h3 { font-size: 17px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.stat .num { font-size: 32px; font-weight: 800; letter-spacing: -.03em; color: var(--navy); }
.stat .lbl { font-size: 13px; color: var(--ink-3); }

/* ---------- pills & tags ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #EEF1F7; color: var(--navy-2); white-space: nowrap; }
.pill.ok { background: #E5F1E8; color: var(--ok); }
.pill.warn { background: #FBF0DA; color: var(--warn); }
.pill.bad { background: #F7E3E3; color: var(--bad); }
.pill.gold { background: var(--gold-soft); color: #7A5A1C; }
.pill.grey { background: #EFEDE7; color: var(--ink-3); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.disc-code { font-weight: 800; letter-spacing: .02em; }
.disc-code .D { color: var(--d); } .disc-code .I { color: var(--i); } .disc-code .S { color: var(--s); } .disc-code .C { color: var(--c); } .disc-code .sep { color: #B9B3A3; }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font: 500 11.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr.click { cursor: pointer; }
.table td.nowrap, .table th.nowrap { white-space: nowrap; }
.table tr.click:hover td { background: #FBF8F0; }
.table-wrap { overflow-x: auto; }

/* ---------- app shell (HR + admin) ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--navy-deep); color: #C9D3E6; padding: 22px 16px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.side .brand { color: #fff; padding: 2px 8px 22px; }
.side .brand img.logo { height: 52px; }
.side .company { margin: 0 4px 18px; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .06); display: flex; gap: 10px; align-items: center; }
.side .company .logo { width: 36px; height: 36px; border-radius: 9px; background: #fff; display: grid; place-items: center; overflow: hidden; color: var(--navy); font-weight: 800; flex: none; }
.side .company .logo img { width: 100%; height: 100%; object-fit: contain; }
.side .company b { color: #fff; font-size: 13.5px; display: block; line-height: 1.25; }
.side .company span { font-size: 11.5px; color: #97A6C2; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: #C9D3E6; font-weight: 500; font-size: 14.5px; text-decoration: none; margin-bottom: 2px; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: rgba(201, 162, 78, .16); color: #F4E2B5; }
.nav a svg { width: 18px; height: 18px; opacity: .9; }
.side .foot { margin-top: auto; font-size: 12px; color: #7F8FAE; padding: 0 8px; }
.side .foot .me { color: #E3E9F5; font-weight: 600; font-size: 13.5px; }
.main { padding: 28px 36px 60px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 27px; font-weight: 800; letter-spacing: -.025em; }
.page-head .sub { color: var(--ink-3); margin-top: 4px; }
.mtop { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .mtop { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; background: var(--navy-deep); color: #fff; padding: 10px 14px; }
  .mtop .brand { color: #fff; } .mtop .brand img { width: 30px; height: 30px; } .mtop .brand b { font-size: 17px; }
  .mtop button { background: rgba(255,255,255,.08); border: 0; color: #fff; width: 40px; height: 40px; border-radius: 10px; font-size: 20px; cursor: pointer; }
  .side { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: 270px; height: 100%; transform: translateX(-100%); transition: transform .22s ease; overflow-y: auto; }
  body.nav-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(6, 26, 58, .45); }
  .main { padding: 18px 14px 50px; }
  .page-head { margin-bottom: 16px; }
  .page-head h1 { font-size: 22px; }
  .page-head .row { flex-wrap: wrap; }
  .card { padding: 16px; }
  .stat .num { font-size: 26px; }
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tabs button { white-space: nowrap; padding: 10px 12px; font-size: 14px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr !important; }
  .copybox { min-width: 0 !important; }
  input, select, textarea { font-size: 16px; } /* stops iPhone zooming into fields */
}
/* tables that turn into cards on phones: add class "cards" + data-label on each <td> */
@media (max-width: 700px) {
  .table.cards thead { display: none; }
  .table.cards, .table.cards tbody, .table.cards tr, .table.cards td { display: block; width: 100%; }
  .table.cards tr { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 8px 12px; background: #fff; }
  .table.cards td { border: 0; padding: 5px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table.cards td::before { content: attr(data-label); font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); text-align: left; padding-top: 3px; flex: none; }
  .table.cards td:first-child { display: block; text-align: left; font-size: 15px; border-bottom: 1px solid var(--line-2); padding-bottom: 8px; margin-bottom: 4px; }
  .table.cards td:first-child::before { display: none; }
  .table.cards td:empty { display: none; }
}

/* ---------- modal & toast ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(6, 26, 58, .45); display: grid; place-items: center; z-index: 50; padding: 20px; backdrop-filter: blur(2px); }
.modal { background: var(--paper); border-radius: 18px; width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: 26px; box-shadow: 0 30px 80px rgba(6, 26, 58, .3); }
.modal h2 { font-size: 21px; margin-bottom: 6px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; }
#toast div { background: var(--navy-deep); color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow); animation: pop .2s ease; }
#toast div.err { background: var(--bad); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }

.empty { text-align: center; padding: 50px 20px; color: var(--ink-3); }
.empty svg { width: 46px; height: 46px; color: var(--gold); margin-bottom: 8px; }
.copybox { display: flex; gap: 8px; align-items: center; background: #fff; border: 1px dashed #D6CDB4; border-radius: 10px; padding: 6px 6px 6px 12px; font: 13px var(--mono); color: var(--navy-2); }
.copybox span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tabs button { background: none; border: none; padding: 11px 16px; font: 600 14.5px var(--sans); color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: var(--navy); border-bottom-color: var(--gold); }
.bar { height: 8px; border-radius: 99px; background: #ECE7DA; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--gold-grad); border-radius: 99px; }
.spinner { width: 22px; height: 22px; border: 3px solid #E5DFCF; border-top-color: var(--navy); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- AI interview ---------- */
.ov-card { background: linear-gradient(160deg, #FFFFFF, #F1F5FD); border: 1.5px solid #C9D6EE; box-shadow: 0 16px 40px rgba(11, 42, 91, .08); }
.ai-card { background: linear-gradient(160deg, #FFFDF8, #F3ECDA); border-color: #E3D3A8; }
.ai-box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--ink-2); }
.ai-box b { color: var(--ink); display: block; margin-bottom: 4px; }
.ai-box ul, .ai-box ol { margin: 4px 0 0; padding-left: 18px; } .ai-box li { margin-bottom: 3px; } .ai-box p { margin: 0; }
.ai-box.ok { border-left: 3px solid var(--ok); } .ai-box.warn { border-left: 3px solid var(--warn); }
.ai-reason { background: #FBF6E9; border-left: 3px solid var(--gold); border-radius: 0 10px 10px 0; padding: 10px 12px; margin: 10px 0; font-size: 14px; color: var(--ink-2); }
.ai-reason .q { margin-top: 6px; font-style: italic; color: var(--ink-3); }
.transcript { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; color: var(--ink-2); }

/* ---------- DISC report ---------- */
.report { --rp: 26px; }
.report .card { padding: var(--rp); }
.report .hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.report .hero h1 { font-size: 40px; font-weight: 800; letter-spacing: -.02em; text-transform: uppercase; margin: 6px 0 2px; }
.report .bigcode { font-size: 76px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.report .label { font: 500 12.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.report .disc-letters { font-size: 30px; font-weight: 800; letter-spacing: .18em; margin-top: 10px; }
.report .chart-card h4 { font-size: 16.5px; font-weight: 700; }
.report .chart-card .label { font-size: 11px; }
.report .chart-card svg { width: 100%; height: auto; display: block; margin: 8px 0; }
.report .three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-radius: 10px; overflow: hidden; }
.report .three > div { padding: 14px; }
.report .three ul { margin: 8px 0 0; padding: 0; list-style: none; font-size: 13px; }
.report .three li { padding: 3px 0; }
.report .three li::before { content: '– '; color: var(--ink-3); }
.report .raw td, .report .raw th { padding: 9px 8px; font-family: var(--mono); font-size: 13px; }
.report .raw td:not(:first-child), .report .raw th:not(:first-child) { text-align: center; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
@media (max-width: 900px) { .report .hero, .report .three { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .report { --rp: 16px; }
  .report .hero h1 { font-size: 28px; }
  .report .bigcode { font-size: 56px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles > div { padding: 12px !important; }
  .report h1 { word-break: break-word; }
}
.modal { width: min(560px, 100%); }
@media (max-width: 600px) { .modal-back { padding: 10px; align-items: end; } .modal { padding: 20px; border-radius: 18px 18px 12px 12px; } .modal .actions { flex-wrap: wrap; } .modal .actions .btn { flex: 1; } }

/* ---------- compact A4 print document ---------- */
#printDoc { display: none; }
.pd { font-family: var(--sans); color: #111827; font-size: 9.6pt; line-height: 1.4; }
.pd p { margin: 0 0 4px; }
.pd-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--navy); padding-bottom: 6px; }
.pd-co { display: flex; gap: 8px; align-items: center; } .pd-co img { height: 30px; max-width: 90px; object-fit: contain; }
.pd-co b { display: block; font-size: 11pt; } .pd-co span { font-size: 8pt; color: #6B7280; }
.pd-brand { display: flex; align-items: center; gap: 6px; font-size: 7.5pt; color: #6B7280; } .pd-brand img { width: 18px; height: 18px; }
.pd-id { display: flex; justify-content: space-between; align-items: flex-end; margin: 10px 0 8px; }
.pd-id h1 { font-size: 18pt; font-weight: 800; letter-spacing: -.01em; text-transform: uppercase; margin: 0; }
.pd-meta { font-size: 8.5pt; color: #4B5563; }
.pd-scores { display: grid; gap: 6px; margin-bottom: 8px; }
.pd-score { border: 1px solid #E5E0D2; border-radius: 6px; padding: 6px 8px; background: #FCFAF4; }
.pd-l { font: 600 7pt var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #8A6D2B; margin-bottom: 2px; }
.pd-big { font-size: 15pt; font-weight: 800; color: var(--navy); line-height: 1.15; } .pd-big small { font-size: 8pt; }
.pd-s { font-size: 7.5pt; color: #6B7280; font-weight: 400; }
.pd-sec { margin-top: 8px; break-inside: avoid; page-break-inside: avoid; }
.pd-sec h3 { font-size: 10.5pt; font-weight: 800; color: var(--navy); border-bottom: 1px solid #E5E0D2; padding-bottom: 2px; margin: 0 0 5px; }
.pd-list { margin: 2px 0 4px; padding-left: 15px; } .pd-list li { margin-bottom: 1px; }
.pd-disc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pd-chart { border: 1px solid #E5E0D2; border-radius: 6px; padding: 4px 6px; }
.pd-chart svg { width: 100%; height: 108px; } .pd-c { font-size: 10pt; } .pd-c span { font-size: 7.5pt; color: #4B5563; }
.pd-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.pd-bar { display: grid; grid-template-columns: 90px 1fr 34px; gap: 6px; align-items: center; font-size: 8.5pt; margin: 2px 0; }
.pd-bar i { height: 6px; background: #EEE9DC; border-radius: 9px; overflow: hidden; } .pd-bar i b { display: block; height: 100%; background: var(--navy); }
.pd-bar em { font-style: normal; font-family: var(--mono); font-size: 8pt; text-align: right; }
.pd-t { width: 100%; border-collapse: collapse; font-size: 8.5pt; }
.pd-t td, .pd-t th { padding: 2.5px 4px; border-bottom: 1px solid #EFEBE0; text-align: left; vertical-align: top; }
.pd-t th { font: 600 7pt var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #6B7280; }
.pd-mp td:first-child { width: 34%; } .pd-mp td:nth-child(2) { width: 22%; }
.pd-num { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.pd-num div { border: 1px solid #E5E0D2; border-radius: 6px; padding: 4px 6px; }
.pd-num b { font-size: 13pt; color: var(--navy); display: block; } .pd-num span { display: block; font-size: 7.5pt; font-weight: 600; } .pd-num em { font-style: normal; font-size: 7pt; color: #6B7280; }
.pd-rec { display: flex; gap: 12px; align-items: center; margin-bottom: 5px; } .pd-rec b { background: #E5F1E8; color: #2F6B45; border-radius: 99px; padding: 3px 12px; font-size: 10.5pt; } .pd-rec span { font-size: 9pt; color: #4B5563; }
.pd-three td { width: 33.3%; font-size: 8pt; } .pd-three b { font-size: 8.5pt; }
.pd-raw td, .pd-raw th { text-align: center; font-family: var(--mono); font-size: 8pt; } .pd-raw td:first-child, .pd-raw th:first-child { text-align: left; font-family: var(--sans); }
.pd-curve svg { width: 100%; height: 120px; }
.pd-quote { font-style: italic; color: #6B7280; margin-top: 2px; }
.pd-mp td:nth-child(3) { width: 44%; }
.pd-sec table { break-inside: auto; } .pd-t tr { break-inside: avoid; page-break-inside: avoid; }
@media print { .pd-break { break-before: page; page-break-before: always; } .pd-sec { break-inside: auto; page-break-inside: auto; } .pd-sec h3 { break-after: avoid; } }
.pd-foot { margin-top: 10px; border-top: 1px solid #E5E0D2; padding-top: 5px; font-size: 7pt; color: #9CA3AF; }

/* ---------- print ---------- */
@page { size: A4; margin: 11mm 12mm; }
@media print {
  body.printing > *:not(#printDoc) { display: none !important; }
  body.printing #printDoc { display: block !important; }
  body.printing { background: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media print {
  body { background: #fff; }
  .side, .no-print, .tabs, #toast { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
  .report .chart-card { break-inside: avoid; }
}
