/* 1729 Cost Segregation — shared design system extracted from the frozen UI design */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif&family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --ink-2: #5a5854;
  --ink-3: #8b8983;
  --line: #ece9e2;
  --line-soft: #f2efe9;
  --accent: #2f4a3a;
  --accent-soft: #eaf0e9;
  --gold: #c89a4a;
  --gold-soft: rgba(200,154,74,0.12);
  --warn: #b85c2b;
  --danger: #a83b3b;
}
html, body {
  background: var(--bg);
  font-family: 'Geist', sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01","cv11";
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
.serif { font-family: 'Instrument Serif', serif; font-weight: 400; letter-spacing: -0.01em; }
.mono { font-family: 'Geist Mono', monospace; }

.shell { width: 1440px; max-width: 100%; margin: 0 auto; display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: 256px; background: transparent; padding: 24px 16px;
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  border-right: 1px solid var(--line); flex-shrink: 0;
}
.logo { display: flex; align-items: center; gap: 11px; padding: 4px 10px 28px; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(140deg, #2f4a3a 0%, #1a2e25 100%);
  display: grid; place-items: center; color: #f6f5f2;
  font-family: 'Instrument Serif', serif; font-size: 18px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 4px 10px rgba(47,74,58,0.2);
}
.logo-name { font-weight: 600; font-size: 15px; letter-spacing: -0.015em; }
.logo-sub { font-size: 11px; color: var(--ink-3); letter-spacing: 0.02em; }

.nav-section { margin-bottom: 22px; }
.nav-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3); padding: 8px 12px; font-weight: 500; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px;
  font-size: 13.5px; color: var(--ink-2); cursor: pointer; margin-bottom: 1px;
  transition: all 0.15s ease; text-decoration: none;
}
.nav-item:hover { background: rgba(255,255,255,0.6); color: var(--ink); }
.nav-item.active {
  background: var(--surface); color: var(--ink); font-weight: 500;
  box-shadow: 0 1px 2px rgba(20,20,20,0.04), 0 0 0 1px var(--line);
}
.nav-item svg { width: 16px; height: 16px; stroke-width: 1.6; }
.nav-badge { margin-left: auto; font-size: 10.5px; padding: 1px 7px; border-radius: 999px; font-weight: 500; background: var(--accent); color: #f6f5f2; }
.nav-badge.muted { background: var(--line); color: var(--ink-2); }
.nav-badge.warn { background: var(--gold); color: #fff; }

.sidebar-footer {
  margin-top: auto; padding: 14px; border-radius: 12px; background: var(--surface);
  box-shadow: 0 1px 2px rgba(20,20,20,0.04), 0 0 0 1px var(--line);
  display: flex; align-items: center; gap: 11px;
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #c89a4a, #8b6630);
  color: white; display: grid; place-items: center;
  font-family: 'Instrument Serif', serif; font-size: 17px;
  flex-shrink: 0;
}
.avatar.green { background: linear-gradient(135deg, #4a6b54, #2f4a3a); }
.avatar.slate { background: linear-gradient(135deg, #5a6878, #3b475a); }
.avatar.rose { background: linear-gradient(135deg, #a8675c, #7a4036); }
.user-name { font-size: 13px; font-weight: 500; }
.user-firm { font-size: 11px; color: var(--ink-3); }
.user-chev { margin-left: auto; color: var(--ink-3); }
.portal-switch {
  display: block; padding: 10px 12px; border-radius: 9px; background: var(--bg);
  font-size: 11.5px; color: var(--ink-2); margin-bottom: 8px; border: 1px solid var(--line);
  text-align: center;
}
.portal-switch b { color: var(--ink); }
.portal-switch:hover { background: var(--accent-soft); color: var(--accent); }

/* Main */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 68px; display: flex; align-items: center; padding: 0 36px; gap: 18px;
  background: rgba(246,245,242,0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5;
}
.breadcrumb { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; letter-spacing: 0.01em; }
.breadcrumb b { color: var(--ink); font-weight: 500; }
.breadcrumb a { color: inherit; }
.breadcrumb a:hover { color: var(--accent); }
.search { flex: 1; max-width: 460px; margin-left: 24px; position: relative; }
.search input {
  width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 10px;
  padding: 0 14px 0 38px; font-size: 13px; background: var(--surface); outline: none;
  font-family: inherit; color: var(--ink);
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(47,74,58,0.08); }
.search svg { position: absolute; left: 13px; top: 12px; width: 15px; height: 15px; color: var(--ink-3); }
.search kbd { position: absolute; right: 10px; top: 9px; font-size: 10.5px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 5px; padding: 2px 7px; font-family: 'Geist Mono'; background: var(--bg); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; position: relative; }
.icon-btn svg { width: 16px; height: 16px; color: var(--ink-2); stroke-width: 1.7; }
.icon-btn .dot { position: absolute; top: 9px; right: 9px; width: 7px; height: 7px; background: var(--gold); border-radius: 50%; border: 2px solid var(--surface); }
.btn-primary {
  height: 40px; padding: 0 18px; border-radius: 10px;
  background: linear-gradient(180deg, #36513f 0%, #243a2c 100%);
  color: #f6f5f2; font-size: 13px; font-weight: 500; border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; font-family: inherit;
  box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset, 0 6px 14px rgba(47,74,58,0.18);
  text-decoration: none;
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-secondary {
  height: 40px; padding: 0 18px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); font-size: 13px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; font-family: inherit; text-decoration: none;
}
.btn-secondary:hover { background: var(--bg); }
.btn-ghost {
  height: 36px; padding: 0 14px; border-radius: 9px;
  background: transparent; border: none;
  color: var(--accent); font-size: 13px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; font-family: inherit;
}
.btn-ghost:hover { background: var(--accent-soft); }
.btn-danger {
  height: 40px; padding: 0 18px; border-radius: 10px;
  background: #fff; border: 1px solid #f0d3d3; color: var(--danger);
  font-size: 13px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; font-family: inherit;
}
.btn-danger:hover { background: rgba(168,59,59,0.05); }

.content { padding: 32px 36px 80px; }
.page-title { font-size: 28px; letter-spacing: -0.02em; margin-bottom: 6px; line-height: 1.15; }
.page-title em { font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; color: var(--accent); }
.page-sub { font-size: 14px; color: var(--ink-2); margin-bottom: 28px; }

/* Hero (CP-01) */
.hero { display: grid; grid-template-columns: 1fr 420px; gap: 24px; margin-bottom: 32px; align-items: stretch; }
.hero-left {
  background: var(--surface); border-radius: 18px; padding: 28px 30px;
  box-shadow: 0 1px 2px rgba(20,20,20,0.03), 0 0 0 1px var(--line);
  position: relative; overflow: hidden;
}
.hero-left::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(200,154,74,0.10) 0%, transparent 70%);
  pointer-events: none;
}
.hero-greet { font-size: 13px; color: var(--ink-3); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.hero-greet .pill { background: var(--accent-soft); color: var(--accent); padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 500; }
.hero-title { font-size: 36px; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 6px; }
.hero-title em { font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; color: var(--accent); }
.hero-sub { font-size: 14px; color: var(--ink-2); margin-bottom: 24px; }

.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line-soft); padding-top: 20px; }
.hero-stat { padding-right: 20px; border-right: 1px solid var(--line-soft); }
.hero-stat:last-child { border-right: none; }
.hs-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); margin-bottom: 8px; }
.hs-value { font-size: 26px; letter-spacing: -0.02em; font-weight: 500; }
.hs-value .unit { font-size: 13px; color: var(--ink-3); font-weight: 400; margin-left: 4px; }
.hs-delta { font-size: 12px; color: var(--accent); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.hs-delta.warn { color: var(--warn); }

.hero-right {
  border-radius: 18px; padding: 24px;
  background: linear-gradient(155deg, #2c4536 0%, #1d3025 100%);
  color: #f0ede5; position: relative; overflow: hidden;
  box-shadow: 0 12px 28px rgba(29,48,37,0.22), 0 1px 0 rgba(255,255,255,0.08) inset;
}
.hero-right::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 90% 10%, rgba(200,154,74,0.18), transparent 50%);
}
.hr-content { position: relative; }
.hr-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: rgba(240,237,229,0.6); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.hr-eyebrow .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(200,154,74,0.2); }
.hr-amount { font-size: 42px; letter-spacing: -0.025em; font-weight: 500; line-height: 1; margin-bottom: 4px; }
.hr-caption { font-size: 13px; color: rgba(240,237,229,0.7); margin-bottom: 22px; }
.hr-bar { height: 8px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden; display: flex; }
.hr-bar div { height: 100%; }
.seg-5 { width: 28%; background: #c89a4a; }
.seg-7 { width: 14%; background: #8db381; }
.seg-15 { width: 22%; background: #5a8a6e; }
.seg-39 { width: 36%; background: rgba(255,255,255,0.18); }
.hr-legend { display: flex; gap: 16px; margin-top: 12px; font-size: 11.5px; color: rgba(240,237,229,0.75); flex-wrap: wrap; }
.hr-legend span { display: flex; align-items: center; gap: 6px; }
.hr-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

/* Alert */
.alert {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 24px;
  background: var(--surface); border-radius: 12px;
  box-shadow: 0 0 0 1px var(--line); border-left: 3px solid var(--gold);
}
.alert.info { border-left-color: var(--accent); }
.alert.danger { border-left-color: var(--danger); }
.alert-icon { width: 36px; height: 36px; border-radius: 9px; background: rgba(200,154,74,0.12); display: grid; place-items: center; flex-shrink: 0; }
.alert.info .alert-icon { background: var(--accent-soft); }
.alert.danger .alert-icon { background: rgba(168,59,59,0.10); }
.alert-icon svg { width: 18px; height: 18px; color: var(--gold); }
.alert.info .alert-icon svg { color: var(--accent); }
.alert.danger .alert-icon svg { color: var(--danger); }
.alert-body { flex: 1; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.alert-body b { color: var(--ink); font-weight: 500; }
.alert-cta { font-size: 13px; color: var(--accent); font-weight: 500; cursor: pointer; padding: 6px 12px; border-radius: 8px; }
.alert-cta:hover { background: var(--accent-soft); }

/* Grid */
.grid-main { display: grid; grid-template-columns: 1fr 380px; gap: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.panel {
  background: var(--surface); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(20,20,20,0.03), 0 0 0 1px var(--line);
  overflow: hidden;
}
.panel-head {
  padding: 20px 24px 18px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line-soft); gap: 12px;
}
.panel-head.no-border { border-bottom: none; padding-bottom: 4px; }
.panel-title { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.panel-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.panel-body { padding: 8px 24px 20px; }
.panel-body.dense { padding: 0 24px 20px; }
.panel-body.flush { padding: 0; }

.seg-control { display: flex; gap: 2px; padding: 3px; background: var(--bg); border-radius: 9px; border: 1px solid var(--line); }
.seg-tab { padding: 6px 12px; font-size: 12.5px; color: var(--ink-2); border-radius: 6px; cursor: pointer; font-weight: 500; }
.seg-tab.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(20,20,20,0.05); }
.seg-tab:hover:not(.active) { color: var(--ink); }

/* Studies list (CP-01) */
.study {
  padding: 18px 24px; display: grid;
  grid-template-columns: 1fr 130px 150px 90px 28px;
  gap: 18px; align-items: center;
  border-bottom: 1px solid var(--line-soft); cursor: pointer; transition: background 0.15s;
  text-decoration: none; color: inherit;
}
.study:last-child { border-bottom: none; }
.study:hover { background: #fcfbf8; }
.study-prop { display: flex; gap: 14px; align-items: center; }
.prop-thumb {
  width: 40px; height: 40px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, #e8e2d3, #d4cdba);
  display: grid; place-items: center; color: #8b6630;
  font-family: 'Instrument Serif', serif; font-size: 19px;
}
.prop-thumb.b { background: linear-gradient(135deg, #d8e2dd, #b9c9c0); color: #2f4a3a; }
.prop-thumb.c { background: linear-gradient(135deg, #e6d6d2, #ccb6af); color: #8a4a3b; }
.prop-thumb.d { background: linear-gradient(135deg, #d6dbe6, #b3bcd0); color: #3b4a72; }
.prop-thumb.e { background: linear-gradient(135deg, #e2dde6, #c4bcd2); color: #5e4a72; }
.prop-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.prop-name { font-size: 14px; font-weight: 500; letter-spacing: -0.005em; }
.prop-meta { font-size: 11.5px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.prop-meta .mono { font-family: 'Geist Mono'; }
.dot-sep { width: 3px; height: 3px; background: var(--ink-3); border-radius: 50%; opacity: 0.5; }

.stage { display: flex; flex-direction: column; gap: 6px; }
.stage-name { font-size: 12.5px; font-weight: 500; color: var(--ink); }
.stage-sub { font-size: 11px; color: var(--ink-3); }

.progress-2 { display: flex; flex-direction: column; gap: 6px; }
.pbar { height: 5px; background: var(--line-soft); border-radius: 999px; overflow: hidden; }
.pfill { height: 100%; background: linear-gradient(90deg, #2f4a3a, #4a6b54); border-radius: 999px; }
.pfill.gold { background: linear-gradient(90deg, #c89a4a, #d9b370); }
.pfill.done { background: linear-gradient(90deg, #5a8a6e, #76a888); }
.ptext { font-size: 11px; color: var(--ink-3); font-family: 'Geist Mono'; }

.due-2 { font-family: 'Geist Mono'; font-size: 12px; }
.due-warn-2 { color: var(--warn); }
.due-ok-2 { color: var(--ink-2); }
.due-done { color: var(--accent); }

.row-action-2 { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; }
.study:hover .row-action-2 { background: var(--bg); }
.row-action-2 svg { width: 14px; height: 14px; color: var(--ink-3); }

/* Right column actions */
.right-stack { display: flex; flex-direction: column; gap: 24px; }
.action {
  display: flex; gap: 13px; padding: 14px 0; border-bottom: 1px solid var(--line-soft);
}
.action:last-child { border-bottom: none; }
.a-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.a-icon.sign { background: var(--accent-soft); color: var(--accent); }
.a-icon.dl { background: rgba(200,154,74,0.14); color: #8b6630; }
.a-icon.up { background: #f0ebe2; color: #6b5a3b; }
.a-icon.note { background: rgba(91,138,110,0.12); color: var(--accent); }
.a-icon svg { width: 16px; height: 16px; }
.a-body { flex: 1; min-width: 0; }
.a-title { font-size: 13px; font-weight: 500; letter-spacing: -0.005em; }
.a-desc { font-size: 12px; color: var(--ink-3); margin-top: 3px; line-height: 1.45; }
.a-time { font-size: 10.5px; color: var(--ink-3); margin-top: 5px; opacity: 0.8; }
.a-cta {
  margin-top: 9px; font-size: 12px; font-weight: 500; color: var(--accent);
  padding: 6px 11px; border-radius: 7px; background: var(--accent-soft); display: inline-block; cursor: pointer; text-decoration: none;
}
.a-cta:hover { background: rgba(47,74,58,0.14); }

/* Risk register */
.risk-list { padding: 4px 0; }
.risk-row { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.risk-row:last-child { border-bottom: none; }
.risk-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.risk-prop-name { font-size: 12.5px; font-weight: 500; }
.conf-pill { font-size: 11px; font-family: 'Geist Mono'; padding: 2px 8px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; }
.conf-pill .cdot { width: 6px; height: 6px; border-radius: 50%; }
.conf-low { background: rgba(168,59,59,0.08); color: var(--danger); }
.conf-low .cdot { background: var(--danger); }
.conf-med { background: rgba(184,92,43,0.08); color: var(--warn); }
.conf-med .cdot { background: var(--warn); }
.conf-high { background: rgba(91,138,110,0.10); color: var(--accent); }
.conf-high .cdot { background: var(--accent); }
.risk-text { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.risk-cite-2 { display: inline-block; margin-top: 7px; font-size: 10.5px; font-family: 'Geist Mono'; color: var(--ink-3); padding: 2px 7px; border-radius: 5px; background: var(--bg); border: 1px solid var(--line); }

/* Type badges */
.tbadge { font-size: 10.5px; padding: 2px 8px; border-radius: 999px; font-weight: 500; letter-spacing: 0.01em; display: inline-flex; align-items: center; gap: 5px; }
.t-acq { background: var(--accent-soft); color: var(--accent); }
.t-look { background: rgba(200,154,74,0.12); color: #8b6630; }
.t-risk-aggr { background: rgba(168,59,59,0.10); color: var(--danger); }
.t-risk-mod { background: rgba(184,92,43,0.10); color: var(--warn); }
.t-risk-cons { background: rgba(91,138,110,0.10); color: var(--accent); }

/* Form components */
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.label { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.label .req { color: var(--danger); margin-left: 2px; }
.help { font-size: 11.5px; color: var(--ink-3); margin-top: -2px; }
input.ctrl, select.ctrl, textarea.ctrl {
  height: 40px; padding: 0 14px; font-size: 13px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--ink); outline: none; width: 100%;
}
textarea.ctrl { height: auto; padding: 12px 14px; resize: vertical; min-height: 80px; }
select.ctrl { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%238b8983'><path d='M5 8l5 5 5-5z'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
input.ctrl:focus, select.ctrl:focus, textarea.ctrl:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(47,74,58,0.08); }

/* Drag-and-drop */
.dropzone {
  border: 1.5px dashed var(--line); background: var(--bg);
  border-radius: 14px; padding: 36px 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  transition: all 0.2s; cursor: pointer;
}
.dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .dz-icon { width: 56px; height: 56px; border-radius: 14px; background: var(--surface); display: grid; place-items: center; box-shadow: 0 1px 0 var(--line) inset, 0 0 0 1px var(--line); }
.dropzone .dz-icon svg { width: 22px; height: 22px; color: var(--accent); }
.dz-title { font-size: 16px; font-weight: 500; }
.dz-sub { font-size: 12.5px; color: var(--ink-3); }
.dz-types { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.dz-types span { font-size: 10.5px; font-family: 'Geist Mono'; color: var(--ink-3); padding: 2px 8px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line); }

/* File row */
.file-row {
  display: grid; grid-template-columns: 36px 1fr 110px 110px 28px; gap: 14px; align-items: center;
  padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  margin-bottom: 8px;
}
.file-icon { width: 36px; height: 36px; border-radius: 9px; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent); }
.file-icon svg { width: 16px; height: 16px; }
.file-name { font-size: 13px; font-weight: 500; }
.file-meta { font-size: 11px; color: var(--ink-3); margin-top: 2px; font-family: 'Geist Mono'; }
.file-status { font-size: 11.5px; font-family: 'Geist Mono'; }
.file-status.ok { color: var(--accent); }
.file-status.warn { color: var(--warn); }
.file-status.err { color: var(--danger); }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl thead th {
  text-align: left; font-weight: 500; font-size: 11.5px; color: var(--ink-3);
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  text-transform: uppercase; letter-spacing: 0.06em; background: var(--bg);
}
.tbl tbody td {
  padding: 14px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle;
}
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: #fcfbf8; }
.tbl tbody td.mono { font-family: 'Geist Mono'; font-size: 12.5px; }
.tbl tbody td.right { text-align: right; }
.tbl tbody td.amt { font-family: 'Geist Mono'; font-size: 12.5px; text-align: right; color: var(--ink); }

/* Stat tiles */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-row.three { grid-template-columns: repeat(3, 1fr); }
.stat-tile {
  background: var(--surface); border-radius: 14px; padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(20,20,20,0.03), 0 0 0 1px var(--line);
  position: relative; overflow: hidden;
}
.stat-tile.dark {
  background: linear-gradient(155deg, #2c4536 0%, #1d3025 100%); color: #f0ede5;
}
.stat-tile .label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); margin-bottom: 8px; font-weight: 500; }
.stat-tile.dark .label { color: rgba(240,237,229,0.6); }
.stat-tile .val { font-size: 24px; font-weight: 500; letter-spacing: -0.02em; }
.stat-tile .val .unit { font-size: 12px; color: var(--ink-3); margin-left: 4px; font-weight: 400; }
.stat-tile.dark .val .unit { color: rgba(240,237,229,0.5); }
.stat-tile .delta { font-size: 11.5px; color: var(--accent); margin-top: 4px; }
.stat-tile.dark .delta { color: var(--gold); }

/* Stage chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 500;
  background: var(--bg); border: 1px solid var(--line); color: var(--ink-2);
}
.chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.chip.active { background: var(--accent-soft); color: var(--accent); border-color: rgba(47,74,58,0.2); }
.chip.active i { background: var(--accent); }
.chip.warn { background: rgba(200,154,74,0.10); color: #8b6630; border-color: rgba(200,154,74,0.3); }
.chip.warn i { background: var(--gold); }
.chip.danger { background: rgba(168,59,59,0.10); color: var(--danger); border-color: rgba(168,59,59,0.25); }
.chip.danger i { background: var(--danger); }

/* Workflow tracker */
.wf-track {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 0; padding: 18px 24px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.wf-step { position: relative; padding: 8px 14px 8px 24px; }
.wf-step::before {
  content: ""; position: absolute; left: 6px; top: 14px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--line); border: 2px solid var(--bg);
}
.wf-step.done::before { background: var(--accent); }
.wf-step.current::before { background: var(--gold); box-shadow: 0 0 0 4px rgba(200,154,74,0.18); }
.wf-step::after {
  content: ""; position: absolute; left: 16px; top: 18px; right: -8px; height: 1px; background: var(--line);
}
.wf-step:last-child::after { display: none; }
.wf-step.done::after { background: var(--accent); }
.wf-name { font-size: 11px; font-weight: 500; color: var(--ink-2); }
.wf-step.done .wf-name { color: var(--accent); }
.wf-step.current .wf-name { color: var(--ink); }
.wf-time { font-size: 10.5px; color: var(--ink-3); margin-top: 3px; font-family: 'Geist Mono'; }

/* Cards: AI summary cards (WB-02) */
.queue-card {
  background: var(--surface); border-radius: 14px; padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(20,20,20,0.03), 0 0 0 1px var(--line);
  display: flex; flex-direction: column; gap: 14px; cursor: pointer; transition: all 0.15s; text-decoration: none; color: inherit;
}
.queue-card:hover { box-shadow: 0 6px 14px rgba(20,20,20,0.04), 0 0 0 1px rgba(47,74,58,0.18); }
.qc-head { display: flex; align-items: flex-start; gap: 14px; }
.qc-head .prop-info { flex: 1; }
.qc-meta-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-soft); padding-top: 12px; gap: 12px; }
.qc-meta-grid > div { display: flex; flex-direction: column; gap: 3px; }
.qc-mlabel { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); }
.qc-mval { font-size: 13px; font-weight: 500; font-family: 'Geist Mono'; }

/* Take-off editor */
.editor-shell { display: grid; grid-template-columns: 1fr 460px; gap: 20px; }
.lineitem-tbl { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.lineitem-tbl thead th { padding: 10px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); border-bottom: 1px solid var(--line); background: var(--bg); text-align: left; font-weight: 500; }
.lineitem-tbl tbody td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.lineitem-tbl tbody tr.adjusted { background: rgba(200,154,74,0.05); }
.lineitem-tbl tbody tr:hover { background: #fcfbf8; }
.lineitem-tbl input { border: 1px solid transparent; background: transparent; font-family: 'Geist Mono'; font-size: 12.5px; padding: 4px 6px; border-radius: 6px; width: 100%; }
.lineitem-tbl input:focus { border-color: var(--accent); background: var(--surface); outline: none; }
.lineitem-tbl .ai-flag { display: inline-block; font-size: 9.5px; padding: 1px 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font-family: 'Geist Mono'; margin-left: 6px; }
.lineitem-tbl .adj-flag { display: inline-block; font-size: 9.5px; padding: 1px 6px; border-radius: 4px; background: rgba(200,154,74,0.14); color: #8b6630; font-family: 'Geist Mono'; margin-left: 6px; }
.doc-viewer {
  background: linear-gradient(135deg, #ece8df, #ddd7c5); border-radius: 14px; height: 100%;
  min-height: 540px; display: flex; flex-direction: column;
  box-shadow: 0 0 0 1px var(--line);
}
.dv-head { padding: 12px 16px; border-bottom: 1px solid rgba(0,0,0,0.06); display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-2); }
.dv-body { flex: 1; padding: 24px; display: flex; flex-direction: column; gap: 14px; overflow: auto; }
.dv-page {
  background: var(--surface); border-radius: 8px; padding: 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06); font-family: 'Geist Mono'; font-size: 11px; color: var(--ink-2); line-height: 1.6;
}
.dv-highlight { background: rgba(200,154,74,0.25); padding: 2px 4px; border-radius: 3px; color: var(--ink); }

/* Side-by-side compare */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.compare-grid > div { padding: 18px 22px; }
.compare-grid > div:first-child { border-right: 1px dashed var(--line); }
.compare-h { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); margin-bottom: 12px; font-weight: 500; }
.compare-amt { font-family: 'Geist Mono'; font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.compare-amt.gain { color: var(--accent); }

/* DocuSign envelope */
.envelope {
  border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px;
  display: flex; align-items: center; gap: 14px; margin-bottom: 12px; background: var(--surface);
}
.env-status { font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 500; font-family: 'Geist Mono'; }
.env-status.signed { background: var(--accent-soft); color: var(--accent); }
.env-status.pending { background: rgba(200,154,74,0.14); color: #8b6630; }
.env-status.failed { background: rgba(168,59,59,0.10); color: var(--danger); }

/* Audit trail */
.trail-row {
  display: grid; grid-template-columns: 14px 1fr auto; gap: 14px; padding: 12px 0;
  border-bottom: 1px solid var(--line-soft); align-items: flex-start;
}
.trail-row:last-child { border-bottom: none; }
.trail-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; }
.trail-text { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.trail-text b { color: var(--ink); font-weight: 500; }
.trail-time { font-size: 11px; color: var(--ink-3); font-family: 'Geist Mono'; white-space: nowrap; }

/* Integrations */
.integration-card {
  background: var(--surface); border-radius: 14px; padding: 22px;
  box-shadow: 0 1px 2px rgba(20,20,20,0.03), 0 0 0 1px var(--line);
  display: flex; flex-direction: column; gap: 14px;
}
.int-head { display: flex; align-items: center; gap: 12px; }
.int-logo { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-family: 'Instrument Serif'; font-size: 22px; flex-shrink: 0; }
.int-logo.qbo { background: #d6e9f0; color: #1a607a; }
.int-logo.xero { background: #d6e3f0; color: #1a4f7a; }
.int-logo.netsuite { background: #e9d6e0; color: #7a1a4f; }
.int-logo.docusign { background: #ffe9c8; color: #8b5a18; }
.int-logo.stripe { background: #d8d4ee; color: #4a3aaa; }
.int-name { font-size: 14px; font-weight: 600; }
.int-sub { font-size: 11.5px; color: var(--ink-3); }
.int-status { margin-left: auto; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 6px 0; font-size: 12.5px; border-top: 1px solid var(--line-soft); }
.kv:first-child { border-top: none; }
.kv .k { color: var(--ink-3); }
.kv .v { font-family: 'Geist Mono'; color: var(--ink); }

/* Rule citation pill */
.cite-pill {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-family: 'Geist Mono';
  padding: 2px 8px; border-radius: 5px; background: var(--bg); border: 1px solid var(--line);
  color: var(--ink-2);
}

/* Tabs */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); padding: 0 24px; background: var(--bg); border-top-left-radius: 16px; border-top-right-radius: 16px; }
.tab { padding: 14px 18px; font-size: 13px; color: var(--ink-2); cursor: pointer; border-bottom: 2px solid transparent; font-weight: 500; }
.tab.active { color: var(--ink); border-bottom-color: var(--accent); background: var(--surface); }
.tab:hover:not(.active) { color: var(--ink); }

/* Misc */
.kbd { font-family: 'Geist Mono'; font-size: 10.5px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; background: var(--bg); }
.divider { height: 1px; background: var(--line-soft); margin: 16px 0; }
.muted { color: var(--ink-3); }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.between { justify-content: space-between; }
.center { align-items: center; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-acc { color: var(--accent); }
.text-warn { color: var(--warn); }
.text-danger { color: var(--danger); }
.text-gold { color: var(--gold); }

/* Landing index */
.landing-shell {
  min-height: 100vh; display: grid; place-items: center; padding: 40px 24px;
}
.landing-card {
  background: var(--surface); border-radius: 24px; max-width: 880px; width: 100%;
  padding: 48px; box-shadow: 0 24px 60px rgba(20,20,20,0.06), 0 0 0 1px var(--line);
}
.landing-eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.landing-title { font-size: 44px; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 12px; }
.landing-title em { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; color: var(--accent); }
.landing-sub { font-size: 15px; color: var(--ink-2); margin-bottom: 36px; max-width: 620px; line-height: 1.55; }
.portal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.portal-card {
  border-radius: 16px; padding: 24px; background: var(--bg); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit; transition: all 0.2s;
}
.portal-card:hover { background: var(--accent-soft); border-color: rgba(47,74,58,0.25); transform: translateY(-1px); }
.portal-card .pc-icon { width: 44px; height: 44px; border-radius: 11px; background: var(--surface); display: grid; place-items: center; color: var(--accent); box-shadow: 0 1px 0 var(--line) inset, 0 0 0 1px var(--line); }
.portal-card .pc-name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.portal-card .pc-sub { font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }
.portal-card .pc-roles { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.portal-card .pc-roles span { font-size: 10.5px; padding: 2px 8px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }

/* utility for hidden but available content */
[hidden] { display: none !important; }
