/* CRM layout, re-implemented from measured computed-style tokens
   (docs/artifacts/00005-capture/notes/tokens.md). Original CSS, Lato (OFL). */
@font-face { font-family: 'Lato'; src: url(fonts/Lato-Regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Lato'; src: url(fonts/Lato-Medium.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Lato'; src: url(fonts/Lato-SemiBold.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Lato'; src: url(fonts/Lato-Bold.woff2) format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --ink: #313949; --ink-h: #202123; --ink-2: #616e88; --ink-3: #8c91ab; --ink-empty: #8b9ab9; --ink-cap: #434d5f;
  --canvas: #eef1f9; --surface: #fff; --row-h: #f5f7fc; --hover: #edf0f9; --menu-h: #f0f4fc; --search-fill: #f6f8fc;
  --line: #dcdbee; --line-row: #edf0f4; --line-tbl: #d9e0eb; --line-tbl-row: #eef1f7; --line-in: #c5c4d3; --line-btn: #d5d8e9; --line-card: #d6d6e3;
  --brand: #5464f2; --chip: #ebedff; --chip-b: #a3acff; --chip-l: #f0f1ff; --stage-on: #eeeffc;
  --nav: #223458; --nav-ink: #c2cbde; --nav-on: #31446f;
  --ok: #12aa67; --ok-fill: #ddf8ec; --ok-b: #8dd8b7; --bad: #f14949; --bad-badge: #ef4c4c; --warn: #c46a0f; --warn-fill: #fdeddd;
  --grad-primary: linear-gradient(#5767f6 4.69%, #124dc3 100%); --grad-default: linear-gradient(#ffffff 0%, #f1f0f7 100%);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 400 14px/18px 'Lato', system-ui, sans-serif; color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
.ic { display: block; flex: none; }
.nil { display: inline-block; width: 11px; height: 1px; background: var(--ink); vertical-align: middle; }
[hidden] { display: none !important; }

/* ---------------- frame */
.app { display: flex; height: calc(100vh - 28px); height: calc(100dvh - 28px); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }

/* ---------------- left nav (240px, #223458) */
.lnav { width: 240px; flex: none; background: var(--nav); color: var(--nav-ink); display: flex; flex-direction: column; padding: 0 10px 12px; overflow-y: auto; scrollbar-width: none; }
.ln-head { height: 50px; display: flex; align-items: center; justify-content: space-between; padding: 0 0 0 5px; }
.ln-brand { display: flex; align-items: center; gap: 9px; font-weight: 500; font-size: 15px; color: #fff; }
.ln-brand-caret { color: var(--nav-ink); margin-left: -4px; }
.ln-collapse { width: 30px; height: 30px; display: grid; place-items: center; color: var(--nav-ink); border-radius: 6px; }
.ln-collapse:hover { background: var(--nav-on); }
.ln-apps { display: flex; flex-direction: column; gap: 6px; padding: 4px 0 10px; }
.ln-item { display: flex; align-items: center; gap: 12px; height: 30px; padding: 3px 6px; border-radius: 6px; font-size: 14px; line-height: 24px; color: var(--nav-ink); }
.ln-item:hover, .ln-item.active { background: var(--nav-on); }
.ln-item.active { color: #fff; font-weight: 500; }
.ln-ic { width: 24px; height: 24px; display: grid; place-items: center; }
.ln-item.sub { padding-left: 36px; gap: 10px; }
.ln-item.sub .ln-ic { width: 20px; height: 20px; color: var(--nav-ink); }
.ln-item.sub.active .ln-ic { color: #fff; }
.ln-sep { height: 1px; background: rgba(194, 203, 222, 0.22); margin: 6px -10px 10px; }
.ln-team { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 2px; font-weight: 500; font-size: 15px; }
.ln-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ln-team-av.zs { background: #7d6fd0; }
.ln-team-av { width: 24px; height: 24px; border-radius: 8px; background: #f5b334; color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.ln-team-name { color: #fff; }
.ln-more { margin-left: auto; width: 30px; height: 30px; display: grid; place-items: center; color: var(--nav-ink); border-radius: 6px; }
.ln-search { display: flex; align-items: center; gap: 6px; height: 30px; margin: 10px 0 8px; padding: 0 8px; border: 1px solid rgba(194, 203, 222, 0.45); border-radius: 6px; color: var(--nav-ink); }
.ln-search input { background: transparent; border: 0; outline: 0; width: 100%; color: #fff; font-size: 14px; }
.ln-search input::placeholder { color: var(--nav-ink); }
.ln-group-h { display: flex; align-items: center; gap: 12px; width: 100%; height: 30px; padding: 3px 6px; border-radius: 6px; font-weight: 500; font-size: 15px; color: #fff; }
.ln-group-h .ln-ic.folder { color: #6b8cff; }
.ln-chev { margin-left: auto; color: var(--nav-ink); transition: transform .15s; }
.ln-group:not(.open) .ln-chev { transform: rotate(180deg); }
.ln-group:not(.open) .ln-group-b { display: none; }
.ln-group-b { display: flex; flex-direction: column; gap: 2px; margin: 2px 0; }
.lnav > .ln-item { margin-top: 2px; }

/* ---------------- top bar (50px) */
.topbar { height: 50px; flex: none; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 7px 16px 8px; }
.tb-burger { display: none; width: 34px; height: 34px; place-items: center; border-radius: 6px; }
.tb-title { font-weight: 500; font-size: 18px; line-height: 21px; color: var(--ink); white-space: nowrap; }
.tb-terr { display: flex; align-items: center; gap: 8px; height: 34px; padding: 8px 10px 8px 12px; border: 1px solid var(--line-in); border-radius: 6px; font-weight: 600; font-size: 14px; background: #fff; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.tb-search { display: flex; align-items: center; gap: 6px; width: 235px; height: 32px; padding: 0 12px 0 10px; background: var(--search-fill); border: 1px solid rgba(121, 120, 131, 0.5); border-color: transparent; border-radius: 6px; margin-right: 12px; color: var(--ink-3); }
.tb-search input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 13px; color: var(--ink); }
.tb-search input::placeholder { color: var(--ink-3); }
.tb-plus { width: 28px; height: 28px; display: grid; place-items: center; background: var(--chip-l); border: 1px solid var(--brand); border-radius: 6px; color: var(--brand); margin-right: 8px; }
.tb-ib { position: relative; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; color: var(--ink); }
.tb-ib:hover { background: var(--hover); }
.tb-badge { position: absolute; top: 1px; right: 0; min-width: 15px; height: 15px; border-radius: 8px; background: var(--bad-badge); color: #fff; font-size: 10px; font-weight: 600; line-height: 15px; text-align: center; padding: 0 3px; }
.tb-avatar { position: relative; width: 32px; height: 32px; display: grid; place-items: center; margin-left: 4px; }
.av-img { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 50% 38%, #fff 0 22%, transparent 23%), radial-gradient(ellipse at 50% 100%, #fff 0 45%, transparent 46%), #d6d9e4; border: 1px solid #c7cbd9; }
.av-dot { position: absolute; top: -3px; right: -3px; width: 14px; height: 14px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 10px; font-weight: 700; line-height: 14px; text-align: center; border: 1px solid #fff; }

/* ---------------- bottom bar (28px, stills 093, 567) */
.bbar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; height: 28px; display: flex; justify-content: space-between; background: #fff; border-top: 1px solid #e3e6ee; }
.bb-tabs { display: flex; border-right: 1px solid #e3e6ee; }
.bb-tab { width: 97px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: #3d4352; }
.bb-tab .ic { width: 13px; height: 13px; }
.bb-tab span { font-size: 9px; line-height: 10px; color: #555c6c; }
.bb-tab:hover, .bb-w:hover { background: var(--hover); }
.bb-ws { display: flex; }
.bb-w { width: 49px; display: grid; place-items: center; border-left: 1px solid #e3e6ee; color: #2f3443; }
.bb-help { width: 60px; display: flex; align-items: center; justify-content: center; gap: 4px; background: linear-gradient(90deg, #9b63ef, #7c6ff3); color: #fff; font-size: 12px; border-left: 1px solid #e3e6ee; }
.bb-help .ic { width: 16px; height: 16px; }

/* ---------------- app launcher (still 319) */
.tb-apps[aria-expanded="true"] { background: var(--hover); }
.ap-scrim { position: fixed; z-index: 70; inset: 0; background: rgba(36, 44, 66, 0.45); }
.ap { position: fixed; z-index: 71; top: 0; right: 0; bottom: 0; width: 422px; max-width: 100vw; display: flex; flex-direction: column; background: #fff; box-shadow: -4px 0 16px rgba(0, 0, 0, 0.12); }
.ap-search { display: flex; align-items: center; gap: 10px; margin: 25px 25px 14px; height: 42px; padding: 0 14px; border: 1px solid #2c2f36; border-radius: 21px; color: #3d4352; }
.ap-search input { border: 0; outline: 0; width: 100%; font-size: 16px; color: var(--ink); }
.ap-search input::placeholder { color: #6d7280; }
.ap-scroll { flex: 1; overflow-y: auto; padding: 26px 25px 24px; scrollbar-width: thin; }
.ap h5 { margin: 0 0 31px; font-size: 14px; font-weight: 600; letter-spacing: .1px; color: #111; }
.ap h6 { margin: 18px 0 6px; font-size: 10px; font-weight: 600; color: #111; }
.ap-fa { display: flex; gap: 22px; margin-bottom: 33px; }
.ap-fa svg { flex: none; }
.ap-fa b { display: block; font-size: 16px; font-weight: 600; color: #111; margin-bottom: 3px; }
.ap-fa p { margin: 0 0 4px; font-size: 14px; line-height: 19px; color: #222; }
.ap-fa a { color: #1f6fc5; font-size: 14px; }
.ap-web { position: relative; padding: 12px 16px; background: #fde4e6; border-radius: 6px; }
.ap-web small { display: block; font-size: 12px; color: #222; margin-bottom: 6px; }
.ap-web b { display: block; max-width: 230px; font-size: 14px; font-weight: 600; line-height: 21px; color: #111; }
.ap-web a { position: absolute; right: 16px; bottom: 14px; font-size: 12px; color: #d2232a; }
.ap-dots { display: flex; justify-content: center; gap: 4px; margin: 8px 0 24px; }
.ap-dots i { width: 5px; height: 5px; border-radius: 3px; background: #a9b8e6; }
.ap-dots i.on { width: 24px; background: #3d6fe0; }
.ap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 0; margin-bottom: 26px; }
.ap .ap-all h5 { margin-bottom: 22px; }
.ap-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 0; border-radius: 6px; font-size: 14px; color: #222; }
.ap-tile:hover, .ap-row:hover { background: var(--hover); }
.ap-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; }
.ap-row { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 6px; border-radius: 6px; font-size: 14px; color: #222; text-align: left; }
.ap-none { color: var(--ink-3); font-size: 14px; }

/* ---------------- buttons */
.btn-primary { display: inline-flex; align-items: center; justify-content: center; height: 32px; padding: 8px 14px; border-radius: 6px; background: var(--grad-primary); color: #fff; font-weight: 500; font-size: 14px; white-space: nowrap; }
.btn-default { display: inline-flex; align-items: center; justify-content: center; height: 32px; padding: 7px 13px; border-radius: 6px; background: var(--grad-default); border: 1px solid var(--line-btn); color: var(--ink); font-weight: 500; font-size: 14px; white-space: nowrap; }
.btn-default.sq { width: 45px; padding: 0; }
.btn-out { display: inline-flex; align-items: center; gap: 4px; height: 27px; padding: 5px 11px; border-radius: 4px; background: var(--chip-l); border: 1px solid var(--brand); color: var(--brand); font-weight: 500; font-size: 13px; white-space: nowrap; }
.btn-primary.sm, .btn-default.sm { height: 27px; padding: 5px 11px; font-size: 13px; border-radius: 4px; }
.split-btn { display: inline-flex; }
.split-btn .btn-primary:first-child { border-radius: 6px 0 0 6px; height: 33px; padding: 8px 10px 8px 14px; }
.split-btn .btn-primary.caret { border-radius: 0 6px 6px 0; width: 35px; height: 33px; padding: 0; border-left: 1px solid #c3c8f4; }
.split-btn.def .btn-default:first-child { border-radius: 6px 0 0 6px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; display: block; line-height: 16px; }
.split-btn.def .btn-default.caret { border-radius: 0 6px 6px 0; width: 35px; padding: 0; border-left: 0; }

/* ---------------- list view */
.lv { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.vtabs { position: relative; height: 42px; flex: none; display: flex; align-items: center; gap: 4px; padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.vtabs-strip { display: flex; gap: 4px; overflow: hidden; flex: 0 1 auto; min-width: 0; }
.vtab { flex: none; max-width: 76px; height: 26px; padding: 6px 10px; border-radius: 6px; font-size: 13px; line-height: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: clip; -webkit-mask-image: linear-gradient(90deg, #000 80%, transparent); mask-image: linear-gradient(90deg, #000 80%, transparent); }
.vtab.on { background: var(--menu-h); font-weight: 600; color: var(--ink); max-width: none; -webkit-mask-image: none; mask-image: none; }
.vtab.fit { -webkit-mask-image: none; mask-image: none; }
.vtab:hover { background: var(--hover); }
.vtab[hidden] { display: none; }
.vtabs-more { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; margin: 0 10px 0 4px; }
.vtabs-more:hover, .vtabs-more.on { background: var(--hover); }
.cv-drop { position: absolute; z-index: 30; top: 38px; right: 12px; width: 320px; max-height: min(655px, calc(100vh - 100px)); display: flex; flex-direction: column; background: #fff; border: 1px solid #ced0e1; border-radius: 6px; box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.15); padding: 1px 0; }
.cv-search { display: flex; align-items: center; gap: 6px; margin: 10px 11px 6px; height: 34px; padding: 0 10px; border: 1px solid var(--brand); border-radius: 6px; box-shadow: 0 0 6px 0 rgba(76, 94, 253, 0.5); color: var(--ink-3); }
.cv-search input { border: 0; outline: 0; width: 100%; font-size: 13px; }
.cv-list { overflow-y: auto; padding: 4px 6px; }
.cv-group { display: flex; align-items: center; gap: 6px; width: 100%; font-weight: 600; font-size: 14px; color: var(--ink-h); padding: 8px 10px 6px; text-align: left; }
.cv-group.flat { padding-left: 27px; }
.cv-group .ic { color: var(--ink-h); transition: transform .15s; }
.cv-grp.closed .cv-group .ic { transform: rotate(-90deg); }
.cv-grp.closed .cv-grp-b { display: none; }
.cv-item { display: flex; align-items: center; width: 100%; height: 32px; padding: 8px 20px 8px 8px; border-radius: 6px; font-size: 14px; text-align: left; color: var(--ink); }
.cv-item:hover { background: var(--menu-h); }
.cv-item.on { font-weight: 600; color: var(--ink-h); }
.cv-ck { width: 16px; flex: none; margin-right: 6px; display: grid; place-items: center; color: var(--ink-h); }
.cv-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-tog { border-top: 1px solid var(--line); margin: 4px 6px 0; padding: 6px 0; }
.cv-tog button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 25px 6px 26px; font-size: 14px; color: var(--ink-h); text-align: left; border-radius: 6px; }
.cv-tog button:hover { background: var(--menu-h); }
.cv-foot { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding: 4px 0; }
.cv-foot a { color: var(--brand); padding: 8px 25px; font-size: 14px; }

.tbar { height: 46px; flex: none; display: flex; align-items: center; gap: 6px; padding: 7px 12px 6px 15px; background: var(--surface); }
.tb-btn { display: inline-flex; align-items: center; gap: 6px; height: 27px; padding: 0 8px; border-radius: 6px; font-weight: 500; font-size: 14px; }
.tb-btn:hover { background: var(--hover); }
.tb-btn.on { background: var(--hover); }
.tbar-sep { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }
.vt { display: flex; gap: 6px; }
.vt-ic { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; color: var(--ink); }
.vt-ic:hover { background: var(--hover); }
.vt-ic.on { background: var(--chip-l); color: var(--brand); }
.tbar-fill { flex: 1; }

.lv-body { flex: 1; min-height: 0; display: flex; gap: 12px; padding: 15px 15px 14px; }
.fpanel { width: 202px; flex: none; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-left-color: var(--line-card); border-radius: 6px; overflow: hidden; }
body:not(.f-open) .fpanel { display: none; }
.fp-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 12px 10px 18px; font-weight: 600; font-size: 14px; color: var(--ink-h); }
.fp-x { display: none; }
.fp-search { display: flex; align-items: center; gap: 6px; margin: 4px 18px 12px; height: 34px; padding: 0 10px; border: 1px solid var(--line-in); border-radius: 6px; color: var(--ink-2); }
.fp-search input { border: 0; outline: 0; width: 100%; font-size: 14px; }
.fp-scroll { flex: 1; overflow-y: auto; padding: 0 0 10px; }
.fp-sec-h { display: flex; align-items: center; gap: 6px; width: 100%; padding: 8px 12px 6px 14px; font-weight: 600; font-size: 15px; color: var(--ink-h); text-align: left; white-space: nowrap; overflow: hidden; }
.fp-sec-h span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fp-sec-h .ic { flex: none; color: var(--ink-h); transition: transform .15s; }
.fp-sec.closed .fp-sec-h .ic { transform: rotate(-90deg); }
.fp-sec.closed .fp-sec-b { display: none; }
.fp-row { min-height: 30px; padding: 7px 36px 7px 18px; }
.fp-row > label { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 16px; cursor: pointer; }
.cb { appearance: none; -webkit-appearance: none; flex: none; width: 15px; height: 15px; margin: 1px 0 0; border: 2px solid var(--line-in); border-radius: 3px; background: #fff; cursor: pointer; display: grid; place-items: center; }
.cb:checked { background: var(--brand); border-color: var(--brand); }
.cb:checked::after { content: ''; width: 7px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.fp-crit { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 4px 23px; }
.fp-crit select, .fp-crit input { height: 30px; border: 1px solid var(--line-in); border-radius: 5px; padding: 0 8px; font-size: 13px; background: #fff; width: 100%; }
.fp-actions { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); }

.lv-card { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.lv-scroll { flex: 1; overflow: auto; position: relative; }
.lv-table { border-collapse: separate; border-spacing: 0; min-width: 100%; table-layout: fixed; }
.lv-table th { position: sticky; top: 0; z-index: 2; background: #fff; height: 35px; padding: 8px 35px 8px 10px; font-weight: 400; font-size: 14px; line-height: 19px; color: var(--ink-h); text-align: left; border-bottom: 1px solid var(--line-row); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.lv-table th.cbx, .lv-table td.cbx { padding: 9px 0 9px 75px; }
.lv-table th.act, .lv-table td.act { padding: 9px 0 9px 26px; }
.lv-table th.num, .lv-table td.num { text-align: right; }
.lv-table th.cust, .lv-table td.cust { padding: 0; text-align: center; border-left: 1px solid var(--line); position: sticky; right: 0; background: #fff; }
.lv-table th .alpha { display: inline-flex; align-items: center; gap: 2px; margin-left: 14px; font-size: 11px; font-weight: 600; }
.lv-table td { height: 55px; padding: 9px 10px; vertical-align: top; font-size: 14px; line-height: 18px; color: var(--ink); border-bottom: 1px solid var(--line-row); overflow: hidden; }
.lv-table td .cl { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.lv-table tbody tr:hover td { background: var(--row-h); }
@media (min-width: 761px) {
  .lv-table td .cl.brk { -webkit-line-clamp: 3; word-break: break-all; overflow-wrap: anywhere; max-width: 156px; }
  .lv-table tbody td.cust, .lv-table tbody tr:hover td.cust { background: transparent; border-left-color: transparent; }
}
.lv-table tbody tr:hover td a.nm { color: var(--brand); }
.lv-table col.c { width: 200px; } .lv-table col.c-cbx { width: 111px; } .lv-table col.c-act { width: 140px; } .lv-table col.c-cust { width: 41px; } .lv-table col.c-act0 { width: 25px; }
.badge-act { display: inline-flex; align-items: center; gap: 4px; height: 24px; width: 72px; padding: 0 6px; background: var(--warn-fill); color: var(--warn); font-weight: 600; font-size: 12px; border-radius: 4px 0 0 4px; clip-path: polygon(0 0, 100% 0, 88% 50%, 100% 100%, 0 100%); }
.badge-act.over { background: #fde4e4; color: #d93b3b; }
.lv-empty { padding: 60px 20px; text-align: center; color: var(--ink-empty); font-size: 14px; }
.lv-foot { height: 36px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-top: 1px solid var(--line-row); font-size: 14px; }
.lv-foot b { font-weight: 600; font-size: 13px; margin-left: 4px; }
.pg { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 13px; }
.pg b .to { color: var(--ink-2); font-weight: 400; }
.pg-b { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 4px; color: var(--ink); }
.pg-b:disabled { color: #c3c8d6; cursor: default; }

/* ---------------- record detail */
.rec { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.rh { height: 73px; flex: none; display: flex; align-items: center; gap: 14px; padding: 0 20px 0 16px; background: #fff; border-bottom: 1px solid var(--line); }
.rh-back { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); flex: none; }
.rh-back:hover { background: var(--hover); color: var(--brand); }
.rh-av { width: 48px; height: 48px; flex: none; border-radius: 6px; background: #e5e8f2; color: var(--ink-2); display: grid; place-items: center; font-size: 20px; }
.rh-av.bld { background: #eef0f6; color: #8792ad; }
.rh-task { color: var(--ink); display: grid; place-items: center; margin-right: -6px; }
.rh-t { min-width: 0; flex: 1; }
.rh-t h1 { margin: 0; font-weight: 600; font-size: 20px; line-height: 26px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rh-sub { font-weight: 400; font-size: 15px; }
.rh-tags { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 14px; color: var(--ink); }
.rh-tags .ic { color: #6f7891; }
.rh-btns { display: flex; align-items: center; gap: 8px; flex: none; }
.rh-btns .btn-default.sq { margin-left: 8px; height: 33px; }
.rec-body { flex: 1; min-height: 0; display: flex; }
.rl-nav { width: 220px; flex: none; background: #fff; padding: 12px 10px 20px 12px; overflow-y: auto; box-shadow: 0 8px 6px 0 rgba(208, 221, 234, 0.45); z-index: 1; }
.rl-nav h3 { margin: 8px 8px 10px; font-weight: 600; font-size: 15px; color: var(--ink-h); }
.rl-nav h3.links { margin-top: 22px; }
.rl-item { display: flex; align-items: center; gap: 6px; height: 30px; padding: 5px 3px 5px 8px; margin-bottom: 2px; border-radius: 6px; font-size: 14px; }
.rl-item span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-item:hover { background: var(--hover); }
.rl-count { flex: none; min-width: 21px; height: 19px; padding: 2px 5px; border-radius: 7px; background: #f3f5ff; font-weight: 500; font-size: 13px; line-height: 15px; text-align: center; }
.rl-add { display: block; padding: 5px 8px; color: var(--brand); font-size: 14px; }
body.rl-hidden .rl-nav { display: none; }
.rec-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rec-tabs { height: 61px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 40px 0 12px; background: var(--canvas); box-shadow: 0 4px 3px 0 rgba(50, 80, 114, 0.15); z-index: 1; }
.rt-side { width: 37px; height: 37px; border-radius: 50%; border: 1px solid var(--line); background: var(--canvas); display: grid; place-items: center; color: var(--ink); }
.rt-pill { display: flex; padding: 2px 3px; background: #fff; border: 1px solid var(--line); border-radius: 50px; }
.rt-pill button { height: 31px; padding: 6px 20px; border-radius: 20px; font-size: 15px; line-height: 17px; border: 1px solid transparent; }
.rt-pill button.on { background: var(--chip); border-color: var(--chip-b); font-weight: 600; }
.rt-upd { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.rec-scroll { flex: 1; overflow-y: auto; padding: 12px 27px 40px 12px; }
.card { background: #fff; border-radius: 8px; margin-bottom: 12px; }
.bcard { padding: 33px 20px 24px; }
.fr { display: flex; align-items: flex-start; min-height: 34px; margin-bottom: 10px; }
.fl { width: 154px; flex: none; padding: 9px 0; text-align: right; color: var(--ink-2); font-size: 14px; line-height: 18px; }
.fv { flex: 1; min-width: 0; padding: 8px 12px; margin-left: 32px; font-size: 14px; line-height: 18px; color: var(--ink); overflow-wrap: anywhere; border: 1px solid transparent; border-radius: 6px; }
.details .fl { width: 170px; }
.details .fv { margin-left: 22px; }
.v-link { color: var(--brand); }
.v-link:hover { text-decoration: underline; }
.v-mod { color: var(--ink); }
.v-who { display: flex; flex-direction: column; margin-top: -2px; }
.v-who small { font-size: 13px; line-height: 16px; }
.v-pre { white-space: pre-line; }
.v-check { color: var(--ink); display: inline-block; }
.details { padding: 0; }
.hd-toggle { display: block; width: 100%; text-align: left; padding: 13px 20px 12px; font-weight: 600; font-size: 15px; color: var(--ink-h); border-bottom: 1px solid var(--line-card); }
.details.collapsed .hd-body { display: none; }
.details.collapsed .hd-toggle { border-bottom: 0; }
.hd-body { padding: 0 20px 20px; }
.sec h4 { margin: 0; padding: 22px 0 18px; font-weight: 600; font-size: 14px; color: var(--ink-h); }
.sec-cols.two { display: block; }
@media (min-width: 1500px) { .sec-cols.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; } }
.sbar { padding: 20px; }
.sb-dates { display: flex; justify-content: space-between; margin-bottom: 14px; }
.sb-dates b { display: block; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.sb-dates small { display: block; margin-top: 6px; font-size: 11px; color: var(--ink-cap); }
.sb-dates .r { text-align: right; }
.sb-row { display: flex; align-items: center; gap: 0; }
.sb-nav { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; color: var(--ink-2); }
.sb-nav:first-child { border-radius: 4px 0 0 4px; }
.sb-track { display: flex; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; scroll-behavior: smooth; }
.sb-chip { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 3px 14px 4px 20px; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; white-space: nowrap; }
.sb-chip::after { content: ''; position: absolute; right: -6px; top: 3px; width: 20px; height: 20px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); background: inherit; transform: rotate(45deg) skew(10deg, 10deg); z-index: 1; }
.sb-chip.active { background: var(--stage-on); color: var(--brand); border-color: var(--brand); }
.sb-chip.active::after { border-color: var(--brand); }
.sb-won, .sb-lost { margin-left: 12px; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px; width: 52px; height: 27px; border-radius: 4px; }
.sb-won { background: var(--ok-fill); border: 1px solid var(--ok-b); color: var(--ok); }
.sb-lost { background: #fde7e7; border: 1px solid #f3a7a7; color: #e3204f; margin-left: 10px; }
.sbar.lead { padding: 12px 20px; }
.rcard { background: #fff; border-radius: 8px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(30, 40, 90, 0.05); overflow: hidden; scroll-margin-top: 12px; }
.rc-head { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 8px 20px; border-bottom: 1px solid var(--line-card); }
.rc-head h3 { margin: 0; font-weight: 600; font-size: 15px; color: var(--ink-h); }
.rc-btns { display: flex; align-items: center; gap: 8px; }
.rc-ib { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 4px; color: var(--ink); }
.rc-empty { padding: 18px 20px 22px; color: var(--ink-empty); font-size: 14px; }
.rc-scroll { overflow-x: auto; }
.rc-table { border-collapse: collapse; min-width: 100%; }
.rc-table th { text-align: left; font-weight: 500; font-size: 14px; color: var(--ink-h); padding: 8px 10px 8px 20px; border-bottom: 2px solid var(--line-tbl); white-space: nowrap; }
.rc-table td { padding: 11px 10px 10px 20px; border-bottom: 1px solid var(--line-tbl-row); font-size: 14px; vertical-align: top; white-space: nowrap; }
.rc-table.gut th:first-child, .rc-table.gut td:first-child { width: 80px; min-width: 80px; padding: 0; }
.rc-table b { font-weight: 600; }
.ck-chev { display: inline-flex; vertical-align: middle; margin-left: 4px; color: var(--ink); }
.rc-head h3 span { padding: 2px 6px; margin-left: -6px; border-radius: 2px; transition: background .3s; }
.rc-head h3.hl span { background: #fcefc4; }
.rl-item.on { background: var(--hover); }
.rc-table td .sf-desc { display: block; white-space: normal; max-width: 260px; color: var(--ink-2); font-size: 13px; margin-top: 4px; }
.note-add { margin: 14px 20px; padding: 10px 12px; border: 1px solid var(--line-in); border-radius: 6px; color: var(--ink-3); cursor: text; }
.note-list { list-style: none; margin: 0; padding: 0 20px 10px; }
.note-list li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-tbl-row); }
.note-av { width: 30px; height: 30px; flex: none; border-radius: 50%; background: #e5e8f2; display: grid; place-items: center; font-size: 13px; color: var(--ink-2); }
.note-list p { margin: 0 0 4px; }
.note-list small { color: var(--ink-2); font-size: 13px; }
.tl { padding: 0 0 24px; border-radius: 6px; }
.tl-tabs { display: flex; align-items: flex-end; height: 38px; padding: 0 25px; border-bottom: 1px solid var(--line-card); }
.tl-tab { padding: 0 10px 8px; font-weight: 600; font-size: 15px; color: var(--ink-h); border-bottom: 2px solid var(--brand); margin-bottom: -1px; }
.tl-bar { display: flex; align-items: center; gap: 12px; padding: 25px 25px 0; }
.tl-bar h4 { margin: 0; font-weight: 600; font-size: 15px; color: var(--ink-h); }
.tl-filter { width: 42px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line-in); border-radius: 6px; color: var(--ink-h); }
.tl-upc { margin-left: auto; align-self: flex-start; margin-top: -8px; display: inline-flex; align-items: center; gap: 4px; color: var(--brand); font-size: 14px; }
.tl-list { padding: 10px 25px 0; }
.tl-date { width: 130px; margin: 14px 0 14px; padding: 4px 0; text-align: center; background: #f9faff; border: 1px solid var(--line-card); border-radius: 4px; font-size: 13px; color: var(--ink-cap); }
.tl-item { position: relative; display: grid; grid-template-columns: 75px 36px minmax(0, 1fr); column-gap: 8px; align-items: start; padding: 14px 0 22px; }
.tl-item::before { content: ''; position: absolute; left: 101px; top: 0; bottom: 0; width: 1px; background: var(--line-card); }
.tl-time { padding-top: 9px; text-align: right; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.tl-ic { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-card); background: #f9faff; color: var(--ink); }
.tl-ic.mail { background: #e6f0fc; border-color: #6c7afd; color: #4b5ae6; }
.tl-body { padding: 8px 0 0 8px; min-width: 0; }
.tl-main { margin: 0; font-size: 14px; line-height: 18px; color: var(--ink); }
.tl-main b { font-weight: 600; }
.tl-meta { margin: 2px 0 0; font-size: 13px; line-height: 17px; color: var(--ink-2); }
.tl-meta b { font-weight: 600; color: var(--ink); }
.tl-hist { margin-left: 8px; color: var(--ink); border-bottom: 1px solid var(--ink-2); }

/* ---------------- task page: right context panel (still 211) */
.rec.task .rec-tabs { padding-left: 12px; }
.tp { width: 300px; flex: none; display: flex; flex-direction: column; background: #fff; border-left: 1px solid var(--line); }
.tp-sel { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 32px; margin: 15px 10px 6px; padding: 0 10px 0 12px; border: 1px solid var(--line-in); border-radius: 6px; font-size: 14px; }
.tp-tabs { display: flex; gap: 6px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.tp-tabs > * { padding: 8px 10px 9px; font-size: 15px; color: var(--ink-h); }
.tp-tabs .on { font-weight: 600; border-bottom: 2px solid var(--brand); margin-bottom: -1px; }
.tp-scroll { flex: 1; overflow-y: auto; padding: 18px 20px 20px; }
.tp-card { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.tp-who { display: flex; gap: 10px; margin-bottom: 14px; }
.tp-av { width: 42px; height: 42px; flex: none; border-radius: 50%; background: #eef0f5; border: 1px solid var(--line); }
.tp-chip { display: inline-block; margin-left: 4px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px; background: #f6f7fb; font-size: 13px; }
.tp-who .btn-primary { display: block; margin-top: 6px; }
.tp-row { display: flex; align-items: flex-start; gap: 6px; margin: 0 0 12px; font-size: 14px; overflow-wrap: anywhere; }
.tp-row .ic { flex: none; margin-top: 1px; color: var(--ink); }
.tp-more { display: block; text-align: right; font-size: 14px; }
.tp-sec { padding: 18px 0; border-bottom: 1px solid var(--line); }
.tp-sec:last-child { border-bottom: 0; }
.tp-h { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 15px; }
.tp-h b { font-weight: 600; color: var(--ink-h); }
.tp-h a { font-size: 14px; }
.tp-deal { display: flex; gap: 8px; font-size: 14px; line-height: 20px; }
.tp-cur { font-weight: 600; }
.tp-dim { color: var(--ink-2); }
.tp-acc { display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; margin-bottom: 10px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; background: #f3f5ff; font-size: 14px; }
.tp-acc .ic { margin-left: auto; }

/* ---------------- stub pages (extension points) */
.stub { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--ink-2); }

/* ---------------- read-only toast */
.ro-toast { position: fixed; z-index: 100; left: 50%; top: 62px; transform: translateX(-50%); display: flex; align-items: flex-start; gap: 10px; max-width: min(520px, calc(100vw - 24px)); padding: 12px 14px 12px 14px; background: #fff; border: 1px solid #c9cff5; border-left: 4px solid var(--brand); border-radius: 6px; box-shadow: 0 6px 18px rgba(30, 40, 90, 0.18); font-size: 14px; line-height: 19px; color: var(--ink); }
.ro-ic { color: var(--brand); padding-top: 1px; }
.ro-t { display: block; font-weight: 600; color: var(--ink-h); margin-bottom: 2px; }
.ro-t:empty { display: none; }
.ro-x { width: 22px; height: 22px; display: grid; place-items: center; color: var(--ink-2); border-radius: 4px; flex: none; }
.scrim { display: none; }

/* ---------------- mobile (designed: the real product does not reflow below 1140px) */
@media (max-width: 760px) {
  .app { height: 100vh; height: 100dvh; }
  .bbar { display: none; }
  .lnav { position: fixed; z-index: 60; inset: 0 auto 0 0; transform: translateX(-100%); transition: transform .2s; box-shadow: 4px 0 18px rgba(0, 0, 0, 0.25); }
  body.nav-open .lnav { transform: none; }
  body.nav-open .scrim, body.f-open.pg-list .scrim { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(20, 28, 48, 0.4); }
  .topbar { padding: 7px 8px 8px 6px; gap: 6px; }
  .tb-burger { display: grid; }
  .tb-title { font-size: 17px; overflow: hidden; text-overflow: ellipsis; }
  .tb-terr, .tb-ib:not([aria-label="Notifications"]), .tb-search { display: none; }
  .tb-plus { margin-right: 4px; }
  .vtabs { padding: 0 6px; }
  .vtabs-strip { overflow-x: auto; scrollbar-width: none; }
  .vtab { max-width: none; -webkit-mask-image: none; mask-image: none; }
  .vtabs-more { margin: 0 2px; }
  .cv-drop { right: 6px; left: 6px; width: auto; }
  .tbar { padding: 7px 8px 6px; gap: 4px; }
  .tbar .vt, .tbar-sep, .tbar > .btn-default.sq { display: none; }
  .split-btn .btn-primary:first-child { padding: 8px 10px; font-size: 13px; }
  .lv-body { padding: 8px; }
  .fpanel { position: fixed; z-index: 55; left: 8px; right: 8px; bottom: 8px; top: 110px; width: auto; }
  .fp-x { display: grid; width: 26px; height: 26px; place-items: center; }
  .lv-table th.cbx, .lv-table td.cbx { padding-left: 14px; }
  .lv-table th.act, .lv-table td.act { padding-left: 10px; }
  .lv-table col.c { width: 170px; } .lv-table col.c-cbx { width: 50px; } .lv-table col.c-act { width: 92px; } .lv-table col.c-act0 { width: 0; }
  .lv-foot { padding: 0 10px; }
  .rh { height: auto; min-height: 64px; flex-wrap: wrap; gap: 10px; padding: 10px 10px; }
  .rh-av { width: 38px; height: 38px; font-size: 17px; }
  .rh-t h1 { font-size: 17px; line-height: 22px; white-space: normal; }
  .rh-sub { font-size: 14px; }
  .rh-btns { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .rh-btns .btn-default.sq { margin-left: 0; }
  .tp { display: none; }
  .tl-item { grid-template-columns: 62px 36px minmax(0, 1fr); }
  .tl-item::before { left: 88px; }
  .tl-list, .tl-bar { padding-left: 12px; padding-right: 12px; }
  .tl-upc { display: none; }
  .rl-nav { display: none; position: fixed; z-index: 55; top: 50px; bottom: 0; left: 0; width: 260px; }
  body.rl-open .rl-nav { display: block; }
  body.rl-open .scrim { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(20, 28, 48, 0.4); }
  .rec-tabs { height: 52px; padding: 0 8px; gap: 8px; }
  .rt-pill button { padding: 5px 14px; font-size: 14px; }
  .rt-upd { display: none; }
  .rec-scroll { padding: 8px 8px 30px; }
  .bcard { padding: 14px 14px 8px; }
  .fr { flex-direction: column; margin-bottom: 4px; min-height: 0; }
  .fl, .details .fl { width: auto; text-align: left; padding: 6px 0 0; font-size: 13px; }
  .fv, .details .fv { margin-left: 0; padding: 3px 0 6px; }
  .hd-body { padding: 0 14px 14px; }
  .rc-head { padding: 8px 14px; flex-wrap: wrap; gap: 6px; }
  .sbar { padding: 14px; }
}
