/* ==========================================================================
   4TIFY INVESTOR DEMO — STYLES
   Premium enterprise SaaS: white surfaces, charcoal text, lime accents.
   ========================================================================== */

:root {
  --brand: #7bc142;
  --brand-dark: #5c9c2d;
  --brand-light: #eaf6da;
  --ink: #1b1e29;
  --ink-2: #262b3a;
  --ink-3: #333a4d;
  --text: #1f2430;
  --text-mute: #6b7280;
  --text-faint: #9aa1ab;
  --bg: #f4f5f7;
  --card: #ffffff;
  --border: #e6e8ec;
  --border-soft: #eef0f3;
  --red: #e5484d;
  --red-bg: #fdeceb;
  --amber: #dd8c11;
  --amber-bg: #fdf3e0;
  --green: #1f9d5a;
  --green-bg: #e8f7ef;
  --blue: #3f6fe0;
  --blue-bg: #eaf0fd;
  --purple: #8b5cf6;
  --purple-bg: #f1ecfd;
  --grey-bg: #eef0f3;
  --shadow-sm: 0 1px 2px rgba(20, 24, 36, 0.06);
  --shadow-md: 0 4px 16px rgba(20, 24, 36, 0.08);
  --shadow-lg: 0 12px 32px rgba(20, 24, 36, 0.16);
  --radius: 10px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.icon { width: 18px; height: 18px; display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* -------------------------------------------------------------- layout */
#appShell { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px; flex-shrink: 0; background: var(--ink); color: #cfd3dd;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { padding: 20px 18px 12px; }
.brand-logo { width: 132px; display: block; filter: brightness(1.15); }
.nav-list { flex: 1; overflow-y: auto; padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; }
.navitem {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px;
  color: #b7bcc9; font-size: 13.5px; font-weight: 500; transition: background 0.15s, color 0.15s;
}
.navitem .icon { width: 17px; height: 17px; }
.navitem:hover { background: rgba(255,255,255,0.06); color: #fff; }
.navitem.active { background: var(--brand); color: #12210a; font-weight: 700; }
.navitem.active .icon { stroke: #12210a; }
.sidebar-foot { padding: 12px 14px 18px; border-top: 1px solid rgba(255,255,255,0.08); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; flex-shrink: 0; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 20;
}
.topbar-search { position: relative; width: 380px; max-width: 40vw; }
.topbar-search input {
  width: 100%; padding: 9px 14px 9px 38px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg); font-size: 13.5px; color: var(--text); outline: none;
}
.topbar-search input:focus { border-color: var(--brand); background: #fff; }
.topbar-search > .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-faint); }
.search-results {
  position: absolute; top: 42px; left: 0; right: 0; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); max-height: 320px; overflow-y: auto; z-index: 30;
}
.search-results a { display: flex; justify-content: space-between; align-items: center; padding: 9px 14px; font-size: 13px; border-bottom: 1px solid var(--border-soft); }
.search-results a:hover { background: var(--bg); }
.search-results a small { color: var(--text-faint); font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; }
.search-empty { padding: 14px; color: var(--text-faint); font-size: 13px; }

.topbar-right { display: flex; align-items: center; gap: 14px; }
.demo-pill { font-size: 11px; color: var(--text-faint); background: var(--grey-bg); padding: 5px 10px; border-radius: 999px; letter-spacing: 0.02em; }
.icon-btn { background: none; border: none; color: var(--text-mute); padding: 6px; border-radius: 8px; }
.icon-btn:hover { background: var(--bg); }
.topbar-org { display: flex; align-items: center; gap: 9px; }
.topbar-org strong { display: block; font-size: 12.5px; }
.topbar-org small { color: var(--text-faint); font-size: 11px; }

.view-root { flex: 1; padding: 22px 28px 60px; max-width: 1600px; width: 100%; margin: 0 auto; }

/* -------------------------------------------------------------- header */
.page-header { margin-bottom: 18px; }
.page-header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-header h1 { margin: 0 0 3px; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.page-header .subtitle { margin: 0; color: var(--text-mute); font-size: 13.5px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tab { padding: 10px 16px; font-size: 13px; font-weight: 600; color: var(--text-mute); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand-dark); border-bottom-color: var(--brand); }

.breadcrumb { font-size: 12.5px; color: var(--text-faint); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.breadcrumb a:hover { color: var(--brand-dark); }
.bc-sep { color: var(--text-faint); }

/* -------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; border: 1px solid transparent;
  padding: 8px 14px; font-size: 13px; font-weight: 600; white-space: nowrap;
}
.btn .icon { width: 15px; height: 15px; }
.btn-primary { background: var(--brand); color: #14260b; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text-faint); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }
.btn-chip { background: var(--grey-bg); color: var(--text); border: none; padding: 5px 10px; font-size: 11.5px; border-radius: 999px; font-weight: 600; }
.btn-chip.active { background: var(--ink); color: #fff; }
.btn-chip.chip-red { background: var(--red-bg); color: var(--red); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.status-btn-row { display: flex; gap: 6px; flex-wrap: wrap; }

/* -------------------------------------------------------------- kpi grid */
.kpi-grid { display: grid; gap: 12px; margin-bottom: 14px; }
.kpi-grid-5 { grid-template-columns: repeat(5, 1fr); }
.kpi-grid-4 { grid-template-columns: repeat(4, 1fr); }
.kpi-tile {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px;
  display: block; box-shadow: var(--shadow-sm); transition: box-shadow 0.15s, transform 0.15s;
}
a.kpi-tile:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-color: #d8dce3; }
.kpi-label { font-size: 11.5px; color: var(--text-mute); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 6px; }
.kpi-value { font-size: 25px; font-weight: 800; letter-spacing: -0.02em; }
.kpi-sub { font-size: 11.5px; color: var(--text-faint); margin-top: 4px; }
.kpi-sub.sub-amber { color: var(--amber); font-weight: 600; }
.kpi-sub.sub-red { color: var(--red); font-weight: 600; }
.kpi-sub.sub-green { color: var(--green); font-weight: 600; }

/* -------------------------------------------------------------- cards & grids */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 14px; box-shadow: var(--shadow-sm); overflow: hidden; }
.card-head { padding: 14px 18px; border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: space-between; }
.card-head h3 { margin: 0; font-size: 14.5px; font-weight: 700; }
.card-body { padding: 16px 18px; }
.grid-2col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; align-items: start; }
.grid-3col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; align-items: start; }
.span2 { grid-column: span 2; }
.empty-state { color: var(--text-faint); font-size: 13px; padding: 20px 0; text-align: center; }

/* -------------------------------------------------------------- progress */
.pbar { height: 7px; background: var(--grey-bg); border-radius: 999px; overflow: hidden; flex: 1; }
.pbar-fill { height: 100%; background: var(--brand); border-radius: 999px; transition: width 0.4s ease; }
.prog-row { margin-bottom: 12px; }
.prog-row:last-child { margin-bottom: 0; }
.prog-row-label { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; }
.prog-row-label a:hover { color: var(--brand-dark); }
.tc-progress { display: flex; align-items: center; gap: 8px; }
.tc-progress .pct { font-size: 11.5px; color: var(--text-mute); width: 32px; text-align: right; flex-shrink: 0; }

/* -------------------------------------------------------------- badges */
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.01em; white-space: nowrap; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-purple { background: var(--purple-bg); color: var(--purple); }
.badge-grey { background: var(--grey-bg); color: var(--text-mute); }

/* -------------------------------------------------------------- avatars / people */
.avatar {
  width: 26px; height: 26px; border-radius: 999px; background: var(--ink-3); color: #fff; font-size: 10.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.person-line { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; }
.person-line small { display: block; color: var(--text-faint); font-size: 10.5px; font-weight: 500; }

/* -------------------------------------------------------------- insights / activity */
.insight-card { display: flex; align-items: center; gap: 10px; padding: 11px 4px; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.insight-card:last-child { border-bottom: none; }
.insight-card .icon:first-child { color: var(--brand-dark); flex-shrink: 0; }
.insight-card span { flex: 1; }
.insight-card .chev { width: 14px; height: 14px; color: var(--text-faint); }
.insight-card:hover { color: var(--brand-dark); }

.activity-list, .critical-list, .crit-list, .policy-list, .history-list, .highlight-list { list-style: none; margin: 0; padding: 0; }
.activity-list li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-soft); align-items: flex-start; }
.activity-list li:last-child { border-bottom: none; }
.act-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--blue); margin-top: 5px; flex-shrink: 0; }
.act-dot.act-task { background: var(--blue); } .act-dot.act-ai { background: var(--purple); } .act-dot.act-approval { background: var(--green); }
.act-dot.act-change { background: var(--amber); } .act-dot.act-flow { background: var(--brand-dark); } .act-dot.act-craid { background: var(--red); } .act-dot.act-system { background: var(--text-faint); }
.act-text { font-size: 12.5px; }
.act-time { font-size: 11px; color: var(--text-faint); margin-top: 2px; }

.critical-list li a { display: flex; gap: 10px; align-items: flex-start; padding: 9px 4px; border-bottom: 1px solid var(--border-soft); }
.critical-list li:last-child a { border-bottom: none; }
.critical-list li a:hover { color: var(--brand-dark); }
.sev { font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 5px; flex-shrink: 0; margin-top: 2px; }
.sev-High { background: var(--red-bg); color: var(--red); } .sev-Medium { background: var(--amber-bg); color: var(--amber); }
.ci-text { font-size: 12.5px; font-weight: 600; } .ci-sub { font-size: 11.5px; color: var(--text-faint); }

.crit-list li { padding: 5px 0 5px 16px; position: relative; font-size: 13px; }
.crit-list li::before { content: ""; position: absolute; left: 0; top: 12px; width: 5px; height: 5px; border-radius: 999px; background: var(--brand); }

/* -------------------------------------------------------------- kv grid */
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; font-size: 12.5px; margin: 10px 0; }
.kv-grid-2 { grid-template-columns: 1fr 1fr; }
.kv-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.kv-grid > div > span { display: block; color: var(--text-faint); font-size: 11px; text-transform: uppercase; letter-spacing: 0.02em; margin-bottom: 3px; }
.label-line { font-size: 13px; margin: 10px 0; }

/* -------------------------------------------------------------- tree / roadmap */
.roadmap-tree { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.tree-row {
  display: grid; grid-template-columns: 26px minmax(260px, 2.4fr) 1.1fr 0.9fr 1.1fr 0.9fr 1.2fr;
  align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--border-soft); font-size: 12.5px;
}
.tree-row.highlight { background: var(--brand-light); }
.tree-header { background: var(--bg); font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); }
.tree-chevron { background: none; border: none; color: var(--text-faint); padding: 2px; border-radius: 4px; display: flex; }
.tree-chevron .icon { transition: transform 0.15s; }
.tree-chevron.open .icon { transform: rotate(90deg); }
.tree-chevron-spacer { display: inline-block; width: 18px; }
.tree-type { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: 0.05em; color: var(--text-faint); margin-bottom: 1px; }
.tc-title a { font-weight: 600; }
.tc-title a:hover { color: var(--brand-dark); }
.tc-title strong { font-weight: 700; }
.tc-title small { display: block; color: var(--text-faint); font-size: 11px; margin-top: 1px; }
.level-0 { background: #fbfbfa; font-size: 13.5px; }
.level-1 .tc-title { padding-left: 0; }
.level-2 .tc-title { padding-left: 14px; }
.level-3 .tc-title { padding-left: 28px; }
.level-4 .tc-title { padding-left: 42px; }
.level-5 .tc-title { padding-left: 56px; }
.tree-children:empty { display: none; }

/* -------------------------------------------------------------- flow board */
.flow-board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; }
.flow-col { min-width: 210px; flex-shrink: 0; }
.flow-col-head { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; color: var(--text-mute); padding: 0 4px 10px; display: flex; justify-content: space-between; }
.flow-col-head .count { background: var(--grey-bg); border-radius: 999px; padding: 1px 7px; font-size: 10.5px; }
.flow-col-body { display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.flow-card { display: block; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow-sm); }
.flow-card:hover { box-shadow: var(--shadow-md); border-color: #d8dce3; }
.flow-card-top { margin-bottom: 6px; }
.flow-card h4 { margin: 0 0 8px; font-size: 12.5px; font-weight: 700; line-height: 1.35; }
.flow-card-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 11px; color: var(--text-faint); }
.flow-empty { color: var(--text-faint); font-size: 12px; padding: 10px 4px; }
.stage-select-wrap select { width: 100%; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--border); font-size: 13px; font-weight: 600; margin-bottom: 10px; background: #fff; }
.pct-note { color: var(--text-faint); font-size: 11.5px; margin: 6px 0 0; }

/* -------------------------------------------------------------- requirement / flow detail table */
.req-table { display: flex; flex-direction: column; }
.req-row { display: grid; grid-template-columns: 90px 2.2fr 50px 130px 110px 110px; gap: 10px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--border-soft); font-size: 12.5px; }
.req-row-head { font-weight: 700; text-transform: uppercase; font-size: 10.5px; letter-spacing: 0.03em; color: var(--text-faint); }
a.req-row:hover { background: var(--bg); }
.req-row small { display: block; color: var(--text-faint); font-size: 11px; }
.flag-dot { display: inline-block; width: 7px; height: 7px; border-radius: 999px; background: var(--red); margin-left: 6px; }

/* -------------------------------------------------------------- drawer / modal */
.overlay { position: fixed; inset: 0; background: rgba(15, 18, 26, 0.45); z-index: 1; }
.drawer-root { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.modal-root { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.modal-root.open, .drawer-root.open { pointer-events: auto; }
.modal-root .overlay, .drawer-root .overlay { opacity: 0; transition: opacity 0.2s; }
.modal-root.open .overlay, .drawer-root.open .overlay { opacity: 1; }
.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -46%); width: 560px; max-width: 92vw;
  max-height: 86vh; overflow-y: auto; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 26px 26px 24px; opacity: 0; transition: opacity 0.2s, transform 0.2s; z-index: 2;
}
.modal-wide { width: 720px; }
.modal-root.open .modal { opacity: 1; transform: translate(-50%, -50%); }
.modal-close { position: absolute; top: 16px; right: 16px; background: var(--grey-bg); border: none; border-radius: 999px; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; color: var(--text-mute); }
.modal h2 { margin: 0 0 4px; font-size: 18px; }
.modal-sub { color: var(--text-mute); font-size: 13px; margin: 0 0 14px; }

.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 480px; max-width: 92vw; background: #fff;
  box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform 0.22s ease; overflow-y: auto;
  padding: 26px 24px 40px; z-index: 2;
}
.drawer-root.open .drawer { transform: translateX(0); }
.drawer-close { position: absolute; top: 16px; right: 16px; background: var(--grey-bg); border: none; border-radius: 999px; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; color: var(--text-mute); }
.drawer-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; padding-right: 34px; }
.drawer-head h2 { margin: 0; font-size: 17px; flex: 1 0 100%; }
.drawer-subhead { font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-faint); margin: 18px 0 8px; font-weight: 700; }
body.no-scroll { overflow: hidden; }

/* -------------------------------------------------------------- alert banner */
.alert-banner { background: var(--red-bg); border: 1px solid #f6c8c8; border-radius: var(--radius); padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0; flex-wrap: wrap; }
.alert-banner > div:first-child { display: flex; gap: 10px; align-items: flex-start; }
.alert-banner .icon { color: var(--red); margin-top: 2px; }
.alert-banner strong { display: block; font-size: 12px; color: var(--red); letter-spacing: 0.02em; }
.alert-banner p { margin: 3px 0 0; font-size: 12.5px; }
.alert-banner.alert-resolved { background: var(--green-bg); border-color: #bfe6cf; }
.alert-banner.alert-resolved .icon { color: var(--green); }
.alert-banner.alert-resolved strong { color: var(--green); }

/* -------------------------------------------------------------- approval chain */
.approval-chain { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.approval-step { display: flex; align-items: center; gap: 6px; background: var(--green-bg); color: var(--green); padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.approval-step .icon { width: 14px; height: 14px; }
.approval-arrow { width: 14px; height: 1px; background: var(--border); }

/* -------------------------------------------------------------- artefacts */
.artefact-list { display: flex; flex-direction: column; gap: 10px; }
.artefact-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; background: var(--bg); }
.artefact-card.empty { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: #fff; }
.artefact-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.artefact-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-mute); margin-bottom: 8px; }
.artefact-content { background: #fff; border: 1px solid var(--border-soft); border-radius: 8px; padding: 12px; font-size: 12.5px; margin-bottom: 8px; }
.artefact-content p { margin: 0 0 8px; } .artefact-content ul { margin: 0; padding-left: 18px; }
.ai-note { font-size: 11.5px; color: var(--purple); display: flex; align-items: center; gap: 6px; margin-top: 8px; }

/* -------------------------------------------------------------- ai processing */
.ai-processing-host { margin-top: 10px; }
.ai-processing { display: flex; align-items: center; gap: 12px; background: var(--purple-bg); border-radius: var(--radius); padding: 14px 16px; }
.ai-spinner { color: var(--purple); animation: spin 1.1s linear infinite; }
.ai-processing-text { font-size: 12.5px; font-weight: 600; color: #5b3fae; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* -------------------------------------------------------------- history */
.history-list li { display: grid; grid-template-columns: 90px 130px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border-soft); font-size: 12px; }
.history-list li span:first-child { color: var(--text-faint); }
.history-list li span:nth-child(2) { font-weight: 600; }
.policy-list li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; font-size: 12.5px; }
.policy-list .icon { flex-shrink: 0; margin-top: 1px; color: var(--green); }
.policy-list li:has(.icon.alert) { color: var(--amber); }

/* -------------------------------------------------------------- kanban */
.kanban { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; align-items: start; overflow-x: auto; }
.kcol { background: #eef0f2; border-radius: var(--radius-lg); padding: 10px; min-height: 200px; min-width: 0; }
.kcol-head { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; color: var(--text-mute); padding: 4px 4px 10px; display: flex; justify-content: space-between; }
.kcol-head .count { background: #fff; border-radius: 999px; padding: 1px 7px; font-size: 10.5px; }
.kcol-body { display: flex; flex-direction: column; gap: 8px; min-height: 60px; border-radius: 8px; transition: background 0.15s; }
.kcol-body.drop-hover { background: var(--brand-light); }
.kcard { background: #fff; border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow-sm); cursor: grab; min-width: 0; }
.kcard.dragging { opacity: 0.4; }
.kcard-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; gap: 6px; flex-wrap: wrap; }
.kcard-top .badge { white-space: normal; text-align: left; line-height: 1.3; }
.kcard h4 { margin: 0 0 8px; font-size: 12px; font-weight: 700; line-height: 1.35; cursor: pointer; }
.kcard h4:hover { color: var(--brand-dark); }
.kcard-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-faint); margin-bottom: 8px; }
.kcard-actions { display: flex; gap: 5px; flex-wrap: wrap; }

/* -------------------------------------------------------------- ledger table */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.select-inline, .input-inline { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); font-size: 12.5px; background: #fff; }
.input-inline { min-width: 220px; }
.ledger-table { display: flex; flex-direction: column; font-size: 12px; }
.ledger-row { display: grid; grid-template-columns: 100px 130px 130px 2fr 110px 80px 150px; gap: 10px; align-items: center; padding: 9px 6px; border-bottom: 1px solid var(--border-soft); }
.ledger-head { font-weight: 700; text-transform: uppercase; font-size: 10px; letter-spacing: 0.03em; color: var(--text-faint); }
a.ledger-row:hover { background: var(--bg); }
.ledger-row small { display: block; color: var(--text-faint); font-size: 10.5px; }
.chip { background: var(--grey-bg); border-radius: 5px; padding: 2px 6px; font-size: 10.5px; margin-right: 3px; }
.table-note { font-size: 11.5px; color: var(--text-faint); margin-top: 10px; }

/* -------------------------------------------------------------- providers / automations */
.provider-row { padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.provider-row:last-child { border-bottom: none; }
.provider-top { display: flex; justify-content: space-between; align-items: center; }
.provider-role { color: var(--text-faint); font-size: 12px; margin: 3px 0 8px; }
.model-list { display: flex; flex-direction: column; gap: 6px; }
.model-row { display: flex; align-items: center; gap: 10px; font-size: 12px; background: var(--bg); padding: 7px 10px; border-radius: 8px; }
.model-row small { color: var(--text-faint); flex: 1; text-align: right; }
.automation-list { display: flex; flex-direction: column; gap: 12px; }
.automation-row { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.automation-top { display: flex; justify-content: space-between; margin-bottom: 6px; }
.automation-row p { margin: 0 0 8px; font-size: 12.5px; color: var(--text-mute); }

/* -------------------------------------------------------------- meetings */
.meeting-layout { display: grid; grid-template-columns: 260px 1fr; gap: 14px; align-items: start; }
.meeting-list { display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 8px; }
.meeting-item { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 8px; position: relative; }
.meeting-item span { font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.meeting-item:hover { background: var(--bg); }
.meeting-item.active { background: var(--brand-light); }
.meeting-detail { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; }
.highlight-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.highlight-list li:last-child { border-bottom: none; }

/* -------------------------------------------------------------- craid / health */
.health-table, .craid-table, .resource-table, .estimation-table { display: flex; flex-direction: column; font-size: 12.5px; }
.health-row { display: grid; grid-template-columns: 2fr 60px 120px 1fr; gap: 10px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--border-soft); }
.health-head { font-weight: 700; font-size: 10.5px; text-transform: uppercase; color: var(--text-faint); }
a.health-row:hover { background: var(--bg); }
.craid-row { display: grid; grid-template-columns: 110px 2fr 60px 90px 120px; gap: 10px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--border-soft); cursor: pointer; }
.craid-row:hover { background: var(--bg); }
.craid-head { font-weight: 700; font-size: 10.5px; text-transform: uppercase; color: var(--text-faint); cursor: default; }
.craid-head:hover { background: none; }
.chip-filter { padding: 5px 11px; border-radius: 999px; background: var(--grey-bg); font-size: 12px; font-weight: 600; }
.chip-filter.active { background: var(--ink); color: #fff; }

/* -------------------------------------------------------------- compliance */
.compliance-note { background: var(--blue-bg); color: var(--blue); font-size: 12px; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 14px; }
.compliance-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.compliance-card { display: flex; gap: 14px; align-items: center; text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow-sm); }
.compliance-card:hover { box-shadow: var(--shadow-md); }
.area-label { font-size: 10.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.03em; }
.compliance-card h4 { margin: 2px 0 6px; font-size: 13px; }
.compliance-ring {
  --pct: 0; width: 56px; height: 56px; border-radius: 999px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: conic-gradient(var(--brand) calc(var(--pct) * 1%), var(--grey-bg) 0); position: relative; font-size: 12px; font-weight: 800;
}
.compliance-ring::before { content: ""; position: absolute; inset: 5px; background: #fff; border-radius: 999px; }
.compliance-ring span { position: relative; }

/* -------------------------------------------------------------- resources */
.resource-row { display: grid; grid-template-columns: 1.4fr 1.4fr 2fr 1.6fr; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--border-soft); align-items: center; }
.resource-head { font-weight: 700; font-size: 10.5px; text-transform: uppercase; color: var(--text-faint); }
.resource-row.conflict { background: var(--red-bg); border-radius: 8px; }
.alloc-bar { height: 8px; background: var(--grey-bg); border-radius: 999px; overflow: hidden; margin-bottom: 4px; }
.alloc-fill { height: 100%; background: var(--brand); }
.alloc-fill.over { background: var(--red); }
.resource-row div:nth-child(3) div { font-size: 11.5px; color: var(--text-mute); }
.opportunity-list { display: flex; flex-direction: column; gap: 8px; }
.opportunity-row { display: flex; align-items: center; gap: 12px; font-size: 12.5px; padding: 9px 10px; background: var(--bg); border-radius: 8px; }
.opportunity-row div:first-child { flex: 1; }

/* -------------------------------------------------------------- adoption */
.maturity-overall { display: flex; align-items: center; gap: 18px; }
.maturity-ring {
  --pct: 0; width: 90px; height: 90px; border-radius: 999px; flex-shrink: 0; display: flex; align-items: baseline; justify-content: center; gap: 2px;
  background: conic-gradient(var(--brand) calc(var(--pct) * 1%), var(--grey-bg) 0); position: relative; font-weight: 800;
}
.maturity-ring::before { content: ""; position: absolute; inset: 7px; background: #fff; border-radius: 999px; }
.maturity-ring span { position: relative; font-size: 24px; } .maturity-ring small { position: relative; color: var(--text-faint); font-size: 12px; }
.maturity-overall p { font-size: 12.5px; color: var(--text-mute); margin: 0; }

/* -------------------------------------------------------------- estimation */
.loop-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.loop-step { background: var(--brand-light); color: var(--brand-dark); font-weight: 700; font-size: 12px; padding: 9px 14px; border-radius: 999px; }
.loop-arrow { color: var(--text-faint); }
.loop-arrow .icon { width: 16px; height: 16px; }
.fin-chart { display: flex; align-items: flex-end; gap: 16px; height: 160px; padding: 0 6px; }
.fin-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; gap: 6px; }
.fin-bars { display: flex; gap: 4px; align-items: flex-end; height: 130px; }
.fin-bar { width: 16px; border-radius: 4px 4px 0 0; }
.fin-cost { background: #c9cedb; }
.fin-benefit { background: var(--brand); }
.fin-year { font-size: 11px; color: var(--text-faint); }
.fin-legend { display: flex; gap: 16px; font-size: 11.5px; color: var(--text-mute); margin-top: 8px; }
.fin-legend .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 5px; }
.sw-cost { background: #c9cedb; } .sw-benefit { background: var(--brand); }
.reco { background: var(--purple-bg); color: #5b3fae; padding: 10px 12px; border-radius: 8px; font-size: 12.5px; margin-top: 10px; }
.est-row { display: grid; grid-template-columns: 2fr 1.3fr 1.3fr 0.8fr 2fr; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--border-soft); align-items: center; }
.est-head { font-weight: 700; font-size: 10.5px; text-transform: uppercase; color: var(--text-faint); }

/* -------------------------------------------------------------- outcomes */
.outcome-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.outcome-card { text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-sm); }
.outcome-card:hover { box-shadow: var(--shadow-md); }
.outcome-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.outcome-top h3 { margin: 0; font-size: 14.5px; }
.outcome-metric { margin-bottom: 8px; } .outcome-metric span { font-size: 24px; font-weight: 800; } .outcome-metric small { color: var(--text-faint); font-size: 12px; }
.roi-line { margin-top: 10px; font-weight: 700; color: var(--brand-dark); font-size: 13px; }

/* -------------------------------------------------------------- invest */
.invest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.invest-card { display: block; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-sm); }
.invest-card:hover { box-shadow: var(--shadow-md); }
.invest-card-top { display: flex; gap: 6px; margin-bottom: 8px; }
.invest-card h3 { margin: 0 0 6px; font-size: 14px; }
.invest-card p { margin: 0 0 10px; font-size: 12.5px; color: var(--text-mute); }
.invest-card-meta { display: flex; gap: 14px; font-size: 12px; font-weight: 600; }
.stage-stepper { display: flex; align-items: center; gap: 0; margin-bottom: 16px; overflow-x: auto; }
.stage-step { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; color: var(--text-faint); flex-shrink: 0; min-width: 92px; text-align: center; }
.stage-step span { width: 26px; height: 26px; border-radius: 999px; background: var(--grey-bg); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--text-mute); }
.stage-step.done span { background: var(--brand); color: #14260b; }
.stage-step.current { color: var(--text); font-weight: 700; }
.stage-line { flex: 1; height: 2px; background: var(--border); margin-bottom: 22px; min-width: 16px; }

/* -------------------------------------------------------------- reports / brief */
.brief-section { margin-bottom: 14px; }
.brief-section h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-faint); margin: 0 0 6px; }
.brief-section ul { margin: 0; padding-left: 18px; font-size: 13px; }
.brief-section p { margin: 0; font-size: 13px; }
.brief-footer { text-align: center; background: var(--brand-light); color: var(--brand-dark); font-weight: 700; padding: 12px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; gap: 8px; }

/* -------------------------------------------------------------- forms */
.form-grid { display: flex; flex-direction: column; gap: 12px; }
.form-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--text-mute); }
.form-grid input, .form-grid select, .form-grid textarea {
  padding: 9px 11px; border-radius: 8px; border: 1px solid var(--border); font-size: 13px; font-family: inherit; color: var(--text); background: #fff;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { outline: none; border-color: var(--brand); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.form-actions-wrap { flex-wrap: wrap; justify-content: flex-end; }

/* -------------------------------------------------------------- toasts */
.toast-host { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 80; }
.toast {
  display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 10px;
  box-shadow: var(--shadow-lg); font-size: 13px; font-weight: 600; max-width: 360px; opacity: 0; transform: translateY(8px); transition: opacity 0.25s, transform 0.25s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast .icon { color: var(--brand); flex-shrink: 0; }
.toast-error .icon { color: var(--red); }

/* -------------------------------------------------------------- responsive (laptop) */
@media (max-width: 1280px) {
  .kpi-grid-5 { grid-template-columns: repeat(3, 1fr); }
  .kpi-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2col, .grid-3col { grid-template-columns: 1fr; }
  .span2 { grid-column: span 1; }
  .kanban { grid-template-columns: repeat(3, 1fr); }
  .meeting-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { width: 72px; }
  .navitem span { display: none; }
  .brand-logo { width: 34px; }
  .kanban { grid-template-columns: repeat(2, 1fr); }
  .topbar-search { width: 220px; }
}
