:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-soft: #f3f3f0;
  --surface-hover: #ededE9;
  --text: #20211f;
  --muted: #71756f;
  --faint: #9a9e97;
  --line: #e5e6e1;
  --line-strong: #d4d6cf;
  --accent: #7d9131;
  --accent-hover: #6f8225;
  --accent-soft: #eef2df;
  --accent-ink: #526215;
  --warn: #a36c18;
  --warn-soft: #fbf4e5;
  --danger: #b74a43;
  --danger-soft: #faecea;
  --info: #39708a;
  --info-soft: #eaf3f7;
  --shadow-panel: 0 18px 55px rgba(33, 36, 29, .14), 0 2px 10px rgba(33, 36, 29, .06);
  --shadow-float: 0 12px 35px rgba(33, 36, 29, .12), 0 2px 8px rgba(33, 36, 29, .05);
  --sidebar: 266px;
  --topbar: 56px;
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --control: 36px;
  --keyboard-inset: 0px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; height: 100dvh; }
html { color-scheme: light; }
body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid rgba(125, 145, 49, .55);
  outline-offset: 2px;
}
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
kbd {
  min-width: 24px;
  padding: 1px 5px;
  border: 0;
  border-radius: 5px;
  background: #e9eae6;
  color: #7c8079;
  font: 11px/1.5 var(--font);
  text-align: center;
}
.is-hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.app-shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); height: 100%; height: 100dvh; }

/* Sidebar */
.sidebar {
  position: relative;
  z-index: 30;
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  padding: 10px 9px 8px;
  background: #f1f2ef;
  border-right: 1px solid var(--line);
  transition: width .22s ease, transform .22s ease;
}
.brand-row { display: flex; align-items: center; justify-content: space-between; height: 42px; padding: 0 3px 0 4px; }
.brand-button { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 2px; cursor: pointer; text-align: left; }
.brand-mark, .mini-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--accent);
  color: white;
  font-weight: 760;
}
.brand-mark { width: 28px; height: 28px; border-radius: 8px; font-size: 14px; }
.mini-mark { width: 21px; height: 21px; border-radius: 6px; font-size: 11px; }
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { font-size: 14px; letter-spacing: .035em; }
.brand-copy small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.sidebar-scroll {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: #cdcec9 transparent;
}
.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #5d625b;
  cursor: pointer;
}
.icon-button:hover { background: rgba(0, 0, 0, .05); color: var(--text); }
.icon-button svg { width: 19px; height: 19px; }
.company-switch {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  margin: 5px 0 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .72);
  cursor: pointer;
  text-align: left;
}
.company-switch:hover { background: white; }
.company-switch > span:nth-child(2) { display: grid; min-width: 0; line-height: 1.15; }
.company-switch strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.company-switch small { margin-top: 4px; color: var(--muted); font-size: 10.5px; }
.company-switch svg { width: 15px; height: 15px; color: var(--muted); }
.company-avatar { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent-ink); font-size: 11px; font-weight: 750; }
.nav-search {
  display: flex;
  height: 34px;
  align-items: center;
  gap: 7px;
  margin: 0 1px 6px;
  padding: 0 8px;
  border-radius: 8px;
  color: var(--muted);
}
.nav-search:hover, .nav-search:focus-within { background: rgba(255, 255, 255, .76); }
.nav-search svg { width: 16px; height: 16px; }
.nav-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12.5px; }
.nav-search input::placeholder { color: #858a82; }
.nav-search kbd { margin-left: auto; }
.nav-scroll { flex: 0 0 auto; padding: 2px 0 10px; }
.nav-group { margin: 1px 0; }
.nav-parent, .nav-child, .footer-nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.nav-parent { min-height: 37px; gap: 9px; padding: 6px 7px; border-radius: 8px; color: #3c403a; font-weight: 570; }
.nav-parent:hover { background: rgba(0, 0, 0, .042); }
.nav-parent.is-active { color: var(--accent-ink); }
.nav-parent.is-locked { color: #666b63; }
.nav-parent.is-locked:hover { background: rgba(125, 145, 49, .07); }
.nav-parent-icon { display: grid; width: 21px; height: 21px; place-items: center; flex: 0 0 auto; }
.nav-parent-icon svg { width: 18px; height: 18px; }
.nav-parent-label { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-lock, .child-lock { flex: 0 0 auto; color: #8a8e86; }
.nav-lock { display: grid; width: 13px; height: 13px; place-items: center; }
.nav-lock svg { width: 13px; height: 13px; }
.child-lock { width: 12px; height: 12px; margin-left: auto; }
.nav-parent .chevron { width: 14px; height: 14px; color: var(--faint); transition: transform .16s ease; }
.nav-parent[aria-expanded="true"] .chevron { transform: rotate(90deg); }
.nav-count { min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: #e6e7e2; color: #646860; font-size: 10px; font-weight: 700; line-height: 19px; text-align: center; }
.nav-count.is-alert { background: var(--warn-soft); color: #87601c; }
.nav-children { display: grid; gap: 1px; margin: 0 0 5px 30px; padding-left: 5px; }
.nav-child { min-height: 32px; gap: 8px; padding: 5px 8px; border-radius: 7px; color: #656a63; font-size: 12.5px; }
.nav-child > span:first-child { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-child::before { width: 4px; height: 4px; flex: 0 0 auto; border-radius: 50%; background: #b9bcb5; content: ""; }
.nav-child:hover { background: rgba(0, 0, 0, .04); color: var(--text); }
.nav-child.is-active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; }
.nav-child.is-active::before { background: var(--accent); }
.nav-child.is-locked { color: #777b74; }
.nav-child.is-locked:hover { background: rgba(125, 145, 49, .06); }
.sidebar-footer { display: grid; gap: 1px; margin-top: auto; padding-top: 7px; border-top: 1px solid var(--line); }
.footer-nav-item { min-height: 35px; gap: 9px; padding: 5px 7px; border-radius: 8px; color: #4a4e48; }
.footer-nav-item:hover { background: rgba(0, 0, 0, .045); }
.footer-nav-item svg { width: 17px; height: 17px; }
.footer-nav-item span:nth-child(2) { min-width: 0; flex: 1; }
.profile-item { margin-top: 3px; }
.profile-dot { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: var(--accent); color: white; font-size: 10px; font-weight: 750; }

/* Workspace and topbar */
.workspace { min-width: 0; height: 100%; overflow: hidden; background: var(--surface); }
.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  height: var(--topbar);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
}
.topbar-left, .topbar-actions { display: flex; min-width: 0; align-items: center; gap: 7px; }
.back-button { display: inline-flex; min-height: 32px; align-items: center; gap: 5px; border: 0; border-radius: 8px; background: var(--surface-soft); padding: 0 9px 0 6px; color: #4f554d; cursor: pointer; font-size: 12px; font-weight: 650; }
.back-button:hover { background: #e9eae6; color: var(--text); }
.back-button svg { width: 17px; height: 17px; }
.breadcrumbs { display: flex; min-width: 0; align-items: center; gap: 7px; font-size: 12.5px; }
.breadcrumb-item { color: var(--muted); white-space: nowrap; }
.breadcrumb-item:last-child { overflow: hidden; color: var(--text); font-weight: 640; text-overflow: ellipsis; }
.breadcrumb-separator { color: #b1b4ae; }
.top-search { display: flex; height: 34px; min-width: 156px; align-items: center; gap: 7px; padding: 0 7px 0 10px; border: 0; border-radius: 9px; background: var(--surface-soft); color: var(--muted); cursor: pointer; }
.top-search:hover { background: #ebebe8; }
.top-search svg { width: 16px; height: 16px; }
.top-search span { flex: 1; text-align: left; }
.armic-pill, .button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: white;
  padding: 0 12px;
  color: var(--text);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 650;
  max-width: 100%;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
.armic-pill:hover, .button:hover { background: var(--surface-soft); }
.button.primary { border-color: var(--accent); background: var(--accent); color: white; }
.button.primary:hover { background: var(--accent-hover); }
.button.soft { border-color: transparent; background: var(--accent-soft); color: var(--accent-ink); }
.button.ghost { border-color: transparent; background: transparent; color: #5d625b; }
.button.danger { border-color: #e9c4c0; background: var(--danger-soft); color: #963c36; }
.button.small { min-height: 29px; padding: 0 9px; border-radius: 7px; font-size: 11.5px; }
.button svg, .armic-pill svg { width: 15px; height: 15px; flex: 0 0 auto; }
.has-dot { position: relative; }
.has-dot::after { position: absolute; top: 7px; right: 7px; width: 5px; height: 5px; border: 2px solid white; border-radius: 50%; background: #c78622; content: ""; }
.mobile-menu { display: none; }
.main-view { height: calc(100% - var(--topbar)); overflow-x: hidden; overflow-y: auto; background: var(--surface); scrollbar-color: #d4d5d1 transparent; }
.page { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 28px 0 56px; }
.page.compact-page { padding-top: 22px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.page-heading { min-width: 0; }
.eyebrow { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.page-heading h1 { margin: 0; font-size: clamp(24px, 2.3vw, 32px); line-height: 1.12; letter-spacing: -.035em; }
.page-heading p { max-width: 760px; margin: 7px 0 0; color: var(--muted); font-size: 13.5px; }
.page-actions { display: flex; flex: 0 1 auto; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }
.demo-badge { display: inline-flex; height: 23px; align-items: center; gap: 5px; margin-left: 7px; border-radius: 12px; background: var(--warn-soft); padding: 0 8px; color: #8a641c; font-size: 10px; font-weight: 750; letter-spacing: .02em; vertical-align: middle; }
.demo-badge::before { width: 5px; height: 5px; border-radius: 50%; background: #c58e2b; content: ""; }

/* Home conversation */
.home-page { display: flex; min-height: calc(100vh - var(--topbar)); min-height: calc(100dvh - var(--topbar)); flex-direction: column; }
.conversation { width: min(820px, calc(100% - 36px)); margin: 0 auto; padding: 0 0 190px; }
.home-welcome { display: grid; min-height: calc(100vh - var(--topbar) - 172px); min-height: calc(100dvh - var(--topbar) - 172px); place-content: center; justify-items: center; padding: 26px 0; text-align: center; }
.home-symbol { display: grid; width: 42px; height: 42px; place-items: center; margin-bottom: 20px; border-radius: 13px; background: var(--accent); color: white; font-size: 17px; font-weight: 780; box-shadow: 0 9px 24px rgba(82, 98, 21, .17); }
.home-welcome h1 { margin: 0; font-size: clamp(27px, 3vw, 38px); line-height: 1.13; letter-spacing: -.045em; }
.home-attention { display: grid; min-width: min(390px, 100%); grid-template-columns: 8px minmax(0, 1fr) 22px; align-items: center; gap: 11px; margin-top: 26px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.92); padding: 10px 12px; cursor: pointer; text-align: left; box-shadow: 0 5px 20px rgba(33,36,29,.045); }
.home-attention:hover { border-color: var(--line-strong); background: var(--surface-soft); }
.attention-dot { display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.home-attention > span:nth-child(2) { display: grid; min-width: 0; }
.home-attention strong { font-size: 12.5px; }
.home-attention small { margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.home-attention > svg { width: 15px; height: 15px; color: var(--muted); }
.home-page.is-empty { justify-content: center; padding: 36px 0; }
.home-page.is-empty .conversation { padding-bottom: 0; }
.home-page.is-empty .home-welcome { min-height: 0; padding: 0; }
.home-page.is-empty .composer-wrap { position: relative; left: auto; bottom: auto; width: min(820px, calc(100% - 36px)); margin: 22px auto 0; transform: none; }
.home-page.is-empty .composer { border-color: #dcddd7; background: #f3f3f0; box-shadow: 0 8px 28px rgba(33, 36, 29, .08); }
.conversation-thread { display: grid; gap: 21px; padding-top: 40px; }
.message { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; }
.message.user { grid-template-columns: minmax(0, 1fr); justify-items: end; }
.message-avatar { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; background: var(--accent); color: white; font-size: 11px; font-weight: 750; }
.message-body { max-width: 690px; color: #30332e; font-size: 14.5px; line-height: 1.65; }
.message.user .message-body { padding: 9px 13px; border-radius: 14px 14px 3px 14px; background: var(--surface-soft); }
.message-body p { margin: 0 0 9px; }
.message-body p:last-child { margin-bottom: 0; }
.message-actions { display: flex; gap: 7px; margin-top: 11px; }
.composer-wrap { position: fixed; z-index: 15; left: calc(var(--sidebar) + (100vw - var(--sidebar)) / 2); bottom: max(18px, env(safe-area-inset-bottom)); width: min(820px, calc(100vw - var(--sidebar) - 46px)); transform: translateX(-50%); }
.composer {
  display: block;
  padding: 9px 10px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: rgba(255, 255, 255, .98);
  box-shadow: var(--shadow-float);
}
.composer textarea { width: 100%; min-height: 42px; max-height: 150px; resize: none; border: 0; outline: 0; background: transparent; padding: 7px 7px 9px; color: var(--text); font-size: 14px; line-height: 1.45; }
.composer textarea::placeholder { color: #898d86; }
.composer .icon-button { width: 36px; height: 36px; }
.home-composer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.composer-leading-actions, .composer-trailing-actions { display: flex; min-width: 0; align-items: center; gap: 6px; }
.compose-circle { display: grid; width: 36px; height: 36px; place-items: center; flex: 0 0 auto; border: 0; border-radius: 50%; background: var(--surface-soft); color: #50554e; cursor: pointer; }
.compose-circle:hover { background: #e8e9e4; }
.compose-circle svg { width: 19px; height: 19px; }
.recipient-pill { display: flex; min-width: 0; height: 36px; align-items: center; gap: 7px; border: 0; border-radius: 18px; background: var(--surface-soft); padding: 0 12px; cursor: pointer; font-size: 12.5px; font-weight: 650; }
.recipient-pill:hover { background: #e8e9e4; }
.recipient-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recipient-pill svg { width: 13px; height: 13px; flex: 0 0 auto; transform: rotate(90deg); color: var(--muted); }
.compose-sheet { position: absolute; right: 0; bottom: calc(100% + 9px); left: 0; max-height: min(560px, calc(100dvh - 190px)); overflow-y: auto; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.99); padding: 8px; box-shadow: var(--shadow-panel); }
.compose-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 7px 10px 10px; }
.compose-sheet-head > div { display: grid; }
.compose-sheet-head strong { font-size: 13px; }
.compose-sheet-head small { margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.compose-sheet-head .icon-button { font-size: 21px; font-weight: 300; }
.compose-options { display: grid; gap: 2px; }
.compose-options > button { display: grid; min-height: 54px; grid-template-columns: 35px minmax(0, 1fr) 20px; align-items: center; gap: 10px; border: 0; border-radius: 10px; background: transparent; padding: 7px 10px; cursor: pointer; text-align: left; }
.compose-options > button:hover { background: var(--surface-soft); }
.compose-options > button > span:nth-child(2) { display: grid; min-width: 0; }
.compose-options strong { overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.compose-options small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.compose-options svg { width: 15px; height: 15px; color: var(--accent-ink); }
.option-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); font-size: 11px; font-weight: 760; }
.attachment-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.attachment-grid button { display: grid; min-height: 94px; place-content: center; justify-items: center; gap: 9px; border: 0; border-radius: 12px; background: var(--surface-soft); padding: 10px 7px; cursor: pointer; color: #4e534c; font-size: 10.5px; text-align: center; }
.attachment-grid button:hover { background: var(--accent-soft); color: var(--accent-ink); }
.attachment-grid svg { width: 21px; height: 21px; }
.send-button { display: grid; width: 36px; height: 36px; place-items: center; border: 0; border-radius: 10px; background: var(--accent); color: white; cursor: pointer; }
.send-button:hover { background: var(--accent-hover); }
.send-button svg { width: 18px; height: 18px; }

/* Data views */
.summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 21px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.summary-strip.count-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.summary-cell { min-width: 0; padding: 12px 16px 12px 0; }
.summary-cell.is-clickable { position: relative; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; text-align: left; }
.summary-cell.is-clickable:hover { background: linear-gradient(90deg, rgba(125,145,49,.07), transparent); }
.summary-cell.is-clickable:focus-visible { z-index: 1; outline: 2px solid rgba(125,145,49,.4); outline-offset: -2px; }
.summary-cell.is-clickable i { position: absolute; top: 10px; right: 10px; display: grid; width: 18px; height: 18px; place-items: center; color: #a0a49d; }
.summary-cell.is-clickable i svg { width: 13px; height: 13px; }
.summary-cell.is-selected { background: linear-gradient(90deg, var(--accent-soft), rgba(244,247,231,.25)); }
.summary-cell.is-selected strong { color: var(--accent-ink); }
.summary-cell[data-queue-filter] { min-height: 74px; padding-right: 32px; }
.summary-cell[data-queue-filter].is-selected { box-shadow: inset 0 -3px 0 var(--accent); }
.summary-cell[data-queue-filter].is-selected i { color: var(--accent-ink); }
.summary-cell + .summary-cell { padding-left: 16px; border-left: 1px solid var(--line); }
.summary-cell span { display: block; color: var(--muted); font-size: 11px; }
.summary-cell strong { display: block; margin-top: 2px; overflow: hidden; font-size: 18px; line-height: 1.25; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.summary-cell small { display: block; margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.summary-cell.attention strong { color: #915e11; }
.section-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 24px 0 8px; }
.section-bar h2, .section-bar h3 { margin: 0; font-size: 16px; line-height: 1.3; letter-spacing: -.015em; }
.section-bar p { margin: 0; color: var(--muted); font-size: 11.5px; }
.filter-bar { display: flex; align-items: flex-end; gap: 8px; margin: 0 0 13px; padding: 0 0 13px; border-bottom: 1px solid var(--line); }
.filter-field { display: grid; min-width: 150px; gap: 4px; }
.filter-field.grow { min-width: 210px; flex: 1; }
.filter-field label { color: var(--muted); font-size: 10.5px; font-weight: 650; }
.field, .field-button, select.field, input.field, textarea.field {
  width: 100%;
  height: var(--control);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0 10px;
  color: var(--text);
  outline: 0;
}
textarea.field { height: auto; min-height: 84px; padding-top: 9px; resize: vertical; }
.field:focus, select.field:focus, textarea.field:focus { border-color: #a5b36e; box-shadow: 0 0 0 2px rgba(125, 145, 49, .1); }
.field-button { display: flex; align-items: center; justify-content: space-between; cursor: pointer; text-align: left; }
.field-button svg { width: 15px; height: 15px; color: var(--muted); }
.search-field { position: relative; min-width: 220px; flex: 1; }
.search-field svg { position: absolute; top: 10px; left: 10px; width: 16px; height: 16px; color: var(--muted); }
.search-field input { padding-left: 32px; }
.segmented { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 9px; background: var(--surface-soft); }
.segment { height: 30px; border: 0; border-radius: 7px; background: transparent; padding: 0 10px; color: var(--muted); cursor: pointer; font-size: 11.5px; font-weight: 620; }
.segment:hover { color: var(--text); }
.segment.is-active { background: white; color: var(--accent-ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.workflow-tabs { display: flex; gap: 4px; margin: 0 0 18px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.workflow-tab { display: inline-flex; min-height: 39px; flex: 0 0 auto; align-items: center; gap: 7px; border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 0 10px; color: var(--muted); cursor: pointer; font: inherit; font-size: 12px; font-weight: 650; }
.workflow-tab:hover { color: var(--text); }
.workflow-tab.is-active { border-bottom-color: var(--accent); color: var(--accent-ink); }
.workflow-tab b { display: grid; min-width: 20px; height: 20px; place-items: center; border-radius: 10px; background: var(--surface-soft); color: var(--muted); font-size: 9.5px; }
.workflow-tab.is-active b { background: var(--accent-soft); color: var(--accent-ink); }
.object-kind { display: inline-flex; min-height: 23px; align-items: center; border-radius: 999px; background: var(--surface-soft); padding: 3px 8px; color: #5d625a; font-size: 10px; font-weight: 700; }
.data-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.data-table th { height: 34px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10.5px; font-weight: 650; text-align: left; }
.data-table td { height: 52px; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); overflow: hidden; color: #363934; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.data-table th:not(:first-child), .data-table td:not(:first-child) { padding-left: 10px; }
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover { background: #fafaf8; }
.data-table tbody tr:focus-visible { outline: 2px solid rgba(125,145,49,.45); outline-offset: -2px; }
.primary-cell { display: grid; min-width: 0; line-height: 1.25; }
.primary-cell strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.primary-cell small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.numeric { font-variant-numeric: tabular-nums; }
.align-right { text-align: right !important; }
.status { display: inline-flex; min-height: 22px; align-items: center; gap: 5px; max-width: 100%; border-radius: 11px; background: var(--surface-soft); padding: 2px 8px; color: #5f645d; font-size: 10.5px; font-weight: 650; }
.status::before { width: 5px; height: 5px; flex: 0 0 auto; border-radius: 50%; background: #969b93; content: ""; }
.status.ok { background: var(--accent-soft); color: var(--accent-ink); }
.status.ok::before { background: var(--accent); }
.status.warn { background: var(--warn-soft); color: #875e18; }
.status.warn::before { background: #c58c28; }
.status.danger { background: var(--danger-soft); color: #963e38; }
.status.danger::before { background: var(--danger); }
.status.info { background: var(--info-soft); color: #35667b; }
.status.info::before { background: var(--info); }
.row-arrow { display: inline-grid; width: 26px; height: 26px; place-items: center; color: var(--muted); }
.row-arrow svg { width: 15px; height: 15px; }
.empty-state { display: grid; min-height: 260px; place-items: center; border-top: 1px solid var(--line); color: var(--muted); text-align: center; }
.empty-state strong { display: block; margin-bottom: 4px; color: var(--text); }
.check {
  display: inline-grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid #cbd0c6;
  border-radius: 5px;
  background: white;
  color: white;
  cursor: pointer;
}
.check.is-checked { border-color: var(--accent); background: var(--accent); }
.check svg { width: 11px; height: 11px; stroke-width: 2.5; }
.select-hit { display: inline-flex; min-height: 32px; align-items: center; gap: 8px; }
.notice { display: flex; align-items: flex-start; gap: 10px; margin: 13px 0; padding: 10px 12px; border-radius: 9px; background: var(--surface-soft); color: #565b54; font-size: 11.5px; }
.notice svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; }
.notice.warn { background: var(--warn-soft); color: #755219; }
.notice.danger { background: var(--danger-soft); color: #873b35; }
.inline-link { border: 0; background: transparent; padding: 0; color: var(--accent-ink); cursor: pointer; font-weight: 650; text-decoration: underline; text-decoration-color: #cfd7aa; text-underline-offset: 3px; }
.stat-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.stat-row:last-child { border-bottom: 0; }
.stat-row span { color: var(--muted); }
.stat-row strong { text-align: right; }
.work-list { border-top: 1px solid var(--line); }
.work-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 28px; align-items: center; gap: 14px; min-height: 59px; border-bottom: 1px solid var(--line); padding: 9px 4px; cursor: pointer; }
.work-row:hover { background: #fafaf8; }
.work-row-copy { min-width: 0; }
.work-row-copy strong { display: block; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.work-row-copy small { display: block; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.work-row-meta { display: grid; justify-items: end; font-size: 12px; }
.work-row-meta small { color: var(--muted); font-size: 10.5px; }
.work-row > .row-arrow:last-child { grid-column: 3; }

/* Company overview */
.company-overview-page { max-width: 1040px; }
.overview-header { margin-bottom: 15px; }
.overview-status-line { display: flex; min-height: 39px; align-items: center; gap: 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11.5px; }
.overview-status-line strong { color: var(--text); font-size: 12px; }
.overview-status-line > span:last-child { margin-left: auto; }
.overview-tabs { display: flex; gap: 4px; margin: 16px 0 22px; overflow-x: auto; scrollbar-width: none; }
.overview-tab { display: inline-flex; min-height: 32px; flex: 0 0 auto; align-items: center; gap: 7px; border: 0; border-radius: 9px; background: var(--surface-soft); padding: 0 10px; color: var(--muted); cursor: pointer; font-size: 11.5px; font-weight: 630; }
.overview-tab:hover { color: var(--text); }
.overview-tab.is-active { background: var(--accent-soft); color: var(--accent-ink); }
.overview-tab b { display: grid; min-width: 18px; height: 18px; place-items: center; border-radius: 9px; background: rgba(0,0,0,.055); padding: 0 5px; font-size: 9.5px; }
.overview-groups { display: grid; gap: 22px; }
.overview-group-title { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.overview-group-title h2 { margin: 0; font-size: 12px; letter-spacing: .015em; }
.overview-group-title span { color: var(--muted); font-size: 10.5px; }
.overview-list { border-top: 1px solid var(--line); }
.overview-row { display: grid; width: 100%; min-height: 72px; grid-template-columns: 34px minmax(0, 1fr) minmax(175px, auto) 26px; align-items: center; gap: 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 9px 2px; cursor: pointer; text-align: left; }
.overview-row:hover { background: #fafaf8; }
.overview-row-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; background: var(--surface-soft); color: var(--muted); }
.overview-row-icon.danger { background: var(--danger-soft); color: var(--danger); }
.overview-row-icon.warn { background: var(--warn-soft); color: var(--warn); }
.overview-row-icon.info { background: var(--info-soft); color: var(--info); }
.overview-row-icon svg { width: 17px; height: 17px; }
.overview-row-copy { display: grid; min-width: 0; }
.overview-row-copy small { color: var(--muted); font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.overview-row-copy strong { margin-top: 1px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.overview-row-copy > span { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.overview-row-meta { display: grid; justify-items: end; min-width: 0; font-variant-numeric: tabular-nums; }
.overview-row-meta strong { font-size: 11px; }
.overview-row-meta span, .overview-row-meta small { color: var(--muted); font-size: 10px; }
.overview-row > .row-arrow { justify-self: end; }
.overview-footnote { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted); font-size: 10.5px; }

/* Sales command center and buyer requests */
.sales-health { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: -4px 0 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.sales-health > div { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 5px 12px; }
.sales-health span { color: var(--muted); font-size: 11px; }
.sales-health strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.sales-health i { grid-column: 1 / -1; height: 4px; overflow: hidden; border-radius: 2px; background: #eceee8; }
.sales-health b { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.request-flow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0 0 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.request-flow button { position: relative; display: grid; min-height: 62px; align-content: center; gap: 2px; border: 0; border-right: 1px solid var(--line); background: transparent; padding: 9px 10px 9px 32px; color: var(--text); cursor: pointer; text-align: left; }
.request-flow button:last-child { border-right: 0; }
.request-flow button:hover { background: var(--surface-soft); }
.request-flow button > span { position: absolute; top: 20px; left: 9px; display: grid; width: 17px; height: 17px; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 9px; font-weight: 750; }
.request-flow strong { overflow: hidden; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.request-flow small { color: var(--muted); font-size: 10px; }
.request-list .work-row { grid-template-columns: minmax(0, 1fr) minmax(150px, .55fr) auto 28px; }
.request-list .work-row > .row-arrow:last-child { grid-column: 4; }
.request-source { display: grid; min-width: 0; font-size: 11px; }
.request-source small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.request-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; color: var(--muted); font-size: 11px; }
.mini-flow { display: flex; overflow-x: auto; margin: 5px 0 13px; padding-bottom: 5px; }
.mini-flow span { position: relative; flex: 1 0 92px; padding-top: 20px; color: var(--muted); font-size: 10.5px; text-align: center; }
.mini-flow span::before { position: absolute; z-index: 1; top: 4px; left: calc(50% - 5px); width: 10px; height: 10px; border: 2px solid white; border-radius: 50%; background: #d5d8d1; box-shadow: 0 0 0 1px var(--line-strong); content: ""; }
.mini-flow span::after { position: absolute; top: 8px; left: 50%; width: 100%; height: 1px; background: var(--line-strong); content: ""; }
.mini-flow span:last-child::after { display: none; }
.mini-flow span.done { color: var(--accent-ink); font-weight: 650; }
.mini-flow span.done::before { background: var(--accent); }

/* Pricing and selection */
.selection-box { position: relative; }
.selection-popover { position: absolute; z-index: 8; top: calc(100% + 6px); right: 0; width: min(520px, 90vw); border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow-float); }
.selection-search { padding: 9px; border-bottom: 1px solid var(--line); }
.selection-list { max-height: 260px; overflow-y: auto; padding: 4px; scrollbar-width: thin; }
.selection-option { display: flex; min-height: 39px; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 7px; cursor: pointer; }
.selection-option:hover, .selection-option.is-focused { background: var(--surface-soft); }
.selection-option.is-selected { background: var(--accent-soft); color: var(--accent-ink); }
.selection-footer { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.price-table { border-top: 1px solid var(--line); }
.price-head, .price-row { display: grid; grid-template-columns: minmax(180px, 1.5fr) 120px 110px 125px 110px 98px 98px 28px; gap: 8px; align-items: center; }
.price-head { min-height: 35px; color: var(--muted); font-size: 10px; }
.price-row { min-height: 58px; padding: 7px 0; border-top: 1px solid var(--line); }
.price-row:nth-child(odd) { background: linear-gradient(90deg, #fafaf8, transparent); }
.price-product { min-width: 0; padding-left: 6px; }
.price-product strong, .price-product small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price-product small { margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.price-cell { height: 34px; border: 1px solid var(--line); border-radius: 7px; background: white; padding: 0 8px; font-size: 11.5px; }
.price-result { color: var(--accent-ink); font-weight: 750; }
.bulk-rule { display: grid; grid-template-columns: minmax(180px, 1fr) 160px 160px auto; align-items: end; gap: 8px; margin: 13px 0 16px; padding: 12px; border-radius: 10px; background: var(--surface-soft); }
.bulk-rule p { margin: 0; color: var(--muted); font-size: 11.5px; }
.price-scope-list { border-top: 1px solid var(--line); }
.price-scope-row { display: grid; width: 100%; min-height: 66px; grid-template-columns: 18px minmax(220px, 1.25fr) minmax(180px, 1fr) 110px 110px 28px; align-items: center; gap: 10px; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 8px 3px; color: var(--text); cursor: pointer; font: inherit; text-align: left; }
.price-scope-row:hover { background: #fafaf8; }
.price-scope-row.level-1 .scope-tree { position: relative; height: 100%; margin-left: 8px; border-left: 1px solid #d8dbd3; }
.price-scope-row.level-1 .scope-tree::after { position: absolute; top: 50%; left: 0; width: 10px; border-top: 1px solid #d8dbd3; content: ""; }
.scope-main, .scope-rule, .scope-exceptions { display: grid; min-width: 0; gap: 2px; }
.scope-main small, .scope-rule small, .scope-exceptions small { color: var(--muted); font-size: 9.5px; font-style: normal; }
.scope-main strong, .scope-rule strong, .scope-exceptions strong { overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.scope-main em, .scope-rule em { overflow: hidden; color: var(--muted); font-size: 10.5px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.section-hint { margin: -4px 0 11px; color: var(--muted); font-size: 11px; }
.panel-bulk { grid-template-columns: 1fr 1fr auto; margin: 0; padding: 0; background: transparent; }
.hierarchy-path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 10px; color: var(--muted); font-size: 10.5px; }
.hierarchy-path span { border-radius: 6px; background: var(--surface-soft); padding: 5px 7px; color: var(--text); }
.hierarchy-path b { color: #a6aaa2; }
.panel-price-table { overflow-x: auto; }
.statement-table { min-width: 1180px; }
.statement-table th:first-child { width: 210px; }
.overdue-table { min-width: 1180px; }
.overdue-table th:first-child { width: 240px; }

/* Semantic registries and working context */
.metric-definition, .registry-explanation, .purchase-selection { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: -5px 0 16px; border-radius: 10px; background: var(--surface-soft); padding: 11px 13px; color: var(--muted); font-size: 12px; }
.metric-definition strong, .registry-explanation strong { min-width: 190px; color: var(--text); }
.registry-grid { border-top: 1px solid var(--line); }
.registry-head, .registry-row { display: grid; grid-template-columns: minmax(260px, 1.35fr) minmax(170px, .8fr) minmax(220px, 1fr) minmax(150px, .65fr) 28px; align-items: center; gap: 16px; }
.registry-head { min-height: 38px; color: var(--muted); font-size: 10.5px; font-weight: 700; }
.registry-row { width: 100%; min-height: 72px; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 9px 2px; color: var(--text); cursor: pointer; text-align: left; }
.registry-row:hover { background: #fafaf8; }
.registry-primary, .registry-cell { display: grid; min-width: 0; gap: 3px; }
.registry-primary strong, .registry-cell strong { overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.registry-primary small, .registry-cell small, .registry-primary em { overflow: hidden; color: var(--muted); font-size: 10.5px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.registry-status { justify-self: start; }
.conditions-registry .registry-head, .conditions-registry .registry-row { grid-template-columns: minmax(250px, 1.2fr) minmax(210px, 1fr) minmax(230px, 1.1fr) minmax(170px, .8fr) 28px; }
.conditions-registry .registry-row.level-1 { padding-left: 22px; }
.conditions-registry .registry-row.level-1 .registry-primary { border-left: 1px solid var(--line-strong); padding-left: 12px; }
.claims-registry .registry-head, .claims-registry .registry-row { grid-template-columns: minmax(240px, 1.2fr) minmax(210px, 1fr) minmax(230px, 1.1fr) minmax(150px, .7fr) 28px; }
.overdue-value, .danger-text { color: var(--danger) !important; font-weight: 750; }
.purchase-selection { align-items: center; margin-top: 0; }

/* Shared communication block */
.dialogue-card { padding-top: 2px; }
.dialogue-card .section-bar { margin-top: 0; }
.dialogue-thread { display: grid; gap: 8px; max-height: 210px; overflow-y: auto; margin: 0 0 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fafaf8; }
.dialogue-message { width: min(82%, 620px); border-radius: 11px; background: white; padding: 8px 10px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.dialogue-message.outbound { justify-self: end; background: var(--accent-soft); }
.dialogue-message small { color: var(--muted); font-size: 10px; }
.dialogue-message p { margin: 3px 0 0; font-size: 12px; line-height: 1.45; }
.context-composer { border: 1px solid var(--line-strong); border-radius: 12px; background: white; padding: 8px; box-shadow: 0 5px 18px rgba(33,36,29,.06); }
.composer-routing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-bottom: 7px; }
.composer-routing label { display: grid; min-width: 0; gap: 3px; }
.composer-routing label > span { color: var(--muted); font-size: 9.5px; font-weight: 700; }
.composer-routing .field { height: 31px; font-size: 11px; }
.composer-input-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: end; gap: 5px; border-top: 1px solid var(--line); padding-top: 7px; }
.composer-input-row textarea { width: 100%; min-height: 42px; max-height: 120px; resize: vertical; border: 0; outline: 0; padding: 8px; font-size: 12.5px; }

/* Omnichannel chats */
.chat-toolbar { display: grid; grid-template-columns: auto 130px minmax(240px, 1fr); align-items: center; gap: 10px; margin-bottom: 18px; }
.chat-audience { display: inline-flex; align-items: center; gap: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); padding: 3px; }
.chat-audience button { min-height: 33px; border: 0; border-radius: 6px; background: transparent; padding: 0 13px; color: var(--muted); cursor: pointer; font: inherit; font-size: 11.5px; font-weight: 650; }
.chat-audience button:hover { color: var(--text); }
.chat-audience button.is-active { background: white; color: var(--accent-ink); box-shadow: 0 1px 3px rgba(31,33,29,.08); }
.chat-period .field { width: 100%; height: 41px; }
.chat-search { min-width: 0; width: 100%; }
.chat-feed { border-top: 1px solid var(--line); }
.chat-day > h2 { margin: 0; border-bottom: 1px solid var(--line); padding: 13px 4px 7px; color: var(--muted); font-size: 10.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.chat-list-item { display: grid; width: 100%; min-height: 72px; grid-template-columns: 42px minmax(0, 1fr) 130px 28px; align-items: center; gap: 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 9px 4px; color: var(--text); cursor: pointer; font: inherit; text-align: left; }
.chat-list-item:hover { background: #fafaf8; }
.chat-avatar { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: var(--accent-soft); color: var(--accent-ink); font-size: 11px; font-weight: 800; }
.chat-list-copy { display: grid; min-width: 0; gap: 6px; }
.chat-list-title { display: flex; min-width: 0; align-items: baseline; gap: 8px; }
.chat-list-title strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.chat-list-title small { flex: 0 0 auto; color: var(--muted); font-size: 10px; }
.chat-preview { overflow: hidden; color: #5f645d; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.chat-list-meta { display: grid; justify-items: end; gap: 2px; color: var(--muted); font-size: 10px; }
.chat-list-meta strong { color: var(--text); font-size: 11px; }
.chat-list-meta b { display: grid; min-width: 18px; height: 18px; place-items: center; margin-top: 2px; border-radius: 9px; background: var(--accent); color: white; font-size: 9px; }
.chat-contact-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 12px; border-bottom: 1px solid var(--line); padding: 3px 0 12px; }
.chat-contact-summary > div { display: grid; gap: 3px; }
.chat-contact-summary > div:last-child { justify-items: end; }
.chat-contact-summary span, .chat-contact-summary small { color: var(--muted); font-size: 10.5px; }
.chat-contact-summary strong { font-size: 12.5px; }
.chat-recipient-picker { display: grid; gap: 5px; margin-bottom: 10px; }
.chat-recipient-picker > span, .chat-send-route label > span { color: var(--muted); font-size: 9.5px; font-weight: 700; }
.chat-panel-thread { display: grid; min-height: 290px; max-height: calc(100vh - 350px); align-content: start; gap: 9px; overflow-y: auto; margin: 0 0 10px; border-radius: 11px; background: #fafaf8; padding: 12px; }
.chat-panel-thread.is-empty { place-items: center; align-content: center; }
.chat-empty { display: grid; justify-items: center; gap: 4px; color: var(--muted); text-align: center; }
.chat-empty strong { color: var(--text); }
.chat-bubble { width: min(84%, 620px); border: 1px solid var(--line); border-radius: 11px; background: white; padding: 9px 11px; }
.chat-bubble.outbound { justify-self: end; border-color: #dbe2bc; background: var(--accent-soft); }
.chat-bubble small { color: var(--muted); font-size: 9.5px; }
.chat-bubble small strong { color: var(--text); }
.chat-bubble p { margin: 4px 0 0; font-size: 12px; line-height: 1.45; }
.chat-recognition { display: flex; width: min(94%, 720px); align-items: flex-start; gap: 9px; justify-self: center; border: 1px solid #cfd9aa; border-radius: 11px; background: #f4f7e9; padding: 11px 12px; color: var(--text); font-size: 11px; line-height: 1.4; }
.chat-recognition-icon { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; border-radius: 8px; background: var(--accent); color: white; font-size: 11px; font-weight: 800; }
.chat-recognition > span:last-child { display: grid; min-width: 0; gap: 3px; }
.chat-recognition small { color: var(--accent-ink); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.chat-recognition strong { font-size: 11.5px; }
.chat-recognition .inline-link { justify-self: start; margin-top: 2px; font-size: 10.5px; }
.chat-intent-card { display: grid; width: min(94%, 720px); justify-self: center; gap: 6px; border: 1px solid #dce2c5; border-radius: 11px; background: white; padding: 11px 12px; box-shadow: 0 3px 10px rgba(35,38,29,.035); }
.chat-intent-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-intent-card > strong { font-size: 12px; }
.chat-intent-card > p { margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.chat-intent-actions { display: flex; flex-wrap: wrap; gap: 5px; padding-top: 2px; }
.chat-composer { position: sticky; bottom: -20px; border: 1px solid var(--line-strong); border-radius: 12px 12px 0 0; background: white; padding: 8px 8px 20px; box-shadow: 0 -6px 18px rgba(33,36,29,.05); }
.chat-send-route { display: flex; align-items: end; gap: 8px; margin-bottom: 7px; }
.chat-send-route label { display: grid; width: 100%; gap: 3px; }
.chat-send-route .field { height: 32px; font-size: 11px; }
.chat-channel-prompt { flex: 0 0 150px; color: var(--danger); font-size: 10px; line-height: 1.3; }

/* Customer settlements */
.settlement-hero { display: grid; grid-template-columns: 1.3fr .7fr .8fr; gap: 1px; margin: -4px 0 20px; background: var(--line); }
.settlement-hero > div { display: grid; align-content: center; min-height: 92px; gap: 4px; background: white; padding: 12px; }
.settlement-hero span { color: var(--muted); font-size: 10.5px; }
.settlement-hero strong { font-size: 17px; }
.settlement-hero small { color: var(--muted); font-size: 10.5px; }
.settlement-number.danger strong { color: var(--danger); }
.settlement-facts, .claim-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.settlement-facts > div, .claim-facts > div { display: grid; min-height: 67px; align-content: center; gap: 4px; background: white; padding: 9px; }
.settlement-facts span, .claim-facts span { color: var(--muted); font-size: 10px; }
.settlement-facts strong, .claim-facts strong { font-size: 12px; }
.settlement-facts small, .claim-facts small { color: var(--muted); font-size: 10px; }
.compact-table { border-top: 1px solid var(--line); }
.compact-head, .compact-row { display: grid; grid-template-columns: minmax(200px, 1.3fr) repeat(3, minmax(120px, .8fr)); align-items: center; gap: 12px; }
.compact-head { min-height: 33px; color: var(--muted); font-size: 10px; }
.compact-row { width: 100%; min-height: 62px; border: 0; border-top: 1px solid var(--line); background: transparent; padding: 8px 0; text-align: left; }
button.compact-row { cursor: pointer; }
button.compact-row:hover { background: var(--surface-soft); }
.compact-row > span { display: grid; gap: 3px; }
.compact-row strong { font-size: 12px; }
.compact-row small { color: var(--muted); font-size: 10px; }
.allocation-rule { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-bottom: 9px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.allocation-rule div { display: grid; gap: 3px; }
.allocation-rule strong { font-size: 12px; }
.allocation-rule small { color: var(--muted); font-size: 10.5px; }
.rule-badge { display: grid; width: 39px; height: 30px; place-items: center; border-radius: 7px; background: var(--accent-soft); color: var(--accent-ink); font-size: 10px; font-weight: 800; }
.action-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.action-card { min-height: 82px; border: 1px solid var(--line); border-radius: 9px; background: white; padding: 9px; cursor: pointer; text-align: left; }
.action-card:hover { border-color: #b8c18e; background: var(--accent-soft); }
.action-card strong, .action-card small { display: block; }
.action-card strong { font-size: 11.5px; }
.action-card small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.35; }

/* Orders, claims and procurement */
.mini-search { position: relative; display: block; width: 190px; }
.mini-search svg { position: absolute; top: 8px; left: 8px; width: 14px; height: 14px; color: var(--muted); }
.mini-search input { width: 100%; height: 31px; border: 1px solid var(--line); border-radius: 7px; padding: 0 8px 0 28px; outline: 0; }
.order-comment, .claim-reason { margin-bottom: 8px; border-radius: 9px; background: var(--surface-soft); padding: 9px 11px; }
.order-comment strong, .order-comment span, .claim-reason strong { display: block; }
.order-comment strong, .claim-reason strong { font-size: 11px; }
.order-comment span, .claim-reason p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.order-items { max-height: 275px; overflow-y: auto; border-top: 1px solid var(--line); }
.order-item { display: grid; grid-template-columns: minmax(140px, 1.5fr) 58px 58px 92px; align-items: center; gap: 9px; min-height: 58px; border-bottom: 1px solid var(--line); padding: 7px 3px; font-size: 11px; }
.order-item.head { position: sticky; z-index: 1; top: 0; min-height: 32px; background: white; color: var(--muted); font-size: 10px; }
.order-item > span { display: grid; gap: 2px; }
.order-item strong { font-size: 11.5px; }
.order-item small { color: var(--muted); font-size: 9.5px; }
.order-item.has-issue { background: linear-gradient(90deg, var(--warn-soft), transparent); }
.execution-details { margin: 0 0 20px; border-top: 1px solid var(--line); padding-top: 10px; }
.execution-details summary { cursor: pointer; color: var(--muted); font-size: 11px; font-weight: 700; }
.execution-details[open] .timeline { margin-top: 14px; }
.procurement-formula { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: stretch; gap: 6px; margin-bottom: 14px; }
.procurement-formula span { display: grid; min-height: 52px; place-items: center; border-radius: 8px; background: var(--surface-soft); padding: 6px; font-size: 10.5px; text-align: center; }
.procurement-formula b { align-self: center; color: var(--muted); }
.procurement-formula .result { background: var(--accent-soft); color: var(--accent-ink); font-weight: 750; }
.purchase-plan-table .compact-head, .purchase-plan-table .compact-row { grid-template-columns: minmax(260px, 1.4fr) 85px 130px 85px minmax(190px, 1fr); }
.purchase-plan-table .compact-row.exception { background: var(--warn-soft); }
.claim-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 10px; }
.attachment-strip, .resolution-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.attachment-strip button, .resolution-options button { display: inline-flex; min-height: 30px; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 7px; background: white; padding: 0 9px; cursor: pointer; font-size: 10.5px; }
.attachment-strip svg { width: 14px; height: 14px; }
.resolution-options button.is-selected { border-color: #b8c18e; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.claim-actions { flex-wrap: wrap; }

/* Wide workspaces for dense documents and tables */
.detail-panel.is-wide { width: min(1080px, calc(100vw - var(--sidebar) - 32px)); }
.detail-panel.is-wide .panel-price-table { overflow: visible; }
.detail-panel.is-wide .price-head, .detail-panel.is-wide .price-row { min-width: 0; grid-template-columns: minmax(170px, 1.35fr) minmax(90px, .75fr) minmax(92px, .75fr) minmax(100px, .85fr) minmax(96px, .75fr) 94px 94px 30px; }
.reconciliation-controls { position: sticky; z-index: 4; top: -18px; margin: -18px -20px 0; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); padding: 14px 20px; backdrop-filter: blur(8px); }
.reconciliation-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.document-status { display: flex; align-items: center; gap: 10px; margin-top: 8px; color: var(--muted); font-size: 10.5px; }
.embedded-document { min-height: auto; margin: 0 -20px; }
.embedded-document .document-page { min-height: 760px; }
.send-document { margin-top: 20px; }

/* Detail sheet */
.detail-panel {
  position: fixed;
  z-index: 50;
  top: 10px;
  right: 10px;
  bottom: 10px;
  display: grid;
  width: min(500px, calc(100vw - 40px));
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-panel);
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(100% + 28px));
  transition: transform .24s ease, opacity .18s ease, width .24s ease, left .24s ease;
}
.detail-panel.is-open { opacity: 1; pointer-events: auto; transform: translateX(0); }
.detail-panel.is-expanded { left: calc(var(--sidebar) + 12px); width: auto; }
.detail-header { display: flex; min-height: 66px; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.detail-leading, .detail-actions { display: flex; min-width: 0; align-items: center; gap: 5px; }
.detail-leading > div { min-width: 0; }
.detail-leading .eyebrow { margin-bottom: 1px; }
.detail-leading h2 { margin: 0; overflow: hidden; font-size: 16px; line-height: 1.25; letter-spacing: -.015em; text-overflow: ellipsis; white-space: nowrap; }
.detail-body { min-height: 0; overflow-y: auto; padding: 18px 20px 28px; scrollbar-width: thin; scrollbar-color: #d0d2cc transparent; }
.detail-section { margin: 0 0 23px; }
.detail-section > h3 { margin: 0 0 9px; font-size: 13px; }
.detail-section > p { margin: 0; color: var(--muted); }
.object-path { display: flex; align-items: center; gap: 7px; margin: -3px 0 17px; overflow-x: auto; color: var(--muted); font-size: 10.5px; white-space: nowrap; scrollbar-width: none; }
.object-path b { color: #b1b4ae; font-weight: 500; }
.object-path strong { color: var(--text); }
.next-effect { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: start; gap: 10px; margin: 4px 0 20px; border: 1px solid #dce3bd; border-radius: 10px; background: #f6f8ed; padding: 11px 12px; }
.next-effect > span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; background: var(--accent); color: white; }
.next-effect svg { width: 15px; height: 15px; }
.next-effect strong { display: block; font-size: 11.5px; }
.next-effect p { margin: 3px 0 0; color: #646a53; font-size: 10.5px; line-height: 1.45; }
.decision-list { display: grid; gap: 7px; }
.decision-option { display: grid; width: 100%; gap: 4px; border: 1px solid var(--line); border-radius: 10px; background: white; padding: 11px 12px; cursor: pointer; text-align: left; }
.decision-option:hover { border-color: #bac48f; background: #fafbf5; }
.decision-option.is-selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px rgba(125, 145, 49, .1); }
.decision-option strong { font-size: 11.5px; }
.decision-option small { color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.subscription-hero { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: start; gap: 12px; margin: -2px 0 21px; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.subscription-lock { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); }
.subscription-lock svg { width: 21px; height: 21px; }
.subscription-hero h2 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.subscription-hero p { margin: 5px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.capability-list { display: grid; gap: 7px; }
.capability-list > div { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 8px; border-bottom: 1px solid var(--line); padding: 0 0 8px; font-size: 11.5px; }
.capability-list > div:last-child { border-bottom: 0; }
.capability-list svg { width: 16px; height: 16px; color: var(--accent); }
.module-section-list { display: flex; flex-wrap: wrap; gap: 6px; }
.module-section-list span { border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); padding: 5px 9px; color: #555a53; font-size: 10.5px; }
.subscription-grid { display: grid; gap: 7px; }
.subscription-card { display: grid; width: 100%; min-height: 60px; grid-template-columns: 32px minmax(0, 1fr) auto 22px; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 10px; background: white; padding: 8px 9px; cursor: pointer; text-align: left; }
.subscription-card:hover { border-color: #c5cbb0; background: #fafbf6; }
.subscription-card.is-connected { background: #fbfcf7; }
.subscription-card-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; background: var(--surface-soft); color: var(--muted); }
.subscription-card.is-connected .subscription-card-icon { background: var(--accent-soft); color: var(--accent-ink); }
.subscription-card-icon svg { width: 16px; height: 16px; }
.subscription-card > span:nth-child(2) { min-width: 0; }
.subscription-card strong, .subscription-card small { display: block; }
.subscription-card strong { overflow: hidden; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.subscription-card small { margin-top: 2px; color: var(--muted); font-size: 9.5px; }
.service-setting-card { display: grid; width: 100%; min-height: 68px; grid-template-columns: 34px minmax(0, 1fr) auto 22px; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 11px; background: white; padding: 10px; color: inherit; cursor: pointer; font: inherit; text-align: left; }
.service-setting-card:hover { border-color: #c5cbb0; background: #fafbf6; }
.service-setting-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: var(--warn-soft); color: #875e18; }
.service-setting-icon svg { width: 17px; height: 17px; }
.service-setting-copy { display: grid; min-width: 0; gap: 3px; }
.service-setting-copy strong { font-size: 12px; }
.service-setting-copy small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.service-setting-state { color: #875e18; font-size: 10px; font-weight: 700; white-space: nowrap; }
.locked-config { margin: 13px 0 0; border: 1px dashed var(--line-strong); border-radius: 10px; padding: 12px; opacity: .76; }
.locked-config:disabled { color: inherit; }
.detail-summary { margin: -2px 0 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.detail-summary-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.detail-summary strong { font-size: 23px; letter-spacing: -.025em; }
.detail-summary p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.detail-footer { position: sticky; bottom: -28px; display: flex; flex-wrap: wrap; align-items: stretch; justify-content: flex-end; gap: 7px; margin: 24px -20px -28px; padding: 12px 20px 14px; border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.detail-footer .button { flex: 0 1 auto; min-height: 38px; padding-block: 6px; }
.armic-checks { margin: 12px 0 18px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); padding: 0 12px; }
.armic-checks summary { padding: 12px 0; cursor: pointer; font-size: 12px; font-weight: 750; }
.armic-checks .settlement-facts { margin-bottom: 12px; }
.activity-toolbar { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.activity-list { display: grid; }
.activity-row { display: grid; width: 100%; grid-template-columns: 48px 10px minmax(0, 1fr) 22px; align-items: start; gap: 10px; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 12px 2px; color: inherit; cursor: pointer; text-align: left; }
.activity-row:hover { background: var(--surface-soft); }
.activity-row:last-child { border-bottom: 0; }
.activity-time { color: var(--muted); font-size: 10.5px; }
.activity-dot { width: 8px; height: 8px; margin-top: 3px; border-radius: 50%; background: var(--accent); }
.activity-dot.warn { background: var(--warn); }
.activity-dot.danger { background: var(--danger); }
.activity-dot.info { background: var(--info); }
.activity-row > span:nth-child(3) { display: grid; gap: 3px; }
.activity-row small { color: var(--muted); font-size: 9.5px; text-transform: uppercase; }
.activity-row strong { font-size: 12px; }
.activity-row em { color: var(--muted); font-size: 10.5px; font-style: normal; line-height: 1.4; }
.detail-tabs { display: flex; gap: 2px; margin: -6px 0 18px; padding: 2px; overflow-x: auto; border-radius: 9px; background: var(--surface-soft); scrollbar-width: none; }
.detail-tab { min-height: 30px; flex: 0 0 auto; border: 0; border-radius: 7px; background: transparent; padding: 0 10px; color: var(--muted); cursor: pointer; font-size: 11px; }
.detail-tab.is-active { background: white; color: var(--accent-ink); font-weight: 650; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.form-field { display: grid; min-width: 0; gap: 4px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { color: var(--muted); font-size: 10.5px; font-weight: 650; }
.address-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: start; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.address-row:last-child { border-bottom: 0; }
.address-icon { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 7px; background: var(--surface-soft); color: var(--muted); }
.address-icon svg { width: 15px; height: 15px; }
.address-copy strong { display: block; font-size: 12.5px; }
.address-copy p { margin: 2px 0 0; color: var(--muted); font-size: 11.5px; overflow-wrap: anywhere; }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; margin-left: 7px; padding: 0 0 15px 21px; border-left: 1px solid var(--line-strong); }
.timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline li::before { position: absolute; top: 3px; left: -4px; width: 7px; height: 7px; border: 2px solid white; border-radius: 50%; background: #afb3ac; box-shadow: 0 0 0 1px #afb3ac; content: ""; }
.timeline li.done::before { background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.timeline strong { display: block; font-size: 12px; }
.timeline span { color: var(--muted); font-size: 10.5px; }
.document-shell { min-height: 100%; margin: -18px -20px -28px; background: #edeeeb; }
.document-toolbar { position: sticky; z-index: 3; top: 0; display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 12px; border-bottom: 1px solid #d8dad4; background: rgba(250,250,248,.96); backdrop-filter: blur(8px); }
.document-toolbar > div { display: flex; align-items: center; gap: 5px; }
.document-page { width: min(760px, calc(100% - 28px)); min-height: 920px; margin: 18px auto 34px; padding: 58px 62px; background: white; box-shadow: 0 2px 12px rgba(0,0,0,.08); color: #242622; }
.document-page h1 { margin: 0 0 8px; font-size: 24px; }
.document-page h2 { margin: 28px 0 9px; font-size: 14px; }
.document-page p { margin: 6px 0; font-size: 12px; line-height: 1.55; }
.document-table { width: 100%; margin: 18px 0; border-collapse: collapse; font-size: 10.5px; }
.document-table th, .document-table td { border: 1px solid #cfd1ca; padding: 6px; text-align: left; }
.document-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; margin-top: 50px; }
.signature-line { margin-top: 32px; border-top: 1px solid #8f938b; padding-top: 4px; color: #747870; font-size: 10px; }
.product-hero { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; margin-bottom: 20px; }
.product-photo { display: grid; width: 88px; height: 88px; place-items: center; border-radius: 11px; background: var(--surface-soft); color: var(--muted); text-align: center; font-size: 10px; }
.product-photo svg { width: 24px; height: 24px; margin: 0 auto 5px; }
.order-split { display: grid; grid-template-columns: minmax(0, 1fr) 80px 92px; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.order-split strong { display: block; font-size: 12px; }
.order-split small { display: block; color: var(--muted); font-size: 10.5px; }

/* Regulatory control */
.regulatory-mode {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin: 2px 0 18px;
  padding: 10px 0 14px;
  border-bottom: 1px solid var(--line);
}
.regulatory-mode-switch { flex-wrap: nowrap; white-space: nowrap; }
.regulatory-mode strong { display: block; font-size: 12.5px; }
.regulatory-mode p { margin: 2px 0 0; color: var(--muted); font-size: 11.5px; }
.regulatory-section-bar { align-items: end; }
.regulatory-section-bar > div { min-width: 0; }
.regulatory-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0 0 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.regulatory-step {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  min-height: 86px;
  padding: 13px 10px;
  border-right: 1px solid var(--line);
}
.regulatory-step:last-child { border-right: 0; }
.regulatory-step > span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}
.regulatory-step.done > span { background: var(--accent); color: white; }
.regulatory-step.active > span { background: var(--warn-soft); color: #87601c; }
.regulatory-step strong, .regulatory-step small { display: block; }
.regulatory-step strong { margin-top: 2px; font-size: 11.5px; }
.regulatory-step small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.compliance-list { margin-bottom: 18px; border-top: 1px solid var(--line); }
.compliance-row {
  display: grid;
  width: 100%;
  min-height: 58px;
  grid-template-columns: minmax(210px, 1.2fr) minmax(180px, .9fr) minmax(120px, auto) 32px;
  align-items: center;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 8px 2px;
  cursor: pointer;
  text-align: left;
}
.compliance-row:hover { background: var(--surface-soft); }
.compliance-main strong, .compliance-main small { display: block; }
.compliance-main strong { font-size: 12.5px; }
.compliance-main small, .compliance-docs { margin-top: 3px; color: var(--muted); font-size: 10.5px; }
.manual-action { justify-self: end; color: var(--accent-ink); font-size: 11px; font-weight: 700; }
.regulatory-rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0 0 17px; background: var(--line); }
.rule-summary {
  display: grid;
  min-height: 74px;
  grid-template-columns: 31px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  border: 0;
  background: white;
  padding: 10px;
  cursor: pointer;
  text-align: left;
}
.rule-summary:hover { background: var(--surface-soft); }
.rule-icon, .code-mark {
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 9px;
  font-weight: 800;
}
.rule-icon { width: 31px; height: 31px; }
.rule-summary strong, .rule-summary small { display: block; }
.rule-summary strong { font-size: 11.5px; }
.rule-summary small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.panel-lead { margin: 0 0 20px; color: #4c5049; font-size: 12.5px; line-height: 1.55; }
.responsibility-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); }
.responsibility-grid > div { min-height: 82px; background: white; padding: 11px; }
.responsibility-grid span, .responsibility-grid strong { display: block; }
.responsibility-grid span { margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.responsibility-grid strong { font-size: 11.5px; line-height: 1.45; }
.regulatory-actions { flex-wrap: wrap; }
.linked-documents { border-top: 1px solid var(--line); }
.linked-document {
  display: grid;
  width: 100%;
  min-height: 58px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 8px 0;
  cursor: pointer;
  text-align: left;
}
.linked-document:hover { background: var(--surface-soft); }
.linked-document > span:first-child { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 7px; background: var(--surface-soft); color: var(--accent-ink); }
.linked-document svg { width: 15px; height: 15px; }
.linked-document strong, .linked-document small { display: block; }
.linked-document strong { font-size: 12px; }
.linked-document small { margin-top: 3px; color: var(--muted); font-size: 10.5px; }
.code-type-list { border-top: 1px solid var(--line); }
.code-type {
  display: grid;
  width: 100%;
  min-height: 72px;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 9px 0;
  cursor: pointer;
  text-align: left;
}
.code-type:hover { background: var(--surface-soft); }
.code-mark { width: 38px; height: 38px; }
.code-type strong, .code-type small { display: block; }
.code-type strong { font-size: 12.5px; }
.code-type small { margin-top: 4px; color: var(--muted); font-size: 10.5px; line-height: 1.4; }
.code-answer { margin: 18px 0 0; padding: 12px 14px; background: var(--accent-soft); color: #37400f; }
.code-answer strong { font-size: 11px; text-transform: uppercase; }
.code-answer p { margin: 5px 0 0; font-size: 11.5px; line-height: 1.5; }

/* Command palette and transient UI */
.command-palette { position: fixed; z-index: 90; inset: 0; display: grid; align-items: start; justify-items: center; padding-top: 13vh; background: rgba(33,35,31,.22); backdrop-filter: blur(2px); }
.command-palette[hidden] { display: none; }
.palette-box { width: min(620px, calc(100vw - 28px)); overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow-panel); }
.palette-input { display: flex; height: 54px; align-items: center; gap: 10px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); }
.palette-input svg { width: 19px; height: 19px; color: var(--muted); }
.palette-input input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 14.5px; }
.palette-results { max-height: 55vh; overflow-y: auto; padding: 6px; }
.palette-group-label { padding: 8px 10px 5px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.palette-result { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 43px; padding: 6px 9px; border-radius: 8px; cursor: pointer; }
.palette-result:hover, .palette-result.is-focused { background: var(--surface-soft); }
.palette-result-icon { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 7px; background: #eceDE9; color: #666b63; }
.palette-result-icon svg { width: 15px; height: 15px; }
.palette-result strong { display: block; font-size: 12.5px; }
.palette-result small { display: block; color: var(--muted); font-size: 10.5px; }
.palette-result > small { white-space: nowrap; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 24px; max-width: min(430px, calc(100vw - 32px)); border-radius: 9px; background: #262824; padding: 10px 14px; color: white; font-size: 12px; box-shadow: var(--shadow-float); opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity .18s ease, transform .18s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Installable app and release updates */
.pwa-banner {
  position: fixed;
  z-index: 130;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  display: grid;
  width: min(620px, calc(100vw - 24px));
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(125, 145, 49, .3);
  border-radius: 14px;
  background: rgba(255, 255, 255, .98);
  padding: 10px;
  box-shadow: var(--shadow-panel);
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
}
.pwa-banner[hidden], .pwa-dialog[hidden] { display: none !important; }
.pwa-banner-mark, .pwa-dialog-logo {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-weight: 780;
}
.pwa-banner-mark { width: 38px; height: 38px; border-radius: 10px; }
.pwa-banner-copy { display: grid; min-width: 0; line-height: 1.25; }
.pwa-banner-copy strong { font-size: 13px; }
.pwa-banner-copy small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.pwa-banner-actions { display: flex; align-items: center; gap: 5px; }
.pwa-dialog {
  position: fixed;
  z-index: 140;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(31, 33, 29, .36);
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  backdrop-filter: blur(4px);
}
.pwa-dialog-card {
  width: min(440px, 100%);
  max-height: 100%;
  overflow: auto;
  border-radius: 20px;
  background: #fff;
  padding: 18px;
  box-shadow: var(--shadow-panel);
}
.pwa-dialog-head { display: grid; grid-template-columns: 42px minmax(0, 1fr) 34px; align-items: center; gap: 11px; }
.pwa-dialog-logo { width: 42px; height: 42px; border-radius: 12px; font-size: 17px; }
.pwa-dialog-head small { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.pwa-dialog-head h2 { margin: 1px 0 0; font-size: 20px; line-height: 1.2; }
.pwa-dialog-head .icon-button { font-size: 27px; font-weight: 300; }
.pwa-install-steps { display: grid; gap: 10px; margin: 18px 0; padding: 0; list-style: none; }
.pwa-install-steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; border: 1px solid var(--line); border-radius: 12px; padding: 11px; }
.pwa-install-steps li > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 750; }
.pwa-install-steps li div { display: grid; min-width: 0; }
.pwa-install-steps small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.pwa-dialog-done { width: 100%; min-height: 42px; }
.mobile-scrim { display: none; }

/* Compact sidebar */
.app-shell.sidebar-collapsed { grid-template-columns: 68px minmax(0, 1fr); }
.sidebar-collapsed .sidebar { padding-inline: 8px; }
.sidebar-collapsed .brand-copy, .sidebar-collapsed .company-switch > span:nth-child(2), .sidebar-collapsed .company-switch > svg, .sidebar-collapsed .nav-search input, .sidebar-collapsed .nav-search kbd, .sidebar-collapsed .nav-parent-label, .sidebar-collapsed .nav-parent .chevron, .sidebar-collapsed .nav-count, .sidebar-collapsed .nav-lock, .sidebar-collapsed .footer-nav-item > span:nth-child(2) { display: none; }
.sidebar-collapsed .brand-row { justify-content: center; }
.sidebar-collapsed .brand-button { display: none; }
.sidebar-collapsed .sidebar-collapse { display: inline-grid; }
.sidebar-collapsed .company-switch { display: flex; justify-content: center; padding: 5px; }
.sidebar-collapsed .nav-search { justify-content: center; }
.sidebar-collapsed .nav-parent { justify-content: center; padding-inline: 0; }
.sidebar-collapsed .nav-children { display: none; }
.sidebar-collapsed .footer-nav-item { justify-content: center; }
.sidebar-collapsed .composer-wrap { left: calc(68px + (100vw - 68px) / 2); width: min(820px, calc(100vw - 114px)); }
.sidebar-collapsed .detail-panel.is-expanded { left: 80px; }

@media (max-width: 1180px) {
  .detail-panel.is-wide { left: 10px; width: auto; }
}

@media (max-width: 980px) {
  :root { --sidebar: 238px; }
  .top-search { min-width: 34px; width: 34px; padding: 0; justify-content: center; }
  .top-search span, .top-search kbd { display: none; }
  .summary-strip { grid-template-columns: repeat(2, 1fr); }
  .summary-strip.count-5 { grid-template-columns: repeat(2, 1fr); }
  .summary-cell:nth-child(3) { border-top: 1px solid var(--line); border-left: 0; padding-left: 0; }
  .summary-cell:nth-child(4) { border-top: 1px solid var(--line); }
  .filter-bar { flex-wrap: wrap; }
  .price-head { display: none; }
  .price-row { grid-template-columns: 1.4fr 1fr 1fr; padding: 12px 5px; }
  .price-row > *:nth-child(n+4):not(:last-child) { display: none; }
  .panel-price-table .price-head { display: grid; min-width: 980px; }
  .panel-price-table .price-row { min-width: 980px; grid-template-columns: minmax(180px, 1.5fr) 120px 110px 125px 110px 98px 98px 28px; padding: 7px 0; }
  .panel-price-table .price-row > *:nth-child(n+4):not(:last-child) { display: block; }
  .bulk-rule { grid-template-columns: 1fr 1fr; }
  .panel-bulk { grid-template-columns: 1fr 1fr auto; }
  .price-scope-row { grid-template-columns: 18px minmax(190px, 1.2fr) minmax(170px, 1fr) 95px 28px; }
  .price-scope-row > .scope-exceptions { display: none; }
  .regulatory-flow { grid-template-columns: repeat(3, 1fr); }
  .regulatory-step:nth-child(3) { border-right: 0; }
  .regulatory-step:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .regulatory-rules { grid-template-columns: 1fr; }
  .compliance-row { grid-template-columns: minmax(190px, 1.1fr) minmax(160px, .8fr) auto 28px; }
  .detail-panel.is-wide { left: 10px; width: auto; }
  .detail-panel.is-wide .panel-price-table { overflow: visible; }
  .detail-panel.is-wide .price-head, .detail-panel.is-wide .price-row { min-width: 0; grid-template-columns: minmax(150px, 1.2fr) minmax(86px, .7fr) minmax(88px, .7fr) minmax(92px, .8fr) minmax(90px, .7fr) 88px 88px 28px; }
  .action-grid { grid-template-columns: repeat(2, 1fr); }
  .settlement-facts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  :root { --topbar: 52px; }
  html, body { width: 100%; height: var(--app-height, 100svh); overscroll-behavior: none; }
  body { position: fixed; inset: 0; overflow: hidden; }
  .app-shell, .app-shell.sidebar-collapsed { display: block; }
  .app-shell, .workspace { height: var(--app-height, 100svh); }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: min(290px, 88vw); height: 100dvh; max-height: 100dvh; transform: translateX(-105%); box-shadow: var(--shadow-panel); }
  .app-shell.mobile-nav-open .sidebar { transform: translateX(0); }
  .app-shell.mobile-nav-open .mobile-scrim { position: fixed; z-index: 25; inset: 0; display: block; background: rgba(31,33,29,.28); }
  .sidebar-collapse { display: inline-grid; }
  .mobile-menu { display: inline-grid; }
  .topbar { padding: 0 10px; }
  .armic-pill { display: none; }
  .is-home .breadcrumbs, .is-home .top-search, .is-home .topbar-actions .has-dot { display: none; }
  .sidebar-scroll { padding-bottom: max(2px, env(safe-area-inset-bottom)); }
  .breadcrumbs .breadcrumb-item:first-child, .breadcrumbs .breadcrumb-separator:first-of-type { display: none; }
  .back-button span { display: none; }
  .back-button { width: 32px; padding: 0; justify-content: center; }
  .main-view { height: calc(100% - var(--topbar)); overscroll-behavior: contain; }
  .page { width: calc(100% - 28px); padding-top: 21px; }
  .page-header { align-items: flex-start; flex-direction: column; gap: 12px; }
  .page-heading h1 { font-size: 25px; }
  .page-actions { width: 100%; justify-content: stretch; overflow: visible; }
  .page-actions .button { flex: 1 1 145px; }
  .conversation { width: calc(100% - 28px); }
  .home-welcome { min-height: calc(100dvh - var(--topbar) - 158px); padding-bottom: 6vh; }
  .home-page { min-height: calc(var(--app-height, 100svh) - var(--topbar)); }
  .home-page.is-empty { padding: clamp(24px, 6vh, 52px) 0; }
  .home-page.is-empty .home-welcome { min-height: 0; padding: 0; }
  .home-page.is-empty .composer-wrap { left: auto; bottom: auto; width: calc(100% - 28px); margin-top: 20px; transform: none; }
  .home-symbol { width: 38px; height: 38px; margin-bottom: 18px; border-radius: 12px; }
  .home-attention { min-width: 0; width: min(390px, 100%); }
  .composer-wrap, .sidebar-collapsed .composer-wrap { left: 50%; width: calc(100vw - 20px); bottom: max(8px, env(safe-area-inset-bottom)); }
  body.keyboard-open .home-page .composer-wrap,
  body.keyboard-open .home-page.is-empty .composer-wrap {
    position: fixed;
    z-index: 45;
    left: 50%;
    bottom: max(calc(var(--keyboard-inset) + 8px), env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
    margin: 0;
    transform: translateX(-50%);
  }
  body.keyboard-open .main-view { overflow-y: hidden; }
  .composer { border-radius: 18px; padding-inline: 8px; }
  .composer textarea { min-height: 39px; padding-inline: 6px; font-size: 16px; }
  .recipient-pill { max-width: min(58vw, 260px); padding-inline: 11px; }
  .compose-sheet { max-height: calc(100dvh - 148px); border-radius: 15px; }
  .attachment-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .attachment-grid button { min-height: 82px; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .summary-cell { padding-right: 9px; }
  .summary-cell + .summary-cell { padding-left: 9px; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .filter-field, .filter-field.grow, .search-field { width: 100%; min-width: 0; }
  .filter-bar > .button { width: 100%; }
  .data-table { min-width: 690px; }
  .table-scroll { overflow-x: auto; }
  .workflow-table { min-width: 0; }
  .workflow-table thead { display: none; }
  .workflow-table tbody, .workflow-table tr { display: block; }
  .workflow-table tr { position: relative; padding: 12px 38px 12px 2px; border-bottom: 1px solid var(--line); }
  .workflow-table td { display: block; width: auto !important; height: auto; padding: 3px 0; border: 0; overflow: visible; white-space: normal; text-align: left; }
  .workflow-table td:first-child { padding-top: 0; }
  .workflow-table td:last-child { position: absolute; top: calc(50% - 13px); right: 2px; }
  .workflow-table .primary-cell strong, .workflow-table .primary-cell small { overflow: visible; text-overflow: initial; white-space: normal; }
  .workflow-table td:nth-last-child(2) { padding-top: 7px; }
  .workflow-table.has-selection tr { padding-left: 34px; }
  .workflow-table.has-selection td:first-child { position: absolute; top: 13px; left: 2px; }
  .detail-panel, .detail-panel.is-expanded { inset: 0; width: 100%; border-radius: 0; }
  .detail-panel.is-wide { inset: 0; width: 100%; }
  .detail-body { padding-inline: 16px; }
  .detail-footer { display: grid; grid-template-columns: minmax(0, 1fr); bottom: -28px; margin-inline: -16px; padding: 10px 16px max(14px, env(safe-area-inset-bottom)); }
  .detail-footer .button { width: 100%; min-height: 44px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .bulk-rule { grid-template-columns: 1fr; }
  .document-page { width: calc(100% - 18px); min-height: 800px; margin-top: 9px; padding: 32px 24px; }
  .document-signatures { grid-template-columns: 1fr; }
  .work-row { grid-template-columns: minmax(0, 1fr) 28px; }
  .work-row-meta { display: none; }
  .sales-health { gap: 10px; }
  .request-flow { grid-template-columns: repeat(3, 1fr); }
  .request-flow button:nth-child(3) { border-right: 0; }
  .request-flow button:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .request-list .work-row { grid-template-columns: minmax(0, 1fr) 28px; gap: 4px 8px; padding-block: 11px; }
  .request-list .request-source { grid-column: 1; }
  .request-list .work-row-meta { display: block; grid-column: 1; justify-self: start; }
  .request-list .work-row > .row-arrow:last-child { grid-column: 2; grid-row: 1 / span 3; }
  .registry-head { display: none; }
  .registry-row, .request-registry .registry-row, .conditions-registry .registry-row, .claims-registry .registry-row { position: relative; display: grid; min-height: 0; grid-template-columns: 1fr; gap: 8px; padding: 13px 36px 13px 2px; }
  .registry-row .row-arrow { position: absolute; top: calc(50% - 13px); right: 2px; }
  .registry-primary strong, .registry-cell strong { white-space: normal; }
  .registry-primary small, .registry-cell small, .registry-primary em { white-space: normal; }
  .registry-cell { grid-template-columns: minmax(0, 1fr); }
  .registry-status { justify-self: start; }
  .conditions-registry .registry-row.level-1 { padding-left: 14px; }
  .price-scope-row { grid-template-columns: 14px minmax(0, 1fr) 28px; gap: 7px; }
  .price-scope-row .scope-main { grid-column: 2; }
  .price-scope-row .scope-rule { grid-column: 2; }
  .price-scope-row > .status { grid-column: 2; justify-self: start; }
  .price-scope-row > .row-arrow { grid-column: 3; grid-row: 1 / span 3; }
  .price-scope-row.level-1 .scope-tree { grid-row: 1 / span 3; }
  .panel-bulk { grid-template-columns: 1fr; }
  .detail-panel.is-wide .panel-price-table { overflow: visible; }
  .detail-panel.is-wide .price-head { display: none; }
  .detail-panel.is-wide .price-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; min-width: 0; padding: 12px 0; }
  .detail-panel.is-wide .price-row > * { display: block !important; min-width: 0; width: 100%; }
  .detail-panel.is-wide .price-product { grid-column: 1 / -1; }
  .detail-panel.is-wide .price-row .icon-button { width: 34px; }
  .customer-table { min-width: 0; }
  .customer-table thead { display: none; }
  .customer-table tbody, .customer-table tr { display: block; }
  .customer-table tr { position: relative; padding: 11px 38px 11px 0; border-bottom: 1px solid var(--line); }
  .customer-table td, .customer-table th:not(:first-child), .customer-table td:not(:first-child) { display: block; width: auto !important; height: auto; border: 0; padding: 2px 0; overflow: visible; white-space: normal; }
  .customer-table td:nth-child(2) { color: var(--muted); font-size: 11px; }
  .customer-table td:nth-child(3) { font-size: 12px; font-weight: 700; }
  .customer-table td:nth-child(5) { position: absolute; top: calc(50% - 13px); right: 0; }
  .regulatory-mode { grid-template-columns: 1fr; gap: 9px; }
  .regulatory-mode-switch { width: 100%; overflow-x: auto; }
  .regulatory-flow { display: block; border-bottom: 0; }
  .regulatory-step, .regulatory-step:nth-child(3) { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .compliance-row { grid-template-columns: minmax(0, 1fr) 28px; gap: 8px; }
  .compliance-docs, .compliance-state { grid-column: 1; }
  .compliance-row > .row-arrow, .compliance-row > .manual-action { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
  .responsibility-grid { grid-template-columns: 1fr; }
  .metric-definition, .registry-explanation, .purchase-selection { display: grid; gap: 5px; }
  .metric-definition strong, .registry-explanation strong { min-width: 0; }
  .composer-routing { grid-template-columns: 1fr; }
  .chat-toolbar { grid-template-columns: 1fr; gap: 8px; }
  .chat-audience { width: 100%; }
  .chat-audience button { flex: 1; padding-inline: 8px; }
  .chat-list-item { grid-template-columns: 36px minmax(0, 1fr) 28px; gap: 9px; padding-block: 11px; }
  .chat-avatar { width: 34px; height: 34px; grid-row: 1 / span 2; }
  .chat-list-title { align-items: flex-start; flex-direction: column; gap: 2px; }
  .chat-list-meta { display: flex; grid-column: 2; align-items: center; justify-content: flex-start; gap: 7px; }
  .chat-list-meta b { display: inline-grid; margin: 0; }
  .chat-list-item > .row-arrow { grid-column: 3; grid-row: 1 / span 2; }
  .chat-contact-summary { align-items: flex-start; }
  .chat-contact-summary > div:last-child { justify-items: start; text-align: left; }
  .chat-panel-thread { max-height: calc(100vh - 330px); }
  .chat-intent-actions .button { flex: 1 1 130px; }
  .chat-send-route { align-items: stretch; flex-direction: column; }
  .chat-channel-prompt { flex: 0 0 auto; }
  .settlement-hero { grid-template-columns: 1fr; }
  .settlement-hero > div { min-height: 67px; }
  .settlement-facts, .claim-facts { grid-template-columns: 1fr 1fr; }
  .compact-head { display: none; }
  .compact-row, .purchase-plan-table .compact-row { grid-template-columns: 1fr 1fr; gap: 9px; padding: 11px 2px; }
  .action-grid { grid-template-columns: 1fr 1fr; }
  .order-item { grid-template-columns: 1fr 1fr; min-width: 0; gap: 5px 12px; }
  .order-item.head { display: none; }
  .order-item > span:first-child { grid-column: 1 / -1; }
  .order-items { overflow-x: visible; }
  .mini-search { width: 100%; }
  .procurement-formula { grid-template-columns: 1fr; }
  .procurement-formula b { justify-self: center; }
  .reconciliation-controls { position: static; margin: -18px -16px 0; padding-inline: 16px; }
  .embedded-document { margin-inline: -16px; }
  .overview-status-line { grid-template-columns: 8px minmax(0, 1fr); display: grid; gap: 2px 10px; padding: 9px 0; }
  .overview-status-line > span:last-child { grid-column: 2; margin-left: 0; }
  .overview-tabs { margin-bottom: 18px; }
  .overview-row { grid-template-columns: 32px minmax(0, 1fr) 24px; gap: 10px; min-height: 84px; }
  .overview-row-copy strong, .overview-row-copy > span { overflow: visible; text-overflow: initial; white-space: normal; }
  .overview-row-meta { grid-column: 2; justify-items: start; grid-template-columns: auto auto; gap: 2px 8px; }
  .overview-row-meta small { grid-column: 1 / -1; }
  .overview-row > .row-arrow { grid-column: 3; grid-row: 1 / span 2; }
  .subscription-hero { grid-template-columns: 40px minmax(0, 1fr); }
  .subscription-hero > .status { grid-column: 2; justify-self: start; }
  .subscription-card { grid-template-columns: 30px minmax(0, 1fr) 20px; }
  .subscription-card > .status { grid-column: 2; justify-self: start; }
  .subscription-card > .row-arrow { grid-column: 3; grid-row: 1 / span 2; }
  .service-setting-card { grid-template-columns: 32px minmax(0, 1fr) 20px; }
  .service-setting-state { grid-column: 2; white-space: normal; }
  .service-setting-card > .row-arrow { grid-column: 3; grid-row: 1 / span 2; }
}

@media (max-width: 440px) {
  .pwa-banner { top: auto; bottom: max(10px, env(safe-area-inset-bottom)); grid-template-columns: 36px minmax(0, 1fr); }
  .pwa-banner-mark { width: 36px; height: 36px; }
  .pwa-banner > .button, .pwa-banner-actions { grid-column: 1 / -1; width: 100%; }
  .pwa-banner-actions .button { flex: 1; }
  .pwa-dialog-card { padding: 15px; }
  .topbar-actions .has-dot { display: none; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .summary-cell + .summary-cell { padding-left: 9px; border-left: 1px solid var(--line); }
  .summary-cell:nth-child(3) { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .summary-cell:nth-child(4) { border-top: 1px solid var(--line); }
  .summary-cell strong { font-size: 16px; }
  .summary-cell small { white-space: normal; }
  .sales-health { grid-template-columns: 1fr; gap: 9px; }
  .home-welcome h1 { font-size: 28px; }
  .home-attention { grid-template-columns: 8px minmax(0, 1fr) 18px; padding-inline: 10px; }
  .recipient-pill { max-width: 55vw; }
  .attachment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-input-row { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .home-input-row .icon-button, .composer-input-row .icon-button, .home-input-row .send-button, .composer-input-row .send-button { display: grid; width: 34px; height: 34px; }
  .context-composer { padding: 6px; }
  .composer-input-row { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .composer-input-row textarea { min-height: 38px; padding-inline: 5px; }
  .action-grid, .settlement-facts, .claim-facts { grid-template-columns: 1fr; }
  .product-hero { grid-template-columns: 70px minmax(0, 1fr); }
  .product-photo { width: 70px; height: 70px; }
}

@media print {
  .sidebar, .topbar, .detail-header, .document-toolbar, .toast { display: none !important; }
  .workspace, .detail-panel, .detail-panel.is-open, .detail-panel.is-expanded { position: static; display: block; width: 100%; height: auto; overflow: visible; box-shadow: none; opacity: 1; transform: none; }
  .main-view { display: none; }
  .detail-body, .document-shell { margin: 0; padding: 0; overflow: visible; background: white; }
  .document-page { width: 100%; min-height: 0; margin: 0; padding: 0; box-shadow: none; }
}
