/* AML Firmogo. Style «Oficjalny niebieski» (variant B of the Firmogo cabinet, Alisa 18.11.2026, chosen by Galina);
   tokens from WORK/Rejestracja firm/Макет дашборда/_alisa/стиль-синий.md, layout from the mock-up «Макет AML».
   Red only for STOP and for errors that need an action. */
:root {
  --page: #f2f4f7; --card: #fff; --raised: #fff; --surface: #e9edf3; --line: #d5dbe4; --field: #7a8699;
  --fg: #1b1f24; --muted: #56606e; --link: #0052a5;
  --primary: #0052a5; --primary-hover: #003f80; --primary-fg: #fff; --focus: #0052a5;
  --side-fg: #2b3440; --side-muted: #6b7684; --side-hover: #eef2f8; --side-active: #e3ecf8; --side-strong: #0b3d7a;
  --side-mark: #0052a5; --side-count: #dde7f5; --side-count-fg: #0b3d7a;
  --hot-fg: #8f2f24; --hot-bg: #f7e4df; --hot: #a3392c;
  --soon-fg: #6e5215; --soon-bg: #f3ead0; --soon: #a77a1c;
  --done-fg: #1f4d2b; --done-bg: #e2f0e5; --done: #2e7d43;
  --info-fg: #183f6b; --info-bg: #e6eef8; --info: #3a6ea5;
  --test: #6a3aa8; --test-bg: #efe6fa; --real: #1f4d2b;
  --r-sm: 6px; --r: 8px; --r-lg: 12px;
  /* old names still used in templates */
  --bg: var(--page); --ink: var(--fg); --accent: var(--primary); --ok: var(--done-fg); --warn: var(--soon-fg); --bad: var(--hot-fg);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--fg); font: 15px/22px Arial, Helvetica, sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
svg.i { flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 18px; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; word-break: break-all; }
h1 { font-size: 24px; line-height: 32px; margin: 4px 0 16px; }
h2 { font-size: 17px; line-height: 24px; margin: 0 0 12px; }
h3 { font-size: 15px; line-height: 22px; margin: 24px 0 8px; }
.lead { color: var(--muted); margin: -8px 0 20px; }
[id] { scroll-margin-top: 72px; }

/* room bar: real data green, test violet */
.roombar { font-size: 13px; line-height: 18px; text-align: center; padding: 4px 16px; color: #fff; font-weight: 700; letter-spacing: .02em; }
.roombar.real { background: var(--real); }
.roombar.test { background: var(--test); }

/* frame: menu on the left, bar on top */
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: calc(100vh - 26px); }
.side { background: #fff; border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 0 12px 12px; }
.logo { height: 56px; display: flex; align-items: center; gap: 8px; padding: 0 8px; font-size: 20px; font-weight: 700; color: var(--fg); text-decoration: none; letter-spacing: -.2px; }
.logo:hover { text-decoration: none; }
.logo b { color: var(--primary); }
.logo .tag { font-size: 12px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 6px; letter-spacing: .04em; }
.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.nav a { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: var(--r-sm); color: var(--side-fg); text-decoration: none; }
.nav a:hover { background: var(--side-hover); color: var(--side-strong); }
.nav a[aria-current=page] { background: var(--side-active); color: var(--side-strong); font-weight: 700; box-shadow: inset 3px 0 0 var(--side-mark); }
.nav .cnt { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-sm); background: var(--side-count); color: var(--side-count-fg); font-size: 12px; line-height: 20px; font-weight: 700; text-align: center; }
.nav .cnt.hot { background: var(--hot); color: #fff; }
.nav .cnt.soon { background: var(--soon-bg); color: var(--soon-fg); }
.side .bottom { margin-top: auto; border-top: 1px solid var(--line); padding: 12px 8px 26px; font-size: 13px; line-height: 18px; color: var(--side-muted); }
.main { min-width: 0; display: flex; flex-direction: column; }
header.top { position: sticky; top: 0; z-index: 30; height: 56px; background: var(--card); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; padding: 0 24px; }
.content { padding: 24px; width: 100%; max-width: 1320px; }
.spacer { flex: 1; }
details.menu { position: relative; }
details.menu > summary { list-style: none; }
details.menu > summary::-webkit-details-marker { display: none; }
.switch { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--raised); cursor: pointer; }
.switch .t { display: flex; flex-direction: column; line-height: 16px; }
.switch .t span { font-size: 12px; color: var(--muted); }
.rdot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.rdot.real { background: var(--done); }
.rdot.test { background: var(--test); }
.pop { position: absolute; top: 46px; left: 0; z-index: 50; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 8px 24px #0b1f3a22; min-width: 280px; padding: 8px; }
details.menu.right .pop { left: auto; right: 0; }
.pop form { margin: 0 !important; }
.pop .it { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; padding: 8px; border: 0; background: none; border-radius: var(--r-sm); text-align: left; cursor: pointer; text-decoration: none; color: var(--fg); font-weight: 400; min-height: 0; white-space: normal; }
.pop .it:hover { background: var(--surface); text-decoration: none; }
.pop .it.static { cursor: default; }
.pop .it.static:hover { background: none; }
.pop .it small { display: block; color: var(--muted); font-size: 13px; line-height: 18px; }
.pop .it.sel { font-weight: 700; background: var(--side-active); }
.pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: var(--r); font-size: 13px; font-weight: 700; text-decoration: none; }
.chip:hover { text-decoration: none; }
.chip.ok { background: var(--done-bg); color: var(--done-fg); }
.chip.warn { background: var(--soon-bg); color: var(--soon-fg); }
.chip.bad { background: var(--hot-bg); color: var(--hot-fg); }
.ib { height: 40px; min-width: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r); cursor: pointer; padding: 0 4px; }
.ib:hover { background: var(--surface); }
.ava { width: 32px; height: 32px; border-radius: 50%; background: var(--surface); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
.seg { display: inline-flex; border: 1px solid var(--field); border-radius: var(--r); overflow: hidden; margin: 0 4px; }
.seg button { border: 0; border-radius: 0; background: var(--raised); color: var(--fg); padding: 0 10px; min-height: 0; height: 32px; cursor: pointer; border-right: 1px solid var(--line); font-weight: 400; font-size: 13px; }
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--surface); }
.seg button[aria-pressed=true] { background: var(--side-active); color: var(--side-strong); font-weight: 700; }

/* sign-in, code, choice of firm: one card in the middle, no menu */
.auth { display: flex; justify-content: center; padding: 64px 16px; }
.authcard { width: 100%; max-width: 460px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; }
.authtop { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.authtop .logo { padding: 0; height: auto; font-size: 22px; }
.authtop .seg { margin: 0; }
form.stack { display: flex; flex-direction: column; margin: 0 0 12px; }
form.stack input { width: 100%; }
form.stack button { margin-top: 16px; }
button.wide { width: 100%; }
.roomcard { display: flex; align-items: center; justify-content: flex-start; gap: 14px; width: 100%; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; background: var(--raised); color: var(--fg); cursor: pointer; text-align: left; margin-bottom: 10px; font-weight: 400; white-space: normal; }
.roomcard:hover { border-color: var(--primary); background: var(--raised); }
.roomcard.sel { box-shadow: 0 0 0 1px var(--primary); border-color: var(--primary); }
.roomcard .tx { flex: 1; }
.roomcard .tx span { display: block; font-size: 13px; color: var(--muted); }

/* cards and grids */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 20px; margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.grid2 > * { min-width: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.section-n { color: var(--muted); font-weight: 400; margin-right: 6px; }

/* tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; line-height: 16px; color: var(--muted); font-weight: 700; }
tr:last-child > td { border-bottom: 0; }
.tablewrap { overflow-x: auto; }
td:first-child { white-space: nowrap; }

/* badges: colour by meaning */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 16px; font-weight: 700; border-radius: var(--r-sm); padding: 2px 8px; white-space: nowrap; vertical-align: middle; }
.b-test { background: var(--test-bg); color: var(--test); }
.b-niskie, .b-real { background: var(--done-bg); color: var(--done-fg); }
.b-standardowe { background: var(--soon-bg); color: var(--soon-fg); }
.b-wysokie { background: var(--hot-bg); color: var(--hot-fg); }
.b-stop { background: var(--hot); color: #fff; }
.b-muted { background: var(--surface); color: var(--fg); }
.b-info { background: var(--info-bg); color: var(--info-fg); }
.overdue { color: var(--hot-fg); font-weight: 700; }

/* buttons: one main (blue) per screen, the rest outlined */
.btn, button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--primary); background: var(--primary); color: var(--primary-fg); font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover, button:hover { background: var(--primary-hover); text-decoration: none; }
.btn.secondary, button.secondary { background: var(--raised); border-color: var(--field); color: var(--fg); }
.btn.secondary:hover, button.secondary:hover { background: var(--surface); }
button[disabled], .btn[disabled] { background: var(--surface); border-color: var(--line); color: var(--side-muted); cursor: not-allowed; }
.linkbtn, button.linkbtn { background: none; border: 0; color: var(--link); padding: 0; min-height: 0; font-weight: 400; text-decoration: underline; }
.linkbtn:hover { background: none; }
form.inline { display: inline; }

/* fields */
input[type=text], input[type=password], input[type=date], input[type=search], input[type=number], input[type=email], select, textarea { height: 40px; padding: 0 12px; border: 1px solid var(--field); border-radius: var(--r); background: var(--raised); max-width: 100%; }
textarea { width: 100%; height: auto; min-height: 88px; padding: 8px 12px; resize: vertical; }
select[multiple] { height: auto; padding: 6px; }
label { display: block; font-size: 13px; line-height: 18px; color: var(--muted); margin: 12px 0 4px; font-weight: 700; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin-bottom: 12px; }

/* messages and alerts */
.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.messages li { background: var(--done-bg); border: 1px solid #bcdcc4; color: var(--done-fg); padding: 10px 14px; border-radius: var(--r); margin-bottom: 6px; }
.messages li.error { background: var(--hot-bg); border-color: #e7b9b0; color: var(--hot-fg); }
.messages li.warning { background: var(--soon-bg); border-color: #e3d3a3; color: var(--soon-fg); }
.messages li.info { background: var(--info-bg); border-color: #c4d6ee; color: var(--info-fg); }
.errors { background: var(--hot-bg); border: 1px solid #e7b9b0; padding: 10px 14px; border-radius: var(--r); color: var(--hot-fg); margin-bottom: 12px; }
.warnbox { background: var(--soon-bg); border: 1px solid #e3d3a3; padding: 10px 14px; border-radius: var(--r); color: var(--soon-fg); margin-bottom: 12px; }
.blockers li { color: var(--hot-fg); }
.ok-text { color: var(--done-fg); }

/* risk map */
.factor { display: grid; grid-template-columns: 28px 52px 1fr 70px; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: start; }
.factor label { margin: 0; font-weight: 400; color: var(--fg); }
.factor .code { font-weight: 700; }
.factor .norm { grid-column: 3 / 5; font-size: 12px; color: var(--muted); }
.factor input[type=text] { grid-column: 3 / 5; width: 100%; height: 34px; }
.proposal { position: sticky; top: 72px; max-height: calc(100vh - 90px); overflow-y: auto; }  /* the whole column reachable (Galina 18.11.2026) */
.chosen-factors li { margin: 2px 0; }
details.all-factors > summary { cursor: pointer; margin: 8px 0; font-weight: 700; }

/* forms on the card: room between them, a text field wide enough to read (15.11.2026) */
.card form:not(.inline):not(.filters) { margin: 10px 0; }
td form:not(.inline) { margin: 0; }
form.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
form.row input[type=text] { flex: 1 1 320px; min-width: 220px; }

/* decision page and match decisions (18.11.2026): choices as a list, nothing preselected */
.formgrid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr); gap: 16px; align-items: start; }
fieldset.choices { border: 0; padding: 0; margin: 0 0 8px; }
fieldset.choices legend { font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 6px; padding: 0; }
label.choice { display: flex; gap: 12px; align-items: flex-start; color: var(--fg); font-size: 15px; font-weight: 400; margin: 0 0 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--raised); cursor: pointer; }
label.choice input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
label.choice.off { color: var(--muted); background: var(--page); cursor: not-allowed; }
label.choice:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
table.hits > tbody.hit { border-bottom: 2px solid var(--line); }
table.hits tr.hit-body > td { border-bottom: 0; padding-top: 0; }
table.cmp { width: auto; min-width: 60%; margin: 4px 0 10px; background: var(--page); border-radius: var(--r); }
table.cmp th, table.cmp td { padding: 4px 10px; }
.mark { font-size: 12px; font-weight: 700; white-space: nowrap; }
.m-same { color: var(--done-fg); } .m-diff { color: var(--hot-fg); } .m-part { color: var(--soon-fg); } .m-unknown { color: var(--muted); }
.m-none { color: var(--muted); font-weight: 400; }
.hit-decision textarea { min-height: 52px; }
dialog { border: 1px solid var(--line); border-radius: var(--r-lg); max-width: 560px; padding: 20px 24px; box-shadow: 0 16px 48px #0b1f3a40; }
dialog::backdrop { background: #0b1f3a66; }

/* narrow screens: the menu goes on top */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 0 8px 8px; }
  .nav { flex-direction: row; flex-wrap: wrap; margin-top: 0; }
  .nav a { height: 36px; }
  .side .bottom { display: none; }
  header.top { padding: 8px 16px; height: auto; min-height: 56px; flex-wrap: wrap; }
  .content { padding: 16px; }
  .formgrid, .two { grid-template-columns: 1fr; }
}

/* register (part 3, 18.11.2026): tabs with counters, rows that open the card */
.b-hotline { background: #fff; color: var(--hot-fg); box-shadow: inset 0 0 0 1px var(--hot); }
.b-doneline { background: #fff; color: var(--done-fg); box-shadow: inset 0 0 0 1px var(--done); }
.ph { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.ph h1 { margin-bottom: 8px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid var(--line); margin: 0 0 16px; }
.tabs a { padding: 10px 9px; color: var(--muted); font-weight: 700; border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; gap: 6px; align-items: center; text-decoration: none; white-space: nowrap; }
.tabs a:hover { color: var(--fg); text-decoration: none; }
.tabs a[aria-selected=true] { color: var(--fg); border-bottom-color: var(--primary); }
.tabs .c { font-size: 12px; line-height: 18px; background: var(--surface); border-radius: var(--r-sm); padding: 0 6px; color: var(--fg); }
.tabs .c.hot { background: var(--hot); color: #fff; }
.tabs .c.soon { background: var(--soon-bg); color: var(--soon-fg); }
.acts { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.acts input[type=search] { width: 100%; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush table th:first-child, .card.flush table td:first-child { padding-left: 20px; }
.card.flush table th:last-child, .card.flush table td:last-child { padding-right: 20px; }
table.reg td { padding: 10px; }
table.reg tbody tr { cursor: pointer; }
table.reg tbody tr:hover { background: var(--side-hover); }
table.reg .sub { display: block; font-size: 13px; line-height: 18px; color: var(--muted); }
table.reg tr.stoprow td:first-child { box-shadow: inset 3px 0 0 var(--hot); }
.th-sort { border: 0; background: none; padding: 0; min-height: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; font-weight: 700; }
.th-sort:hover { background: none; color: var(--fg); }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty b { display: block; color: var(--fg); font-size: 16px; margin-bottom: 4px; }
.empty .btn { margin-top: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* client card on tabs (part 4, 18.11.2026) */
.chead { position: sticky; top: 56px; z-index: 25; background: var(--page); padding: 8px 0 0; margin: -8px 0 16px; }
.chead .back { display: inline-block; margin-bottom: 4px; }
.chead .cline { display: flex; align-items: center; gap: 16px; justify-content: space-between; }
.chead .ttl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chead h1 { margin: 0; }
.chead .meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.chead .tabs { margin: 12px 0 0; }
.js-tabs .tabpanel { display: none; }
.js-tabs .tabpanel.on { display: block; }
.stopbar { display: flex; gap: 12px; align-items: center; background: var(--hot); color: #fff; border-radius: var(--r-lg); padding: 12px 16px; margin-bottom: 16px; }
.stopbar .tx { flex: 1; }
.stopbar b { display: block; }
.card > .hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card > .hd h2 { margin: 0; }
.ref { font-size: 12px; color: var(--muted); font-weight: 400; }
.ovgrid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.steps { margin: 0 -20px; }
.step { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); }
.step:first-child { border-top: 0; }
.step .tx { flex: 1; min-width: 0; }
.step .tx span { display: block; font-size: 13px; line-height: 18px; color: var(--muted); }
.sic { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; font-size: 13px; font-weight: 700; }
.sic.ok { background: var(--done-bg); color: var(--done); }
.sic.todo { background: var(--soon-bg); color: var(--soon); }
.sic.stop { background: var(--hot); color: #fff; }
.sic.na { background: var(--surface); color: var(--muted); }
table.kv th { width: 200px; font-size: 13px; font-weight: 400; color: var(--muted); }
table.kv td, table.kv th { border-bottom: 0; padding: 5px 10px 5px 0; }
.evt { padding: 6px 0; border-top: 1px solid var(--line); margin: 0; }
.evt:first-of-type { border-top: 0; }
.lchips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.lchip { display: inline-flex; gap: 4px; align-items: center; font-size: 13px; border-radius: var(--r-sm); padding: 2px 8px; background: var(--done-bg); color: var(--done-fg); }
.lchip.fail { background: var(--hot-bg); color: var(--hot-fg); font-weight: 700; }
details.tech summary { cursor: pointer; color: var(--link); font-size: 13px; }
details.tech pre { background: var(--page); border-radius: var(--r-sm); padding: 8px; margin: 6px 0 0; white-space: pre-wrap; word-break: break-all; font-size: 12px; }
.was { color: var(--muted); text-decoration: line-through; }
button.copy { font-size: 12px; }
@media (max-width: 900px) { .ovgrid { grid-template-columns: 1fr; } .chead { position: static; } .chead .cline { flex-wrap: wrap; } }
.js-tabs .tabpanel [id] { scroll-margin-top: 200px; }

/* hits grouped by person (part 5, 18.11.2026) */
.mgroup { border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 16px; background: var(--card); overflow: hidden; }
.mgroup > .gh { display: flex; align-items: center; gap: 10px; padding: 12px 20px; background: var(--page); border-bottom: 1px solid var(--line); }
.match { padding: 16px 20px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; }
.mgroup > .match:nth-child(2) { border-top: 0; }
.match.open { box-shadow: inset 3px 0 0 var(--soon); }
.match.confirmed { box-shadow: inset 3px 0 0 var(--hot); }
.match.cleared { box-shadow: inset 3px 0 0 var(--done); }
.match table.cmp { width: 100%; }
.decided { background: var(--page); border-radius: var(--r); padding: 12px 14px; }
.decided p { margin: 8px 0 4px; }
.qchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.qchips button { border: 1px solid var(--line); background: var(--raised); color: var(--fg); border-radius: 14px; padding: 2px 10px; min-height: 0; font-size: 13px; font-weight: 400; }
.qchips button:hover { border-color: var(--primary); color: var(--primary); background: var(--raised); }
.counter { font-weight: 700; }
.bar { display: inline-block; width: 200px; height: 6px; background: var(--surface); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--done); }
.okbox { display: flex; gap: 12px; align-items: center; background: var(--done-bg); border: 1px solid #bcdcc4; color: var(--done-fg); border-radius: var(--r-lg); padding: 12px 16px; margin-bottom: 16px; }
.okbox .tx { flex: 1; } .okbox b { display: block; }
@media (max-width: 900px) { .match { grid-template-columns: 1fr; } }
.why { color: var(--hot-fg); }

/* risk map (part 7, 18.11.2026): one scroll, the level and the button in a bar at the bottom */
.riskbar { position: sticky; bottom: 0; z-index: 20; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 12px 20px; display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; box-shadow: 0 -4px 12px #0b1f3a12; margin-top: 8px; }
.riskbar label { margin: 0 0 4px; }
.riskbar .rb-reason { flex: 1 1 260px; }
.riskbar .rb-reason input { width: 100%; }
table.factors td:first-child { width: 56px; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--fg); font-size: 15px; margin: 6px 0; cursor: pointer; }
label.check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
details.all-factors.card > summary { margin: 0; }
details.all-factors.card[open] > summary { margin-bottom: 8px; }
.warnbox ul { margin: 6px 0 0; padding-left: 20px; }

/* forms (part 8, 18.11.2026): groups in two columns, buttons in a bar at the bottom */
.form-page { max-width: 960px; }
fieldset.fgroup { border: 1px solid var(--line); }
fieldset.fgroup legend { font-weight: 700; font-size: 15px; padding: 0 6px; margin-left: -6px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.fgrid .fld.wide { grid-column: 1 / -1; }
.fgrid input[type=text], .fgrid input[type=date], .fgrid input[type=number], .fgrid input[type=email], .fgrid select, .fgrid textarea { width: 100%; }
.fielderr { color: var(--hot-fg); font-size: 13px; font-weight: 700; margin-top: 4px; }
.formbar { position: sticky; bottom: 0; z-index: 20; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 12px 20px; display: flex; gap: 12px; align-items: center; box-shadow: 0 -4px 12px #0b1f3a12; }
.drop { display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; border: 2px dashed var(--field); border-radius: var(--r-lg); padding: 24px; background: var(--page); cursor: pointer; color: var(--fg); font-weight: 400; margin: 8px 0 0; }
.drop.has { border-style: solid; border-color: var(--done); background: var(--done-bg); }
.drop { position: relative; }
.drop input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.searchgrid { display: grid; grid-template-columns: minmax(0, 1fr) 220px auto; gap: 12px; align-items: end; }
.searchgrid input[type=search], .searchgrid select { width: 100%; }
.searchgrid label { margin-top: 0; }
.cand { display: flex; gap: 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.cand:first-of-type { border-top: 0; }
.cand .tx { flex: 1; min-width: 0; }
.cand .tx > div { margin-top: 2px; }
@media (max-width: 700px) { .fgrid, .searchgrid { grid-template-columns: 1fr; } .cand { flex-wrap: wrap; } }

/* sanctions lists page (part 9, 18.11.2026) */
table.lists td { padding: 12px 10px; }
.bar i.run { width: 40%; animation: barrun 1.2s ease-in-out infinite; background: var(--primary); }
@keyframes barrun { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
details.card > summary { cursor: pointer; }

/* journal (part 10, 18.11.2026) */
.chainline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; font-size: 14px; }
.jfilters label.check { margin-top: 22px; }
.jfilters select { max-width: 240px; }
table.journal td { padding: 10px; }
table.journal details.tech pre { max-width: 520px; }

/* package (part 11, 18.11.2026) */
.pkgrow { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.pkgrow label { margin-top: 0; }
.pkgrow .seg label { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 0 12px; height: 38px; font-weight: 400; color: var(--fg); border-right: 1px solid var(--line); cursor: pointer; }
.pkgrow .seg label:last-child { border-right: 0; }
.pkgrow .seg label:has(input:checked) { background: var(--side-active); color: var(--side-strong); font-weight: 700; }
.pkglist { max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r); padding: 4px 12px; columns: 2; }
.pkglist label.check { margin: 4px 0; break-inside: avoid; font-size: 14px; }
.pkglist { overflow-x: hidden; }
.pkglist label[hidden], [hidden] { display: none !important; }
.pkgrow .seg input { position: absolute; opacity: 0; pointer-events: none; }
.lchip.extra { background: var(--surface); color: var(--fg); }
.lchip.extra.soft { background: var(--soon-bg); color: var(--soon-fg); font-weight: 400; }
/* select arrow: own chevron with room on the right (Galina 18.11.2026 «поправь стрелочки») */
select:not([multiple]) { -webkit-appearance: none; appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2356606e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }

/* identity and questionnaire tabs (part 12, 18.11.2026) */
.idrow .acts { margin: 0; }
.qa { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 24px; padding: 10px 0; border-top: 1px solid var(--line); }
.qa:first-child { border-top: 0; }
.qa .q { color: var(--muted); font-size: 14px; }
.qa .q small { display: block; font-size: 12px; color: var(--side-muted); margin-top: 2px; }
@media (max-width: 700px) { .qa { grid-template-columns: 1fr; } }

/* hits: our data once per person, each list entry compact; the decision column never overflows (18.11.2026) */
.mgroup > .gours { padding: 8px 20px; border-bottom: 1px solid var(--line); background: var(--page); }
.match > * { min-width: 0; }
.match .rec { margin-top: 6px; }
.match .recf { display: inline-block; margin-right: 14px; }
.hit-decision textarea { width: 100%; }
.hit-decision label.choice, .qchips button { white-space: normal; text-align: left; }
.hit-decision button[type=submit] { white-space: normal; }
.mgroup > .gours + .match { border-top: 0; }
.chead .tabs.ctabs { flex-wrap: wrap; overflow: visible; row-gap: 0; }

/* Repeated identity comparison keeps each match self-contained. */
.identity-comparison { grid-column:1 / -1; border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.comparison-head, .comparison-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
.comparison-head { background:var(--page); }
.comparison-head > *, .comparison-row > div { padding:12px 16px; min-width:0; overflow-wrap:anywhere; }
.comparison-head > :last-child, .comparison-row > :last-child { border-left:1px solid var(--line); }
.comparison-row { border-top:1px solid var(--line); }
.comparison-row strong, .comparison-row .mark { display:block; margin-top:4px; }
.comparison-row strong { font-weight:600; }
.match { padding:24px; gap:20px 28px; }
.hit-evidence > div { margin-top:12px; line-height:1.6; }
.mgroup { margin-top:24px; margin-bottom:24px; }
.mgroup > .gh { flex-wrap:wrap; gap:10px 16px; padding:16px 24px; }
#listy details { margin:20px 0; }
#listy details > summary { cursor:pointer; padding:6px 0; }
#listy .warnbox, #listy .okbox { margin:20px 0; padding:16px 20px; line-height:1.6; }
#listy .acts { margin:24px 0; gap:16px; }
.hit-decision .decided { margin-bottom:16px; }
.revise-decision { padding-top:12px; border-top:1px solid var(--line); }
@media(max-width:600px) { .match { padding:16px; gap:16px; } .comparison-head > *, .comparison-row > div { padding:10px; } }

/* Screening summaries: result first, a separate action below it. */
.screening-summary { display:flex; flex-direction:column; align-items:flex-start; gap:8px; min-width:0; }
.screening-summary__status { display:flex; flex-wrap:wrap; align-items:flex-start; gap:6px 8px; max-width:100%; }
.screening-summary__status .badge { white-space:normal; line-height:1.4; max-width:100%; }
.screening-summary__status .b-stop { flex-shrink:0; white-space:nowrap; }
.screening-summary__status .sub { flex-basis:100%; }
.screening-summary__action { display:inline-flex; align-items:center; gap:8px; max-width:100%; min-height:28px; line-height:1.5; text-decoration:underline; text-underline-offset:3px; }
.screening-summary__action > span { flex-shrink:0; }
.screening-summary__action:focus-visible { outline:2px solid var(--primary); outline-offset:4px; border-radius:2px; }
table.reg td { padding-top:16px; padding-bottom:16px; }

/* Sanctions tab (20.11.2026): who x list at the top, hits per person as one table, one decision per list subject */
table.lmatrix { min-width: 640px; }
table.lmatrix th, table.lmatrix td { padding: 8px 10px; vertical-align: middle; }
table.lmatrix th.grp { text-align: center; border-bottom: 1px solid var(--line); font-weight: 700; }
table.lmatrix th.grp.req, table.lmatrix th.col.req { background: var(--info-bg); color: var(--info-fg); }
table.lmatrix th.col { text-align: center; white-space: nowrap; }
table.lmatrix th.col.fail { color: var(--hot-fg); }
table.lmatrix th.who { font-size: 14px; color: var(--fg); min-width: 180px; }
table.lmatrix th.who .small { display: block; font-weight: 400; }
table.lmatrix td.mc { text-align: center; font-size: 13px; line-height: 18px; white-space: nowrap; }
table.lmatrix td.mc .small { display: block; white-space: normal; }
.mc-none { color: var(--done-fg); }
.mc-unchecked { color: var(--muted); }
.mc-cleared a { color: var(--done-fg); }
.mc-open { background: var(--soon-bg); }
.mc-open a { color: var(--soon-fg); font-weight: 700; }
.mc-confirmed { background: var(--hot-bg); }
.mc-confirmed a { color: var(--hot-fg); font-weight: 700; }
table.hitcmp { table-layout: fixed; min-width: 560px; }
table.hitcmp col.c-where { width: 28%; }
table.hitcmp th, table.hitcmp td { padding: 10px 14px; overflow-wrap: anywhere; }
table.hitcmp thead th { background: var(--page); }
table.hitcmp tr.ours th, table.hitcmp tr.ours td { background: var(--page); font-weight: 700; color: var(--fg); font-size: 14px; }
table.hitcmp tbody th { font-size: 14px; font-weight: 400; color: var(--fg); }
table.hitcmp tbody th .small { display: block; }
table.hitcmp td .mark { display: block; margin-top: 2px; }
.mgroup .gwarn { margin: 0; padding: 8px 24px; background: var(--soon-bg); color: var(--soon-fg); }
.mgroup .cl { border-top: 2px solid var(--line); }
.mgroup .cl.open { box-shadow: inset 4px 0 0 var(--soon); }
.mgroup .cl.confirmed { box-shadow: inset 4px 0 0 var(--hot); }
.mgroup .cl.cleared { box-shadow: inset 4px 0 0 var(--done); }
.mgroup .cl table.hitcmp tr:last-child > * { border-bottom: 0; }
.mgroup .samehint { margin: 0; padding: 8px 14px 0 18px; color: var(--info-fg); }
.mgroup label.inc { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 14px; color: var(--fg); font-weight: 400; cursor: pointer; }
.mgroup label.inc input { width: 16px; height: 16px; margin: 2px 0 0; flex: none; }
.cl-foot { padding: 4px 18px 16px; border-top: 1px dashed var(--line); }
.cl-foot details.why { margin: 8px 0; }
.cl-foot details.why p { margin: 4px 0; }
.cl-foot .decided { margin: 8px 0; }
.cl-foot fieldset.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cl-foot fieldset.choices legend { width: 100%; }
.cl-foot label.choice { flex: 1 1 240px; margin: 0; padding: 10px 12px; }
.cl-foot textarea { width: 100%; min-height: 52px; }
.cl-foot .qchips button { white-space: normal; text-align: left; }
.cl.cleared .cl-foot .revise-decision { border-top: 0; padding-top: 4px; }
.more-checks { display: flex; flex-wrap: wrap; gap: 16px 32px; }
.more-checks > div { flex: 1 1 260px; }
@media (max-width: 600px) { .cl-foot { padding: 4px 12px 12px; } .mgroup .gwarn { padding: 8px 12px; } }
.mgroup .cl:has(details.revise-decision:not([open])) label.inc input { display: none; }
#listy-skrot > .hd { flex-wrap: wrap; }
#listy-skrot > .hd button { white-space: normal; }
table.hitcmp tr.ours.inline th, table.hitcmp tr.ours.inline td { font-weight: 400; font-size: 13px; padding-top: 6px; padding-bottom: 6px; }
table.hitcmp tr.ours.inline th { color: var(--muted); }
#listy .cl > .messages { margin: 10px 18px 0; }
/* anchors land right under the pinned header, measured by card.js (22.11.2026) */
.js-tabs .tabpanel, .js-tabs .tabpanel [id] { scroll-margin-top: calc(var(--pin, 192px) + 8px); }
/* a note under a value in the card tables, then its link, each on its own line (22.11.2026) */
table.kv td .sub { display: block; font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 2px; }
table.kv td .sub + a { display: inline-block; margin-top: 2px; }
table.regcheck { margin: 4px 0 16px; }
table.regcheck td { vertical-align: top; }
table.regcheck td .sub { display: block; font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 2px; }
table.regcheck td:first-child { width: 55%; }
table.regcheck td:last-child { white-space: nowrap; }
/* hits one at a time (22.11.2026) */
.rvw { max-width: 1100px; }
.rvw-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.rvw-top h1 { margin: 0; }
.rvw-who { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 18px; margin-bottom: 10px; }
.rvw-who .muted { font-size: 14px; }
.rvw-src { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
table.rvw-cmp { margin: 12px 0 16px; }
table.rvw-cmp th, table.rvw-cmp td { padding: 10px 14px; vertical-align: top; }
table.rvw-cmp tbody th { width: 170px; color: var(--muted); font-weight: 400; font-size: 14px; }
table.rvw-cmp tbody td { font-size: 15px; }
table.rvw-cmp thead th { background: var(--page); font-size: 13px; }
table.rvw-cmp .mark { display: block; margin-top: 2px; }
.rvw-form fieldset.choices { display: flex; flex-wrap: wrap; gap: 12px; }
.rvw-form fieldset.choices legend { width: 100%; }
.rvw-form label.choice { flex: 1 1 260px; margin: 0; padding: 16px; font-size: 16px; font-weight: 700; justify-content: center; }
.rvw-form textarea { width: 100%; min-height: 72px; }
.rvw .samehint { color: var(--info-fg); margin: 8px 0 0; }
.rvw label.inc { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: 13px; color: var(--muted); font-weight: 700; }
/* contracts in the folder (22.11.2026) */
table.contracts td .sub { display: block; font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 2px; }
table.contracts td:first-child { width: 32%; }
table.contracts td:nth-child(4) { width: 22%; }
table.contracts .badge { white-space: normal; }
table.contracts td { overflow-wrap: anywhere; }
table.kv td .sub .badge { white-space: normal; }
table.contracts td:nth-child(2), table.contracts td:last-child { white-space: nowrap; overflow-wrap: normal; }
table.signers-edit td { padding: 4px 6px; vertical-align: top; }
table.signers-edit input[type=text], table.signers-edit input[type=email], table.signers-edit select { width: 100%; min-width: 120px; }
table.signers-edit input[type=date] { width: 100%; min-width: 140px; }
table.signers-edit td.who > * + * { margin-top: 4px; }
table.signers-edit td.who { min-width: 220px; }
table.signers-edit td.side select { min-width: 165px; }

/* DocuSign connection (22.11.2026) */
.dsconn { margin-bottom: 16px; }
.dsconn h2 { margin-top: 0; }
.dsconn .acts { margin-top: 8px; }
ol.dssteps { margin: 8px 0 12px; padding-left: 22px; }
ol.dssteps li { margin: 4px 0; }
button.busy { cursor: progress; }
button.busy::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -2px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: busy-spin .8s linear infinite; }
@keyframes busy-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { button.busy::before { animation: none; } }
/* DocuSign envelopes (22.11.2026): groups to link, a table that fits the page */
.dsgroup { margin-bottom: 12px; }
.dsg-head { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.dsg-title { flex: 1 1 320px; min-width: 0; overflow-wrap: anywhere; }
.dsg-title .sub, .dsg-list .sub { display: block; font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 2px; }
.dsg-acts { display: flex; flex-direction: column; gap: 6px; align-items: stretch; flex: 0 1 360px; }
.dsg-acts .row { display: flex; gap: 6px; }
.dsg-acts .row input { flex: 1 1 auto; min-width: 0; }
.dsg-list, .dsg-hide { margin-top: 8px; }
.dsg-list summary, .dsg-hide summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.dsg-list ul { margin: 6px 0 0; padding-left: 18px; }
.dsg-list li { margin: 6px 0; overflow-wrap: anywhere; }
.dsg-hide .row { display: flex; gap: 6px; margin-top: 6px; }
.dsg-hide .row input { flex: 1 1 auto; }
table.envelopes { table-layout: fixed; width: 100%; }
table.envelopes col.c-env { width: 38%; } table.envelopes col.c-state { width: 13%; }
table.envelopes col.c-who { width: 29%; } table.envelopes col.c-client { width: 20%; }
table.envelopes td { overflow-wrap: anywhere; vertical-align: top; white-space: normal; }
table.envelopes td .sub { display: block; font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 2px; }
.dsai { margin-bottom: 12px; }
.dsai p { margin: 0 0 8px; }
.dsai .sub { display: block; margin-top: 4px; }
table.envelopes .dsg-hide .row { flex-direction: column; align-items: stretch; }
table.envelopes .dsg-hide input { width: 100%; min-width: 0; box-sizing: border-box; }
/* terms found in the contract's PDF (22.11.2026) */
.terms-found { border: 1px solid var(--line); border-radius: var(--r); background: var(--page); padding: 10px 12px; margin: 0 0 12px; }
.terms-found p { margin: 0 0 6px; }
.tf-row { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 6px 0; border-top: 1px solid var(--line); }
.tf-what { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.tf-what .sub { display: block; font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 2px; }
.tf-row.taken .tf-what b { color: var(--done-fg); }
.notice-pair { display: grid; grid-template-columns: 1fr 120px; gap: 8px; }
a.ds-open { font-size: 13px; font-weight: 600; white-space: nowrap; margin-left: 4px; }
/* contract preview and the list of contracts (22.11.2026) */
.pv-head { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.pv-head h1 { margin-bottom: 4px; overflow-wrap: anywhere; }
iframe.pdfview { width: 100%; height: 78vh; min-height: 480px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.ct-search { display: flex; gap: 8px; margin: 0 0 12px; max-width: 560px; }
.ct-search input { flex: 1 1 auto; }
table.contracts-all { table-layout: fixed; width: 100%; }
table.contracts-all col.c-client { width: 13%; } table.contracts-all col.c-doc { width: 24%; }
table.contracts-all col.c-person { width: 13%; } table.contracts-all col.c-end { width: 10%; }
table.contracts-all col.c-now { width: 12%; } table.contracts-all col.c-sign { width: 18%; } table.contracts-all col.c-act { width: 10%; }
table.contracts-all.in-card col.c-doc { width: 28%; } table.contracts-all.in-card col.c-sign { width: 22%; }
table.contracts-all tr.annex-row td { background: var(--page); }
table.contracts-all tr.annex-row td.doc { padding-left: 28px; }
table.contracts-all tr.main-row td { border-top: 1px solid var(--line); }
.annex-mark { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
table.contracts-all td.signers .sg { display: block; margin-bottom: 4px; }
table.contracts-all td.acts-cell a, table.contracts-all td.acts-cell form { display: block; margin-bottom: 4px; }
.pv-more { margin: -4px 0 12px; display: flex; gap: 16px; }
table.contracts-all td { overflow-wrap: anywhere; vertical-align: top; white-space: normal; }
table.contracts-all td .sub { display: block; font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 2px; }
table.contracts-all { min-width: 820px; }
table.contracts-all .badge, table.envelopes .badge { white-space: normal; }
.dl-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.dl-note { max-width: 900px; margin: -4px 0 12px; }
table.contracts-all td.acts-cell a, table.contracts-all td.acts-cell button { white-space: nowrap; overflow-wrap: normal; }
/* contracts, compact and by firm (22.11.2026) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.chips a { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--fg); text-decoration: none; background: var(--raised); }
.chips a[aria-current="true"] { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); font-weight: 700; }
.chips a .c { color: var(--muted); font-weight: 400; margin-left: 2px; }
.card.firm { padding-top: 10px; padding-bottom: 10px; margin-bottom: 10px; }
.firm-head { cursor: pointer; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.firm-head .firm-name { font-weight: 700; }
.firm-head .firm-sum { font-size: 13px; color: var(--muted); }
.warn-t { color: var(--soon-fg); }
.firm-empty { font-size: 14px; display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; }
table.ct { table-layout: fixed; width: 100%; min-width: 680px; font-size: 14px; margin-top: 8px; }
table.ct th { font-size: 12px; }
table.ct td { padding: 6px 8px; vertical-align: top; white-space: normal; overflow-wrap: anywhere; }
table.ct td .sub { display: block; font-size: 12px; line-height: 16px; color: var(--muted); }
table.ct td .sub.warn-t { color: var(--soon-fg); } table.ct td .sub.overdue { color: var(--hot-fg, #b42318); }
/* the same grid in every firm's table: fixed dates, state and actions, the name takes what is left */
table.ct col.c-person { width: 16%; } table.ct col.c-from { width: 96px; } table.ct col.c-end { width: 112px; }
table.ct col.c-now { width: 140px; } table.ct col.c-act { width: 96px; }
table.ct td.dt { white-space: nowrap; overflow-wrap: normal; }
table.ct tr.annex-row td { background: var(--page); }
table.ct tr.annex-row td.doc { padding-left: 26px; }
table.ct td.signers .sg { display: block; }
table.ct td.acts-cell a, table.ct td.acts-cell form { display: block; margin-bottom: 4px; white-space: nowrap; }
table.ct .badge { white-space: normal; }

/* «Sprawdź podpisującego» on the contract's page (22.11.2026) */
.signer-check form.signer-ok { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.signer-check form.signer-ok input[type=text] { flex: 1 1 280px; min-width: 0; }

/* «Do podpisu»: requests to sign from other firms (24.11.2026) */
table.sr-table td:first-child { white-space: normal; }
table.sr-table .sub { display: block; }
.sr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 16px; }
.sr-grid .card { margin: 0; }
.sr-msg { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--line); background: var(--page); white-space: normal; }
.sr-acts textarea { width: 100%; box-sizing: border-box; }
.sr-acts .acts { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.sr-acts details form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.sr-acts details input { flex: 1 1 260px; min-width: 0; }
.sr-note { padding: 8px 0; border-bottom: 1px solid var(--line); }
.sr-note.sr-pytanie b { color: var(--hot-fg); }
.sr-note.sr-ok b, .sr-note.sr-podpisane b { color: var(--done-fg); }
.sr-grid form.inline { display: flex; gap: 8px; flex-wrap: wrap; }
.sr-grid form.inline input { flex: 1 1 220px; min-width: 0; }
.sr-inbox .sr-addr { word-break: break-all; background: var(--page); padding: 2px 6px; border-radius: var(--r-sm); }
.sr-inbox ol { margin: 4px 0 8px 18px; padding: 0; }
/* «Wyślij do podpisu» (24.11.2026) */
ol.send-steps { padding-left: 22px; max-width: 760px; }
ol.send-steps > li { margin: 0 0 18px; }
ol.send-steps ul { margin: 6px 0 0; padding-left: 18px; }
ol.send-steps p { margin: 6px 0; }
table.send-who { margin: 6px 0; }
table.send-who td { padding: 4px 12px 4px 0; vertical-align: top; overflow-wrap: anywhere; }
