/* WATARI workspace design system. Layout and information architecture follow the Affectrum teardown
   (research/affectrum/reverse_engineering.md §2); colours and type are WATARI's own (site/ brand tokens). */
:root {
  --ink: #0b1f33; --ink-2: #1c3550; --muted: #5d6f83; --faint: #8a99aa; --line: #e2e8ef; --line-2: #eef2f6;
  --paper: #f6f9fb; --surface: #ffffff; --hover: #f4f8fb;
  --navy: #0b1f33; --navy-2: #18466a; --cyan: #16d4e8; --cyan-ink: #0b7f8d; --cyan-soft: #e7fafc; --blue: #3b82f6; --blue-soft: #eaf2ff;
  --red: #c4314b; --red-soft: #fdecef; --red-line: #f3c2cc;
  --amber: #9b5d00; --amber-soft: #fdf4de; --amber-line: #f0d48f;
  --green: #16835b; --green-soft: #e5f4ec; --green-line: #b9e2cc;
  --grey: #5f6f82; --grey-soft: #eef2f6;
  --radius: 12px; --shadow: 0 1px 2px rgba(11, 31, 51, .04), 0 1px 1px rgba(11, 31, 51, .03);
  --font: 'Plus Jakarta Sans', 'Noto Sans JP', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 14px/1.5 var(--font); color: var(--ink); min-height: 100vh;
  background: radial-gradient(1100px 520px at -5% -10%, #dff5fa 0%, rgba(223, 245, 250, 0) 62%), radial-gradient(900px 420px at 105% -15%, #e9eefc 0%, rgba(233, 238, 252, 0) 60%), var(--paper);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 15px; height: 15px; } svg.i.lg { width: 22px; height: 22px; }

/* ---------- shell ---------- */
.topbar { position: sticky; top: 0; z-index: 20; min-height: 64px; display: flex; flex-wrap: wrap; row-gap: 8px; align-items: center; gap: 16px; padding: 8px 24px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--navy), var(--navy-2)); display: grid; place-items: center; }
.brand-name { font-weight: 800; letter-spacing: .04em; line-height: 1.1; } .brand-sub { font-size: 12px; color: var(--muted); }
.nav { display: flex; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.nav a:hover { background: var(--hover); color: var(--ink); }
.nav a.on { background: var(--cyan-soft); color: var(--ink); box-shadow: inset 0 0 0 1px #c6eef3; }
.spacer { flex: 1; }
.demo-pill { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--cyan-ink); background: var(--cyan-soft); border: 1px solid #c6eef3; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.who { text-align: right; line-height: 1.25; flex: none; } .who b, .who span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .who b { font-size: 14px; } .who span { font-size: 12px; color: var(--muted); }
.sheet th:not(:first-child), .sheet td:not(:first-child) { min-width: 52px; padding-left: 5px; padding-right: 5px; }
.who-sel { position: relative; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.who-sel select { appearance: none; border: 1px solid var(--line); border-radius: 10px; padding: 7px 30px 7px 10px; background: #fff; font-size: 13px; cursor: pointer; width: 170px; text-overflow: ellipsis; }
.who-sel::after { content: ''; position: absolute; right: 11px; top: 50%; width: 6px; height: 6px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.tabsbar { position: sticky; top: 64px; z-index: 19; display: flex; align-items: flex-end; gap: 4px; padding: 6px 24px 0; background: rgba(250, 252, 253, .94); border-bottom: 1px solid var(--line); min-height: 42px; overflow-x: auto; }
.tab { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid transparent; border-bottom: none; border-radius: 10px 10px 0 0; color: var(--muted); font-size: 13px; white-space: nowrap; cursor: pointer; }
.tab.on { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: inset 0 2px 0 var(--navy); font-weight: 600; }
.tab .x { border: none; background: none; padding: 0 0 0 2px; color: var(--faint); cursor: pointer; font-size: 15px; line-height: 1; }
.page { max-width: 1480px; margin: 0 auto; padding: 26px 24px 60px; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan-ink); }
h1 { font-size: 28px; line-height: 1.2; margin: 6px 0 6px; letter-spacing: -.01em; }
.subtitle { color: var(--muted); font-size: 15px; margin: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }

/* ---------- buttons & form ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn.primary { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; border-color: var(--navy); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.cyan { background: var(--cyan); border-color: var(--cyan); color: var(--navy); }
.btn.danger { color: var(--red); border-color: var(--red-line); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: not-allowed; filter: none; }
.input, .select { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; width: 100%; }
.select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }
textarea.input { min-height: 90px; resize: vertical; }
label.lbl { font-size: 12px; font-weight: 600; color: var(--muted); display: block; margin-bottom: 4px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); cursor: pointer; }

/* ---------- chips, badges ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 6px 5px 14px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.chip .n { min-width: 24px; text-align: center; border-radius: 999px; padding: 1px 7px; font-size: 12px; background: var(--grey-soft); color: var(--grey); }
.chip.on { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; border-color: var(--navy); }
.chip.on .n { background: rgba(255, 255, 255, .18); color: #fff; }
.n.red { background: var(--red-soft) !important; color: var(--red) !important; } .n.amber { background: var(--amber-soft) !important; color: var(--amber) !important; } .n.green { background: var(--green-soft) !important; color: var(--green) !important; } .n.cyan { background: var(--cyan-soft) !important; color: var(--cyan-ink) !important; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.b-missing { background: var(--red-soft); color: var(--red); border-color: var(--red-line); }
.b-attention { background: var(--amber-soft); color: var(--amber); border-color: var(--amber-line); }
.b-ready { background: var(--green-soft); color: var(--green); border-color: var(--green-line); }
.b-blocked, .b-grey { background: var(--grey-soft); color: var(--grey); border-color: #dde3ea; }
.b-cyan { background: var(--cyan-soft); color: var(--cyan-ink); border-color: #c6eef3; }
.b-blue { background: var(--blue-soft); color: #2459b8; border-color: #cfe0fd; }
.b-outline { background: #fff; color: var(--ink-2); border-color: var(--line); }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 6px; background: var(--grey-soft); color: var(--ink-2); }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line-2); }
.card-h .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.card-h h3 { margin: 0; font-size: 16px; } .card-h p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.card-h .aside { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.card-b { padding: 16px 18px; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; margin: 0 0 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stack > * + * { margin-top: 16px; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12.5px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.link { color: var(--navy-2); font-weight: 600; cursor: pointer; } .link:hover { text-decoration: underline; }

/* ---------- filter bar & table ---------- */
.filterbar { display: grid; grid-template-columns: 2.2fr repeat(5, 1fr); gap: 10px; padding: 12px; margin-bottom: 14px; }
.search { position: relative; } .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search .input { padding-left: 36px; }
.fsel { position: relative; } .fsel svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.fsel .select { padding-left: 32px; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none; }
.tbl th.sort { cursor: pointer; } .tbl th.sort .g { color: var(--faint); margin-left: 4px; } .tbl th.on { color: var(--navy-2); } .tbl th.on .g { color: var(--navy-2); }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr.click { cursor: pointer; } .tbl tbody tr.click:hover td { background: var(--hover); }
.tbl td.edge { padding: 0; width: 4px; } .edge-missing { background: var(--red); } .edge-attention { background: #e8a91c; } .edge-ready { background: var(--green); } .edge-blocked { background: #9aa8b8; }
.person { display: flex; align-items: center; gap: 12px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12.5px; flex: none; background: linear-gradient(135deg, #18466a, #12a5bb); }
.avatar.lg { width: 54px; height: 54px; font-size: 17px; }
.avatar.blocked { background: linear-gradient(135deg, #8a99aa, #b7c2ce); }
.person b { font-weight: 700; } .person .age { color: var(--muted); }
.dots { display: inline-flex; gap: 4px; align-items: center; } .dots i { width: 9px; height: 9px; border-radius: 50%; background: #dbe3eb; display: block; }
.dots i.done { background: #7fa6c4; } .dots i.now { background: var(--navy); box-shadow: 0 0 0 3px #d4e3ee; }
.pct-low { color: var(--red); font-weight: 700; } .pct-ok { color: var(--ink); font-weight: 600; }
.consent-ok { color: var(--navy-2); font-weight: 600; } .consent-warn { color: var(--amber); font-weight: 600; } .consent-bad { color: var(--red); font-weight: 600; }

/* ---------- record ---------- */
.rec-head { background: #fff; border-bottom: 1px solid var(--line); position: relative; }
.rec-head .stripe { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; }
.rec-head .in { max-width: 1480px; margin: 0 auto; padding: 16px 24px 16px 30px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rec-head h2 { margin: 0; font-size: 24px; letter-spacing: -.01em; }
.rec-head .meta { color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.kpis { margin-left: auto; display: flex; gap: 32px; flex-wrap: wrap; }
.kpi .k { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kpi .v { font-weight: 700; font-size: 14px; margin-top: 2px; } .kpi .v.red { color: var(--red); }
.rec { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 26px; max-width: 1480px; margin: 0 auto; padding: 22px 24px 60px; }
.secnav { position: sticky; top: 130px; align-self: start; }
.secnav .back { display: flex; align-items: center; gap: 6px; color: var(--navy-2); font-weight: 600; font-size: 13px; padding: 4px 10px 12px; cursor: pointer; }
.secnav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; margin-bottom: 4px; }
.secnav a:hover { background: var(--hover); }
.secnav a.on { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; box-shadow: 0 4px 12px rgba(11, 31, 51, .18); }
.secnav a .cnt { margin-left: auto; min-width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; font-size: 12px; background: var(--grey-soft); color: var(--grey); }
.secnav a .cnt.red { background: var(--red-soft); color: var(--red); }
.secnav a.on .cnt { background: rgba(255, 255, 255, .2); color: #fff; }
.sec-head { display: flex; align-items: flex-start; gap: 14px; justify-content: space-between; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sec-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 22px; }
.sec-head p { margin: 4px 0 0; color: var(--muted); }
.with-rail { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.kpi-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); position: relative; }
.tile .k { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tile .v { font-size: 28px; font-weight: 800; margin: 6px 0 2px; letter-spacing: -.01em; }
.tile .s { color: var(--muted); font-size: 13px; }
.tile .tic { position: absolute; right: 14px; top: 14px; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; }
.segmented { display: inline-flex; background: var(--grey-soft); border-radius: 10px; padding: 3px; }
.segmented button { border: none; background: transparent; padding: 6px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; cursor: pointer; }
.segmented button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

/* ---------- AI card ---------- */
.ai { border: 1px solid #cdeef3; border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.ai-top { padding: 18px 20px; background: linear-gradient(120deg, #eefbfd 0%, #f2f6ff 100%); border-bottom: 1px solid #ddf1f5; display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.ai-top .eyebrow { display: flex; align-items: center; gap: 8px; }
.ai-top h3 { margin: 6px 0 2px; font-size: 22px; }
.ai-top .meta { color: var(--muted); font-size: 13px; }
.ai-top .acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.ai-body { padding: 18px 20px; }
.ai-body .narr { font-size: 15.5px; line-height: 1.65; margin: 0 0 16px; }
.ai-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ai-col h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14.5px; }
.ai-col.gap h4 { color: var(--red); } .ai-col.str h4 { color: var(--green); } .ai-col.chg h4 { color: #2459b8; }
.ai-col ul { list-style: none; margin: 0; padding: 0; } .ai-col li { border-left: 2px solid var(--line); padding: 2px 0 2px 12px; margin-bottom: 8px; font-size: 14px; color: var(--ink-2); }
.support { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--paper); }
.support .chips { margin: 8px 0 8px; } .support .tag { background: #fff; border: 1px solid var(--line); padding: 2px 10px; border-radius: 999px; }
.edited { background: var(--amber-soft); border: 1px solid var(--amber-line); color: var(--amber); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; margin-bottom: 10px; }

/* ---------- rail ---------- */
.rail > * + * { margin-top: 14px; }
.cat { margin: 14px 16px 6px; border-radius: 10px; padding: 10px 14px; border: 1px solid; }
.cat .k { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; } .cat .v { font-size: 19px; font-weight: 800; }
.cat.missing { background: var(--red-soft); border-color: var(--red-line); color: var(--red); } .cat.attention { background: var(--amber-soft); border-color: var(--amber-line); color: var(--amber); } .cat.ready { background: var(--green-soft); border-color: var(--green-line); color: var(--green); } .cat.blocked { background: var(--grey-soft); border-color: #dde3ea; color: var(--grey); }
.alert { margin: 8px 16px; border: 1px solid var(--line); border-left: 3px solid; border-radius: 8px; padding: 10px 12px; }
.alert.high { border-left-color: var(--red); } .alert.medium { border-left-color: #e8a91c; } .alert.low { border-left-color: #9aa8b8; }
.alert .t { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 13.5px; } .alert .t span { font-weight: 600; color: var(--muted); font-size: 12px; text-transform: capitalize; }
.alert .e { font-size: 13px; color: var(--ink-2); margin-top: 2px; } .alert .src { font-size: 12px; color: var(--muted); margin-top: 4px; }
.mini-h { display: flex; align-items: center; gap: 8px; padding: 14px 16px 6px; font-weight: 700; }
.mini-h .view { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--navy-2); cursor: pointer; }
.mini-b { padding: 4px 16px 14px; }
.bar { height: 6px; border-radius: 999px; background: var(--grey-soft); overflow: hidden; } .bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--navy-2), #12a5bb); border-radius: 999px; }
.gate { border: 1px solid #bfe6ee; background: linear-gradient(180deg, #f3fcfd, #fff); }
.req { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 4px 0; } .req .ok { color: var(--green); } .req .no { color: var(--red); } .req .ns { color: var(--faint); }

/* ---------- score ---------- */
.score { display: grid; grid-template-columns: 190px 1fr; gap: 24px; align-items: center; }
.ring-num { font-size: 44px; font-weight: 800; } .comp { margin-bottom: 14px; } .comp .top { display: flex; justify-content: space-between; font-weight: 600; font-size: 14px; } .comp .bar { margin: 6px 0 4px; height: 8px; } .comp .basis { font-size: 12.5px; color: var(--muted); }
.comp.excl .top { color: var(--faint); }

/* ---------- grids (flowsheet analogue) ---------- */
.sheet { width: 100%; border-collapse: collapse; font-size: 13px; }
.sheet th { font-size: 11px; color: var(--muted); font-weight: 700; padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.sheet th:first-child, .sheet td:first-child { text-align: left; padding-left: 16px; position: sticky; left: 0; background: #fff; min-width: 170px; border-right: 1px solid var(--line-2); }
.sheet th .d { display: block; color: var(--ink); font-size: 12.5px; }
.sheet td { padding: 9px 8px; border-bottom: 1px solid var(--line-2); text-align: center; white-space: nowrap; }
.sheet tr.grp td { background: var(--paper); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan-ink); text-align: left; padding: 8px 16px; }
.sheet tr.grp td:first-child { background: var(--paper); }
.cell-stage { background: var(--cyan-soft); color: var(--cyan-ink); font-weight: 700; } .cell-dec { background: var(--green-soft); color: var(--green); font-weight: 700; } .cell-warn { background: var(--amber-soft); color: var(--amber); font-weight: 700; } .cell-bad { background: var(--red-soft); color: var(--red); font-weight: 700; } .cell-n { color: var(--ink-2); font-weight: 600; }
.scroll-x { overflow-x: auto; }
.evid td, .evid th { text-align: left; }
.st-confirmed { color: var(--green); } .st-proposed { color: var(--cyan-ink); } .st-missing { color: var(--amber); } .st-not_shared { color: var(--faint); }

/* ---------- empty, callout, banner ---------- */
.empty { border: 1.5px dashed var(--line); border-radius: 10px; padding: 26px; text-align: center; color: var(--muted); }
.empty svg { color: var(--faint); margin-bottom: 6px; }
.callout { display: flex; align-items: center; gap: 12px; border: 1px solid var(--amber-line); background: var(--amber-soft); border-radius: 10px; padding: 12px 14px; }
.callout b { display: block; } .callout .s { color: var(--amber); font-size: 13px; }
.banner { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--amber-line); background: var(--amber-soft); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px; }
.banner b { display: block; margin-bottom: 2px; }
.notice { display: flex; gap: 10px; align-items: center; background: var(--cyan-soft); border: 1px solid #c6eef3; border-radius: 10px; padding: 10px 14px; color: var(--ink-2); font-size: 13px; margin-bottom: 14px; }

/* ---------- board & week ---------- */
.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; }
.col-h { display: flex; align-items: center; justify-content: space-between; background: var(--grey-soft); border-radius: 10px; padding: 9px 12px; font-weight: 700; margin-bottom: 4px; }
.col-sub { font-size: 11.5px; color: var(--muted); margin: 0 4px 10px; }
.pcard { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #fff; cursor: pointer; box-shadow: var(--shadow); }
.pcard:hover { box-shadow: 0 4px 14px rgba(11, 31, 51, .08); }
.pcard.missing { background: #fffafa; border-color: var(--red-line); } .pcard.attention { background: #fffdf6; border-color: var(--amber-line); } .pcard.ready { background: #f8fdfa; border-color: var(--green-line); } .pcard.blocked { background: #f7f9fb; }
.pcard .nm { font-weight: 700; font-size: 15px; margin: 6px 0 2px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 12px; overflow-x: auto; }
.day-h { border-radius: 10px; padding: 9px 12px; background: var(--grey-soft); font-weight: 700; margin-bottom: 10px; }
.day-h.today { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; }
.ev { border: 1px solid; border-radius: 12px; padding: 11px 12px; margin-bottom: 10px; cursor: pointer; }
.ev.scheduled { background: #f4f8ff; border-color: #cfe0fd; } .ev.completed { background: #f2fbf6; border-color: var(--green-line); } .ev.no_show { background: #fff4f6; border-color: var(--red-line); }
.ev .tm { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; } .ev .tm span { font-weight: 500; color: var(--muted); }
.ev .nm { font-weight: 700; font-size: 15px; margin: 4px 0 6px; }
.ev .ch { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; } .ev .ch span { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.none { border: 1.5px dashed var(--line); border-radius: 10px; padding: 14px; text-align: center; color: var(--faint); font-size: 13px; }

/* ---------- finance ---------- */
.age { margin-bottom: 14px; } .age .top { display: flex; justify-content: space-between; font-size: 14px; } .age .bar { height: 7px; margin-top: 6px; }

/* ---------- note ---------- */
.note { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; }
.note .row { margin-bottom: 8px; } .note p { margin: 0 0 6px; font-size: 14.5px; }
.pinned { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; }

/* Where a value or a suggestion came from: AI (a person checks it), a fixed check, or a person. Same marks on every screen. */
.mark { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; line-height: 18px; padding: 0 7px; border-radius: 999px; border: 1px solid; white-space: nowrap; vertical-align: middle; }
.mark.ai { background: linear-gradient(120deg, #eefbfd, #eef3ff); color: #2459b8; border-color: #c9dcfb; }
.mark.rule { background: #fff; color: var(--ink-2); border-color: var(--line); }
.mark.person { background: var(--grey-soft); color: var(--grey); border-color: #dde3ea; }
.mark.pending { border-style: dashed; }
.marks { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 12.5px; color: var(--muted); }
.legend span.item { display: inline-flex; gap: 6px; align-items: center; }
.applicant { margin-top: 18px; padding: 12px 12px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.applicant h4 { margin: 0 0 6px; font-size: 11.5px; color: var(--muted); font-weight: 700; letter-spacing: .04em; }
.applicant .nm { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.applicant dl { margin: 0; display: grid; gap: 7px; }
.applicant dt { font-size: 11.5px; color: var(--faint); }
.applicant dd { margin: 1px 0 0; font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.applicant hr { border: 0; border-top: 1px solid var(--line-2); margin: 10px 0; }
.secnav a { cursor: pointer; }
.secnav a .cnt.ok { background: var(--green-soft); color: var(--green); }
.secnav a .frac { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.secnav a .frac + .cnt { margin-left: 6px; }
.secnav a.on .frac { color: rgba(255, 255, 255, .8); }
.group-h { margin: 22px 0 10px; font-weight: 700; font-size: 14.5px; display: flex; gap: 8px; align-items: center; }
.group-h:first-child { margin-top: 0; }
.group-h .hint { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.demo-box { border: 1.5px dashed var(--line); background: transparent; box-shadow: none; }
.sec-bar { width: 120px; }
@media (max-width: 1100px) {
  .secnav { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
  .secnav .back { width: 100%; padding-bottom: 4px; }
  .secnav a { margin: 0; padding: 7px 10px; }
  .applicant { width: 100%; margin-top: 8px; }
  .applicant dl { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
details.more > summary { cursor: pointer; color: var(--navy-2); font-size: 13px; font-weight: 600; margin-top: 4px; }

#toast { position: fixed; bottom: 18px; right: 18px; max-width: 440px; padding: 11px 16px; border-radius: 10px; background: var(--ink); color: #fff; display: none; z-index: 50; box-shadow: 0 8px 24px rgba(11, 31, 51, .25); }
#toast.err { background: var(--red); }
.loading { padding: 60px; text-align: center; color: var(--muted); }
@media (max-width: 1100px) { .with-rail { grid-template-columns: 1fr; } .kpi-tiles { grid-template-columns: repeat(2, 1fr); } .filterbar { grid-template-columns: 1fr 1fr; } .rec { grid-template-columns: 1fr; } .secnav { position: static; } .ai-cols { grid-template-columns: 1fr; } .score { grid-template-columns: 1fr; } .grid2 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .topbar { gap: 10px; padding: 0 12px; overflow-x: auto; } .brand { min-width: 0; } .brand-sub, .who { display: none; } .page, .rec { padding-left: 16px; padding-right: 16px; } .kpis { margin-left: 0; gap: 18px; } }
