/* Intake UI kit: the structure every brand shares. Layout only, no colour: each brand's kit.css draws the look from
   its own tokens. The frame is fixed: the page never scrolls; panels scroll inside. One control height. */

:root { --ik-control-h: 32px; }

html, body { margin: 0; height: 100%; overflow: hidden; }
body { min-width: 1280px; }
* { box-sizing: border-box; }

.ik-app { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.ik-header { flex: none; display: flex; align-items: center; gap: 16px; position: relative; z-index: 5; }
.ik-brand { flex: none; display: flex; align-items: center; gap: 10px; text-decoration: none; }
.ik-brand img { display: block; }
.ik-nav { display: flex; align-items: center; gap: 4px; }
.ik-spacer { flex: 1 1 auto; }
.ik-who { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.ik-who form { margin: 0; }
.ik-main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }

.ik-page { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.ik-head { flex: none; }
.ik-titlerow { display: flex; align-items: center; gap: 16px; min-height: var(--ik-control-h); }
.ik-title { margin: 0; flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ik-actions { flex: none; display: flex; align-items: center; gap: 8px; }
.ik-actions form { margin: 0; display: flex; gap: 8px; align-items: center; }
.ik-blurb { margin: 4px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ik-tabs { display: flex; align-items: center; gap: 2px; }
.ik-tab { display: inline-flex; align-items: center; gap: 6px; height: var(--ik-control-h); white-space: nowrap; text-decoration: none; cursor: pointer; }
.ik-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }

.ik-body { flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 14px; }
.ik-row { flex: 1 1 auto; min-height: 0; display: flex; gap: 14px; }
.ik-row.fit { flex: none; }
.ik-col { min-height: 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.ik-grow { flex: 1 1 0; min-width: 0; min-height: 0; }
.ik-w-sm { flex: 0 0 300px; }
.ik-w-md { flex: 0 0 380px; }
.ik-w-lg { flex: 0 0 480px; }
.ik-w-xl { flex: 0 0 560px; }

.ik-panel { display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.ik-panel.grow { flex: 1 1 0; }
.ik-panel.fit { flex: none; }
.ik-panel-head { flex: none; display: flex; align-items: center; gap: 10px; min-height: 44px; }
.ik-panel-title { margin: 0; flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ik-panel-tools { flex: none; display: flex; align-items: center; gap: 8px; }
.ik-panel-tools form { margin: 0; display: flex; gap: 8px; align-items: center; }
.ik-panel-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
.ik-panel-body.flush { padding: 0; }
.ik-panel-body.fixed { overflow: hidden; }

.ik-stats { flex: none; display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 12px; }
.ik-stat { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ik-stat > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ik-badge { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ik-badges { display: flex; flex-wrap: wrap; gap: 4px; }

.ik-btn { height: var(--ik-control-h); display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; white-space: nowrap; cursor: pointer; text-decoration: none; }
.ik-btn:disabled { cursor: default; opacity: .5; }
.ik-input, .ik-select, .ik-file { height: var(--ik-control-h); min-width: 0; padding: 0 10px; }
.ik-file { padding: 0 4px; display: inline-flex; align-items: center; }
.ik-file::file-selector-button { height: calc(var(--ik-control-h) - 8px); }
.ik-textarea { min-width: 0; width: 100%; resize: none; padding: 7px 10px; }
.ik-form { display: flex; flex-direction: column; gap: 10px; }
.ik-form-row { display: flex; gap: 8px; align-items: flex-end; }
.ik-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ik-field > span { white-space: nowrap; }

.ik-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.ik-table th { position: sticky; top: 0; z-index: 1; text-align: left; white-space: nowrap; }
.ik-table td, .ik-table th { vertical-align: top; }
.ik-table td.num, .ik-table th.num { text-align: right; white-space: nowrap; }
.ik-table td.nowrap { white-space: nowrap; }
.ik-table td.tight, .ik-table th.tight { width: 1%; white-space: nowrap; }
.ik-table tr.ik-group td { position: sticky; top: 33px; z-index: 0; }
.ik-cell-title { display: block; }
.ik-cell-sub { display: block; }
a.ik-rowlink { color: inherit; text-decoration: none; display: block; }

.ik-list { display: flex; flex-direction: column; }
.ik-list-item { display: flex; align-items: flex-start; gap: 10px; text-decoration: none; color: inherit; }
.ik-list-item > div { min-width: 0; flex: 1 1 auto; }
.ik-list-title, .ik-list-sub { display: block; overflow: hidden; text-overflow: ellipsis; }
.ik-list-title { white-space: nowrap; }
.ik-list-end { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

.ik-checks { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ik-check { display: flex; gap: 9px; align-items: flex-start; }
.ik-check-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: 6px; }

.ik-thread { display: flex; flex-direction: column; gap: 10px; }
.ik-msg { max-width: 88%; }
.ik-msg.client { align-self: flex-start; }
.ik-msg.team { align-self: flex-end; }
.ik-msg.reply { margin-left: 24px; }
.ik-msg-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ik-msg-text { margin: 4px 0 0; white-space: pre-wrap; }

.ik-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.ik-kv dt, .ik-kv dd { margin: 0; min-width: 0; }

.ik-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 28px 20px; }
.ik-pre { white-space: pre-wrap; margin: 0; }
.ik-section + .ik-section { margin-top: 16px; }
.ik-section > h3 { margin: 0 0 8px; }
.ik-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.ik-chip { display: inline-flex; align-items: center; white-space: nowrap; }
.ik-scroll-x { overflow-x: auto; }
.ik-clip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Sign-in: one panel in the middle of the frame. */
.ik-signin { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; }
.ik-signin .ik-panel { width: 760px; max-height: 100%; }
.ik-people { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ik-person { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; height: auto; padding: 10px 12px; text-align: left; cursor: pointer; }

/* Intake UI kit in Hubshape's look: the Hubshape for Vos tokens (hubshape-vos-globals.css, loaded first). The rules
   follow its app-header, page-header, page-tabs, card, stat, badge, btn, input and table rules: asphalt chrome, paper
   ground, ink text, gold for the one accent, the alert red for the dots. Every colour is one of its tokens. */

body { font: 400 13px/1.45 var(--font); color: var(--ink); background: var(--paper); }

/* ---- the frame: the asphalt header ------------------------------------------------------------- */
.ik-header { height: 52px; padding: 0 16px 0 18px; background: var(--asphalt); color: var(--chrome-text); }
.ik-brand { width: 228px; color: var(--chrome-text); }
.ik-brand img { height: 22px; width: auto; }
.ik-brand-rule { width: 1px; height: 20px; background: var(--chrome-3); }
.ik-brand-sub { font: 600 13px var(--font); color: var(--chrome-muted); }
.ik-nav { gap: 2px; }
.ik-navlink { height: var(--ik-control-h); display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: var(--radius); color: var(--chrome-muted); text-decoration: none; font-size: 13px; font-weight: 500; position: relative; }
.ik-navlink:hover { background: var(--chrome-2); color: var(--chrome-text); }
.ik-navlink[aria-current="page"] { background: var(--chrome-3); color: var(--chrome-text); }
.ik-navlink[aria-current="page"]::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -10px; height: 3px; border-radius: 2px; background: var(--marking); }
.ik-who { font-size: 12px; color: var(--chrome-muted); }
.ik-who b { color: var(--chrome-text); font-weight: 600; }
.ik-hbtn { height: var(--ik-control-h); display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border-radius: var(--radius); border: 1px solid var(--chrome-3); background: transparent; color: var(--chrome-text); cursor: pointer; text-decoration: none; font: 400 12.5px var(--font); }
.ik-hbtn:hover { background: var(--chrome-2); }
.ik-header .ik-select { width: 230px; background-color: var(--chrome-2); border-color: var(--chrome-3); color: var(--chrome-text); font-weight: 600; }
.ik-header .ik-select option { background: var(--surface); color: var(--ink); }

/* ---- the page header and its tabs --------------------------------------------------------------- */
.ik-head { padding: 18px 24px 0; }
.ik-eyebrow { font-size: 12px; color: var(--muted); margin-bottom: 6px; display: flex; gap: 10px; align-items: center; }
.ik-eyebrow b { color: var(--mustard); font-weight: 600; }
.ik-rule { display: none; }
.ik-title { font: 700 23px/1.15 var(--display); letter-spacing: -0.01em; color: var(--ink); }
.ik-blurb { color: var(--muted); font-size: 13px; }
.ik-tabs { margin-top: 12px; border-bottom: 1px solid var(--line); gap: 2px; }
.ik-tab { height: 36px; padding: 0 12px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ik-tab:hover { color: var(--ink); }
.ik-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.ik-count { font: 500 11px var(--mono); color: var(--muted); background: var(--grey-bg); border-radius: 10px; padding: 1px 6px; }
.ik-dot { background: var(--alert); }
.ik-body { padding: 16px 24px 20px; }

/* ---- cards ------------------------------------------------------------------------------------- */
.ik-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.ik-panel-head { padding: 9px 14px; border-bottom: 1px solid var(--line-soft); min-height: 48px; position: relative; isolation: isolate; background: var(--head-ground); }
.ik-panel-head::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: var(--motif-cells); background-position: right -30px top -10px; opacity: .6; -webkit-mask-image: linear-gradient(90deg, transparent 40%, var(--ink) 100%); mask-image: linear-gradient(90deg, transparent 40%, var(--ink) 100%); }
.ik-panel-title { font: 600 13.5px var(--font); color: var(--ink); }
.ik-panel-title::before { content: ''; display: inline-block; width: 4px; height: 14px; border-radius: 2px; margin-right: 9px; vertical-align: -2px; background: linear-gradient(180deg, var(--gold), var(--mustard)); }
.ik-panel-sub { color: var(--muted); font-size: 12px; white-space: nowrap; }
.ik-panel-body { padding: 14px; }
.ik-section > h3 { font: 600 12.5px var(--font); color: var(--mustard); }

/* ---- stats -------------------------------------------------------------------------------------- */
.ik-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 10px 14px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.ik-stat::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--mustard), var(--gold)); opacity: .55; }
.ik-stat.ok::before { background: var(--green); opacity: .8; }
.ik-stat.warn::before { background: linear-gradient(90deg, var(--gold), var(--marking)); opacity: 1; }
.ik-stat.bad::before { background: var(--red); opacity: .85; }
.ik-stat-label { font-size: 11.5px; color: var(--muted); }
.ik-stat-value { font: 600 20px/1.2 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--ink); }
.ik-stat-note { font-size: 11.5px; color: var(--muted); }

/* ---- badges ------------------------------------------------------------------------------------- */
.ik-badge { height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: var(--grey-bg); color: var(--ink-2); }
.ik-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }
.ik-badge.ok { background: var(--green-bg); color: var(--green); }
.ik-badge.warn { background: var(--amber-bg); color: var(--amber); }
.ik-badge.bad { background: var(--red-bg); color: var(--red); }
.ik-badge.info { background: var(--blue-bg); color: var(--blue); }
.ik-badge.ink { background: var(--asphalt); color: var(--paper); }
.ik-badge.mute { color: var(--muted); }
.ik-chip { font: 500 11px var(--mono); padding: 1px 6px; border-radius: 6px; background: var(--bar); color: var(--ink-2); border: 1px solid var(--line); }

/* ---- controls ------------------------------------------------------------------------------------ */
.ik-btn { border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 500 13px var(--font); }
.ik-btn:hover { background: var(--surface-2); border-color: var(--muted-2); }
.ik-btn.primary { background: var(--asphalt); border-color: var(--asphalt); color: var(--paper); }
.ik-btn.primary:hover { background: var(--chrome-3); }
.ik-btn.bad { color: var(--red); border-color: var(--red-bg); }
.ik-btn.ghost { border-color: transparent; background: transparent; }
.ik-input, .ik-select, .ik-textarea, .ik-file { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: 400 13px var(--font); outline: none; }
.ik-input:focus, .ik-select:focus, .ik-textarea:focus { border-color: var(--ink-2); box-shadow: 0 0 0 3px var(--line-soft); }
.ik-file::file-selector-button { border: 1px solid var(--line); border-radius: 6px; background: var(--bar); color: var(--ink); font: 500 12px var(--font); padding: 0 10px; margin-right: 10px; cursor: pointer; }
.ik-field > span { font-size: 12px; color: var(--muted); }

/* ---- tables -------------------------------------------------------------------------------------- */
.ik-table { font-size: 13px; color: var(--ink); }
.ik-table th { background: var(--head-ground); font-size: 12px; font-weight: 600; color: var(--muted); padding: 9px var(--cell-x); border-bottom: 1px solid var(--head-rule); }
.ik-table td { padding: 8px var(--cell-x); border-bottom: 1px solid var(--line-soft); }
.ik-table td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ik-table tbody tr:nth-child(even) td { background: var(--row-band); }
.ik-table tbody tr:hover td { background: var(--row-hover); }
.ik-table tr.ik-group td { background: var(--bar); font-weight: 600; font-size: 12px; color: var(--mustard); padding: 6px var(--cell-x); }
.ik-table tr.current td { background: var(--cream); }
.ik-cell-title { font-weight: 600; }
.ik-cell-sub { margin-top: 2px; font-size: 12px; color: var(--muted); }
.ik-id { font: 500 11.5px var(--mono); padding: 1px 6px; border-radius: 6px; background: var(--grey-bg); color: var(--ink-2); white-space: nowrap; }

/* ---- lists, checks, threads ------------------------------------------------------------------------ */
.ik-list-item { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); }
.ik-list-item:hover { background: var(--row-hover); }
.ik-list-item[aria-current="true"] { background: var(--cream); box-shadow: inset 3px 0 0 var(--gold); }
.ik-list-title { font-weight: 600; }
.ik-list-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ik-check { font-size: 13px; color: var(--ink-2); }
.ik-check-dot { background: var(--muted-2); }
.ik-check.pass .ik-check-dot { background: var(--green); }
.ik-check.partial .ik-check-dot { background: var(--gold); }
.ik-check.fail .ik-check-dot { background: var(--alert); }
.ik-msg { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 9px 12px; background: var(--surface); }
.ik-msg.team { background: var(--surface-2); border-color: var(--head-rule); }
.ik-msg-head { font-size: 12px; color: var(--muted); }
.ik-msg-head b { color: var(--ink); }
.ik-msg-text { font-size: 13px; color: var(--ink); line-height: 1.5; }
.ik-kv dt { font-size: 12px; color: var(--muted); }
.ik-note { border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--radius); background: var(--surface-2); padding: 9px 12px; font-size: 13px; }
.ik-note.warn { border-left-color: var(--amber); background: var(--amber-bg); }
.ik-note.bad { border-left-color: var(--red); background: var(--red-bg); }
.ik-empty { color: var(--muted); }
.ik-empty b { color: var(--ink); font-weight: 600; font-size: 14px; }
.ik-pre { font: 13px/1.6 var(--mono); color: var(--ink-2); }
.ik-muted { color: var(--muted); }
.ik-mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ik-person { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: 400 12.5px var(--font); }
.ik-person:hover { background: var(--row-hover); border-color: var(--gold); }
.ik-person b { font-weight: 600; font-size: 13.5px; }
