[hidden] { display: none !important; }

:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-synthesis: none;
  color: #17253d;
  background: #f5f7fb;
  --blue: #2454d6;
  --blue-deep: #14358c;
  --ink: #17253d;
  --muted: #5d6c83;
  --line: #dfe5ef;
  --soft: #f5f7fb;
  --white: #fff;
  --radius: 12px;
}

* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; outline-offset: 3px; }
button { border: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible,
select:focus-visible, summary:focus-visible { outline: none; box-shadow: none; }
button:focus-visible, a:focus-visible, summary:focus-visible { text-decoration: underline; text-underline-offset: 4px; filter: brightness(.9); }
:is(input,textarea,select):focus-visible { border-bottom-color: #78909f; }
input:is([type=checkbox],[type=radio]):focus-visible { filter: brightness(.75); }
a { color: var(--blue); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 30px; letter-spacing: -.9px; line-height: 1.2; font-weight: 650; }
h2 { font-size: 21px; letter-spacing: -.4px; }
h3 { font-size: 15px; line-height: 1.5; }
small { font-size: 12px; }
svg { display: block; }
input::placeholder, textarea::placeholder { color: #68758b; opacity: 1; }
input, textarea, select { min-width: 0; max-width: 100%; }
summary { cursor: pointer; }
summary::marker { color: var(--blue); }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 200; background: #fff; padding: 12px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.boot { min-height: 100vh; display: grid; place-content: center; gap: 20px; text-align: center; }
.boot .brand-mark { margin: auto; }

/* A quiet shell keeps the manager's work in the foreground. */
.brand-mark { width: 43px; height: 43px; border-radius: 13px; background: var(--blue); color: #fff; display: inline-grid; place-items: center; font-size: 34px; line-height: 1; font-weight: 700; letter-spacing: -4px; padding-right: 5px; flex-shrink: 0; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-word { font-size: 18px; font-weight: 750; letter-spacing: -.6px; }
.brand-word span { display: block; font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: 1.7px; margin-top: 4px; text-transform: uppercase; }
.app-shell { display: grid; grid-template-columns: 234px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 31px 20px 21px; border-right: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; }
.sidebar .brand { padding: 0 8px 32px; }
.nav-label { text-transform: uppercase; font-size: 11px; letter-spacing: 1.2px; font-weight: 650; color: var(--muted); padding: 0 14px; margin: 13px 0; }
.nav { display: grid; gap: 7px; }
.nav-button { width: 100%; display: flex; gap: 12px; align-items: center; border-radius: 8px; background: transparent; padding: 13px 14px; color: #4f5f78; text-align: left; font-size: 14px; font-weight: 550; min-height: 46px; }
.nav-button.active { background: #edf2ff; color: #2149bb; }
.nav-button:hover { background: #f2f5fa; }
.nav-button.active:hover { background: #e7eeff; }
.nav-symbol { font-size: 19px; width: 22px; text-align: center; flex-shrink: 0; }
.sidebar-note { margin: auto 9px 21px; background: #f5f7fb; padding: 14px 12px; border-radius: 8px; font-size: 12px; line-height: 1.7; color: var(--muted); }
.sidebar-note strong { display: block; color: #3e506b; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.user-block { display: flex; gap: 10px; align-items: center; padding: 17px 8px 0; border-top: 1px solid var(--line); min-width: 0; }
.avatar { flex: 0 0 auto; background: #e9efff; color: #3153aa; border-radius: 50%; width: 35px; height: 35px; display: grid; place-items: center; font-size: 12px; font-weight: 650; }
.user-copy { min-width: 0; flex: 1; }
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 12px; color: var(--muted); margin-top: 3px; }
.icon-button { display: grid; place-items: center; min-width: 36px; min-height: 36px; background: transparent; color: #5b6a82; padding: 7px; border-radius: 7px; font-size: 19px; }
.icon-button:is(:hover,:focus-visible) { background: #edf2f8; color: var(--blue); }
.workspace { min-width: 0; }
.topbar { min-height: 70px; background: #fff; border-bottom: 1px solid var(--line); padding: 16px 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.breadcrumb { font-size: 13px; color: var(--muted); display: flex; gap: 11px; align-items: center; }
.breadcrumb strong { font-weight: 550; color: #3f506b; }
.environment { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: #77602c; padding: 7px 10px; border-radius: 6px; background: #faf7ed; border: 1px solid #e9dfc5; line-height: 1.5; }
.environment:before { content: ""; width: 6px; height: 6px; flex: 0 0 auto; background: #937126; border-radius: 50%; }
.content { padding: 32px 32px 26px; max-width: 1900px; margin: 0 auto; min-width: 0; }
.page-heading { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 28px; }
.page-heading > div:first-child { min-width: 0; }
.eyebrow { font-size: 12px; font-weight: 650; letter-spacing: 1.1px; color: #53647f; text-transform: uppercase; margin-bottom: 9px; }
.subtitle { font-size: 14px; line-height: 1.65; color: var(--muted); margin-top: 10px; max-width: 670px; }
.heading-actions { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }

/* Controls keep the same size and focus treatment throughout the workflow. */
.button { border: 1px solid #d4ddea; padding: 10px 14px; border-radius: 8px; background: #fff; font-weight: 550; font-size: 13px; color: #435570; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; line-height: 1.4; white-space: nowrap; }
.button:hover { border-color: #a5b7d7; background: #f8faff; }
.button.primary { background: var(--blue); border-color: var(--blue); color: #fff; min-height: 42px; box-shadow: 0 2px 3px #2454d614; }
.button.primary:hover { background: #1d47bb; border-color: #1d47bb; }
.button.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.button.danger { color: #a13b43; border-color: #e6c9cd; }
.button.small { padding: 8px 11px; min-height: 36px; font-size: 12px; }
.button-plus { font-size: 20px; font-weight: 400; line-height: 16px; }
.summary-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; margin-bottom: 24px; }
.summary-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; min-height: 112px; min-width: 0; }
.summary-card > div { min-width: 0; }
.summary-label { font-size: 12px; color: #53647d; margin-bottom: 8px; line-height: 1.5; }
.summary-value { font-size: 26px; font-weight: 650; letter-spacing: -.7px; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.summary-card:nth-child(2) .summary-value { font-size: 23px; }
.summary-caption { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 7px; }
.summary-icon { background: #edf2ff; color: #3f62b5; width: 34px; height: 34px; flex-shrink: 0; border-radius: 8px; display: grid; place-items: center; font-size: 18px; }
.summary-card.attention .summary-icon { background: #fff2e8; color: #9c5a2c; }
.summary-card.attention .summary-value { color: #9c5a2c; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.toolbar-left, .toolbar-right { display: flex; gap: 10px; align-items: center; min-width: 0; flex-wrap: wrap; }
.toolbar-left { flex: 1 1 400px; }
.toolbar-right { margin-left: auto; }
.search-form { display: flex; gap: 0; background: #fff; border: 1px solid #cfd9e8; border-radius: 8px; align-items: center; height: 42px; min-width: 0; max-width: 100%; }
.search-form:focus-within { border-color: #9dabb8; box-shadow: none; }
.search-symbol { font-size: 20px; color: #65758e; padding-left: 12px; flex-shrink: 0; }
.search-input { border: 0; background: transparent; padding: 10px; width: 225px; min-width: 0; outline-offset: -3px; font-size: 14px; color: var(--ink); }
.search-form button { align-self: stretch; padding: 0 12px; background: #fff; color: #445b80; font-size: 13px; border-left: 1px solid var(--line); }
.search-form button:hover { background: #f3f6fc; }
.toolbar-select { background: #fff; border: 1px solid #cfd9e8; border-radius: 8px; height: 42px; padding: 8px 28px 8px 12px; max-width: 230px; color: #435570; font-size: 14px; }
.toolbar:has(.toolbar-filters), .toolbar-left:has(.toolbar-filters) { align-items: flex-end; }
.toolbar-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; flex: 1 1 300px; min-width: 0; max-width: 470px; }
.toolbar-filter-field { display: flex; flex-direction: column; gap: 5px; flex: 1 1 140px; min-width: 0; max-width: 230px; }
.toolbar-filter-field > label { font-size: 12px; line-height: 1.5; font-weight: 550; color: #53647d; }
.toolbar-filter-field > .toolbar-select { width: 100%; max-width: 100%; min-width: 0; height: 42px; flex: 0 0 auto; }
.view-switch { background: #e8edf5; padding: 3px; border-radius: 8px; display: flex; gap: 2px; }
.view-switch button { background: transparent; color: #53647d; padding: 7px 11px; border-radius: 5px; font-size: 12px; min-height: 34px; }
.view-switch button.active { background: #fff; color: #22499e; box-shadow: 0 1px 4px #1d2d5b14; }
.refresh-caption { font-size: 12px; color: var(--muted); white-space: nowrap; }
.deal-focus { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.focus-tab, .focus-overdue { border: 1px solid #d4ddea; border-radius: 7px; padding: 8px 12px; background: #fff; color: #4c5e78; font-size: 13px; line-height: 1.4; min-height: 40px; }
.focus-tab:hover, .focus-overdue:hover { border-color: #a5b7d7; background: #f8faff; }
.focus-tab[aria-pressed="true"] { border-color: #94ace8; background: #edf2ff; color: #234ba9; font-weight: 600; }
.focus-overdue { margin-left: 4px; }
.focus-overdue[aria-pressed="true"] { border-color: #dab6aa; background: #fff2ec; color: #9c402c; font-weight: 600; }

/* The board scrolls within its own surface; the page never needs sideways scrolling. */
.board { display: flex; gap: 16px; overflow-x: auto; padding: 3px 3px 18px; margin: -3px -3px 0; min-height: 330px; max-width: calc(100% + 6px); scrollbar-width: thin; scrollbar-color: #bccadf transparent; overscroll-behavior-x: contain; }
.board-column { flex: 1 0 280px; max-width: 340px; min-width: 260px; }
.column-heading { display: flex; align-items: center; gap: 9px; margin: 2px 2px 13px; font-size: 13px; color: #435570; min-height: 26px; }
.stage-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #577cdb; }
.board-column:nth-child(4n+2) .stage-dot { background: #388981; }
.board-column:nth-child(4n+3) .stage-dot { background: #a67b39; }
.board-column:nth-child(4n) .stage-dot { background: #7865a7; }
.column-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.column-count { font-size: 12px; background: #e7edf6; color: #52627c; min-width: 23px; height: 23px; display: inline-grid; place-items: center; border-radius: 5px; padding: 0 5px; flex-shrink: 0; }
.column-body { display: grid; gap: 12px; }
.deal-card { background: #fff; border: 1px solid #dce4ef; border-radius: 10px; box-shadow: 0 2px 3px #24396504; display: block; width: 100%; text-align: left; padding: 16px; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.deal-card:hover { border-color: #9cb4e2; box-shadow: 0 4px 14px #2439650d; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.tag { font-size: 12px; padding: 4px 7px; border-radius: 4px; background: #edf3ff; color: #365ba4; display: inline-block; line-height: 1.35; }
.tag.credit { background: #eef7f5; color: #356e62; }
.card-more { color: #526888; font-size: 18px; line-height: 1; }
.card-title { font-size: 14px; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; }
.card-company { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.6; overflow-wrap: anywhere; }
.card-amount { font-size: 22px; font-weight: 650; letter-spacing: -.4px; margin-top: 16px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.card-bank { font-size: 12px; color: var(--muted); margin-top: 4px; }
.card-action { font-size: 13px; font-weight: 500; line-height: 1.6; color: #354d72; background: #f4f7fc; border-radius: 6px; padding: 10px; margin-top: 14px; min-height: 40px; overflow-wrap: anywhere; }
.card-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.card-person { display: flex; gap: 7px; align-items: center; color: #53647d; font-size: 12px; min-width: 0; }
.card-person .avatar { width: 25px; height: 25px; font-size: 10px; }
.person-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.due { font-size: 12px; color: #53647d; white-space: nowrap; font-variant-numeric: tabular-nums; }
.due.overdue { color: #9c402c; font-weight: 600; background: #fff2ec; border-radius: 4px; padding: 3px 6px; }
.column-empty { border: 1px dashed #cdd8e9; border-radius: 9px; padding: 22px 14px; color: #62718a; text-align: center; font-size: 13px; line-height: 1.8; background: #f6f8fc; }
.page-bottom { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); line-height: 1.65; }
.pagination { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.pagination .button { min-height: 36px; }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: auto; max-width: 100%; overscroll-behavior-x: contain; }
table { border-collapse: collapse; width: 100%; text-align: left; min-width: 680px; }
th { font-size: 12px; font-weight: 600; color: #53647d; background: #f8fafd; padding: 14px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 16px 18px; border-bottom: 1px solid #eaf0f6; font-size: 14px; color: #43536b; line-height: 1.6; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f7faff; }
.table-title { font-size: 14px; font-weight: 600; color: #244b9c; }
.text-button { text-align: left; border: 0; padding: 4px 0; min-height: 30px; background: transparent; color: var(--blue); font: inherit; }
.text-button.table-title { font-size: 14px; font-weight: 600; color: #244b9c; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.table-secondary { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; line-height: 1.6; }
.contact-cell { display: flex; align-items: center; gap: 12px; }
.contact-cell .avatar { width: 36px; height: 36px; font-size: 12px; }
.muted { color: var(--muted); }

/* Empty, loading, and recovery states have the same readable density as records. */
.empty-state { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 60px 24px; text-align: center; }
.empty-symbol { margin: 0 auto 20px; width: 54px; height: 54px; background: #edf2ff; border-radius: 15px; color: #4368b6; display: grid; place-items: center; font-size: 26px; }
.empty-state h2 { font-size: 20px; margin-bottom: 10px; }
.empty-state p { font-size: 14px; color: var(--muted); line-height: 1.8; max-width: 440px; margin: auto; }
.empty-state .button { margin-top: 24px; }
.notice { border: 1px solid #d5dff1; background: #f1f5ff; padding: 14px 16px; border-radius: 8px; color: #425f91; font-size: 13px; line-height: 1.75; margin-bottom: 20px; overflow-wrap: anywhere; }
.notice.error { color: #9d3e48; border-color: #eacbd0; background: #fff5f5; }
.notice.success { color: #356b58; border-color: #cee3d7; background: #f0faf5; }
.notice.warning { color: #795d2b; border-color: #e8dbc0; background: #fffbf1; }
.notice .button { margin-top: 10px; max-width: 100%; white-space: normal; }
.notice p + p { margin-top: 6px; }
.load-state { padding: 75px 24px; text-align: center; color: var(--muted); font-size: 14px; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid #dce4f4; border-top-color: #416bcc; border-radius: 50%; animation: spin 1s linear infinite; vertical-align: middle; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 120; border: 1px solid #cddfd4; border-radius: 8px; background: #fff; color: #356b58; padding: 13px 18px; box-shadow: 0 5px 25px #162f5014; font-size: 14px; max-width: calc(100vw - 32px); overflow-wrap: anywhere; }

/* Drawers have one scrolling body; the title and save action remain visible. */
.form-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; min-width: 0; }
.form-field > label { font-size: 13px; font-weight: 550; color: #435570; line-height: 1.5; }
.form-field input, .form-field textarea, .form-field select { width: 100%; background: #fff; border: 1px solid #c8d3e3; border-radius: 7px; padding: 11px 12px; color: #263e60; font-size: 14px; min-height: 44px; }
.form-field input:hover, .form-field textarea:hover, .form-field select:hover { border-color: #9dafcb; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: var(--blue); }
.form-field textarea { resize: vertical; line-height: 1.7; min-height: 96px; }
.form-field input:disabled, .form-field textarea:disabled, .form-field select:disabled { background: #f3f6fa; color: #617087; border-color: #dce3ee; }
.form-field .hint { font-size: 12px; color: var(--muted); line-height: 1.65; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.dialog { position: fixed; inset: 0 0 0 auto; margin: 0; height: 100dvh; max-height: 100dvh; width: 640px; max-width: 100%; border: 0; border-left: 1px solid var(--line); padding: 0; color: var(--ink); background: #fff; box-shadow: -10px 0 40px #17253d12; }
.dialog::backdrop { background: #17253d55; backdrop-filter: blur(2px); }
.dialog-shell { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 1px solid var(--line); padding: 24px 28px 20px; flex-shrink: 0; background: #fff; }
.dialog-header > div { min-width: 0; }
.dialog-header h2 { font-size: 22px; line-height: 1.4; overflow-wrap: anywhere; }
.dialog-header .eyebrow { font-size: 12px; margin-bottom: 7px; }
.dialog-header .icon-button { font-size: 28px; line-height: 1; min-width: 40px; min-height: 40px; padding: 4px; margin: -4px -8px 0 0; flex-shrink: 0; }
.dialog-scroll { padding: 26px 28px; overflow-y: auto; overflow-x: hidden; flex: 1; min-height: 0; scrollbar-width: thin; scrollbar-color: #bccadf transparent; scroll-padding-block: 16px; }
.dialog-footer { padding: 16px 28px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; background: #fff; flex-shrink: 0; }
.dialog-footer .muted { font-size: 12px; line-height: 1.6; min-width: 0; }
.dialog-footer > .button { flex-shrink: 0; }
.deal-overview { border: 1px solid #d7e2f4; background: #f4f7fc; border-radius: 9px; padding: 16px; margin-bottom: 24px; }
.deal-overview-label { font-size: 12px; font-weight: 550; color: #53647d; margin-bottom: 8px; }
.deal-overview-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; line-height: 1.7; color: #435570; overflow-wrap: anywhere; }
.deal-overview-amount { margin-top: 8px; font-size: 20px; font-weight: 650; letter-spacing: -.3px; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.deal-overview-action { border-top: 1px solid #dce5f3; margin-top: 12px; padding-top: 12px; font-size: 15px; font-weight: 600; color: #2a456d; line-height: 1.6; overflow-wrap: anywhere; }
.deal-overview-next-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12px; line-height: 1.7; color: #53647d; margin-top: 6px; }
.deal-overview-due { font-size: 12px; font-variant-numeric: tabular-nums; }
.deal-overview-due.overdue { color: #9c402c; font-weight: 600; }
.deal-overview .button { margin-top: 12px; min-height: 40px; font-size: 12px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 18px; }
.section-title h3 { font-size: 15px; }
.section-title span { font-size: 12px; color: var(--muted); }
.section-divider { height: 1px; background: var(--line); margin: 24px 0; }
.detail-meta { font-size: 12px; color: var(--muted); line-height: 1.8; margin-top: 8px; overflow-wrap: anywhere; }
.relation-card { padding: 14px; border: 1px solid var(--line); border-radius: 8px; display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.relation-copy { flex: 1; min-width: 0; }
.relation-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.relation-name { font-size: 14px; font-weight: 550; color: #354b6c; overflow-wrap: anywhere; }
.relation-info { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.6; overflow-wrap: anywhere; }
.relation-card.archived { background: #f6f8fc; }
.relation-card.archived .relation-name { color: #617087; }
.relation-card .button { font-size: 12px; padding: 8px 10px; min-height: 36px; }
.relation-actions > .button { min-height: 40px; }
.relation-form { padding: 16px; background: #f5f7fb; border: 1px solid var(--line); border-radius: 8px; margin-top: 16px; }
.relation-form h3 { font-size: 14px; margin-bottom: 16px; color: #435b7e; }
.relation-form .form-field { margin-bottom: 14px; }
.relation-form .search-form { margin-bottom: 14px; width: 100%; }
.relation-form .search-input { width: 100%; min-width: 0; }
.inline-search { display: flex; gap: 8px; align-items: center; }
.inline-search .form-field { flex: 1; }
.inline-search .button { margin-bottom: 20px; }
.linked-empty { font-size: 13px; color: var(--muted); line-height: 1.8; padding: 10px 0; }
.record-readonly { font-size: 13px; color: #795d2b; line-height: 1.7; margin-bottom: 22px; }
.scope-note { font-size: 12px; line-height: 1.7; color: var(--muted); margin-top: 15px; overflow-wrap: anywhere; }
.section-loading { font-size: 13px; color: var(--muted); padding: 17px 0; }

/* Administration keeps source declaration, preview, and apply in one workspace. */
.pipeline-import { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 24px; min-width: 0; max-width: 100%; }
.pipeline-import-intro { font-size: 14px; line-height: 1.75; color: var(--muted); margin-bottom: 20px; max-width: 800px; }
.pipeline-import-form, .pipeline-import-preview, .pipeline-import-result { max-width: 900px; }
.pipeline-import-form .pipeline-import-json { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 14px; line-height: 1.65; height: 280px; min-height: 180px; max-height: 420px; resize: vertical; overflow: auto; white-space: pre; tab-size: 2; }
.pipeline-import-json[aria-invalid="true"] { border-color: #9d3e48; }
.pipeline-import-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.pipeline-import-actions .button { min-height: 40px; }
.pipeline-import-actions .button.primary { min-height: 42px; }
.pipeline-import-preview { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
.pipeline-import-source { font-size: 13px; line-height: 1.7; color: #435570; background: #f5f7fb; border: 1px solid var(--line); border-radius: 7px; padding: 12px 14px; overflow-wrap: anywhere; }
.pipeline-import-counts { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; line-height: 1.7; color: #435570; margin: 16px 0; }
.pipeline-import-list { border: 1px solid var(--line); border-radius: 8px; max-height: 400px; overflow: auto; scrollbar-width: thin; scrollbar-color: #bccadf transparent; }
.pipeline-import-row { display: grid; gap: 4px; padding: 12px 14px; border-bottom: 1px solid var(--line); min-width: 0; }
.pipeline-import-row:last-child { border-bottom: 0; }
.pipeline-import-item-title { font-size: 14px; font-weight: 600; line-height: 1.6; color: #354d72; overflow-wrap: anywhere; }
.pipeline-import-item-meta { display: block; font-size: 12px; line-height: 1.7; color: var(--muted); overflow-wrap: anywhere; }
.pipeline-import-row ol { margin: 8px 0 0; padding-left: 22px; font-size: 13px; line-height: 1.65; color: #435570; }
.pipeline-import-row li + li { margin-top: 10px; }
.pipeline-import-row li .pipeline-import-item-meta { margin-top: 2px; }
.pipeline-import-row[data-status="new"] .pipeline-import-item-meta { color: #3d5d93; }
.pipeline-import-row[data-status="conflict"] { background: #fff5f5; border-left: 3px solid #c98189; padding-left: 11px; }
.pipeline-import-row[data-status="conflict"] .pipeline-import-item-title { color: #963e49; }
.pipeline-import-conflicts { color: #9d3e48; border: 1px solid #eacbd0; background: #fff5f5; border-radius: 8px; padding: 12px 14px; font-size: 13px; line-height: 1.7; margin: 16px 0; overflow-wrap: anywhere; }
.pipeline-import-conflicts:empty { display: none; }
.pipeline-import-conflicts ul { margin: 8px 0 0; padding-left: 20px; }
.pipeline-import-conflicts li + li { margin-top: 6px; }
.pipeline-import-result { font-size: 13px; line-height: 1.7; color: #435570; margin-top: 16px; overflow-wrap: anywhere; }
.pipeline-import-result .notice.success { border-color: #d5dff1; background: #f1f5ff; color: #425f91; }

/* Optional work is disclosed in place, with an obvious open/close affordance. */
.deal-documents { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 12px; }
.deal-documents > summary { font-size: 14px; font-weight: 650; color: #345784; outline-offset: 4px; padding: 8px 0; line-height: 1.6; min-height: 40px; }
.documents-body { padding-top: 16px; }
.document-reference-note { font-size: 13px; line-height: 1.7; color: #53647d; margin-bottom: 16px; overflow-wrap: anywhere; }
.document-list { display: grid; gap: 10px; margin-bottom: 16px; }
.document-card { border: 1px solid #dce4ef; border-radius: 8px; background: #fff; }
.document-card > summary { position: relative; padding: 14px 42px 14px 14px; border-radius: 8px; list-style: none; }
.document-card > summary::-webkit-details-marker { display: none; }
.document-card > summary::after { content: "›"; position: absolute; right: 14px; top: 15px; font-size: 23px; line-height: 1; color: #4f6383; }
.document-card > summary:hover { background: #f3f7fd; }
.document-card[open] > summary { border-radius: 8px 8px 0 0; background: #f7f9fd; }
.document-card[open] > summary::after { transform: rotate(90deg); }
.document-title { display: block; font-size: 14px; font-weight: 600; line-height: 1.6; color: #354d72; overflow-wrap: anywhere; }
.document-card-meta { display: block; font-size: 12px; line-height: 1.7; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.document-access-tag { display: inline-flex; font-size: 12px; line-height: 1.5; font-weight: 550; padding: 4px 7px; border-radius: 4px; max-width: 100%; margin-top: 8px; }
.document-access-tag.restricted { background: #eef2f7; color: #435570; }
.document-access-tag.team { background: #fff4e3; color: #795d2b; }
.document-card-body { border-top: 1px solid var(--line); padding: 16px; border-radius: 0 0 8px 8px; }
.document-source { font-size: 12px; line-height: 1.7; color: #435570; white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px; background: #f5f7fb; border: 1px solid var(--line); border-radius: 6px; margin: 8px 0 16px; }
.document-create-panel { border: 1px solid var(--line); border-radius: 8px; background: #f5f7fb; margin-top: 16px; }
.document-create-panel > summary { font-size: 14px; font-weight: 550; line-height: 1.6; color: #435b7e; min-height: 44px; padding: 11px 14px; }
.document-create-panel[open] > summary { border-bottom: 1px solid var(--line); }
.document-form { padding: 16px; }
.document-form .form-field, .document-version-form .form-field, .document-access-form .form-field { margin-bottom: 16px; }
.document-optional, .document-reader-options { margin-bottom: 16px; }
.document-optional > summary, .document-reader-options > summary, .document-link-options > summary { font-size: 13px; line-height: 1.6; color: #435b7e; padding: 8px 0; min-height: 40px; }
.document-optional-body { padding-top: 12px; }
.document-link-options { min-width: 0; margin-bottom: 16px; }
.document-reader-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 12px; max-height: 220px; overflow-y: auto; padding: 4px 4px 8px; scrollbar-width: thin; scrollbar-color: #bccadf transparent; }
.document-reader-grid label { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 4px; font-size: 13px; line-height: 1.5; color: #435570; border-radius: 4px; cursor: pointer; overflow-wrap: anywhere; }
.document-reader-grid label:hover { background: #edf2fa; }
.document-reader-grid input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; accent-color: var(--blue); }
.document-versions, .document-version-create, .document-access-control { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 8px; }
.document-versions > summary, .document-version-create > summary, .document-access-control > summary { font-size: 13px; line-height: 1.6; font-weight: 550; color: #435b7e; min-height: 40px; padding: 8px 0; }
.document-version-list { list-style: none; padding: 0; margin: 12px 0; }
.document-version-list > li { border-left: 2px solid #dce5f5; padding: 0 0 16px 12px; margin-left: 3px; font-size: 13px; line-height: 1.7; color: #435570; overflow-wrap: anywhere; }
.document-version-list > li:last-child { padding-bottom: 4px; }
.document-version-title { font-size: 13px; font-weight: 600; color: #354d72; }
.document-version-meta { font-size: 12px; line-height: 1.7; color: var(--muted); margin-top: 4px; }
.document-version-form, .document-access-form { margin-top: 12px; }
.deal-calculator { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 12px; }
.deal-calculator > summary { font-size: 14px; font-weight: 650; color: #345784; outline-offset: 4px; padding: 8px 0; line-height: 1.6; min-height: 40px; }
.calculator-body { padding-top: 16px; }
.calculator-context { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #f4f7fc; font-size: 13px; line-height: 1.7; color: #435570; margin-bottom: 12px; overflow-wrap: anywhere; }
.calculator-source { font-size: 12px; line-height: 1.7; color: var(--muted); margin-bottom: 16px; overflow-wrap: anywhere; }
.calculator-form { border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 20px; }
.calculator-form .form-field { margin-bottom: 16px; }
.calculator-bank-options { border: 1px solid var(--line); border-radius: 7px; background: #fff; margin-bottom: 16px; }
.calculator-bank-options > summary { font-size: 13px; color: #435570; line-height: 1.6; padding: 10px 12px; min-height: 42px; }
.calculator-bank-options[open] > summary { border-bottom: 1px solid var(--line); }
.calculator-bank-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 12px; max-height: 220px; overflow-y: auto; padding: 8px 12px 12px; scrollbar-width: thin; scrollbar-color: #bccadf transparent; }
.calculator-bank-grid label { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 4px; font-size: 13px; line-height: 1.5; color: #435570; border-radius: 4px; cursor: pointer; overflow-wrap: anywhere; }
.calculator-bank-grid label:hover { background: #f4f7fc; }
.calculator-bank-grid input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; accent-color: var(--blue); }
.calculation-list { display: grid; gap: 12px; margin: 16px 0; }
.calculation-card { border: 1px solid #dce4ef; border-radius: 8px; background: #fff; }
.calculation-card > summary { position: relative; padding: 14px 42px 14px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; line-height: 1.6; color: #354d72; list-style: none; overflow-wrap: anywhere; }
.calculation-card > summary::-webkit-details-marker { display: none; }
.calculation-card > summary::after { content: "›"; position: absolute; right: 14px; top: 15px; font-size: 23px; line-height: 1; color: #4f6383; }
.calculation-card > summary:hover { background: #f3f7fd; }
.calculation-card[open] > summary { border-radius: 8px 8px 0 0; background: #f7f9fd; }
.calculation-card[open] > summary::after { transform: rotate(90deg); }
.calculation-title { font-size: 14px; font-weight: 600; color: #354d72; }
.calculation-source { display: block; font-size: 12px; line-height: 1.7; color: var(--muted); font-weight: 400; margin-top: 4px; overflow-wrap: anywhere; }
.calculation-card-body { border-top: 1px solid var(--line); padding: 14px; background: #fbfcff; border-radius: 0 0 8px 8px; }
.calculation-counts { font-size: 12px; line-height: 1.7; color: #53647d; margin-bottom: 12px; }
.calculation-offers { display: grid; gap: 10px; }
.calculation-offer { border: 1px solid #dce4ef; border-radius: 8px; background: #fff; padding: 14px; }
.calculation-offer + .calculation-offer { margin-top: 10px; }
.calculation-offers > .calculation-offer + .calculation-offer { margin-top: 0; }
.calculation-offer-count { font-size: 12px; line-height: 1.7; color: var(--muted); margin: 12px 0 8px; }
.calculation-card-body > .button { min-height: 40px; }
.calculation-offer > header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 8px 12px; font-size: 14px; font-weight: 600; line-height: 1.6; color: #2f486c; overflow-wrap: anywhere; }
.calculation-offer > header > :first-child { min-width: 0; }
.calculation-status { display: inline-flex; font-size: 12px; line-height: 1.5; font-weight: 550; padding: 4px 7px; border-radius: 4px; max-width: 100%; }
.calculation-status.estimate { color: #365ba4; background: #edf3ff; }
.calculation-status.manual-review { color: #795d2b; background: #fcf7eb; }
.calculation-price { font-size: 22px; font-weight: 650; color: var(--ink); letter-spacing: -.4px; line-height: 1.4; margin-top: 10px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.calculation-reasons { margin-top: 10px; }
.calculation-reasons > summary { font-size: 13px; line-height: 1.6; color: #435b7e; min-height: 38px; padding: 8px 0; }
.calculation-reasons p, .calculation-reasons li { font-size: 13px; line-height: 1.7; color: #53647d; overflow-wrap: anywhere; }
.calculation-reasons ul { margin: 8px 0 0; padding-left: 20px; }
.calculation-reasons li + li { margin-top: 6px; }
.calculation-provenance { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 8px; font-size: 12px; line-height: 1.7; color: var(--muted); }
.calculation-provenance > summary { font-size: 12px; line-height: 1.6; color: #53647d; min-height: 36px; padding: 8px 0; }
.calculation-provenance p, .calculation-provenance dl { font-size: 12px; line-height: 1.7; color: var(--muted); overflow-wrap: anywhere; margin-top: 8px; }
.calculation-provenance dd { margin: 3px 0 10px; color: #435570; }
.bank-applications { border-top: 1px solid var(--line); margin-top: 25px; padding-top: 16px; }
.bank-applications > summary, .project-reviews > summary, .application-facts > summary { font-size: 14px; font-weight: 650; color: #345784; outline-offset: 4px; padding: 8px 0; line-height: 1.6; min-height: 40px; }
.bank-section-body { padding-top: 16px; }
.bank-manual-note { font-size: 12px; line-height: 1.75; color: #795d2b; padding: 12px 14px; background: #fcf8ed; border: 1px solid #e8dec5; border-radius: 8px; }
.bank-list-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.bank-list-toolbar > span { font-size: 12px; }
.bank-application-list { display: grid; gap: 12px; margin-bottom: 14px; }
.bank-application-card { border: 1px solid #dce4ef; background: #fff; border-radius: 8px; }
.bank-application-card > summary, .project-review-card > summary, .application-fact-card > summary { padding: 16px 44px 16px 16px; position: relative; cursor: pointer; list-style: none; border-radius: 8px; }
.bank-application-card > summary::-webkit-details-marker, .project-review-card > summary::-webkit-details-marker, .application-fact-card > summary::-webkit-details-marker { display: none; }
.bank-application-card > summary::after, .project-review-card > summary::after, .application-fact-card > summary::after { content: "›"; position: absolute; right: 16px; top: 16px; font-size: 23px; line-height: 1; color: #4f6383; }
.bank-application-card[open] > summary::after, .project-review-card[open] > summary::after, .application-fact-card[open] > summary::after { transform: rotate(90deg); }
.bank-application-card > summary:hover, .project-review-card > summary:hover, .application-fact-card > summary:hover { background: #f3f7fd; }
.bank-application-card[open] > summary, .project-review-card[open] > summary, .application-fact-card[open] > summary { border-radius: 8px 8px 0 0; background: #f7f9fd; }
.bank-card-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 8px 12px; }
.bank-name { font-size: 14px; font-weight: 650; color: #2f486c; line-height: 1.6; overflow-wrap: anywhere; }
.bank-status { font-size: 12px; color: #3d5d93; background: #eff4fe; padding: 4px 7px; border-radius: 4px; line-height: 1.5; flex-shrink: 0; max-width: 180px; }
.bank-status-approved, .review-status-agreed { color: #356b58; background: #eff8f4; }
.bank-status-rejected, .bank-status-withdrawn, .review-status-cancelled { color: #963e49; background: #fcf1f2; }
.bank-card-company { font-size: 12px; color: #53647d; line-height: 1.7; display: block; margin-top: 9px; overflow-wrap: anywhere; }
.bank-card-meta { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.7; overflow-wrap: anywhere; }
.bank-card-body { border-top: 1px solid var(--line); padding: 18px 16px; }
.bank-application-card:not([open]) .bank-card-body { display: none; }
.bank-card-body > .detail-meta { margin: 0 0 17px; }
.bank-application-form .form-field { margin-bottom: 16px; }
.bank-application-form textarea { min-height: 80px; }
.bank-immutable { font-size: 13px; color: #53647d; line-height: 1.7; margin-bottom: 20px; overflow-wrap: anywhere; }
.bank-immutable strong { font-weight: 600; color: #354d72; }
.bank-immutable p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.bank-application-creator { background: #f5f7fb; border: 1px solid var(--line); border-radius: 8px; padding: 18px 16px; margin-top: 20px; }
.bank-application-creator:empty { display: none; }
.bank-application-creator > .scope-note { margin: 0 0 18px; }
.bank-application-creator .section-title { margin-top: 0; }
.bank-events { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 12px; }
.bank-events > summary { font-size: 13px; font-weight: 550; color: #536b90; padding: 8px 0; min-height: 38px; }
.bank-event-snapshot { margin: 12px 0 0; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 12px; font-size: 12px; line-height: 1.75; }
.bank-event-snapshot dt { color: var(--muted); }
.bank-event-snapshot dd { margin: 0; white-space: pre-wrap; color: #435570; overflow-wrap: anywhere; }
.audit-details { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 14px; }
.audit-details summary { font-size: 14px; font-weight: 600; color: #435b7e; padding: 8px 0; min-height: 40px; outline-offset: 4px; }
.audit-list { list-style: none; margin: 18px 0 8px; padding: 0; }
.audit-list li { border-left: 2px solid #dce5f5; margin-left: 3px; padding: 0 0 20px 15px; }
.audit-action { font-size: 13px; color: #435570; line-height: 1.6; }
.audit-meta { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.6; overflow-wrap: anywhere; }
.audit-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.audit-controls > span { font-size: 12px; color: var(--muted); }
.project-reviews, .application-facts { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 12px; }
.project-review-section-body, .application-fact-section-body { padding-top: 16px; }
.project-review-list, .application-fact-list { display: grid; gap: 12px; margin-bottom: 14px; }
.project-review-card, .application-fact-card { border: 1px solid #dce4ef; border-radius: 8px; background: #fbfcff; }
.review-title, .fact-title { font-size: 14px; font-weight: 600; color: #354d72; line-height: 1.6; overflow-wrap: anywhere; }
.project-review-card-body, .application-fact-card-body { border-top: 1px solid var(--line); padding: 16px; background: #fff; border-radius: 0 0 8px 8px; }
.project-review-form .detail-meta { margin: 0 0 16px; }
.project-review-form textarea { min-height: 80px; }
.project-review-form .form-field { margin-bottom: 16px; }
.project-review-creator, .application-fact-creator { margin-top: 20px; padding: 16px; background: #f5f7fb; border: 1px solid var(--line); border-radius: 8px; }
.project-review-creator:empty, .application-fact-creator:empty { display: none; }
.project-review-creator > h3, .application-fact-creator > h3 { font-size: 14px; color: #435b7e; margin-bottom: 18px; }
.review-status-changes_requested, .fact-status-recorded { color: #795d2b; background: #fcf7eb; }
.fact-amount { display: block; font-size: 19px; font-weight: 650; color: #354d72; margin-top: 9px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fact-source { display: block; font-size: 12px; line-height: 1.7; color: #795d2b; overflow-wrap: anywhere; margin-top: 7px; white-space: pre-wrap; }
.fact-status-voided { color: #963e49; background: #faf0f2; }
.application-fact-card:has(.fact-status-voided) .fact-amount { color: #68758b; text-decoration: line-through; }
.application-fact-form .form-field, .application-fact-void-form .form-field { margin-bottom: 16px; }
.application-fact-form [hidden] { display: none; }
.application-fact-void-form { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.application-fact-void-form textarea { min-height: 80px; }
.fact-snapshot { margin: 16px 0; }
.fact-void-reason { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.8; color: #963e49; margin-top: 8px; }
.fact-optional-note { margin: 0 0 18px; }
.fact-optional-note > summary { font-size: 13px; color: #435f91; cursor: pointer; padding: 8px 0; min-height: 38px; }
.fact-optional-note .form-field { margin-top: 13px; margin-bottom: 0; }

/* Sign-in shares the working interface's type scale and form controls. */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: #fff; }
.login-intro { background: #eef3ff; padding: 47px 65px; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; position: relative; overflow: hidden; }
.login-intro:after { content: ""; width: 460px; height: 460px; border: 85px solid #dce6ff; position: absolute; border-radius: 50%; right: -160px; bottom: -180px; pointer-events: none; }
.login-message { max-width: 470px; position: relative; z-index: 1; margin: 80px 0; }
.login-message h1 { font-size: 49px; letter-spacing: -2px; line-height: 1.15; color: #193e96; font-weight: 600; }
.login-message p { margin-top: 24px; font-size: 15px; color: #536990; line-height: 1.85; max-width: 340px; }
.login-footnote { color: #536990; font-size: 12px; position: relative; z-index: 1; max-width: 350px; line-height: 1.8; }
.login-main { display: grid; place-items: center; padding: 60px 45px; min-width: 0; }
.login-box { width: 100%; max-width: 360px; }
.login-box h2 { font-size: 27px; margin-bottom: 12px; font-weight: 650; letter-spacing: -.7px; line-height: 1.3; }
.login-box > .subtitle { margin-bottom: 30px; font-size: 14px; }
.login-box .button { width: 100%; margin-top: 6px; }
.login-hint { font-size: 12px; color: var(--muted); line-height: 1.8; margin-top: 25px; padding-top: 21px; border-top: 1px solid var(--line); }
.login-logo-mobile { display: none; }

@media (min-width: 1600px) {
  .content { padding: 40px 44px; }
  .topbar { padding-right: 44px; padding-left: 44px; }
  .board-column { flex-basis: 288px; }
  .app-shell { grid-template-columns: 250px minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 208px minmax(0, 1fr); }
  .sidebar { padding: 25px 14px 20px; }
  .sidebar .brand { padding-left: 4px; gap: 9px; }
  .brand-word { font-size: 16px; }
  .content { padding: 28px 24px; }
  .topbar { padding: 14px 24px; }
  .environment { max-width: 380px; }
  .summary-card { padding: 16px; }
  .summary-icon { display: none; }
  .summary-card:nth-child(2) .summary-value { font-size: 22px; }
  .search-input { width: 190px; }
  .toolbar { gap: 12px; }
  .login-intro { padding: 40px; }
  .login-message h1 { font-size: 42px; }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: relative; height: auto; display: block; padding: 17px 18px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { padding: 0 90px 18px 0; }
  .brand-mark { width: 34px; height: 34px; font-size: 28px; border-radius: 10px; }
  .brand-word { font-size: 16px; }
  .brand-word span { font-size: 11px; letter-spacing: 1.4px; }
  .nav { display: flex; gap: 4px; }
  .nav-button { flex: 1; min-width: 0; width: auto; justify-content: center; padding: 11px 9px; border-radius: 7px 7px 0 0; font-size: 13px; gap: 7px; min-height: 44px; }
  .nav-symbol { font-size: 17px; width: 18px; }
  .sidebar-note, .sidebar .nav-label { display: none; }
  .user-block { position: absolute; right: 12px; top: 14px; border: 0; padding: 0; gap: 6px; }
  .user-copy { display: none; }
  .user-block .avatar { width: 30px; height: 30px; font-size: 11px; }
  .topbar { min-height: 45px; padding: 10px 18px; gap: 12px; }
  .breadcrumb { display: none; }
  .environment { font-size: 12px; padding: 5px 8px; max-width: 100%; }
  .content { padding: 24px 18px; }
  .page-heading { gap: 16px; align-items: flex-start; margin-bottom: 24px; }
  h1 { font-size: 28px; }
  .eyebrow { font-size: 12px; letter-spacing: .7px; }
  .subtitle { font-size: 13px; margin-top: 9px; line-height: 1.7; }
  .heading-actions { padding-top: 3px; }
  .heading-actions .button { padding: 10px 12px; font-size: 13px; gap: 6px; }
  .heading-actions .button.ghost { display: none; }
  .summary-grid { gap: 10px; margin-bottom: 22px; }
  .summary-card { padding: 14px; border-radius: 8px; min-height: 110px; }
  .summary-label { font-size: 12px; line-height: 1.5; margin-bottom: 8px; }
  .summary-value { font-size: 24px; }
  .summary-caption { font-size: 12px; }
  .toolbar { align-items: stretch; margin-bottom: 18px; }
  .toolbar-left { flex-basis: 100%; width: 100%; gap: 8px; }
  .search-form { flex: 1 1 200px; min-width: 0; }
  .search-input { width: 100%; min-width: 0; }
  .toolbar-select { flex: 1 1 160px; max-width: none; min-width: 0; }
  .toolbar-filters { flex-basis: 100%; max-width: none; gap: 8px; }
  .toolbar-filter-field { flex-basis: 120px; max-width: none; }
  .toolbar-right { width: 100%; justify-content: flex-start; gap: 8px; margin-left: 0; }
  .refresh-caption { margin-left: auto; }
  .board { gap: 12px; }
  .board-column { flex: 0 0 280px; max-width: 280px; }
  .page-bottom { align-items: flex-start; }
  .empty-state { padding: 44px 20px; }
  .empty-state p { font-size: 14px; }
  .dialog { width: 100%; border: 0; }
  .dialog-header { padding: 20px 22px 18px; }
  .dialog-header h2 { font-size: 21px; }
  .dialog-scroll { padding: 24px 22px; }
  .dialog-footer { padding: 14px 22px; }
  .login-page { display: block; }
  .login-intro { display: none; }
  .login-main { min-height: 100vh; padding: 40px 27px; }
  .login-logo-mobile { display: block; margin-bottom: 44px; }
  .login-box h2 { font-size: 26px; }
  .table-wrap { border-radius: 8px; }
  td, th { padding: 14px 16px; }
  .pipeline-import { padding: 16px; }
  .pipeline-import-form .pipeline-import-json { height: 220px; max-height: 340px; }
}
@media (max-width: 600px) {
  .nav:has(.nav-button:nth-child(4)) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .nav:has(.nav-button:nth-child(4)) .nav-button { border-radius: 7px; text-align: center; overflow-wrap: anywhere; }
  .sidebar { padding-top: 14px; }
  .sidebar .brand { padding-bottom: 12px; }
  .topbar { padding-top: 8px; padding-bottom: 8px; }
  .content { padding-top: 18px; }
  .summary-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-bottom: 16px; }
  .summary-card { min-height: 84px; padding: 12px; }
  .summary-label { margin-bottom: 6px; line-height: 1.4; }
  .summary-value { font-size: 23px; }
  .summary-caption { display: none; }
  .summary-card:nth-child(2) { grid-column: 1 / -1; order: 3; min-height: 78px; }
  .summary-card:nth-child(2) .summary-value { font-size: 25px; white-space: nowrap; overflow-wrap: normal; }
  .summary-card:nth-child(2) .summary-icon { display: grid; }
  .page-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; margin-bottom: 18px; }
  .page-heading > div:first-child { display: contents; }
  .page-heading .eyebrow { grid-column: 1 / -1; grid-row: 1; margin-bottom: 0; }
  .page-heading h1 { grid-column: 1; grid-row: 2; font-size: 26px; }
  .page-heading .subtitle { grid-column: 1 / -1; grid-row: 3; margin-top: 0; }
  .page-heading .heading-actions { grid-column: 2; grid-row: 2; padding-top: 0; }
  .deal-focus { margin-bottom: 12px; }
  .toolbar { gap: 10px; margin-bottom: 16px; }
  .search-form { flex-basis: 185px; }
  .toolbar-select { flex-basis: 145px; }
  .toolbar-right { flex-wrap: wrap; }
  .relation-card { align-items: flex-start; flex-wrap: wrap; }
  .relation-card .relation-copy { flex-basis: 100%; }
  .relation-actions { width: 100%; flex-wrap: wrap; }
  .relation-actions > .button { flex: 1; }
  .bank-card-header { gap: 8px; }
  .bank-status { max-width: 100%; }
}
@media (max-width: 480px) {
  .content { padding: 18px 16px 22px; }
  .sidebar { padding-right: 16px; padding-left: 16px; }
  .topbar { padding-right: 16px; padding-left: 16px; }
  .nav-button { padding-right: 7px; padding-left: 7px; }
  .nav-symbol { display: none; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .form-field input, .form-field textarea, .form-field select { font-size: 16px; }
  .pipeline-import-form .pipeline-import-json { font-size: 16px; }
  .dialog-header { padding: 18px 18px 16px; }
  .dialog-scroll { padding: 22px 18px; }
  .dialog-footer { padding: 14px 18px; gap: 12px; }
  .dialog-footer .muted { max-width: 165px; }
  .bank-event-snapshot { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .bank-event-snapshot dd { margin-bottom: 8px; }
  .bank-application-creator, .project-review-creator, .application-fact-creator, .bank-card-body, .project-review-card-body, .application-fact-card-body { padding: 14px; }
  .calculator-bank-grid { grid-template-columns: minmax(0, 1fr); }
  .calculation-card-body, .calculation-offer { padding: 12px; }
  .document-reader-grid { grid-template-columns: minmax(0, 1fr); }
  .document-card-body, .document-form { padding: 14px; }
  .inline-search { align-items: stretch; flex-wrap: wrap; }
  .inline-search .form-field { flex-basis: 100%; }
  .inline-search .button { margin: -6px 0 16px; }
  .focus-tab, .focus-overdue { padding-right: 10px; padding-left: 10px; }
  .focus-overdue { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.project-summary { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: baseline; padding: 15px 18px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--muted); }
.project-summary strong { color: var(--ink); }
.project-card-products { display: grid; gap: 10px; margin: 16px 0; }
.project-card-products > div { display: grid; gap: 3px; padding-bottom: 9px; border-bottom: 1px solid var(--line); font-size: 13px; }
.project-card-products strong { font-size: 16px; font-weight: 600; }
.project-product-match { display: block; color: #315b99; font-size: 12px; line-height: 1.5; }
.contact-picker-search { display: flex; gap: 8px; }
.contact-picker-search input { flex: 1; min-width: 0; }
.contact-picker-results { max-height: 250px; overflow-y: auto; border: 1px solid var(--line); border-radius: 9px; background: white; margin-top: 6px; padding: 5px; }
.contact-picker-results button { display: block; width: 100%; min-height: 44px; padding: 10px; text-align: left; color: var(--ink); background: white; border-radius: 6px; overflow-wrap: anywhere; }
.contact-picker-results button:hover, .contact-picker-results button[aria-selected='true'] { background: #edf4ff; }
.datetime-control::-webkit-calendar-picker-indicator { display: none; }
.calendar-toggle { width: fit-content; min-height: 42px; margin-top: 6px; }
.form-grid > .form-field:has(.datetime-picker:not([hidden])) { grid-column: 1 / -1; }
.datetime-picker { width: 100%; max-width: 420px; padding: 14px; margin-top: 10px; background: white; border: 1px solid #bccbe2; border-radius: 14px; box-shadow: 0 8px 24px #17253d0d; }
.calendar-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; text-transform: capitalize; }
.calendar-heading button { background: #f0f4fc; color: var(--ink); border-radius: 9px; width: 42px; height: 42px; font-size: 24px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px; }
.calendar-weekday { text-align: center; color: var(--muted); font-size: 12px; padding: 5px 0; }
.calendar-day { min-height: 40px; border-radius: 8px; background: white; color: var(--ink); padding: 4px; }
.calendar-day.outside { color: var(--muted); background: #f7f9fc; }
.calendar-day:hover { background: #edf4ff; }
.calendar-day[aria-pressed='true'] { background: var(--blue); color: white; font-weight: 650; }
.calendar-shortcuts, .calendar-time, .calendar-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.calendar-shortcuts button, .calendar-actions > button:not(.primary) { min-height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: white; color: var(--ink); }
.calendar-time select { width: 76px; min-height: 44px; }
.calendar-time + .hint { margin-top: 8px; }
.calendar-actions { justify-content: flex-end; padding-top: 12px; border-top: 1px solid var(--line); }
.project-context { padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.project-parties { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-bottom: 12px; }
.project-parties > div { display: grid; gap: 5px; }
.project-party-name { text-align: left; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.project-common, .project-product-add { margin-top: 14px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.project-common > summary, .project-product-add > summary { padding: 13px 14px; cursor: pointer; font-weight: 600; line-height: 1.5; min-height: 46px; }
.project-common-form, .project-product-form { padding: 14px; }
.project-common > div, .project-product-add > div, .project-product-add > p { margin-left: 14px; margin-right: 14px; }
.project-context > .section-title { margin-top: 24px; }
.project-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.project-product-tab { display: grid; gap: 6px; padding: 12px; min-height: 80px; text-align: left; align-content: start; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); cursor: pointer; }
.project-product-tab[aria-pressed='true'] { border-color: #315b99; background: #edf4ff; box-shadow: inset 0 0 0 1px #315b99; }
.project-product-kind { font-size: 14px; font-weight: 600; line-height: 1.5; }
.project-product-state { font-size: 13px; color: #51607a; line-height: 1.5; overflow-wrap: anywhere; }
.bank-decision-amount { margin: 12px 0; }
.bank-decision-amount > summary { cursor: pointer; padding: 8px 0; }
.bank-decision-amount > .form-field { margin-top: 8px; }
@media (max-width: 480px) {
  .project-parties { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .project-products { grid-template-columns: minmax(0, 1fr); }
  .project-product-tab { min-height: 66px; }
  .project-summary { font-size: 14px; gap: 6px; }
}
:root .bank-manual-overview { margin: 12px 0; padding: 12px; border: 1px solid var(--border, #d8e2ef); border-radius: 10px; background: #f6f9fe; }
:root .bank-manual-markers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }

/* Private document upload/download, shared by company and application scopes. */
.document-file { display:flex; flex-direction:column; align-items:flex-start; gap:8px; min-width:0; margin:12px 0; }
.document-download { max-width:100%; white-space:normal; overflow-wrap:anywhere; text-align:left; }
.document-period { font-weight:650; }
.document-period-fields { margin:12px 0; }
.document-form input[type="file"],.document-version-form input[type="file"] { width:100%; max-width:100%; min-width:0; }

/* Original B2G mark and accent from b2gfinance.ru, read2026-10-20. */
:root{--brand:#049FE5;--blue:#0074a8;--blue-deep:#00527b;}
.brand-logo{width:48px;height:48px;flex:none;object-fit:contain;}
.brand-word{font-size:29px;line-height:1;font-weight:750;letter-spacing:-1px;}
.brand-word .brand-finance{font-size:18px;letter-spacing:0;text-transform:none;color:var(--ink);margin-top:4px;}
.brand-word small{display:block;font-size:9px;letter-spacing:0;color:var(--muted);font-weight:500;margin-top:8px;}
.button.primary{background:var(--brand);color:#082637;}
.button.primary:hover{background:#37b4ec;color:#082637;}
.nav-button.active,.filter-pills button[aria-pressed=true]{background:#e1f4fe;color:#00527b;}
.contact-type{display:flex;gap:4px;padding:4px;border:1px solid var(--line);border-radius:10px;background:var(--soft);}
.contact-type-option{flex:1;position:relative;cursor:pointer;}
.contact-type-option input{position:absolute;opacity:0;width:1px;height:1px;}
.contact-type-option span{display:block;padding:11px 18px;border-radius:7px;text-align:center;color:var(--muted);font-weight:600;}
.contact-type-option input:checked+span{background:var(--brand);color:#082637;}
.contact-type-option input:focus-visible+span{outline:none;background:#e8f0f5;text-decoration:underline;text-underline-offset:4px;}
@media(max-width:700px){.brand-logo{width:36px;height:36px}.brand-word{font-size:23px}.brand-word .brand-finance{font-size:15px}.brand-word small{display:none}}

/* Staff controls reuse the card form; checkbox hit areas stay compact. */
.staff-form .form-field input[type="checkbox"] { width:24px; min-height:24px; height:24px; padding:0; }
.staff-form .table-wrap select { min-width:140px; max-width:200px; min-height:44px; }

/* Authorized0.42 workspace: a stable path through parameters, offers and files. */
.dialog.product-workspace { width:850px; }
.product-section-nav { position:sticky; top:-26px; z-index:3; display:flex; flex-wrap:wrap; gap:6px; padding:12px 0; margin:0 0 18px; background:#fff; border-bottom:1px solid var(--line); }
.product-section-nav .button { min-height:40px; padding:8px 13px; background:var(--soft); color:var(--blue-deep); }
.product-workspace .project-context { margin-bottom:18px; padding-bottom:18px; }
.product-workspace .project-products { grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); }
.product-workspace .project-context>.section-title { margin-top:14px; }
.project-context-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:flex-start; margin-top:12px; }
.project-context-actions .project-common,.project-context-actions .project-product-add { flex:1; margin:0; min-width:0; }
.project-context-actions details[open] { flex-basis:100%; }
.project-context-actions>button { margin:0; min-height:46px; }
.product-workspace .deal-overview { display:grid; grid-template-columns:1fr auto; column-gap:16px; }
.product-workspace .deal-overview-label { grid-column:1; margin-bottom:3px; }
.product-workspace .deal-overview-meta { grid-column:1; }
.product-workspace .deal-overview-amount { grid-column:2; grid-row:1/3; margin:0; align-self:center; }
.product-workspace .deal-overview-action { grid-column:1/-1; margin-top:8px; padding-top:8px; }
.product-workspace .deal-overview-next-meta { grid-column:1; }
.product-workspace .deal-overview>.button { grid-column:2; grid-row:4; margin-top:8px; }
.product-section-nav .button[aria-pressed=true] { background:#dff3fd; color:#00527b; box-shadow:inset 0 -2px var(--brand); }
.product-workspace .project-product-tab[aria-pressed='true'] { border-color:var(--brand); box-shadow:inset 0 0 0 1px var(--brand); background:#edf9ff; }
.product-workspace .deal-overview { margin-bottom:16px; padding:14px 16px; background:#f3faff; border-color:#cce9f6; }
.product-workspace .deal-calculator,.product-workspace .deal-documents,.product-workspace .bank-applications,.product-workspace .audit-details { border:1px solid var(--line); border-radius:12px; padding:0; margin-top:16px; background:#fff; }
.product-workspace .deal-calculator>summary,.product-workspace .deal-documents>summary,.product-workspace .bank-applications>summary,.product-workspace .audit-details>summary { padding:16px 18px; min-height:52px; color:var(--ink); font-size:15px; }
.product-workspace .calculator-body,.product-workspace .documents-body,.product-workspace .bank-section-body,.product-workspace .audit-body { padding:0 18px 18px; }
.card-section { border:1px solid var(--line); border-radius:12px; padding:18px; margin:20px 0; min-width:0; }
.card-section>h3 { margin-bottom:14px; }
.card-section>summary { min-height:40px; font-weight:650; }
.selected-offer { background:#f2faff; border-color:#b6deef; }
.selected-offer-summary { font-size:16px; font-weight:650; margin-bottom:14px; }
.offer-finance { display:grid; gap:8px; margin-top:12px; }
.offer-finance strong { font-size:18px; font-variant-numeric:tabular-nums; }
.offer-actions { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-top:12px; }
.offer-commission { color:var(--muted); font-size:13px; margin:6px 0; }
.calculator-new { margin:12px 0 18px; border:1px solid var(--line); border-radius:8px; padding:12px; }
.calculator-new>summary { min-height:24px; font-weight:600; color:var(--blue-deep); }
.calculator-new[open]>summary { margin-bottom:12px; }
.product-workspace .calculation-offer { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:5px 14px; padding:15px; }
.product-workspace .calculation-offer>header { grid-column:1; display:block; }
.product-workspace .calculation-offer>header p { margin:3px 0; font-size:13px; color:var(--muted); }
.product-workspace .calculation-offer .calculation-status { display:none; }
.product-workspace .calculation-offer>.calculation-price { grid-column:2; grid-row:1/3; font-size:21px; margin:0; align-self:start; }
.product-workspace .calculation-offer>.offer-commission { grid-column:1; margin:0; }
.product-workspace .calculation-offer>.offer-workspace,.product-workspace .calculation-offer>.calculation-reasons { grid-column:1/-1; }
@media(max-width:480px){.product-workspace .calculation-offer { grid-template-columns:minmax(0,1fr); }.product-workspace .calculation-offer>.calculation-price {grid-column:1;grid-row:auto;font-size:20px;}}
.button.document-readiness { min-height:40px; white-space:normal; text-align:left; font-size:13px; padding:8px 12px; }
.document-readiness.ready { background:#e9f7ed; color:#205e36; border:1px solid #bbddc5; }
.document-readiness.missing { background:#fff6d9; color:#795411; border:1px solid #e6d18d; }
.document-readiness.review { background:#f1f3f6; color:#4e596c; border:1px solid #d4dae3; }
.offer-document-details { border-top:1px solid var(--line); margin-top:12px; padding-top:8px; }
.offer-document-details>summary { min-height:36px; font-size:13px; }
.offer-document-body { padding:12px 0 0; }
.offer-document-body textarea { width:100%; border:1px solid var(--line); border-radius:8px; padding:12px; margin-top:12px; min-height:110px; }
.document-requirements { display:grid; gap:10px; margin:14px 0; }
.requirement-result { padding:12px; border:1px solid var(--line); border-radius:9px; }
.requirement-result-heading { display:flex; flex-wrap:wrap; justify-content:space-between; gap:5px 14px; }
.requirement-result-heading>span { color:var(--muted); font-size:12px; }
.requirement-result.verified,.requirement-result.exception { border-left:3px solid #378751; }
.requirement-result.missing,.requirement-result.unsuitable { border-left:3px solid #b38322; }
.requirement-result details { margin-top:10px; }
.requirement-review,.offer-history { margin-top:16px; padding-top:12px; border-top:1px solid var(--line); }
.requirement-editor { min-width:0; border:1px solid var(--line); border-radius:9px; padding:14px; margin:12px 0; }
.requirement-editor legend { max-width:100%; overflow-wrap:anywhere; padding:0 5px; font-weight:600; }
.check-label,.agent-option,.selection-chip { display:flex; gap:10px; align-items:center; min-height:44px; cursor:pointer; }
.check-label { margin:16px 0; }
.check-label input[type=checkbox],.agent-option input[type=checkbox],.selection-chip input[type=checkbox] { width:20px; height:20px; min-height:20px; flex:none; }
.selection-chips { display:flex; gap:8px; flex-wrap:wrap; }
.selection-chip { background:#eaf7fd; color:#00527b; padding:7px 10px; border-radius:8px; overflow-wrap:anywhere; }
.agent-option:has(input:checked) { background:#eaf7fd; }
@media(max-width:600px){
 .dialog.product-workspace { width:100%; }
 .product-workspace .project-products { grid-template-columns:1fr; }
 .product-section-nav { top:-18px; gap:4px; }
 .product-section-nav .button { padding:7px 9px; flex:1; }
 .card-section { padding:14px; }
 .offer-actions>.button { flex:1; }
 .product-workspace .calculator-body,.product-workspace .documents-body,.product-workspace .bank-section-body { padding:0 12px 14px; }
 .requirement-editor .form-grid { grid-template-columns:1fr; }
}
@media(prefers-reduced-motion:reduce){.product-workspace *{scroll-behavior:auto!important;}}

/* Employee workspace: consistent surfaces, deliberate filters and a full product canvas. */
:root {
  --ink: #182b40;
  --muted: #586b7e;
  --line: #dce5ec;
  --soft: #f4f7fa;
  --selection: #e7f5fc;
  --focus: #007bb5;
}
body { background: var(--soft); }

.app-shell { grid-template-columns: 212px minmax(0,1fr); }
.sidebar { padding: 25px 16px 18px; }
.sidebar .brand { padding-bottom: 25px; }
.nav { gap: 4px; }
.nav-button { min-height: 44px; padding: 11px 13px; }
.nav-button.active, .nav-button.active:hover { background: var(--selection); color: #005f8f; }
.nav-button.active { box-shadow: inset 3px 0 var(--brand); }
.topbar { min-height: 60px; padding: 12px 28px; }
.content { padding: 28px; }
.page-heading { margin-bottom: 22px; }
.page-heading .subtitle { margin-top: 8px; }
.summary-strip { margin-bottom: 18px; }
.deal-focus { gap: 6px; }
.work-state-switch { display: flex; gap: 2px; padding: 3px; margin-left: 10px; background: #e7edf2; border: 1px solid #dbe3eb; border-radius: 9px; }
.work-state-switch .focus-tab { border: 0; min-height: 34px; background: transparent; padding: 6px 12px; }
.work-state-switch .focus-tab[aria-pressed=true] { background: #fff; color: #005f8f; box-shadow: 0 1px 4px #18344b14; }
.toolbar { padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; gap: 14px; }
.toolbar:has(.toolbar-filters) { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; }
.toolbar:has(.toolbar-filters) .toolbar-left { display: grid; grid-template-columns: minmax(200px,320px) minmax(0,1fr); gap: 14px; align-items: end; }
.toolbar-filters { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); max-width: none; width: 100%; gap: 12px; }
.toolbar-filter-field { max-width: none; }
.toolbar-left .search-form { width: 100%; }
.search-input { width: 100%; flex: 1; }
.toolbar-right { gap: 8px; align-items: center; padding-top: 23px; }
.toolbar .button, .toolbar .view-switch { flex-shrink: 0; }
.refresh-caption { font-size: 11px; }
@media(min-width:1001px) and (max-width:1599px) {
  .toolbar:has(.toolbar-filters) .toolbar-left { grid-template-columns: minmax(0,1fr); }
  .toolbar:has(.toolbar-filters) .search-form { max-width: 420px; }
  .toolbar-right { padding-top: 0; }
}
.board { gap: 14px; }
.board-column { flex-basis: 286px; min-width: 270px; }
.column-heading { margin-bottom: 12px; }
.deal-card { padding: 16px; box-shadow: 0 2px 6px #17334b05; }
.project-card-products { gap: 7px; }
.table-wrap th { position: sticky; top: 0; z-index: 1; }
.table-wrap td:first-child, .table-wrap tbody th:first-child { background: #fff; }
.table-wrap tr:hover td:first-child { background: #f7faff; }
.dialog-header h2:focus, h1:focus { outline: none; }
.dialog-scroll { overscroll-behavior: contain; }
.dialog-footer { box-shadow: 0 -3px 14px #17334b05; }
.dialog.product-workspace { inset: 0; width: 100vw; max-width: 100vw; border: 0; box-shadow: none; background: var(--soft); }
.product-workspace .dialog-header { padding: 17px 28px; align-items: center; }
.product-workspace .dialog-header .eyebrow { font-size: 10px; letter-spacing: 1px; margin-bottom: 3px; }
.product-workspace .dialog-header h2 { font-size: 20px; }
.product-workspace .dialog-scroll { padding: 24px 28px; scroll-padding-top: 72px; }
.product-workspace:has(.project-context) .dialog-scroll { display: grid; grid-template-columns: 280px minmax(0,1fr); gap: 24px; align-items: start; align-content: start; }
.product-workspace .dialog-scroll > div:first-child:empty { display: none; }
.product-workspace .dialog-scroll > div:first-child:not(.project-product-editor):not(:empty),
.product-workspace .record-readonly { grid-column: 1/-1; }
.product-workspace .project-context { position: sticky; top: 0; padding: 18px; margin: 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; min-width: 0; }
.product-workspace .project-parties { grid-template-columns: minmax(0,1fr); gap: 15px; }
.product-workspace .project-parties .muted { font-size: 11px; }
.product-workspace .project-party-name { font-size: 14px; line-height: 1.5; }
.product-workspace .project-context > .section-title { margin: 20px 0 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.product-workspace .project-products { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; }
.product-workspace .project-product-tab { min-width: 0; padding: 12px; border-radius: 8px; }
.project-product-kind { line-height: 1.5; }
.project-product-state { line-height: 1.6; }
.product-workspace .project-context-actions { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; margin-top: 16px; }
.product-workspace .project-context-actions > button { white-space: normal; }
.product-workspace .project-common, .product-workspace .project-product-add { width: 100%; }
.product-workspace .project-context-actions details > summary { padding: 11px 12px; }
.project-product-editor { min-width: 0; max-width: 1200px; width: 100%; margin: 0 auto; }
.product-section-nav { position: sticky; top: 0; margin: 0 0 18px; padding: 8px; gap: 5px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 3px 12px #19334c06; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
.product-section-nav .button { min-height: 40px; padding: 9px 17px; background: transparent; white-space: nowrap; flex: 0 0 auto; }
.product-section-nav .button[aria-pressed=true] { background: var(--selection); color: #005578; box-shadow: none; }
.product-workspace #record-form { border: 1px solid var(--line); border-radius: 12px; padding: 24px; background: #fff; }
.product-workspace #record-form:has(.product-ordinary-fields[hidden]):has(.product-selection-fields:empty) { display: none; }
.product-workspace #record-form:has(.product-selection-fields:not([hidden])) { padding: 0; border: 0; background: transparent; }
.product-workspace .product-ordinary-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 24px; align-items: start; }
.product-ordinary-fields > :not(.form-field), .product-ordinary-fields > .form-field:has(textarea),
.product-ordinary-fields > .form-field:has([name=title]), .product-ordinary-fields > .form-field:has([name=expectedAction]) { grid-column: 1/-1; }
.product-workspace .product-ordinary-fields > .form-field { margin-bottom: 20px; }
.product-workspace .product-section-title { margin: 0 0 20px; }
.product-workspace .term-section { padding: 18px; margin: 0 0 20px; background: var(--soft); border: 1px solid var(--line); border-radius: 9px; }
.product-workspace .term-section .form-field:last-child { margin-bottom: 0; }
.product-workspace .deal-overview { background: #eaf6fc; margin-bottom: 16px; padding: 16px 20px; }
.product-workspace .deal-overview .button { background: #fff; }
.product-workspace .card-section { margin: 0 0 18px; padding: 20px; }
.product-workspace .selected-offer { border-color: #bddfed; background: #fff; }
.product-workspace .offer-finance { gap: 9px; padding: 14px 16px; background: var(--selection); border-radius: 8px; }
.product-workspace .deal-calculator, .product-workspace .deal-documents,
.product-workspace .bank-applications, .product-workspace .audit-details { margin-top: 16px; border-radius: 12px; }
.product-workspace .calculation-card { box-shadow: none; border-radius: 9px; }
.product-workspace .calculation-card-body { padding: 16px; }
.product-workspace .calculation-offer { padding: 18px; gap: 8px 20px; }
.product-workspace .calculation-offer .calculation-status { display: inline-block; margin-top: 7px; font-size: 11px; }
.product-workspace .calculation-offer > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; }
.product-workspace .calculation-offer > header h3 { width: 100%; }
.product-workspace .calculation-offer > .calculation-price { grid-row: 1/3; font-size: 22px; white-space: nowrap; }
.offer-actions .document-readiness { max-width: 100%; }
.product-workspace .offer-document-body { padding-top: 10px; }
.product-workspace .requirement-result { padding: 14px; background: #fbfcfd; }
.product-workspace .requirement-editor { background: #fff; }
.product-workspace .detail-meta { margin: 16px 4px; font-size: 11px; }
.product-workspace .dialog-footer { padding: 14px 28px; }
.product-workspace .dialog-footer .primary { min-width: 180px; }

/* Team members and the selected employee form share a stable two-pane workspace. */
.team-workspace { display: grid; grid-template-columns: 256px minmax(0,1fr); gap: 24px; align-items: start; }
.team-notice { grid-column: 1/-1; }
.team-notice:empty { display: none; }
.team-list { position: sticky; top: 20px; min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.team-list > h2 { font-size: 16px; margin-bottom: 14px; }
.team-list > .button { width: 100%; margin-bottom: 14px; }
.team-employees { display: grid; gap: 5px; }
.team-employee.button { justify-content: flex-start; white-space: normal; text-align: left; border-color: transparent; background: transparent; min-height: 45px; padding: 11px 12px; line-height: 1.5; }
.team-employee.button:hover { background: var(--soft); }
.team-employee.button[aria-pressed=true] { background: var(--selection); color: #005b85; border-color: #c5e4f3; }
.team-editor { min-width: 0; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.staff-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 20px; }
.staff-form > :not(.form-field) { grid-column: 1/-1; }
.staff-form > h2 { font-size: 20px; margin-bottom: 24px; overflow-wrap: anywhere; }
.staff-form > h3 { margin: 12px 0 14px; padding-top: 20px; border-top: 1px solid var(--line); }
.staff-form > p { color: var(--muted); line-height: 1.7; margin-bottom: 16px; font-size: 13px; }
.staff-form .form-field:has([type=checkbox]) { grid-column: 1/-1; flex-direction: row; align-items: center; padding: 10px 12px; background: var(--soft); border-radius: 8px; margin-bottom: 8px; gap: 12px; }
.staff-form .form-field:has([type=checkbox]) input { order: -1; flex-shrink: 0; }
.staff-form .table-wrap { margin-bottom: 20px; }
.staff-form .table-wrap th, .staff-form .table-wrap td { padding: 12px; }
.staff-form .table-wrap select { min-width: 124px; font-size: 12px; }
.staff-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 20px; margin-top: 24px; border-top: 1px solid var(--line); }

@media(max-width:1200px) {
 .team-workspace { grid-template-columns: 220px minmax(0,1fr); gap: 16px; }
 .staff-form { grid-template-columns: minmax(0,1fr); }
 .toolbar:has(.toolbar-filters) { grid-template-columns: minmax(0,1fr); }
 .toolbar:has(.toolbar-filters) .toolbar-left { grid-template-columns: minmax(0,1fr); }
 .toolbar-right { padding: 0; margin: 0; justify-content: flex-end; }
 .toolbar:has(.toolbar-filters) .search-form { max-width: none; }
 .product-workspace:has(.project-context) .dialog-scroll { grid-template-columns: 250px minmax(0,1fr); gap: 20px; }
}
@media(max-width:1000px) {
 .app-shell { grid-template-columns: minmax(0,1fr); }
 .sidebar { position: relative; height: auto; padding: 15px 22px; }
 .sidebar .brand { padding: 0; }
 .app-shell .sidebar .nav { display: flex; grid-template-columns: none; flex-wrap: nowrap; overflow-x: auto; width: 100%; margin-top: 14px; gap: 5px; }
 .nav-button { width: auto; flex: 0 0 auto; min-height: 42px; padding: 9px 13px; }
 .nav-button.active { box-shadow: inset 0 -2px var(--brand); }
 .sidebar .nav-label, .sidebar-note { display: none; }
 .sidebar .user-block { position: absolute; right: 20px; top: 20px; padding: 0; border: 0; max-width: 48%; }
 .content { padding: 24px; }
 .topbar { padding: 12px 24px; }
 .team-workspace { grid-template-columns: 240px minmax(0,1fr); }
 .product-workspace .product-ordinary-fields { grid-template-columns: minmax(0,1fr); }
 .product-workspace .dialog-scroll { padding: 18px; }
 .product-workspace:has(.project-context) .dialog-scroll { gap: 16px; grid-template-columns: 230px minmax(0,1fr); }
 .product-workspace #record-form { padding: 18px; }
}
@media(max-width:760px) {
 .product-workspace:has(.project-context) .dialog-scroll { display: block; }
 .product-workspace .project-context { position: static; padding: 14px; margin-bottom: 16px; }
 .product-workspace .project-parties { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
 .product-workspace .project-products { display: flex; overflow-x: auto; gap: 8px; padding: 2px 2px 8px; }
 .product-workspace .project-product-tab { flex: 0 0 220px; }
 .product-workspace .project-context > .section-title { margin-top: 10px; padding-top: 10px; }
 .product-workspace .project-context-actions { display: flex; flex-wrap: wrap; margin-top: 8px; }
 .product-workspace .project-context-actions > button { width: 100%; min-height: 40px; }
 .product-workspace .project-context-actions details { flex: 1 1 120px; }
 .product-workspace .project-context-actions details[open] { flex-basis: 100%; }
 .product-workspace .product-ordinary-fields { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 16px; }
 .team-workspace { grid-template-columns: minmax(0,1fr); }
 .team-list { position: static; }
 .team-employees { display: flex; overflow-x: auto; }
 .team-employee.button { flex: 0 0 200px; }
 .team-list > .button { width: auto; }
 .staff-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .table-wrap th:first-child, .table-wrap td:first-child { position: sticky; left: 0; z-index: 1; max-width: 240px; min-width: 170px; }
 .table-wrap thead th:first-child { z-index: 2; }
}
@media(max-width:600px) {
 .sidebar { padding: 14px 16px; }
 .sidebar .brand img { width: 36px; height: 36px; }
 .sidebar .user-copy { display: none; }
 .sidebar .user-block { top: 20px; right: 16px; }
 .sidebar .nav { margin-top: 12px; }
 .nav-button { font-size: 12px; padding: 9px 10px; gap: 7px; }
 .nav-symbol { font-size: 15px; width: 17px; }
 .topbar { padding: 10px 16px; min-height: 48px; }
 .topbar .environment { max-width: 100%; white-space: normal; }
 .content { padding: 22px 16px; }
 .page-heading { gap: 14px; margin-bottom: 18px; }
 h1 { font-size: 26px; }
 .toolbar { padding: 12px; gap: 12px; }
 .toolbar-filters { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
 .toolbar-right { flex-wrap: wrap; justify-content: space-between; }
 .toolbar-select { font-size: 13px; }
 .deal-focus { gap: 6px; }
 .work-state-switch { margin-left: 0; }
 .focus-tab,.focus-overdue { padding: 8px 10px; }
 .product-workspace .dialog-header { padding: 14px 16px; }
 .product-workspace .dialog-header h2 { font-size: 17px; line-height: 1.4; }
 .product-workspace .dialog-scroll { padding: 14px 12px; }
 .product-workspace .project-parties { grid-template-columns: minmax(0,1fr); gap: 8px; }
 .product-section-nav { top: 0; padding: 5px; gap: 3px; margin-bottom: 12px; border-radius: 8px; }
 .product-section-nav .button { flex: 0 0 auto; padding: 9px 12px; font-size: 12px; }
 .product-workspace #record-form { padding: 16px; }
 .product-workspace .product-ordinary-fields { grid-template-columns: minmax(0,1fr); }
 .product-workspace .deal-overview { padding: 14px; grid-template-columns: minmax(0,1fr); }
 .product-workspace .deal-overview-amount { grid-column: 1; grid-row: auto; margin-top: 8px; }
 .product-workspace .deal-overview > .button { grid-column: 1; grid-row: auto; justify-self: start; }
 .product-workspace .card-section { padding: 16px; }
 .product-workspace .calculation-offer { grid-template-columns: minmax(0,1fr); padding: 14px; gap: 8px; }
 .product-workspace .calculation-offer > .calculation-price { grid-column: 1; grid-row: auto; }
 .product-workspace .calculation-card-body { padding: 10px; }
 .product-workspace .calculator-body,.product-workspace .documents-body,.product-workspace .bank-section-body,.product-workspace .audit-body { padding: 0 12px 14px; }
 .product-workspace .dialog-footer { padding: 12px 16px; gap: 12px; }
 .product-workspace .dialog-footer .primary { min-width: 0; }
 .dialog-footer .muted { max-width: 42%; }
 .team-list, .team-editor { padding: 16px; }
 .staff-form { grid-template-columns: minmax(0,1fr); }
 .form-field input,.form-field textarea,.form-field select { font-size: 16px; }
 .staff-form .table-wrap select { font-size: 14px; }
 .button { white-space: normal; overflow-wrap: anywhere; }
 .product-section-nav .button,.view-switch button { white-space: nowrap; }
}
@media(prefers-reduced-motion:no-preference) {
 .button,.nav-button,.project-product-tab,.team-employee { transition: background-color .15s,border-color .15s,box-shadow .15s; }
}
@media(min-width:761px) {
 .product-workspace .project-context { max-height: calc(100dvh - 200px); overflow-y: auto; scrollbar-width: thin; overscroll-behavior: contain; }
}
@media(min-width:761px) {
 .selected-offer .offer-finance { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .selected-offer .offer-finance > :first-child, .selected-offer .offer-finance > :last-child { grid-column: 1/-1; }
}
@media(max-width:600px) {
 .product-workspace .project-context { padding: 12px; }
 .product-workspace .project-parties { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
 .product-workspace .project-party-name { font-size: 12px; line-height: 1.5; }
 .product-workspace .project-parties .muted { font-size: 10px; }
 .product-workspace .project-context > .section-title { margin: 8px 0; padding-top: 8px; }
 .product-workspace .project-context > .section-title h3 { font-size: 13px; }
 .product-workspace .project-product-tab { flex-basis: 200px; padding: 10px; }
 .product-workspace .project-product-kind { font-size: 12px; }
 .product-workspace .project-product-state { font-size: 11px; }
 .product-workspace .project-context-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; margin-top: 6px; }
 .product-workspace .project-context-actions > button { width: auto; min-height: 46px; padding: 6px; font-size: 10px; }
 .product-workspace .project-context-actions details > summary { padding: 8px 6px; min-height: 46px; font-size: 10px; line-height: 1.5; }
 .product-workspace .project-context-actions details[open] { grid-column: 1/-1; }
 .product-workspace .deal-overview { grid-template-columns: minmax(0,1fr) auto; padding: 12px; column-gap: 10px; }
 .product-workspace .deal-overview-label { font-size: 10px; }
 .product-workspace .deal-overview-meta { font-size: 11px; }
 .product-workspace .deal-overview-amount { grid-column: 2; grid-row: 1/3; margin: 0; font-size: 18px; }
 .product-workspace .deal-overview-action { font-size: 13px; }
 .product-workspace .deal-overview-next-meta { font-size: 11px; }
 .product-workspace .deal-overview > .button { grid-column: 2; grid-row: 4; font-size: 11px; padding: 8px; max-width: 112px; }
}
@media(min-width:761px) {
 .team-list { max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
}
.staff-actions { position: sticky; bottom: 0; z-index: 2; background: #fff; padding-bottom: 12px; box-shadow: 0 -8px 14px #ffffffed; }
.product-workspace:not(:has(.project-context)) #record-form { max-width: 900px; margin: 0 auto; width: 100%; }
.project-context .form-grid { grid-template-columns: minmax(0,1fr); }

/* Scoped personal-table surfaces. Business card controls keep their own styles. */
.columns-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;max-width:100%}.columns-tools select{max-width:220px;padding:8px}.columns-tools button{padding:8px 12px}.columns-status{font-size:12px;color:#526677;max-width:280px}.toolbar-right:has(.columns-tools){flex-wrap:wrap;justify-content:flex-end}.managed-table-wrap{width:100%;max-width:100%;overflow:auto;position:relative;border:1px solid #d9e5eb;border-radius:10px;background:white;overscroll-behavior-x:contain}.managed-table{table-layout:fixed;border-collapse:separate!important;border-spacing:0;min-width:0!important;max-width:none!important}.managed-table th,.managed-table td{box-sizing:border-box;min-width:0!important;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:top;border-right:1px solid #e1eaf0;border-bottom:1px solid #e1eaf0;padding:12px}.managed-table th{height:78px;overflow:visible;background:#f3f7fa}.managed-table th>button{display:block;max-width:calc(100% - 20px);overflow:hidden;text-overflow:ellipsis;text-align:left;font-weight:650;padding:0;border:0;background:none;color:inherit}.managed-table th>button:disabled{opacity:1;cursor:default}.managed-table small{display:block;font-size:11px;color:#637787;font-weight:400;overflow:hidden;text-overflow:ellipsis}.managed-table .effective-pinned{position:sticky!important;background:#fff;z-index:2;box-shadow:1px 0 #d1e0e8}.managed-table th.effective-pinned{z-index:4;background:#f3f7fa}.managed-table td.cell-wrap{white-space:normal}.managed-cell{overflow:hidden}.managed-cell>span,.managed-related>span{display:block;overflow:hidden;text-overflow:ellipsis}.managed-related{margin-bottom:8px}.managed-related>button{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;font-size:12px}.managed-table .table-title{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:inherit}.column-resizer{position:absolute;right:-3px;top:0;bottom:0;width:9px;cursor:col-resize;z-index:6;touch-action:none}.column-resizer:focus,.column-resizer:hover{background:#049fe566}.column-menu{position:absolute;right:10px;top:9px;font-weight:400}.column-menu summary{cursor:pointer;list-style:none}.column-menu>div{position:absolute;right:0;top:25px;min-width:190px;background:white;box-shadow:0 4px 24px #2343;z-index:20;padding:8px;border-radius:8px}.column-menu button{display:block;width:100%;text-align:left;padding:8px;border:0;background:white}.columns-dialog{width:800px;max-width:90vw;height:min(820px,90dvh);max-height:90dvh;padding:0;border:1px solid #cedee8;border-radius:14px;box-shadow:0 16px 80px #16334840;overflow:hidden}.columns-dialog[open]{display:flex;flex-direction:column}.columns-dialog::backdrop,.columns-expansion::backdrop{background:#162c4355}.columns-dialog header,.columns-dialog footer{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;background:#f6f9fb;border-bottom:1px solid #d9e5eb}.columns-dialog footer{border-top:1px solid #d9e5eb;border-bottom:0;flex-wrap:wrap}.columns-dialog h2{font-size:20px;margin:0}.columns-dialog button,.columns-expansion button{padding:7px 10px;cursor:pointer;border:1px solid #ccdce6;border-radius:6px;background:#fff}.columns-dialog footer button:last-child{background:#007faf;color:white}.columns-body{flex:1;min-height:0;overflow:auto;padding:16px}.columns-editor-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}.columns-editor-actions input,.columns-editor-actions select{padding:8px;max-width:100%}.columns-panes{display:grid;grid-template-columns:1fr 1fr;gap:16px}.columns-panes section{min-width:0}.columns-panes input[type=search]{width:100%;padding:10px}.columns-available{max-height:440px;overflow:auto}.columns-available h3{font-size:13px;color:#526b7e;padding:10px 0;margin:0}.columns-available>label{display:flex;gap:9px;padding:8px;border-bottom:1px solid #eef2f5;align-items:center}.columns-available small,.columns-picked>small{display:block;color:#6a7c88;font-size:11px}.columns-selected{max-height:480px;overflow:auto}.columns-selected h3{font-size:14px;margin-top:0}.columns-picked{border:1px solid #d9e5eb;border-radius:8px;padding:10px;margin-bottom:8px}.columns-picked strong{font-size:13px}.columns-picked-controls{display:flex;gap:5px;flex-wrap:wrap;margin-top:8px;align-items:center}.columns-picked-controls button{font-size:11px;padding:4px 6px}.columns-picked-controls input[type=number]{width:70px;padding:4px}.columns-picked-controls label{font-size:11px}.columns-mobile-tabs{display:none}.columns-preview{max-width:100%;margin-top:16px}.columns-preview .managed-table-wrap{max-height:280px}.columns-confirm{position:absolute;inset:25% 10% auto;padding:24px;background:white;box-shadow:0 0 0 200vmax #162c4366;border-radius:12px;z-index:50}.columns-confirm button{margin-right:8px}.columns-expansion{width:700px;max-width:90vw;max-height:85dvh;overflow:auto;border:1px solid #ccdce6;border-radius:12px;padding:20px}.columns-expansion .managed-cell{padding:8px;border-bottom:1px solid #e0eaf0}
@media(max-width:700px){.columns-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0;margin:0;inset:0}.columns-dialog header,.columns-dialog footer{padding:10px 12px}.columns-dialog footer span{width:100%;font-size:12px}.columns-body{padding:10px}.columns-mobile-tabs{display:flex;gap:8px;margin-bottom:10px}.columns-mobile-tabs button[aria-pressed=true]{background:#dceff9}.columns-panes{display:block}.columns-panes[data-tab=available]>section:last-child,.columns-panes[data-tab=selected]>section:first-child{display:none}.columns-available,.columns-selected{max-height:none}.columns-tools{justify-content:flex-start}.columns-status{max-width:100%}.managed-table td:first-child,.managed-table th:first-child{min-width:0!important}.managed-table .table-title{font-size:13px}.columns-editor-actions>input{width:100%}.columns-expansion{width:100vw;max-width:100vw;max-height:95dvh}.columns-confirm{inset:20% 5% auto}}

/* Text cleanup: retain existing sidebar/footer alignment. */
.sidebar > .user-block { margin-top: auto; }
.dialog-footer > .button:only-child { margin-left: auto; }

/* Existing workflow attempt and common save boundary, technical spec21.10. */
.working-attempt-badge { display:inline-block; font-size:12px; font-weight:650; color:var(--ink); padding:3px 8px; border:1px solid var(--line); border-radius:6px; }
.working-attempt-badge[hidden] { display:none; }
@media(max-width:600px) { .dialog-footer:has(.card-save-scope) { flex-wrap:wrap; } .dialog-footer .card-save-scope { max-width:none; flex-basis:100%; } }

.mail-correspondence{margin:12px 0;padding:12px;border:1px solid var(--border,#ddd);border-radius:8px}.mail-correspondence summary{cursor:pointer}.mail-message{padding:10px 0;border-bottom:1px solid var(--border,#ddd)}.mail-body{white-space:pre-wrap;overflow-wrap:anywhere;margin:12px 0}.mail-actions,.mail-relations{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}.mail-link-editor{padding:12px;border:1px solid var(--border,#ddd)}.mail-link-editor input{width:100%}.mail-list{min-width:0}.mail-intake:empty{display:none}

.mail-compose{display:grid;gap:10px;margin:12px 0;padding:12px;border:1px solid var(--border,#ddd)}.mail-compose label{display:grid;gap:4px}.mail-compose input,.mail-compose textarea,.mail-compose select{max-width:100%;min-width:0;width:100%}

/* STAFF03: approved employee workspace; all rules scoped to this module. */
.team-workspace.stx{--ink:#172d43;--muted:#53657b;--quiet:#697b8e;--brand:#049fe5;--link:#006fae;--bg:#f2f5f9;--line:#dce5ee;--sky:#e8f4fc;--mint:#eaf5ef;--lavender:#efedfa;--sand:#fff1d9;--red:#9d4444;--green:#287353;font:14px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none}
.stx *{box-sizing:border-box}
.team-workspace.stx{margin:0}
.stx button,.stx input,.stx select{font:inherit;color:inherit}
.stx button{cursor:pointer;background:none;border:0}
.stx input{min-width:0}
.stx button:disabled{cursor:default;opacity:.45}
.stx button:focus-visible,.stx a:focus-visible,.stx summary:focus-visible{outline:none;text-decoration:underline;text-underline-offset:4px;background-color:#e0e8ed}
.stx input:focus-visible{outline:none;border-bottom-color:#647b8c!important}
.stx a{color:var(--link)}
.stx h1,.stx h2,.stx h3,.stx p{margin:0}
.stx button,.stx input{-webkit-tap-highlight-color:transparent}
.stx svg{width:20px;height:20px;display:block;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.stx [hidden]{display:none!important}
.stx .muted{color:var(--muted)}
.stx .mono{font-variant-numeric:tabular-nums}
.stx .icon-btn{width:36px;height:36px;border-radius:8px;display:inline-flex;justify-content:center;align-items:center;color:var(--muted)}
.stx .icon-btn:hover{background:#172d4309}
.stx .button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:9px 15px;border:1px solid var(--line);border-radius:9px;background:white;font-weight:550;white-space:nowrap}
.stx .button:hover{background:#f8fafc}
.stx .primary{background:var(--brand);border-color:var(--brand);color:#07344d}
.stx .primary:hover{background:#2bafea}
.stx .text-btn{display:inline-flex;align-items:center;gap:7px;min-height:36px;padding:6px 0;color:var(--link);font-size:13px;font-weight:550}
.stx .text-btn:hover{text-decoration:underline;text-underline-offset:4px}
.stx .text-btn svg{width:16px;height:16px}
.stx .eyebrow{text-transform:uppercase;font-size:10px;letter-spacing:.12em;color:var(--muted);font-weight:600}
.stx .avatar{width:40px;height:40px;border-radius:13px;display:grid;place-items:center;flex:none;font-weight:600;color:#315778;background:var(--sky);overflow:hidden}
.stx .avatar img{width:100%;height:100%;object-fit:cover}
.stx .avatar.large{width:68px;height:68px;border-radius:21px;font-size:24px;letter-spacing:-1px}
.stx .badge{display:inline-flex;align-items:center;gap:6px;border-radius:6px;padding:4px 8px;font-size:11px;line-height:18px;white-space:nowrap;background:#edf2f6;color:var(--muted)}
.stx .badge.green{background:#e7f4ed;color:#28664e}
.stx .badge.gold{background:#f8e8c5;color:#775b25}
.stx .badge.gray{background:#eef0f2;color:#596571}
.stx .dot{width:5px;height:5px;border-radius:50%;background:currentColor;display:inline-block;flex:none}
.stx .chrome{height:64px;padding:0 32px;background:white;display:flex;align-items:center;gap:32px;border-bottom:1px solid #edf1f5}
.stx .brand{display:flex;align-items:center;gap:7px;margin-right:12px;flex:none}
.stx .brand>svg{width:35px;height:35px;stroke:none;fill:var(--brand)}
.stx .wordmark{font-size:18px;line-height:18px;font-weight:700;letter-spacing:-.3px;color:#263539}
.stx .wordmark small{display:block;font-size:10px;font-weight:400;letter-spacing:0;line-height:14px}
.stx .global-nav{display:flex;gap:25px;align-items:center;color:var(--muted);font-size:13px;white-space:nowrap}
.stx .chrome-tools{margin-left:auto;display:flex;gap:16px;align-items:center}
.stx .global-search{display:flex;gap:9px;align-items:center;font-size:12px;color:var(--muted);border-bottom:1px solid var(--line);padding:7px 0;min-width:200px}
.stx .global-search svg{width:16px;height:16px}
.stx .me{width:31px;height:31px;border-radius:50%;display:grid;place-items:center;background:var(--sky);font-size:11px;color:#356482}
.stx .page{max-width:1520px;margin:0 auto;padding:33px 40px 30px}
.stx .page-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:31px}
.stx .page-head h1{font-size:33px;line-height:1.2;letter-spacing:-1.05px;font-weight:650}
.stx .page-heading{display:flex;align-items:baseline;gap:18px;flex-wrap:wrap}
.stx .page-heading p{font-size:12px;color:var(--muted)}
.stx .workspace{display:grid;grid-template-columns:252px minmax(0,1fr);gap:35px;align-items:start}
.stx .directory{position:sticky;top:24px;min-width:0}
.stx .directory-top{display:flex;gap:5px;align-items:center;margin-bottom:17px}
.stx .search{display:flex;gap:8px;align-items:center;background:white;border:1px solid var(--line);border-radius:9px;width:100%;padding:0 11px;height:40px}
.stx .search svg{width:16px;height:16px;color:var(--muted)}
.stx .search input{border:0;background:none;outline:none;width:100%;height:100%;font-size:12px}
.stx .search:focus-within{border-bottom-color:#647b8c}
.stx .directory-filter{display:flex;gap:17px;align-items:center;border-bottom:1px solid var(--line);padding-bottom:0;margin-bottom:11px}
.stx .filter-tab{padding:0 0 10px;font-size:12px;color:var(--muted);border-bottom:2px solid transparent}
.stx .filter-tab[aria-pressed=true]{border-color:var(--brand);color:var(--ink);font-weight:600}
.stx .filter-tab span{font-size:10px;color:var(--muted);margin-left:4px}
.stx .group-filter{width:100%;display:flex;align-items:center;gap:6px;font-size:11px;color:var(--muted);min-height:30px;text-align:left;margin-bottom:13px}
.stx .group-filter svg{width:13px;height:13px;margin-left:auto}
.stx .directory-label{font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--quiet);margin:21px 12px 8px}
.stx .person{width:100%;display:flex;align-items:center;gap:11px;text-align:left;padding:13px 12px;margin-bottom:5px;position:relative;border-radius:11px;min-height:74px}
.stx .person:hover{background:white}
.stx .person.selected{background:#e2f0fa}
.stx .person.selected:before{content:"";position:absolute;left:0;top:22px;bottom:22px;background:var(--brand);width:3px;border-radius:2px}
.stx .person-copy{min-width:0;flex:1}
.stx .person-name{font-size:13px;line-height:19px;font-weight:560;display:block;overflow-wrap:anywhere}
.stx .person-meta{font-size:11px;color:var(--muted);display:block;margin-top:3px}
.stx .person .mini-state{width:6px;height:6px;border-radius:50%;background:#8aa7b9;margin-left:auto;flex:none}
.stx .person.disabled{opacity:.72}
.stx .person.disabled .avatar{filter:grayscale(1)}
.stx .directory-foot{border-top:1px solid var(--line);margin:24px 10px 0;padding-top:13px;font-size:11px;color:var(--quiet);line-height:1.7}
.stx .empty{padding:32px 14px;text-align:center;color:var(--muted);font-size:13px}
.stx .empty svg{margin:0 auto 10px;opacity:.6}
.stx .detail{min-width:0}
.stx .profile{position:relative;display:flex;align-items:center;gap:19px;background:white;padding:25px 27px;border-radius:14px;margin-bottom:16px;min-height:134px}
.stx .profile-main{min-width:0;flex:1}
.stx .profile-name-row{display:flex;align-items:center;gap:10px}
.stx .profile h2{font-size:26px;line-height:1.25;font-weight:620;letter-spacing:-.65px;overflow-wrap:anywhere}
.stx .profile-name-row>.icon-btn{width:28px;height:28px}
.stx .profile-name-row>.icon-btn svg{width:16px;height:16px}
.stx .profile-meta{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:8px;color:var(--muted);font-size:12px}
.stx .meta-separator{width:3px;height:3px;border-radius:50%;background:#9badbc}
.stx .profile-email{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--muted);margin-top:8px;overflow-wrap:anywhere}
.stx .profile-email svg{width:14px;height:14px}
.stx .profile-side{align-self:flex-start;margin-top:3px}
.stx .profile .access-state{min-height:30px;border-radius:7px;font-size:11px}
.stx .mobile-back{display:none}
.stx .overview-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(260px,1fr);gap:16px;margin-bottom:16px}
.stx .module{border-radius:14px;padding:21px 24px;min-width:0}
.stx .module-title{display:flex;align-items:center;gap:9px;margin-bottom:22px}
.stx .module-title h3{font-size:14px;font-weight:620;letter-spacing:-.15px;flex:1}
.stx .module-title>svg{width:18px;height:18px}
.stx .module-title .icon-btn{width:26px;height:26px;margin:-4px -6px -4px 0}
.stx .module-title .icon-btn svg{width:16px;height:16px}
.stx .compensation{background:var(--mint)}
.stx .compensation .module-title>svg{color:#46745e}
.stx .pay-fields{display:grid;grid-template-columns:1.22fr 1fr 1fr;gap:13px}
.stx .pay-field{min-width:0}
.stx .pay-field+.pay-field{padding-left:15px;border-left:1px solid #cddfd5}
.stx .field-caption{display:block;color:var(--muted);font-size:11px;line-height:17px;margin-bottom:7px}
.stx .amount-wrap{display:flex;align-items:baseline;gap:4px;white-space:nowrap}
.stx .inline-input{width:100%;font-size:28px;line-height:36px;letter-spacing:-.8px;font-weight:550;border:0;border-bottom:1px solid transparent;outline:none;background:none;padding:0;min-height:37px;border-radius:0;-moz-appearance:textfield}
.stx .inline-input:hover{border-bottom-color:#b5d3c2}
.stx .inline-input:focus{border-bottom-color:#647b8c;outline:none}
.stx .inline-input::placeholder{font-size:16px;font-weight:400;letter-spacing:0;color:var(--muted)}
.stx .amount-wrap .unit{font-size:19px;color:#456353}
.stx .rate .inline-input{max-width:70px}
.stx .salary .inline-input{max-width:130px}
.stx .pay-help{font-size:11px;color:#4e6c5e;line-height:17px;margin-top:18px;max-width:410px}
.stx .pay-help button{font-size:11px;color:var(--link);padding:0}
.stx .help-more{padding-top:7px}
.stx .substitution{background:var(--sand);display:flex;flex-direction:column}
.stx .substitution .module-title>svg{color:#8d6e35}
.stx .substitution .module-title{margin-bottom:13px}
.stx .sub-person{display:flex;align-items:center;gap:10px;margin-top:12px}
.stx .sub-person .avatar{width:32px;height:32px;border-radius:11px;background:#f7e1b5;color:#775b25;font-size:11px}
.stx .sub-person strong{font-size:14px;font-weight:570}
.stx .sub-person small{display:block;font-size:10px;color:#796a4c;margin-top:1px}
.stx .sub-dates{display:flex;align-items:center;gap:10px;font-size:12px;margin-top:15px;color:#6e5d3c}
.stx .sub-dates svg{width:14px;height:14px}
.stx .substitution .text-btn{margin-top:auto;padding-top:13px;align-self:flex-start}
.stx .no-sub{font-size:18px;font-weight:500;letter-spacing:-.35px;margin:10px 0 4px}
.stx .no-sub-copy{font-size:12px;color:#796a4c;margin-bottom:8px}
.stx .permissions{background:var(--sky);padding-bottom:15px}
.stx .permissions .module-title{margin-bottom:18px}
.stx .permissions .module-title>svg{color:#4b7c9b}
.stx .module-actions{display:flex;align-items:center;gap:18px;font-size:11px;color:var(--muted)}
.stx .help-btn{color:var(--link);padding:5px 0;font-size:11px;display:inline-flex;align-items:center;gap:5px}
.stx .help-btn svg{width:14px;height:14px}
.stx .access-table{width:100%;border-collapse:collapse;table-layout:fixed}
.stx .access-table th{text-align:center;font-size:10px;color:var(--muted);font-weight:450;padding:0 2px 10px;white-space:nowrap}
.stx .access-table th:first-child{text-align:left;width:20%}
.stx .access-table td{border-top:1px solid #cddfeb;padding:10px 2px;text-align:center}
.stx .access-table td:first-child{text-align:left;font-size:12px;font-weight:550;padding-right:6px}
.stx .scope-btn{min-height:32px;padding:6px 9px;font-size:11px;border-radius:6px;display:inline-flex;justify-content:center;align-items:center;gap:5px;white-space:nowrap;width:calc(100% - 7px);max-width:125px}
.stx .scope-btn:hover{background:#ffffff85}
.stx .scope-btn svg{width:10px;height:10px;opacity:0;flex:none}
.stx .scope-btn:hover svg,.stx .scope-btn:focus-visible svg{opacity:1}
.stx .scope-btn.none{color:#6b7f90}
.stx .scope-btn.own{background:#ffffff7d;color:#345b75}
.stx .scope-btn.group{background:#cfe5f6;color:#265474}
.stx .scope-btn.all{background:#d5eada;color:#39654b}
.stx .access-explanation{margin-top:13px;border-top:1px solid #cddfeb;padding-top:12px;font-size:12px;line-height:1.7;color:var(--muted)}
.stx .access-explanation p+p{margin-top:6px}
.stx .capability-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0;font-size:12px;border-top:1px solid #cddfeb}
.stx .switch{display:inline-flex;align-items:center;gap:10px;position:relative;cursor:pointer}
.stx .switch input{width:29px;height:17px;opacity:0;position:absolute;right:0;cursor:pointer}
.stx .switch-track{width:29px;height:17px;border-radius:20px;background:#b6c7d3;position:relative;flex:none}
.stx .switch-track:after{content:"";position:absolute;width:13px;height:13px;left:2px;top:2px;border-radius:50%;background:white;transition:transform .15s}
.stx .switch input:checked+.switch-track{background:#5c99bd}
.stx .switch input:checked+.switch-track:after{transform:translateX(12px)}
.stx .switch input:focus-visible+.switch-track{outline:1px solid #526d7d;outline-offset:2px}
.stx .history{margin-top:15px;background:white;border-radius:13px;overflow:hidden}
.stx .history-toggle{width:100%;padding:17px 24px;display:flex;align-items:center;gap:10px;text-align:left;font-size:13px;font-weight:550}
.stx .history-toggle>svg{width:17px;height:17px;color:#6c649a}
.stx .history-meta{margin-left:auto;font-size:11px;color:var(--muted);font-weight:400}
.stx .history-toggle .chevron{width:14px;height:14px;margin-left:8px}
.stx .history-body{padding:0 24px 18px}
.stx .event{position:relative;padding:14px 0 0 23px;font-size:12px}
.stx .event:before{content:"";position:absolute;left:3px;top:21px;width:5px;height:5px;border-radius:50%;background:#aaa1ce}
.stx .event:after{content:"";position:absolute;top:31px;bottom:-6px;left:5px;width:1px;background:#e4e0ef}
.stx .event:last-child:after{display:none}
.stx .event small{display:block;color:var(--muted);font-size:10px;margin-top:3px}
.stx .savebar{position:sticky;bottom:16px;z-index:4;display:flex;align-items:center;gap:10px;background:#ffffffed;border:1px solid var(--line);border-radius:11px;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);padding:11px 14px;margin-top:18px;box-shadow:0 5px 22px #20394d08}
.stx .save-state{font-size:11px;color:var(--muted);margin-right:auto;display:flex;align-items:center;gap:7px;min-width:0}
.stx .save-state svg{width:15px;height:15px;color:#6f9c83}
.stx .savebar .button{min-height:36px;font-size:12px;padding:7px 13px}
.stx .savebar .cancel{font-size:12px;color:var(--muted);padding:9px}
.stx .prototype-note{display:flex;justify-content:space-between;gap:12px;color:#697b8e;font-size:10px;padding:24px 0 0 287px}
.stx .prototype-note button{font-size:10px;color:var(--muted);padding:0;text-decoration:underline;text-underline-offset:3px}
.stx .popover{position:fixed;z-index:40;background:white;border:1px solid var(--line);border-radius:11px;padding:5px;min-width:190px;max-width:calc(100vw - 24px);box-shadow:0 10px 30px #172d431b}
.stx .popover button{width:100%;display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:38px;text-align:left;padding:8px 10px;border-radius:7px;font-size:12px}
.stx .popover button:hover,.stx .popover button:focus-visible{background:#edf4f9;outline:none;text-decoration:none}
.stx .popover button[aria-selected=true]{background:#e8f4fc;color:var(--link)}
.stx .popover button svg{width:13px;height:13px}
.stx .popover .menu-label{padding:8px 10px 5px;font-size:10px;color:var(--muted)}
.stx .popover .danger{color:var(--red)}
.stx dialog{padding:0;border:1px solid #dce5ee;border-radius:16px;box-shadow:0 25px 100px #102c4330;color:var(--ink);width:min(560px,calc(100vw - 28px));max-height:calc(100dvh - 40px);background:white}
.stx dialog::backdrop{background:#1835493d;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.stx .dialog-head{display:flex;align-items:center;gap:12px;padding:23px 26px 16px}
.stx .dialog-head h2{font-size:21px;font-weight:600;letter-spacing:-.5px;flex:1}
.stx .dialog-body{padding:0 26px 24px}
.stx .dialog-foot{display:flex;justify-content:flex-end;align-items:center;gap:9px;padding:15px 26px;border-top:1px solid var(--line);background:#fafbfd}
.stx .form-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px 18px}
.stx .form-grid .full{grid-column:1/-1}
.stx .form-field{display:flex;flex-direction:column;gap:7px;min-width:0;font-size:12px}
.stx .form-field input:not([type=file]),.stx .form-field .select-button{height:42px;padding:9px 12px;background:#f8fafc;border:1px solid var(--line);border-radius:8px;width:100%;text-align:left}
.stx .select-button{display:flex;justify-content:space-between;align-items:center;gap:10px}
.stx .select-button svg{width:13px;height:13px}
.stx .form-field small{font-size:11px;color:var(--muted);line-height:17px}
.stx .password-label{margin-top:22px;border-top:1px solid var(--line);padding-top:18px}
.stx .password-label>.text-btn{padding:0}
.stx .photo-line{display:flex;gap:15px;align-items:center;margin-bottom:24px}
.stx .photo-line small{display:block;font-size:10px;color:var(--muted)}
.stx .photo-tools{display:flex;align-items:center;gap:14px}
.stx .photo-tools button{font-size:12px;color:var(--link);padding:5px 0}
.stx .photo-tools .remove-photo{color:var(--muted)}
.stx .inline-notice{font-size:12px;color:#665640;padding:13px 15px;background:var(--sand);border-radius:8px;line-height:1.6;margin-bottom:20px}
.stx .form-error{font-size:12px;color:var(--red);background:#fbefee;border-radius:7px;padding:10px;margin-top:16px}
.stx .dialog-scope{font-size:12px;color:var(--muted);margin-bottom:20px}
.stx .sub-history{border-top:1px solid var(--line);margin-top:20px;padding-top:10px}
.stx .sub-history summary{font-size:12px;color:var(--link);padding:8px 0}
.stx .sub-history p{font-size:11px;color:var(--muted);padding:7px 0}
.stx .toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);z-index:70;padding:13px 19px;background:#17374b;color:white;font-size:12px;border-radius:10px;box-shadow:0 10px 30px #172d4320;max-width:calc(100vw - 32px);text-align:center}
.stx .discard-copy{font-size:14px;line-height:1.7;color:var(--muted);margin:0 0 5px}
.stx .disabled-panel{font-size:12px;color:#8c5951;background:#f8e8e6;border-radius:9px;padding:12px 16px;margin-bottom:16px}
.stx .admin-note{font-size:12px;color:var(--muted);padding:15px;border-radius:8px;background:#ffffff85}
.stx .no-permissions{margin:15px 0 6px}
.stx .profile-new .profile h2{color:var(--muted)}
@media(min-width:1650px){.stx .page{padding-top:42px}
.stx .workspace{grid-template-columns:270px minmax(0,1fr);gap:42px}
.stx .prototype-note{padding-left:312px}
}
@media(max-width:1190px){.stx .page{padding:28px}
.stx .workspace{grid-template-columns:225px minmax(0,1fr);gap:24px}
.stx .chrome{padding:0 26px;gap:22px}
.stx .global-nav{gap:18px}
.stx .global-search{min-width:120px}
.stx .global-search span{display:none}
.stx .overview-grid{grid-template-columns:1fr}
.stx .substitution{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}
.stx .substitution .module-title{grid-column:1/-1;margin-bottom:7px}
.stx .substitution .badge{width:max-content}
.stx .substitution .text-btn{grid-column:2;grid-row:3;align-self:center;justify-self:end;margin-top:0}
.stx .substitution .sub-dates{grid-column:1;grid-row:3}
.stx .substitution .sub-person{margin-top:0}
.stx .prototype-note{padding-left:249px}
.stx .access-table th:first-child{width:23%}
.stx .scope-btn{padding:6px 3px;font-size:10px;gap:2px}
.stx .scope-btn svg{display:none}
.stx .profile{padding:23px 21px}
.stx .profile h2{font-size:23px}
.stx .profile-side{margin-left:auto}
.stx .profile .avatar.large{width:57px;height:57px;border-radius:18px;font-size:20px}
}
@media(max-width:820px){.stx .chrome{padding:0 20px;gap:20px}
.stx .global-nav{gap:16px}
.stx .global-nav .nav-extra{display:none}
.stx .chrome-tools{gap:10px}
.stx .global-search{min-width:20px;border:0}
.stx .page{padding:24px 20px}
.stx .page-head{margin-bottom:25px}
.stx .page-head h1{font-size:29px}
.stx .page-heading{gap:5px;display:block}
.stx .page-heading p{margin-top:8px}
.stx .workspace{grid-template-columns:202px minmax(0,1fr);gap:20px}
.stx .module{padding:18px}
.stx .profile{flex-wrap:wrap;gap:13px}
.stx .profile-side{position:absolute;right:14px;top:15px}
.stx .profile h2{font-size:22px;padding-top:17px}
.stx .profile-name-row .icon-btn{align-self:flex-end}
.stx .profile-meta{font-size:11px;gap:6px}
.stx .profile .avatar.large{width:48px;height:48px;border-radius:15px;font-size:19px}
.stx .profile-email{font-size:11px}
.stx .pay-fields{gap:6px;grid-template-columns:1.2fr 1fr 1fr}
.stx .pay-field+.pay-field{padding-left:9px}
.stx .inline-input{font-size:24px;letter-spacing:-.7px}
.stx .amount-wrap .unit{font-size:16px}
.stx .field-caption{font-size:10px}
.stx .access-table{table-layout:auto}
.stx .access-table thead{display:none}
.stx .access-table tbody,.stx .access-table tr{display:block}
.stx .access-table tr+tr{margin-top:13px}
.stx .access-table td{display:inline-flex;flex-direction:column;align-items:center;width:20%;border:0;padding:0 2px}
.stx .access-table td:before{content:attr(data-label);font-size:9px;color:var(--muted);margin-bottom:4px}
.stx .access-table td:first-child{display:block;width:100%;margin-bottom:9px;border-top:1px solid #cddfeb;padding-top:10px}
.stx .access-table td:first-child:before{display:none}
.stx .scope-btn{font-size:10px;width:100%;min-height:32px}
.stx .module-actions .help-btn{font-size:10px}
.stx .module-actions{gap:8px}
.stx .history-meta{display:none}
.stx .history-toggle{padding:16px 18px}
.stx .savebar{flex-wrap:wrap}
.stx .save-state{flex-basis:100%;font-size:10px}
.stx .savebar .button{margin-left:auto}
.stx .savebar .cancel{order:1}
.stx .savebar .primary{order:2}
.stx .prototype-note{padding-left:222px}
.stx .substitution{display:flex}
.stx .substitution .sub-person{margin-top:10px}
.stx .substitution .text-btn{margin-top:5px}
.stx .substitution .sub-dates{margin-top:12px}
}
@media(max-width:620px){.stx .chrome{height:56px;padding:0 16px;gap:15px}
.stx .brand{margin-right:0;gap:5px}
.stx .brand>svg{width:29px;height:29px}
.stx .wordmark{font-size:16px}
.stx .wordmark small{font-size:9px}
.stx .global-nav{font-size:11px;gap:15px}
.stx .global-nav span{display:none}
.stx .global-nav span:nth-child(2){display:block}
.stx .chrome-tools{gap:16px}
.stx .page{padding:23px 16px 22px}
.stx .page-head{gap:10px;margin-bottom:22px}
.stx .page-head h1{font-size:29px}
.stx .page-head .button{font-size:12px;min-height:38px;padding:8px 12px}
.stx .page-heading p{font-size:11px}
.stx .workspace{display:block}
.stx .directory{position:static}
.stx .directory-top{margin-bottom:16px}
.stx .directory-label{margin:23px 8px 8px}
.stx .person{padding:13px 10px;min-height:80px}
.stx .person .avatar{width:46px;height:46px;border-radius:15px}
.stx .person-name{font-size:15px}
.stx .person-meta{font-size:12px}
.stx .directory-foot{margin-top:24px}
.stx .detail{display:none}
.stx .page.has-detail .directory{display:none}
.stx .page.has-detail .detail{display:block}
.stx .page.has-detail .page-head{display:none}
.stx .mobile-back{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--link);padding:0 0 17px;min-height:35px}
.stx .mobile-back svg{width:15px;height:15px}
.stx .profile{padding:22px 17px 20px;gap:12px;min-height:146px;margin-bottom:12px}
.stx .profile h2{font-size:23px;line-height:1.18;padding-top:12px}
.stx .profile .avatar.large{width:49px;height:49px}
.stx .profile-side{top:10px;right:13px}
.stx .profile-meta{font-size:11px;margin-top:8px}
.stx .profile-email{font-size:11px}
.stx .profile-name-row{gap:4px}
.stx .profile-name-row .icon-btn{width:23px}
.stx .overview-grid{gap:12px;margin-bottom:12px}
.stx .module{border-radius:12px;padding:19px 17px}
.stx .module-title{margin-bottom:20px}
.stx .module-title h3{font-size:14px}
.stx .inline-input{font-size:28px;max-width:100%}
.stx .salary .inline-input{max-width:116px}
.stx .rate .inline-input{max-width:58px}
.stx .pay-fields{gap:6px;grid-template-columns:1.28fr 1fr 1fr}
.stx .field-caption{font-size:10px;line-height:17px}
.stx .pay-field+.pay-field{padding-left:11px}
.stx .pay-help{font-size:10px;line-height:16px;margin-top:16px}
.stx .substitution{display:grid;grid-template-columns:1fr 1fr;gap:0 6px}
.stx .substitution .module-title{margin-bottom:6px}
.stx .substitution .sub-person{margin-top:0;gap:6px}
.stx .sub-person strong{font-size:12px}
.stx .sub-person .avatar{width:28px;height:28px}
.stx .sub-dates{font-size:11px;gap:6px}
.stx .substitution .text-btn{font-size:12px;margin:0;grid-column:2;grid-row:3;justify-self:end;align-self:center}
.stx .substitution .no-sub{grid-column:1/-1}
.stx .substitution .no-sub-copy{grid-column:1/-1}
.stx .substitution .assign-sub{grid-column:1/-1;grid-row:auto;justify-self:start;margin-top:6px}
.stx .permissions .module-title{gap:7px;margin-bottom:10px}
.stx .permissions .module-title h3{font-size:14px}
.stx .module-actions .help-btn{font-size:10px;max-width:86px;line-height:15px;text-align:left}
.stx .scope-btn{font-size:10px;letter-spacing:-.2px;white-space:normal;line-height:13px;min-height:36px}
.stx .access-table td:first-child{font-size:12px}
.stx .access-table td:before{font-size:9px;letter-spacing:-.15px}
.stx .access-table tr+tr{margin-top:16px}
.stx .history{margin-top:12px}
.stx .history-toggle{font-size:12px;padding:17px}
.stx .history-toggle .chevron{margin-left:auto}
.stx .savebar{bottom:10px;margin-top:14px;padding:11px;gap:6px}
.stx .savebar .cancel{font-size:11px}
.stx .savebar .button{font-size:12px}
.stx .prototype-note{padding:23px 0 0;display:block;line-height:1.8}
.stx .prototype-note button{margin-top:7px}
.stx .dialog-head{padding:20px 20px 15px}
.stx .dialog-head h2{font-size:20px}
.stx .dialog-body{padding:0 20px 21px}
.stx .dialog-foot{padding:14px 20px}
.stx .form-grid{gap:16px;grid-template-columns:1fr}
.stx .form-grid .full{grid-column:auto}
.stx .form-field input:not([type=file]),.stx .form-field .select-button{font-size:16px}
.stx .photo-line{margin-bottom:20px}
.stx .toast{bottom:18px}
.stx .substitution .sub-dates{margin-top:14px}
}
@media(max-width:820px){.stx .field-caption{min-height:34px}
}
@media(max-width:620px){.stx .field-caption{font-size:11px;line-height:16px;min-height:32px}
.stx .pay-help{font-size:11px;line-height:17px}
.stx .inline-input::placeholder{font-size:12px;letter-spacing:-.2px}
}
@media(prefers-reduced-motion:reduce){.stx *{scroll-behavior:auto!important;transition:none!important}
}
@media(min-width:821px){.stx .page{padding-top:26px}
.stx .page-head{margin-bottom:24px}
.stx .profile{padding:20px 24px;min-height:118px}
.stx .module{padding:18px 22px}
.stx .module-title{margin-bottom:17px}
.stx .substitution .module-title{margin-bottom:9px}
.stx .sub-person{margin-top:8px}
.stx .sub-dates{margin-top:11px}
.stx .substitution .text-btn{padding-top:8px}
.stx .pay-help{margin-top:15px}
.stx .access-table td{padding-top:8px;padding-bottom:8px}
.stx .history-toggle{padding-top:15px;padding-bottom:15px}
.stx .scope-btn{font-size:12px}
.stx .access-table td:first-child{font-size:13px}
}
.stx .savebar.clean{display:none}
.stx .scope-mobile{display:none}
@media(max-width:620px){.stx .scope-desktop{display:none}
.stx .scope-mobile{display:inline}
}
@media(max-width:620px){.stx .pay-fields{grid-template-columns:1fr 1fr;gap:8px 12px}
.stx .pay-field.salary{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;padding-bottom:10px;margin-bottom:3px;border-bottom:1px solid #cddfd5}
.stx .salary .field-caption{min-height:0;margin:0}
.stx .salary .amount-wrap{max-width:150px}
.stx .salary .inline-input{max-width:116px}
.stx .pay-field:nth-child(2){border-left:0;padding-left:0}
.stx .field-caption{overflow-wrap:anywhere}
.stx .substitution .text-btn{font-size:11px}
.stx .sub-dates small{font-size:9px}
}

.team-workspace.stx{display:grid;grid-template-columns:252px minmax(0,1fr);gap:16px 35px;align-items:start;width:100%;margin:0;background:transparent}
.stx .team-notice{grid-column:1/-1}.stx .team-notice:empty{display:none}
.stx .team-list{padding:0;border:0;background:transparent;min-width:0;position:sticky;top:24px}
.stx .team-editor{padding:0;border:0;background:transparent;min-width:0}
.stx .staff-form{display:block;padding:0;margin:0;border:0;background:transparent}
.stx-shell{max-width:1520px;margin:0 auto;padding:26px 40px 30px}
.stx-shell>.page-heading{display:flex;align-items:center;gap:16px;margin:0 0 24px}
.stx-shell>.page-heading h1{font-size:33px;font-weight:650;line-height:1.2;letter-spacing:-1.05px;color:#172d43}
.stx-shell .stx-page-actions{margin-left:auto;display:flex;align-items:center;gap:24px}
.stx-count{font-size:12px;color:#53657b;margin:0}.stx-shell .stx-page-actions .button{background:#049fe5;border-color:#049fe5;color:#07344d}
.stx .stx-local-heading{grid-column:1/-1;display:flex;justify-content:space-between;gap:16px;margin-bottom:10px}.stx .stx-local-heading .stx-page-actions{display:flex;align-items:center;gap:20px}
.stx .stx-avatar-button{background:transparent;border:0;padding:0;box-shadow:none;flex:none}
.stx .form-field{margin:0;min-width:0}.stx .pay-field{gap:0}.stx .pay-fields.stx-two-pay{grid-template-columns:1fr 1fr}.stx .stx-no-sub{grid-template-columns:1fr}
.stx .pay-field .inline-input{border:0;border-bottom:1px solid transparent;border-radius:0;background:none;padding:0;min-height:37px;height:37px;line-height:36px;font-size:28px;font-weight:550;box-shadow:none;letter-spacing:-.8px;width:100%;color:#172d43}
.stx .pay-field .inline-input:disabled{opacity:1;color:#172d43;-webkit-text-fill-color:#172d43}
.stx input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none}
.stx .profile-meta .text-btn{font-size:12px;min-height:20px;padding:0}.stx .profile-email{padding:0;min-height:20px;text-align:left}.stx .profile-email svg{display:inline-block}
.stx .select-button{font-size:12px;min-height:42px;border:1px solid #dce5ee;border-radius:8px;padding:9px 12px;background:#f8fafc}
.stx .access-state svg{width:13px;height:13px}.stx .scope-btn svg{width:10px;height:10px}
.stx .access-table td>select{display:none!important}.stx .scope-btn{font-size:12px}.stx .scope-btn svg{opacity:.25}
.stx .stx-form-note{font-size:11px;color:#53657b;line-height:18px;margin-top:18px}
.stx .form-field>label{font-size:12px;font-weight:400;margin:0;color:#53657b}
.stx .pay-field>label{font-size:11px;margin-bottom:7px}
.stx .dialog-body .form-field{display:flex;flex-direction:column;gap:7px;align-items:stretch}.stx .dialog-body .form-field input[type=checkbox]{width:20px;height:20px;min-height:20px}
.stx .capability-row{display:flex;flex-direction:row;align-items:center;gap:16px}.stx .capability-row label{flex:1}.stx .capability-row input[type=checkbox]{width:20px;min-height:20px;height:20px}
.stx .history-body>details{border:0;padding:0;margin:0;background:none}.stx .history-body>details>div>p{font-size:12px;line-height:1.7;border-top:1px solid #e4e0ef;padding:12px 0;color:#53657b}
.stx .datetime-picker{font-size:12px;max-width:100%;overflow:hidden}.stx .datetime-picker select{max-width:none}
.stx .savebar.clean{display:none}.stx .savebar{margin-top:18px}.stx .module-title{flex-wrap:nowrap}
@media(max-width:1190px){.team-workspace.stx{grid-template-columns:225px minmax(0,1fr);gap:16px 24px}.stx-shell{padding:26px 28px}.stx .scope-btn{font-size:11px}}
@media(max-width:820px){.team-workspace.stx{grid-template-columns:202px minmax(0,1fr);gap:16px 20px}.stx-shell{padding:24px 20px}.stx .scope-btn{font-size:10px;white-space:normal}.stx .scope-btn svg{display:none}.stx .profile h2{padding-top:17px}.stx-count{font-size:11px}}
@media(max-width:620px){.team-workspace.stx{display:block}.stx .team-list{position:static}.stx .team-editor{display:none}.stx.has-detail .team-list{display:none}.stx.has-detail .team-editor{display:block}.stx-shell{padding:23px 16px}.stx-shell>.page-heading h1{font-size:29px}.stx-shell .stx-page-actions{gap:8px}.stx-shell .stx-count{display:none}.stx-shell:has(.stx.has-detail)>.page-heading{display:none}.stx .stx-local-heading h1{font-size:29px}.stx.has-detail .stx-local-heading{display:none}.stx .pay-field>label{font-size:11px;min-height:32px}.stx .pay-field.salary>label{min-height:0;margin:0}.stx .pay-field .inline-input{font-size:28px}.stx .scope-btn{font-size:9px;padding:6px 1px;overflow-wrap:anywhere}.stx .form-field .select-button{font-size:16px}.stx .access-table th{display:none}.stx .profile{padding-top:22px}.stx .profile h2{font-size:23px}}

.stx .staff-form .pay-field input.inline-input{border:0;border-bottom:1px solid transparent;background:transparent;box-shadow:none;border-radius:0;padding:0;min-height:37px;height:37px;font-size:28px;line-height:36px;color:#172d43;letter-spacing:-.8px}
.stx .staff-form .pay-field input.inline-input:hover{border-bottom-color:#b5d3c2}.stx .staff-form .pay-field input.inline-input:focus{outline:none;border-bottom-color:#647b8c}
.stx .access-table thead,.stx .access-table th{background:transparent}.stx .history-toggle .chevron{margin-left:auto}
.stx-title-area{display:flex;align-items:baseline;gap:18px;flex-wrap:wrap}.stx-shell .stx-title-area .stx-count{margin:0}

.stx .staff-form .rate input.inline-input{max-width:none}.stx .amount-wrap .unit{flex:none}.stx .staff-form .salary input.inline-input{max-width:150px}

.stx .staff-form .access-table{min-width:0;width:100%;max-width:100%}.stx .profile button:disabled{opacity:1;color:#53657b;cursor:default}

/* STAFF03 null values and aligned metric captions: presentation only. */
.stx .staff-form .pay-field>label{min-height:34px}
.stx .staff-form .pay-field input.inline-input::placeholder{font-size:12px;letter-spacing:0;opacity:1}
@media(max-width:620px){.stx .staff-form .pay-field.salary>label{min-height:0}}

/* STAFF03 fidelity correction: approved top navigation, real controls, no side column. */
#app .app-shell.staff-shell{display:block;min-height:100vh;background:#f2f5f9}
#app .staff-shell>.workspace{width:100%;min-width:0}
#app .staff-shell .staff-chrome.crm-chrome{height:64px;min-height:64px;max-height:64px;padding:0 32px;gap:16px;justify-content:flex-start;border-bottom:1px solid #edf1f5}
#app .staff-chrome>.brand{display:flex;gap:7px;width:auto;margin:0;padding:0;flex:none}
#app .staff-chrome .brand-logo{width:35px;height:35px}
#app .staff-chrome .brand-word{font-size:18px;line-height:18px;letter-spacing:-.3px;font-weight:700}
#app .staff-chrome .brand-finance{font-size:10px;line-height:14px;font-weight:400;letter-spacing:0;margin:0}
#app .staff-chrome .brand small{display:none}
#app .staff-chrome .nav{display:flex;gap:18px;align-items:center;flex:none;padding:0;margin:0;min-width:0}
#app .staff-shell .nav-button{display:inline-flex;align-items:center;width:auto;min-height:36px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;font:400 12px/18px Inter,system-ui,sans-serif;white-space:nowrap;color:#53657b}
#app .staff-shell .nav-button.active{color:#172d43;text-decoration:underline;text-decoration-color:#049fe5;text-underline-offset:9px}
#app .staff-shell .nav-symbol{display:none}
#app .staff-chrome>.global-search-host{order:2;flex:1 1 200px;min-width:170px;max-width:260px;margin-left:auto}
#app .staff-shell .staff-account{position:relative;order:3;flex:none;margin:0;padding:0;background:transparent;box-shadow:none;min-width:31px}
#app .staff-account>summary{display:flex;align-items:center;justify-content:center;list-style:none;padding:0;border:0;border-radius:50%;cursor:pointer}
#app .staff-account>summary::-webkit-details-marker{display:none}
#app .staff-account .avatar{width:31px;height:31px;min-width:31px;border-radius:50%;background:#e8f4fc;color:#356482;font-size:11px}
#app .staff-account-panel{position:absolute;right:0;top:calc(100% + 10px);z-index:70;min-width:210px;display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:14px;border:1px solid #dce5ee;border-radius:10px;background:white;box-shadow:0 8px 24px #172d4310}
#app .staff-account:not([open])>.staff-account-panel{display:none}
#app .staff-account .user-copy{flex:1}
#app .staff-account .user-name{font-size:12px}
#app .staff-account .user-role{font-size:11px}
#app .staff-account .icon-button{width:32px;min-width:32px;height:32px;min-height:32px;padding:0}
#app .staff-chrome>.james-launcher{order:4}
#app .staff-shell .stx-shell{max-width:1520px;padding:26px 40px 30px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
#app .staff-shell .stx-shell>.page-heading{margin-bottom:24px}
#app .staff-shell .stx-page-actions .button{min-height:40px;padding:9px 15px;font:550 14px/20px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.stx .team-list>.search{margin-bottom:17px}
#app .staff-shell :is(.nav-button,.staff-account>summary):focus-visible{outline:0;box-shadow:none;background:#e0e8ed;text-decoration:underline;text-underline-offset:4px}
@media(max-width:1199px){#app .staff-shell .staff-chrome.crm-chrome{gap:16px}#app .staff-chrome>.card-history-nav{margin-right:auto}#app .staff-shell>.workspace>.crm-chrome-secondary{padding:8px 32px 10px;gap:6px 16px}#app .staff-shell .crm-chrome-secondary>.nav{gap:4px 20px}#app .staff-shell .crm-chrome-secondary>.global-search-host{flex:1 1 200px;order:2;width:auto}#app .staff-shell .crm-chrome-secondary>.staff-account{order:3}#app .staff-shell .stx-shell{padding:26px 28px}}
@media(max-width:650px){#app .staff-shell .staff-chrome.crm-chrome{padding:0 16px;gap:12px}#app .staff-shell>.workspace>.crm-chrome-secondary{padding:8px 16px 10px}#app .staff-shell .crm-chrome-secondary>.nav{gap:4px 17px}#app .staff-shell .nav-button{font-size:11px;min-height:32px}#app .staff-shell .stx-shell{padding:23px 16px}#app .staff-shell .stx-shell>.page-heading{margin-bottom:24px}}
