:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #1d2330;
  --muted: #6a7282;
  --line: #dde1e8;
  --accent: #1f5fbf;
  --accent-text: #ffffff;
  --danger: #b3261e;
  --ok: #1e7a3c;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; }
h1 { font-size: 1.4rem; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; margin: 1.5rem 0 .5rem; }
a { color: var(--accent); }

.topbar {
  display: flex; align-items: center; gap: 1rem; flex-wrap: nowrap;
  padding: .6rem 1rem; background: var(--panel); border-bottom: 1px solid var(--line);
}
.topbar .brand { font-weight: 600; }
.topbar a.brand { text-decoration: none; }
.notice.company-stopped { border-left: 4px solid var(--danger); }
/* the summary: a block a lease, green when its month is done */
.summary-blocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; align-items: start; }
.summary-block { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 1rem; }
.summary-block.done { border: 2px solid var(--ok); }
.summary-done { position: absolute; top: .6rem; right: .7rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-weight: 700; }
.summary-block h2 { margin: 0 2rem .2rem 0; font-size: 1.1rem; }
.summary-block h3 { margin: .8rem 0 .3rem; font-size: .95rem; }
.summary-bills { list-style: none; margin: 0; padding: 0; }
.summary-bills li { display: flex; justify-content: space-between; gap: 1rem; padding: .2rem 0 .2rem .6rem; border-left: 3px solid var(--line); margin-bottom: .2rem; }
.summary-bills li.bill-posted { border-left-color: var(--ok); }
.summary-bills li.bill-draft, .summary-bills li.bill-loaded { border-left-color: #e0a800; }
.summary-bills li > :first-child { flex: 1 1 auto; }
.summary-bills li > :last-child { flex: 0 1 auto; text-align: right; }
.summary-left { margin: .6rem 0 0; }
.summary-month { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.summary-month button { min-width: 2.2rem; font-size: 1.2rem; line-height: 1; }
.summary-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: 1rem; }
.summary-filter input[type=search] { flex: 0 1 22rem; }
.house-block, .house-single { position: relative; }
/* the frame of a house is of its own colour; done, a green one stands around it */
.house-block.done, .panel.house-single.done { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ok); }
.house-state { margin-top: .4rem; font-weight: 600; }
.house-month-flats { overflow-x: auto; }
.signer-row { display: grid; grid-template-columns: 7rem 1fr 1fr auto; gap: .4rem; margin-bottom: .4rem; }
.sign-page main { max-width: 640px; margin: 1.5rem auto; }
@media (max-width: 600px) { .signer-row { grid-template-columns: 1fr; } }
tr.charge-closed td, tr.charge-ahead td { color: var(--muted); }
.flat-space { display: flex; gap: .4rem; align-items: center; margin-bottom: .3rem; }
fieldset.flat-counted { display: contents; border: 0; padding: 0; margin: 0; }
.flat-closed { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .6rem .9rem; border-radius: 8px; background: #f3f5fa; }
.flat-closed button { margin: 0; }
.flat-space input { flex: 1 1 0; width: auto; min-width: 0; }
.space-kinds { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-bottom: .4rem; }
.space-name { color: var(--muted); font-size: .9rem; }
.space-kind { display: inline-flex; align-items: center; gap: .3rem; }
.space-kinds .space-kind input { width: 4.5rem; max-width: 4.5rem; min-width: 0; }
.space-chip { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.space-chip button { margin: 0; padding: .2rem .55rem; font-size: .9rem; white-space: nowrap; border: none; border-radius: 0; background: transparent; box-shadow: none; }
.space-chip.chosen { background: var(--accent); border-color: var(--accent); }
.space-chip.chosen button { color: #fff; }
.space-chip button + button { padding: .2rem .45rem; border-left: 1px solid rgba(255, 255, 255, .4); }
.flat-search { width: min(26rem, 100%); margin-bottom: .6rem; }
.house-report tr.strong td { font-weight: 600; background: #f6f8fb; }
.house-report .house-month-flats td { font-size: .85rem; padding-left: .35rem; padding-right: .35rem; }
.house-bill { padding: .25rem 0; }
.house-bill select { width: auto; }
.house-of-bill { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; align-items: center; }
.house-of-bill select { width: auto; max-width: 100%; }
.house-of-bill .summary-month { margin: 0; }
.house-of-bill .work-of-bill { flex-basis: 100%; }
.house-in-bill { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; align-items: center; flex-basis: 100%; }
.position-tags { margin-top: .2rem; align-items: center; }
.tag-filter { align-items: center; vertical-align: middle; }
.tag-filter select { width: auto; padding: .1rem .3rem; font-size: .82rem; }
.whole-tag { vertical-align: middle; align-items: center; }
.tag-add { margin: 0; padding: 0 .5rem; border: 1px dashed var(--line); border-radius: 999px; background: none; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.tag-field { display: inline-block; width: 13rem; }
.tag-field input { padding: .15rem .45rem; font-size: .82rem; }
/* the colour of a house or a tag: the frame of it, a paler ground, dark words */
.hued { border: 1px solid hsl(var(--hue) 55% 48%); background: hsl(var(--hue) 75% 95%); }
.chip.hued { color: hsl(var(--hue) 65% 22%); background: hsl(var(--hue) 75% 94%); }
.chip.hued button.link { color: hsl(var(--hue) 45% 38%); }
.house-block.hued, .panel.house-single.hued { border: 2px solid hsl(var(--hue) 55% 48%); background: hsl(var(--hue) 75% 98%); }
.panel.house-single { margin-top: .8rem; }
/* how many a tag takes: a part of the tag until it is pressed */
.chip input.tag-quantity { width: 2.6rem; margin-left: .3rem; padding: 0 .25rem; border-radius: 4px; font-size: .8rem; text-align: right; border: 1px solid transparent; background: transparent; box-shadow: none; color: inherit; font-weight: 600; cursor: pointer; }
.chip input.tag-quantity:hover { border-color: hsl(var(--hue) 55% 48%); }
.chip input.tag-quantity:focus { border-color: hsl(var(--hue) 55% 48%); background: #fff; cursor: text; }
/* the file of a house: its colour kept quiet, a thin line and a breath of it behind the headings */
.house-file.coloured > .panel:first-child, .house-file.coloured > .house-tab > .panel:first-child { border-top: 3px solid hsl(var(--hue) 45% 68%); }
.house-file.coloured > .panel > h2, .house-file.coloured > .house-tab > .panel > h2 { background: hsl(var(--hue) 45% 96%); }
.house-tab[hidden] { display: none; }
.house-tabs { margin-top: 0; }
@media (max-width: 700px) {
  .line-products, .line-products > tbody, .line-products > tbody > tr, .line-products > tbody > tr > td { display: block; width: auto; white-space: normal; }
  .line-products > tbody > tr > td { border: 0; }
  .line-products .inline-category { display: block; margin-top: .4rem; }
}
.charge-row { cursor: pointer; }
.charge-row:hover { background: #e8effa; }
.hot-water { width: 5rem; }
.readings-find { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; margin: .4rem 0; }
.readings-find .flat-search { margin: 0; }
.readings-table td { vertical-align: middle; }
.readings-table tr.first td { border-top: 1px solid var(--line, #dde1e8); }
.readings-flat { max-width: 16rem; }
.reading-cell, .start-cell { width: 7.5rem; }
.reading-cell.big { width: 12rem; font-size: 1.4rem; }
.entrance-head td { background: #eef3fb; font-weight: 600; }
.house-note { margin: .3rem 0; }
.house-note-row { display: flex; gap: .5rem; margin-bottom: .3rem; }
.house-note-row input { flex: 1 1 0; width: auto; min-width: 0; }
.house-note-row input:nth-child(2) { flex-grow: 2; }
table.entrances { table-layout: fixed; width: 100%; min-width: 46rem; }
table.entrances th.last-flat, table.entrances th.door-code { width: 7.5rem; white-space: normal; }
table.entrances th.elder-phone { width: 9rem; }
table.entrances th:first-child { width: 5.5rem; }
table.entrances td input, table.entrances td input.num { width: 100%; min-width: 0; max-width: none; box-sizing: border-box; }
.board-item { border-bottom: 1px solid var(--line, #dde1e8); padding-bottom: .6rem; margin-bottom: .6rem; }
.board-text { white-space: pre-line; }
.board-steps { list-style: none; margin: .4rem 0; padding: 0 0 0 .8rem; border-left: 3px solid #d5def0; }
.board-steps li { margin: .35rem 0; }
.board-steps .actions { margin: .3rem 0 0; }
.flat-interest .date-input, .house-interest .date-input { display: inline-block; width: 10rem; }
.board-history { margin-top: .8rem; }
.board-history > summary { cursor: pointer; color: var(--muted, #6a7282); }
/* the open house with all that is of it, on a ground of its colour */
.tree-house.open { background: hsl(var(--hue, 210) 55% 95%); border-radius: 8px; padding-bottom: .3rem; }
.house-loans .house-month-flats { margin-top: .6rem; }
.loan-interest { margin-top: .3rem; white-space: nowrap; }
.loan-interest input { width: 6rem; }
.photo-add { cursor: pointer; }
.meter-struck { margin: .2rem 0 .2rem .5rem; color: var(--muted, #6a7282); }
.meter-photo { display: block; max-width: 100%; max-height: 60vh; margin: 0 auto .6rem; border-radius: 8px; }
.give-meters { background: var(--accent-soft, #eef3fb); border-radius: 8px; padding: .2rem .8rem .6rem; margin-bottom: .6rem; }
.colour-pick { display: inline-flex; flex-wrap: wrap; gap: .3rem; align-items: center; vertical-align: middle; }
.colours { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
button.colour { width: 1.3rem; height: 1.3rem; min-height: 0; margin: 0; padding: 0; border-radius: 50%; border: 2px solid #fff; outline: 1px solid var(--line); background: hsl(var(--hue) 55% 48%); }
button.colour.on { outline: 2px solid var(--text); }
.colour-dot { display: inline-block; width: .6rem; height: .6rem; margin-right: .4rem; border-radius: 50%; background: hsl(var(--hue) 55% 48%); }
.system-documents.over { outline: 2px dashed var(--accent); outline-offset: -6px; }
.bill-lines td:first-child input:not([type=checkbox]) { width: calc(100% - 2rem); }
.bill-lines .num input { width: 4.5rem; }
.house-mailbox { margin: .6rem 0 1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 8px; }
.house-tree a.tree-month { margin-left: .9rem; }
.charge-price { display: flex; align-items: center; justify-content: flex-end; gap: .3rem; margin-top: .3rem; }
.charge-price .date-input { width: 9.5rem; }
/* the house files: the tree of the houses and their flats at the left, the one chosen at the right */
.house-files { display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: 1rem; align-items: start; }
.house-tree ul { list-style: none; margin: 0; padding: 0; }
.house-tree .tree-row { display: flex; align-items: center; gap: .3rem; }
.house-tree a { display: block; flex: 1 1 auto; padding: .3rem .5rem; border-radius: 6px; color: var(--text); text-decoration: none; }
.house-tree a:hover { background: var(--accent-soft, #eef4ff); }
.house-tree a.active { background: var(--accent-soft, #eef4ff); color: var(--accent); font-weight: 600; }
.house-tree .tree-house.open > .tree-row > a { font-weight: 600; }
.house-tree .tree-house.dragged { opacity: .5; }
.house-tree .tree-order { flex: none; white-space: nowrap; }
.house-tree .tree-flats { margin: .1rem 0 .4rem .9rem; border-left: 2px solid var(--line); padding-left: .3rem; }
.flat-facts th { text-align: left; width: 40%; font-weight: 400; color: var(--muted); }
@media (max-width: 700px) { .house-files { grid-template-columns: 1fr; } }
/* the houses of a manager: a block a house */
.house-blocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.house-block { display: block; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 8px; color: inherit; text-decoration: none; }
.house-block:hover, .house-block:focus-visible { border-color: var(--accent); }
.house-block h2 { margin: 0 0 .3rem; font-size: 1.1rem; }
.topbar nav { display: flex; flex-wrap: wrap; gap: .1rem; flex: 1 1 auto; min-width: 0; }
.topbar nav a { padding: .3rem .55rem; white-space: nowrap; border-radius: 6px; text-decoration: none; color: var(--text); }
.topbar nav a.active { background: var(--accent); color: var(--accent-text); }
.topbar .spacer { flex: 0 0 .5rem; }
.topbar > select, .topbar > button, .topbar > .user, .topbar > details.user-menu { flex: none; }
.topbar .user { color: var(--muted); }

main { padding: 1rem; max-width: 1500px; margin: 0 auto; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 1rem; margin-bottom: 1rem; }
.narrow { max-width: 420px; margin: 3rem auto; }
/* a visitor looking at the example: said above everything */
.demo-bar { display: flex; gap: 1rem; align-items: center; justify-content: center; flex-wrap: wrap; padding: .5rem 1rem; background: #fff8e1; border-bottom: 1px solid #f0d98a; font-size: .95rem; }
/* the sign-in with what the program is for beside it */
.welcome { display: flex; gap: 3rem; align-items: flex-start; max-width: 980px; margin: 3rem auto; padding: 0 1rem; }
.welcome .about { flex: 1; padding-top: .6rem; }
.welcome .about h2 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 .8rem; }
.welcome .about ul { padding-left: 1.2rem; margin: 1rem 0; }
.welcome .about li { margin: .5rem 0; }
.welcome .narrow { flex: 0 0 420px; margin: 0; }
@media (max-width: 880px) {
  .welcome { flex-direction: column; gap: 1.2rem; margin: 1rem 0; padding: 0 .6rem; }
  .welcome .narrow { flex: none; width: 100%; max-width: none; margin: 0; order: -1; }
}

label { display: block; margin: .5rem 0 .2rem; color: var(--muted); font-size: .9rem; }
input, select, textarea {
  font: inherit; padding: .4rem .5rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; width: 100%;
}
input[type=checkbox], input[type=radio] { width: auto; }
.check { display: flex; gap: .4rem; align-items: center; color: var(--text); }

button {
  font: inherit; padding: .45rem .9rem; border-radius: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer;
}
button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
button.danger { color: var(--danger); }
button:disabled { opacity: .5; cursor: default; }
.actions { display: flex; gap: .5rem; margin-top: 1rem; flex-wrap: wrap; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 1rem; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: .9rem; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: #f0f4fb; }
.lines td { padding: .25rem .3rem; }
.lines input, .lines select { padding: .3rem .4rem; }
/* numbers in a table stand at the right, under their column's name (the owner: "все цифры лучше вводить с правой стороны") */
td input.num { text-align: right; }

.error { color: var(--danger); margin: .5rem 0; white-space: pre-wrap; }
.success { color: var(--ok); margin: .5rem 0; }
.muted { color: var(--muted); }
.badge { display: inline-block; padding: .05rem .45rem; border-radius: 10px; font-size: .8rem; background: #eef1f6; }
.badge.draft { background: #fff3cd; }
.badge.posted { background: #d8f0df; }
/* a button and its arrow as one: the action at once, or the choice opened beside it */
.split-button { display: inline-flex; vertical-align: middle; }
.split-button > button:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; padding-left: .55rem; padding-right: .55rem; }
.split-button > button + button { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.badge.suggested { background: transparent; box-shadow: inset 0 0 0 1px #7cc391; color: var(--ok); }
.badge.duplicate { background: #e5e7eb; color: #4b5563; }
/* the failures: where in the code, as it was said - in a narrow box that scrolls */
.failure-stack { max-height: 16rem; overflow: auto; font-size: .78rem; background: #f6f7f9; padding: .5rem; border-radius: 6px; white-space: pre-wrap; word-break: break-word; }
.failures td { vertical-align: top; }
.page-broken { margin-top: 3rem; }
/* the measures of speed: what a person would notice as slow is marked */
.speed tr.slow td { background: #fff3cd; }
.speed table { margin-top: .6rem; }
.speed details { margin-top: 1rem; }
/* the discount code under the paying: a short field, its button, what it gave */
.discount-code { margin-top: .5rem; align-items: center; flex-wrap: wrap; }
.discount-code input { max-width: 12rem; text-transform: uppercase; }
.discount-code .success { padding: .2rem .6rem; margin: 0; }
.discount-codes input.code { text-transform: uppercase; min-width: 9rem; }
.discount-codes td { vertical-align: middle; }
/* payment state: green paid, amber partly, blue not yet, red overdue - on invoices, in lists by a coloured edge */
.badge.pay-paid { background: #d8f0df; color: var(--ok); }
.badge.pay-partial { background: #fff3cd; color: #7a5a00; }
.badge.pay-unpaid { background: #e3ecfb; color: #1f4f99; }
.badge.pay-overdue { background: #fde2e0; color: var(--danger); font-weight: 600; }
tr.pay-row-overdue > td:first-child { box-shadow: inset 4px 0 0 var(--danger); }
tr.pay-row-partial > td:first-child { box-shadow: inset 4px 0 0 #e0a800; }
tr.pay-row-paid > td:first-child { box-shadow: inset 4px 0 0 var(--ok); }
.panel.pay-panel-overdue { border-left: 4px solid var(--danger); }
.panel.pay-panel-paid { border-left: 4px solid var(--ok); }
.panel.pay-panel-partial { border-left: 4px solid #e0a800; }
/* a tick box with the whole cell to click: a near miss doesn't open the row */
label.tick { display: flex; align-items: center; justify-content: center; margin: -.4rem -.5rem; padding: .4rem .9rem; min-height: 1.6rem; cursor: pointer; }
label.tick input { width: 1.15rem; height: 1.15rem; cursor: pointer; margin: 0; }
.code { font-family: Consolas, monospace; font-size: 1.05rem; letter-spacing: .05em; }
.qr img { display: block; margin: .5rem 0; }
.totals { margin-left: auto; width: 320px; }
.totals td { border: none; padding: .15rem .5rem; }
.totals tr.gross td { font-weight: 600; border-top: 1px solid var(--line); }
.lock-date { display: flex; gap: .4rem; align-items: center; }
.lock-date input { width: 10rem; }
.small { font-size: .8rem; }
tr.total td { font-weight: 600; border-top: 2px solid var(--line); }
.nowrap { white-space: nowrap; }
.narrow-form { max-width: 420px; }
.topbar a.user { text-decoration: none; }
.in { color: var(--ok); }
.out { color: var(--danger); }
.overdue { color: var(--danger); }
.payment-editor { background: #f6f8fc; border: 1px solid var(--line); border-radius: 6px; padding: .5rem .8rem; }
a.button { display: inline-block; font: inherit; padding: .45rem .9rem; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--text); text-decoration: none; }
a.button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
/* a button waiting for the server: its text gives way to a spinner, its size stays */
button.busy { position: relative; color: transparent !important; cursor: progress; opacity: 1; }
button.busy::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 1em; height: 1em; margin: -.5em 0 0 -.5em;
  border: 2px solid rgba(0, 0, 0, .2); border-top-color: var(--text); border-radius: 50%; animation: spin .7s linear infinite;
}
button.primary.busy::after { border-color: rgba(255, 255, 255, .35); border-top-color: var(--accent-text); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { button.busy::after { animation-duration: 2s; } }
.spinner {
  display: inline-block; width: 1em; height: 1em; vertical-align: -.15em; border: 2px solid rgba(0, 0, 0, .15);
  border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite;
}
.loading { text-align: center; color: var(--muted); margin-top: 4rem; }
.input-with-button { display: flex; gap: .4rem; }
.input-with-button input { flex: 1; min-width: 0; }
.input-with-button button { white-space: nowrap; }
/* the invoice and its original side by side (as Odoo shows a vendor bill) */
main:has(.with-original) { max-width: none; }
.with-original { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 45%); gap: 1rem; align-items: start; }
.originals { position: sticky; top: .5rem; }
.originals h2 { margin-top: 0; }
.originals .viewer { display: block; width: 100%; height: calc(100vh - 12rem); min-height: 420px; border: 1px solid var(--line); border-radius: 4px; margin-top: .6rem; background: #fff; }
.originals img.viewer { height: auto; min-height: 0; }
.file-list { list-style: none; padding: 0; margin: 0 0 .5rem; }
.file-list li { padding: .2rem 0; }
.file-list li.active > a { font-weight: 600; }
button.link { border: none; background: none; padding: 0 .2rem; }
@media (max-width: 1000px) { .with-original { grid-template-columns: 1fr; } .originals { position: static; } }
.notice { background: #fff8e1; border-color: #f0d98a; }
.notice ul { margin: .3rem 0 0; padding-left: 1.2rem; }
/* what may leave a period's figures short (PeriodChecks.tsx): one line each, with the way to put it right */
ul.notice.period-checks { list-style: none; margin: 0 0 .8rem; padding: .55rem .9rem; border: 1px solid #f0d98a; border-left: 4px solid #e0a800; border-radius: 8px; color: #5c4400; }
ul.notice.period-checks li + li { margin-top: .35rem; }
ul.notice.period-checks li::before { content: "⚠ "; }
.period-mark { color: #b07800; cursor: help; }
/* an other account of the company and the day it is closed from */
.closed-account { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; margin: .35rem 0 0; }
.closed-account > .iban { font-family: ui-monospace, Consolas, monospace; min-width: 15rem; }
.closed-account > label { margin: 0; }
.closed-account > .date-input { flex: none; width: 11rem; }
/* a quiet hint above a form: what else the program can do here */
.panel.hint-note { background: #f3f6fe; border-left: 4px solid #2962ff; font-size: .92rem; padding: .6rem .9rem; }

.company-picker { border: 1px solid var(--line); border-radius: 6px; padding: .4rem .6rem; margin: .5rem 0; }
.company-picker legend { font-size: .85em; color: var(--muted); padding: 0 .3rem; }
.title-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.title-row select.language { width: auto; }
select.language { width: auto; }
/* supplier files dragged over the window */
.drop-overlay {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem;
  background: color-mix(in srgb, var(--accent) 12%, transparent); border: 3px dashed var(--accent); font-size: 1.3rem; color: var(--accent);
  pointer-events: none;
}
.drop-overlay > div:first-child { background: var(--panel); padding: .8rem 1.4rem; border-radius: 8px; }
.file-list li.error { color: var(--danger); }
.title-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.title-row h1 { margin-right: auto; }
button.drop-toggle { border-style: dashed; border-color: var(--accent); color: var(--accent); }
button.drop-toggle.on { border-style: solid; color: var(--muted); border-color: var(--line); }
.drop-zone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; text-align: center;
  min-height: 220px; margin: 0 0 1rem; padding: 1.5rem; border: 2px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 12px; background: color-mix(in srgb, var(--accent) 5%, var(--panel)); color: var(--heading, inherit); cursor: pointer;
  transition: background .15s, border-color .15s;
}
.drop-zone:hover, .drop-zone:focus-visible { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--panel)); outline: none; }
.drop-zone.over { border-style: solid; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, var(--panel)); }
.drop-zone.busy { cursor: progress; opacity: .8; }
.drop-zone .drop-icon { font-size: 2.4rem; line-height: 1; color: var(--accent); }

/* lists: striped rows, sortable titles, a filter under each title */
.panel table:not(.totals) > tbody > tr:nth-child(even):not(.empty) { background: #f7f9fc; }
.panel table:not(.totals) > tbody > tr.clickable:hover { background: #e8effa; }
.table-wrap { overflow-x: auto; }
table.data thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
table.data th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
table.data th.sortable:hover { color: var(--accent); }
table.data .sort-mark { font-size: .75em; color: var(--accent); }
table.data tr.filters th { padding-top: 0; padding-bottom: .35rem; border-bottom: 2px solid var(--line); }
table.data tr.filters input { width: 100%; min-width: 4rem; padding: .2rem .35rem; font-size: .85rem; border: 1px solid var(--line); border-radius: 4px; }
table.data tr.filters th.num input { text-align: right; }
table.data tfoot td { font-weight: 600; border-top: 2px solid var(--line); border-bottom: none; }
.table-search { display: flex; align-items: center; gap: .8rem; margin-bottom: .6rem; flex-wrap: wrap; }
.table-search input { max-width: 360px; }
.table-search .spacer { flex: 1; }
.table-search .list-period { display: inline-flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.table-search .list-period .date-input { width: 9.6rem; flex: none; }
.table-search button.excel { padding: .3rem .8rem; }
/* the partner's card */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .3rem 1.5rem; }
.card-grid > div > span:first-child { display: block; color: var(--muted); font-size: .85rem; }
.figures { display: flex; gap: 2rem; flex-wrap: wrap; }
.figures > div > b { display: block; font-size: 1.3rem; }
/* a field that searches its options as you type */
.search-select { position: relative; }
.search-select ul { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin: 2px 0 0; padding: 0; list-style: none; background: var(--panel);
  border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.12); max-height: 18rem; overflow-y: auto; }
.search-select li { padding: .35rem .6rem; cursor: pointer; }
.search-select li.active, .search-select li:hover { background: #e8effa; }
.search-select li small { color: var(--muted); margin-left: .4rem; }
@media (max-width: 700px) { .topbar { flex-wrap: wrap; } }
/* entering by hand from the original: the field that takes the clicked block, the original as blocks of text */
input.pick-target { outline: 2px solid var(--accent); outline-offset: 1px; background: #eef4ff; }
.originals .toggle { display: inline-flex; gap: 0; margin-left: auto; }
.originals .toggle button { border-radius: 0; }
.originals .toggle button:first-child { border-radius: 6px 0 0 6px; }
.originals .toggle button:last-child { border-radius: 0 6px 6px 0; }
.markup { max-height: 80vh; overflow-y: auto; }
.markup-hint { position: sticky; top: 0; z-index: 2; background: var(--panel); margin: 0 0 .4rem; padding: .3rem 0; font-size: .9rem; }
.markup-hint:not(.muted) { color: var(--accent); font-weight: 600; }
.markup-page { position: relative; background: #fff; border: 1px solid var(--line); margin-bottom: .6rem; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.markup-block { position: absolute; padding: 0 1px; margin: 0; border: 1px solid transparent; border-radius: 2px; background: transparent;
  color: var(--text); line-height: 1; white-space: nowrap; overflow: hidden; text-align: left; cursor: pointer; font-family: inherit; }
.markup-block:hover { border-color: var(--accent); background: rgba(31, 95, 191, .12); z-index: 1; overflow: visible; }
.markup-block.used { background: rgba(30, 122, 60, .14); }
.feed-settings { border-top: 1px solid var(--line); margin-top: .6rem; padding-top: .6rem; }
.feed-settings ol.steps { padding-left: 1.3rem; }
.feed-settings ol.steps li { margin-bottom: .45rem; }
.markup { overflow: auto; }
.markup-zoom { display: flex; gap: .2rem; margin-bottom: .3rem; }
.markup-zoom button { padding: .15rem .5rem; font-size: .85rem; }
.markup-hint { left: 0; }
tr.suggest-row td { background: #f3f7ff; border-bottom: 2px solid var(--line); }
tr.suggest-row .inline-search { display: inline-block; min-width: 22rem; vertical-align: middle; }
.inline-category { display: inline-block; min-width: 12rem; vertical-align: middle; }
/* the original's page as a picture, its blocks over it: seen when the mouse is over them */
.markup-image { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; }
.markup-page.over-image .markup-block { color: transparent; background: rgba(31, 95, 191, .06); border-color: rgba(31, 95, 191, .35); }
.markup-page.over-image .markup-block:hover { color: transparent; border: 2px solid var(--accent); background: rgba(31, 95, 191, .22); overflow: hidden; }
.markup-page.over-image .markup-block.used { background: rgba(30, 122, 60, .22); border-color: rgba(30, 122, 60, .6); }

/* ---- look: calm colours, clear headings, soft depth (not loud) ---- */
:root {
  --bg: #f3f5f9;
  --heading: #17325a;
  --accent-soft: #e7effb;
  --line-soft: #e9edf3;
  --shadow: 0 1px 2px rgba(16, 32, 64, .05), 0 2px 8px rgba(16, 32, 64, .05);
  --focus: 0 0 0 3px rgba(31, 95, 191, .18);
}
body { background: var(--bg); }
h1 { color: var(--heading); font-weight: 600; font-size: 1.45rem; letter-spacing: -.01em; }
h2 { color: var(--heading); font-weight: 600; }
.panel { border-color: var(--line-soft); border-radius: 10px; box-shadow: var(--shadow); padding: 1.1rem 1.25rem; }
.panel > h2:first-child, .panel > form > h2:first-child { margin-top: 0; padding-bottom: .45rem; border-bottom: 1px solid var(--line-soft); }

.topbar { box-shadow: 0 1px 3px rgba(16, 32, 64, .06); position: sticky; top: 0; z-index: 30; }
.topbar .brand { color: var(--heading); font-size: 1.05rem; }
.topbar nav a { color: #384356; transition: background .12s; }
.topbar nav a:hover { background: var(--accent-soft); }
.topbar nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); border-radius: 6px 6px 2px 2px; }

label { color: #5a6475; font-weight: 500; font-size: .85rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
input::placeholder, textarea::placeholder { color: #a0a8b6; }
button { transition: background .12s, border-color .12s, box-shadow .12s; }
button:not(:disabled):hover { border-color: #b9c3d3; background: #f7f9fc; }
button.primary:not(:disabled):hover { background: #1a52a6; border-color: #1a52a6; }
button.danger:not(:disabled):hover { background: #fdecea; border-color: #f2b8b5; }
button:focus-visible, a:focus-visible { outline: none; box-shadow: var(--focus); }
button.link { color: var(--accent); }
button.link:hover { background: none !important; text-decoration: underline; }
.actions .push-right { margin-left: auto; }

table.data thead th, .panel table:not(.totals) > thead th { background: #f6f8fb; color: #5a6475; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
table.data thead th { background: #f6f8fb; }
table.data tr.filters th { background: #fff; text-transform: none; }
th, td { border-bottom-color: var(--line-soft); }

/* the number a new document gets */
.doc-number { margin: -.6rem 0 1rem; color: var(--muted); }
.doc-number b { color: var(--heading); font-family: Consolas, monospace; letter-spacing: .03em; }

/* a field's list: the "make a new one" line */
.search-select li.create { color: var(--accent); font-weight: 600; border-top: 1px solid var(--line-soft); }
.search-select li.create.active, .search-select li.create:hover { background: var(--accent-soft); }

/* a window over the page */
dialog.dialog { border: none; border-radius: 12px; padding: 1.1rem 1.4rem 1.3rem; width: min(560px, calc(100vw - 2rem));
  box-shadow: 0 12px 40px rgba(16, 32, 64, .25); color: var(--text); }
dialog.dialog.wide { width: min(860px, calc(100vw - 2rem)); }
dialog.dialog::backdrop { background: rgba(23, 50, 90, .28); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
/* the head of a window stays in sight while its content is scrolled: the title says what is open, the cross closes it */
.dialog-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-soft);
  position: sticky; top: 0; z-index: 6; background: var(--panel); margin: 0 -1.4rem .4rem; padding: 1.1rem 1.4rem 0; border-radius: 12px 12px 0 0; }
/* the window's own space above goes into the head: a thing that sticks cannot leave the box it lies in */
dialog.dialog:has(> .dialog-head) { padding-top: 0; }
.dialog-head h2 { margin: 0 0 .5rem; }
.dialog-head .close { font-size: 1.6rem; line-height: 1; color: var(--muted); padding: 0 .3rem; }

/* rows under group headings (product categories) */
tr.group-row td { background: #eef2f8 !important; cursor: pointer; user-select: none; border-bottom: 1px solid #dfe5ee; }
tr.group-row:hover td { background: #e3eaf5 !important; }
tr.group-row .group-arrow { display: inline-block; width: 1rem; color: var(--accent); }
tr.group-row .group-summary { float: right; color: var(--muted); font-size: .85rem; }
/* keywords as chips; the editable list takes new ones in its own input */
.chips { display: inline-flex; flex-wrap: wrap; gap: .25rem; }
.chip { display: inline-flex; align-items: center; gap: .15rem; padding: .05rem .5rem; border-radius: 999px; background: var(--accent-soft); color: #23466f; font-size: .82rem; }
.chip button.link { padding: 0 0 0 .15rem; color: #6a7f9c; font-size: 1rem; line-height: 1; }
.chips.editable { display: flex; border: 1px solid var(--line); border-radius: 6px; padding: .35rem; min-height: 2.6rem; background: #fff; }
.chips.editable:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.chips.editable .chip-input { border: none; box-shadow: none; flex: 1 1 10rem; min-width: 8rem; padding: .15rem .3rem; }
.try-result { margin: .4rem 0 0; padding: .45rem .7rem; border-radius: 6px; background: #f6f8fb; }
.try-result.ok { background: #e6f4ea; color: var(--ok); }
.try-result.other { background: #fff6dd; color: #7a5a00; }
.try-result.none { background: #f6f8fb; color: var(--muted); }
tr.group-row .edit-group { margin-left: .3rem; color: var(--muted); font-size: .95rem; }
tr.group-row .edit-group:hover { color: var(--accent); }
/* a date in the user's format, the browser's calendar behind a button */
.date-input { position: relative; display: flex; align-items: stretch; width: 100%; }
.date-input > input:first-child { flex: 1; min-width: 0; padding-right: 2.2rem; font-variant-numeric: tabular-nums; }
.date-input .date-pick { position: absolute; right: 1px; top: 1px; bottom: 1px; width: 2rem; padding: 0; border: none; background: transparent; color: var(--muted); border-radius: 0 5px 5px 0; }
.date-input .date-pick:hover { color: var(--accent); background: var(--accent-soft) !important; }
.date-input .date-native { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.date-input.invalid > input:first-child { border-color: var(--danger); background: #fff7f6; }
.lock-date .date-input { width: 10rem; }
.inline-field { display: inline-flex; align-items: center; gap: .5rem; margin: 0; } .inline-field .date-input { width: 10.5rem; }
/* the journal: an entry's heading, its lines under it (credit side indented, as written by hand) */
.journal-filters { grid-template-columns: 11rem 11rem minmax(14rem, 1fr) minmax(12rem, 1fr); }
.journal-figures { margin-bottom: .8rem; }
.journal-figures > div > span { display: block; font-size: .8rem; }
.panel table.journal > tbody > tr { background: none !important; }
table.journal tr.entry-head td { background: #f3f6fb; border-top: 2px solid var(--line-soft); font-weight: 500; }
table.journal tr.entry-head a { color: var(--heading); text-decoration: none; }
table.journal tr.entry-head a:hover { text-decoration: underline; color: var(--accent); }
table.journal tr.entry-line td { border-bottom: 1px dashed var(--line-soft); padding-top: .25rem; padding-bottom: .25rem; }
table.journal td.credit-side { padding-left: 1.6rem; }
table.journal tr.on-account td { background: #fff8e1 !important; }
table.journal .code-link { font-family: Consolas, monospace; padding: 0; }
@media (max-width: 800px) { .journal-filters { grid-template-columns: 1fr 1fr; } }
button.excel { border-color: #9fd0ae; color: #1e6b3a; }
button.excel:not(:disabled):hover { background: #e6f4ea !important; border-color: #1e7a3c !important; }

/* a row opened for editing in the list */
.panel table > tbody > tr.opened > td { background: var(--accent-soft) !important; border-bottom: none; font-weight: 500; }
.panel table > tbody > tr.open-row > td { background: #f8fafd !important; border-left: 3px solid var(--accent); padding: .8rem 1rem 1rem; cursor: default; }
form.in-list .actions { margin-top: .6rem; }

table.lines input.discount { width: 4.5rem; }

/* the app's question / message window (dialogs.tsx) */
dialog.dialog.message { width: min(480px, calc(100vw - 2rem)); }
.message-text { white-space: pre-line; margin: .8rem 0 1rem; line-height: 1.5; }
dialog.dialog.message .actions { justify-content: flex-end; margin-top: 0; }
button.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
button.danger.solid:hover { filter: brightness(.92); }

/* the empty line at the end of an invoice: for the next one, never saved */
table.lines tr.blank-line input, table.lines tr.blank-line select { opacity: .6; }
table.lines tr.blank-line:focus-within input, table.lines tr.blank-line:focus-within select { opacity: 1; }

/* the supplier field takes the next block clicked in the original */
/* the field that takes the clicks on the markup - not the fields of a window opened from it (a new partner's card) */
.pick-target-box input:not(dialog *) { outline: 2px solid var(--accent); outline-offset: 1px; background: #eef4ff; }

/* the buttons of a form or document (save, post, back to the list...): always at the bottom of the screen while
   the form is longer than it, over a soft band; in its place at the end once scrolled there */
.actions.sticky-bar {
  position: sticky; bottom: 0; z-index: 20;
  margin: 1rem -1.25rem -1.1rem; padding: .7rem 1.25rem;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-top: 1px solid var(--line-soft); border-radius: 0 0 10px 10px;
  box-shadow: 0 -6px 14px -10px rgba(16, 32, 64, .25);
}
/* outside a panel (a posted invoice) and in a window: no panel edges to reach */
.invoice-side > .actions.sticky-bar, main > .actions.sticky-bar { margin: 1rem 0 0; border-radius: 10px; border: 1px solid var(--line-soft); }
/* the bar reaches into the window's own padding (its margin below is negative): held at the very bottom of the window,
   not at the bottom of what is inside the padding - there it stood 1.3rem higher, over the last field, with an empty
   band under it (the owner: "опять что-то не влезает..") */
dialog .actions.sticky-bar { margin: 1rem -1.4rem -1.3rem; border-radius: 0 0 12px 12px; bottom: -1.3rem; }
form.in-list .actions.sticky-bar { margin: .6rem 0 0; border-radius: 8px; }

/* the Odoo import: the sales to decide on */
table.odoo-review td { vertical-align: top; }
table.odoo-review td.odoo-choice { min-width: 280px; }
table.odoo-review select { width: auto; }

/* how the invoice rounds its VAT, over its totals */
.vat-mode { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; margin-top: .8rem; }
.vat-mode label { margin: 0; }
.vat-mode select { width: auto; }

/* the journal for Odoo: what goes, by group */
ul.odoo-groups { list-style: none; padding: 0; margin: .4rem 0; }
ul.odoo-groups li { padding: .3rem 0; border-bottom: 1px solid var(--line-soft); }
ul.odoo-groups li .muted.small { margin-left: 1.8rem; }

/* mail accounts and the letters of an invoice */
.mail-form .grid { margin-bottom: .4rem; }
.panel.letters ul.file-list { margin: .6rem 0 0; }

/* the numbering of the company */
dialog .data input { width: auto; }

/* how to get a Gmail app password, under the mail form */
.mail-help { background: var(--accent-soft, #eef4ff); border-radius: 8px; padding: .6rem .9rem; margin: .4rem 0 .6rem; font-size: .9rem; }
.mail-help ol { margin: .3rem 0 .4rem 1.2rem; padding: 0; }
.mail-help p { margin: .2rem 0 0; color: var(--muted); }

/* which Odoo product the invoice lines go under */
.odoo-products { margin-top: .8rem; }
.odoo-products h4 { margin: .2rem 0; }
.odoo-products table input { width: 100%; }
.odoo-products .warn { color: var(--warn, #b26a00); }
.odoo-products select { margin-top: .4rem; width: auto; }

/* the transfer to Odoo: the invoices and what changed in them */
.odoo-invoices { list-style: none; padding: 0; margin: .3rem 0 .6rem; }
.odoo-invoices > li { padding: .35rem 0; border-bottom: 1px solid var(--border, #e5e7eb); }
.odoo-invoices table.changes { margin: .3rem 0; font-size: .85rem; width: auto; }
.odoo-invoices table.changes td { padding: .1rem .5rem; }
.odoo-invoices table.changes td.was { color: var(--muted); text-decoration: line-through; }
/* in the lists of the transfer the ticks sit at the left, with their text */
ul.odoo-groups label.tick, ul.odoo-invoices label.tick { justify-content: flex-start; gap: .4rem; margin: 0; padding: .15rem 0; flex-wrap: wrap; }

/* the moves of the transfer, each to choose, its lines to look at */
.odoo-move-group { margin: .4rem 0 .6rem; }
ul.odoo-moves { list-style: none; padding: 0 0 0 1.6rem; margin: .2rem 0; }
ul.odoo-moves > li { padding: .15rem 0; border-bottom: 1px solid var(--line-soft); }
ul.odoo-moves details summary { cursor: pointer; margin-left: 1.6rem; }
ul.odoo-moves details table { margin: .2rem 0 .4rem 1.6rem; width: auto; font-size: .85rem; }
.odoo-move-group label.tick, label.tick.all { justify-content: flex-start; gap: .4rem; margin: 0; padding: .15rem 0; }
details.odoo-howto { margin: .3rem 0 .6rem; background: var(--accent-soft, #eef4ff); border-radius: 8px; padding: .4rem .8rem; font-size: .9rem; }
details.odoo-howto summary { cursor: pointer; font-weight: 600; }
details.odoo-howto ol { margin: .3rem 0 .3rem 1.2rem; padding: 0; }
.empty-moves { background: var(--accent-soft, #eef4ff); border-radius: 8px; padding: .5rem .8rem; font-size: .9rem; }

/* a page over another one (an invoice over the journal) */
dialog.dialog.full { width: min(1400px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding-bottom: .6rem; }
dialog.dialog.full .sticky-actions, dialog.dialog.full .actions.sticky { position: static; }

table.data.numbering-check { width: auto; }

/* the journal: entries to tick, the numbering under the buttons */
table.journal th.pick, table.journal td.pick, table.open-bank th.pick, table.open-bank td.pick { width: 1.6rem; padding-right: 0; }
table.journal tr.entry-head.picked td { background: var(--accent-soft, #eef4ff); }
.numbering-line { margin-top: .5rem; display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; }
p.note { background: var(--accent-soft, #eef4ff); border-radius: 8px; padding: .4rem .8rem; font-size: .9rem; }

/* the ticked entries' figures after the whole period's, set apart */
.journal-figures .figures-gap { margin-left: 1.2rem; padding-left: 1.2rem; border-left: 1px solid var(--line-soft); }

/* the transfer to Odoo, step by step: one step open, done ones ticked */
.odoo-steps { display: flex; flex-direction: column; gap: .4rem; }
.odoo-step { border: 1px solid var(--line-soft); border-radius: 10px; }
.odoo-step.open { border-color: var(--accent, #2f5fbf); }
.odoo-step-head { display: flex; align-items: center; gap: .6rem; width: 100%; background: none; border: none; padding: .55rem .8rem; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.odoo-step-n { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--line-soft); font-weight: 600; flex: none; }
.odoo-step.open .odoo-step-n { background: var(--accent, #2f5fbf); color: #fff; }
.odoo-step.done .odoo-step-n { background: #2e8b57; color: #fff; }
.odoo-step-title { font-weight: 600; flex: 1; }
.odoo-step-body { padding: 0 .9rem .8rem 3rem; }
.odoo-step-body h4 { margin: .6rem 0 .2rem; }
.odoo-step-next { justify-content: flex-end; }
ol.odoo-howto-list { margin: .3rem 0 .5rem 1.2rem; padding: 0; }
ol.odoo-howto-list li { margin: .2rem 0; }
ol.odoo-howto-list ul.fields { margin: .2rem 0 .2rem 1rem; padding: 0; }
.odoo-ids-result ul { margin: .2rem 0 .4rem 1.2rem; padding: 0; }
.error-text { color: var(--danger, #b42318); margin: .3rem 0 0; }

.odoo-invoices .warn { color: var(--warn, #b26a00); margin-left: 1.6rem; }

/* step 5: the files from Odoo, chosen or dropped */
label.odoo-drop { display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; cursor: pointer;
  border: 2px dashed var(--accent, #2f5fbf); border-radius: 10px; padding: 1rem; margin: .4rem 0; background: var(--accent-soft, #eef4ff); }
label.odoo-drop.over, label.odoo-drop:hover { background: #dfe9ff; }
.badge.muted-badge { background: var(--line-soft); color: var(--muted); }

/* step 2: the check of the numbering, plain to see, needed to go on */
label.numbering-confirm { display: flex; gap: .7rem; align-items: flex-start; margin: .7rem 0 .2rem; padding: .7rem .9rem; cursor: pointer;
  border: 2px solid var(--warn, #b26a00); border-radius: 10px; background: #fff7e6; }
label.numbering-confirm input { width: 1.4rem; height: 1.4rem; margin: .1rem 0 0; flex: none; cursor: pointer; }
label.numbering-confirm.checked { border-color: #2e8b57; background: #eaf6ee; }

/* the numbering: the whole table in the window, the button under it */
table.data.numbering-edit { width: 100%; table-layout: auto; }
table.data.numbering-edit td { padding: .3rem .35rem; }
table.data.numbering-edit input { width: 100%; min-width: 0; box-sizing: border-box; }
table.data.numbering-edit td:nth-child(2) { width: 32%; }
table.data.numbering-edit td:nth-child(3), table.data.numbering-edit td:nth-child(5) { width: 3.6rem; }
table.data.numbering-edit td:nth-child(4) { width: 5rem; }
table.data.numbering-edit td:nth-child(6) { width: 6rem; }
table.data.numbering-edit code { white-space: nowrap; font-size: .85rem; }

.odoo-unlinked { border: 1px solid var(--warn, #b26a00); border-radius: 8px; padding: .3rem .8rem .5rem; margin: .5rem 0; background: #fff7e6; }
.odoo-unlinked h4 { margin: .3rem 0 .2rem; }

/* the kind of a new company */
.kind-choice { display: flex; gap: .8rem; flex-wrap: wrap; margin: .3rem 0 .6rem; }
.kind-choice label.kind { flex: 1 1 16rem; display: flex; flex-direction: column; gap: .2rem; border: 2px solid var(--line-soft); border-radius: 10px; padding: .6rem .8rem; cursor: pointer; }
.kind-choice label.kind.on { border-color: var(--accent, #2f5fbf); background: var(--accent-soft, #eef4ff); }
/* the radio itself is not shown (the card is the choice): kept inside its card, a point in size - it once stretched the page sideways */
.kind-choice label.kind { position: relative; }
.kind-choice label.kind input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }

/* the lines of the utilities in a lease */
table.data.lease-items input, table.data.lease-items select { width: 100%; min-width: 0; box-sizing: border-box; }
table.data.lease-items td:nth-child(3) { width: 5rem; }
table.data.lease-items td:nth-child(4), table.data.lease-items td:nth-child(5) { width: 6.5rem; }

/* the month of the utilities */
.utilities-period { display: flex; align-items: center; gap: 1rem; }
.utilities-period h2 { margin: 0; }
.utilities-period > button { font-size: 1.2rem; padding: .2rem .8rem; }
table.data.utilities-lines input { width: 100%; min-width: 0; box-sizing: border-box; }
table.data.utilities-lines td:nth-child(3), table.data.utilities-lines td:nth-child(4) { width: 7rem; }
table.data.utilities-lines td:nth-child(5), table.data.utilities-lines td:nth-child(6) { width: 6rem; }
table.data.utilities-lines input.need { border-color: var(--warn, #b26a00); background: #fff7e6; }
pre.utilities-log { white-space: pre-wrap; font-size: .85rem; background: var(--line-soft); padding: .5rem .7rem; border-radius: 6px; }

/* the mailbox for the suppliers' bills */
ul.inbox-letters { list-style: none; padding: 0; margin: 0; }
ul.inbox-letters > li { padding: .5rem 0; border-bottom: 1px solid var(--line-soft); }
ul.inbox-letters ul { margin: .2rem 0 0 1rem; padding: 0; list-style: none; }
ul.inbox-letters li.state-failed .badge { background: #fde8e8; }
ul.inbox-letters li.state-draft .badge, ul.inbox-letters li.state-utility .badge { background: #eaf6ee; }
details.inbox-settings summary { cursor: pointer; }
details.inbox-year { border-top: 1px solid var(--line); padding: .4rem 0; }
details.inbox-year:first-of-type { border-top: 0; }
details.inbox-year > summary { cursor: pointer; font-size: 1.05rem; padding: .2rem 0; }
details.inbox-month { margin: .3rem 0 .3rem 1rem; }
details.inbox-month > summary { cursor: pointer; font-weight: 600; padding: .2rem 0; }
details.inbox-month > ul.inbox-letters { margin-left: 1rem; }
input.num.invalid { border-color: var(--danger); background: #fff7f6; }

/* Tele2: the bills by month, each person's share as it is sent, their account */
.tele2-bills { flex-wrap: wrap; }
.tele2-shares { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .8rem; margin: .8rem 0; }
.tele2-share { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; background: var(--panel); }
.tele2-share.own { opacity: .75; }
.tele2-share-head { display: flex; gap: .5rem; align-items: baseline; }
.tele2-share-head .num { margin-left: auto; font-weight: 600; }
.tele2-share pre, pre.tele2-check { white-space: pre-wrap; font-family: inherit; font-size: .9rem; margin: .4rem 0; }
pre.tele2-check { color: var(--muted); border-top: 1px solid var(--line); padding-top: .5rem; }
pre.tele2-check.bad { color: var(--danger); }
tr.tele2-guess td { background: #eef6ff; }
.tele2-ledger { padding: .4rem 0 .8rem; }
.tele2-extra { align-items: end; }
td.nowrap, span.nowrap { white-space: nowrap; }
details.tele2-others { margin-top: .8rem; }
details.tele2-others > summary { cursor: pointer; color: var(--muted); }
.loading { display: flex; align-items: center; justify-content: center; gap: .6rem; padding: 2.5rem 1rem; color: var(--muted); font-size: 1rem; }
.loading .spinner { width: 1.4rem; height: 1.4rem; }
.bank-tools { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .4rem; }
.bank-tools input[type=search] { flex: 1 1 260px; max-width: 420px; }
/* the invoices to choose: striped on the form's own background, the ticked ones blue */
.payment-editor table > tbody > tr > td { background: #fff; }
.payment-editor table > tbody > tr:nth-child(even) > td { background: #edf1f7; }
.payment-editor table > tbody > tr.picked > td { background: #dcebff; }
/* the buttons right under the invoice ticked last, on its blue */
.payment-editor table > tbody > tr.pay-actions > td { background: #dcebff; padding-top: 0; }
.payment-editor tr.pay-actions .actions { margin-top: .2rem; align-items: center; }
.payment-editor td.pay-tick { width: 1.5rem; text-align: right; }
/* the invoices as wide as they need, not stretched over the form: the sums close to their names */
.payment-editor table { width: auto; }
.payment-editor table th, .payment-editor table td { padding-left: .8rem; padding-right: .8rem; }
.payment-editor table td.pay-tick { padding-right: .2rem; }
/* a long title of a column of sums goes on two lines: the column is as wide as its sums, not as its title */
.payment-editor table thead th.num { width: 6rem; white-space: normal; }
.payment-editor table td input.num { width: 7rem; }
/* the sums under the buttons, on a line of their own; "остаток 92.60" is not cut in two */
.payment-editor tr.pay-actions .push-right { margin-left: 0; flex-basis: 100%; }
.payment-editor tr.pay-actions .push-right b { white-space: nowrap; }
/* the row under the mouse is lit: which invoice the tick or the sum is of */
.payment-editor table > tbody > tr:not(.pay-actions):hover > td { background: #e4ecf8; }
.payment-editor table > tbody > tr.picked:hover > td { background: #cddff9; }

/* the menu's "More": what is not used every day */
.topbar nav details.more { position: relative; }
.topbar nav details.more > summary { list-style: none; cursor: pointer; padding: .3rem .55rem; border-radius: 6px; white-space: nowrap; }
.topbar nav details.more > summary::-webkit-details-marker { display: none; }
.topbar nav details.more > summary::after { content: ' ▾'; color: var(--muted); }
.topbar nav details.more.active > summary { background: var(--accent); color: var(--accent-text); }
.topbar nav details.more.active > summary::after { color: var(--accent-text); }
.topbar nav .more-menu { position: absolute; top: calc(100% + .3rem); left: 0; z-index: 30; min-width: 12rem; display: flex; flex-direction: column; gap: .1rem;
  padding: .35rem; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.14); }
.tabs .count { display: inline-block; min-width: 1.3em; padding: 0 .35em; border-radius: 999px; background: var(--danger); color: #fff; font-size: .8em; text-align: center; }

/* the dates to keep: overdue in red, those within two weeks marked */
table.deadlines tr.due-overdue td { background: #fdf0ef; }
table.deadlines tr.due-done td { color: var(--muted); }
.badge.overdue { background: #fde8e8; color: var(--danger); }
details.deadline-rules { margin-top: .8rem; }
details.deadline-rules > summary { cursor: pointer; color: var(--muted); }
.topbar nav a .count { display: inline-block; min-width: 1.3em; padding: 0 .35em; border-radius: 999px; background: var(--danger); color: #fff; font-size: .8em; text-align: center; }

/* the site is away for a moment (being updated): said at the top, the page goes on by itself */
.waiting-bar { position: sticky; top: 0; z-index: 50; padding: .45rem 1rem; text-align: center; background: #fff7dc; border-bottom: 1px solid #ecd9a0; }
.waiting-bar.error { background: #fde8e8; border-color: #f0c2c2; }
/* the site is being updated: a card in the middle of the screen over soft moving shapes - over a page, the page is
   seen blurred under it. It comes in a moment late, so that a single slow answer does not flash it */
.updating { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 1rem; background: #e9edf5; overflow: hidden; }
.updating.over { background: rgba(233, 237, 245, .55); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); animation: updating-in .35s ease-out .7s both; }
@keyframes updating-in { from { opacity: 0; } to { opacity: 1; } }
.updating-back { position: absolute; inset: -80px; filter: blur(60px); opacity: .8; }
.updating.over .updating-back { opacity: .45; }
.updating-back i { position: absolute; border-radius: 50%; animation: updating-drift 18s ease-in-out infinite alternate; }
.updating-back i:nth-child(1) { width: 46vmax; height: 46vmax; left: -8vmax; top: -10vmax; background: #b9cbff; }
.updating-back i:nth-child(2) { width: 40vmax; height: 40vmax; right: -6vmax; bottom: -12vmax; background: #c9f0dc; animation-duration: 23s; animation-direction: alternate-reverse; }
.updating-back i:nth-child(3) { width: 28vmax; height: 28vmax; left: 38%; top: 46%; background: #ffe2b8; animation-duration: 27s; }
@keyframes updating-drift { to { transform: translate(6vmax, 4vmax) scale(1.12); } }
.updating-card { position: relative; width: min(460px, 100%); box-sizing: border-box; padding: 2.1rem 1.9rem 1.7rem; text-align: center; background: rgba(255, 255, 255, .9);
  border-radius: 20px; box-shadow: 0 18px 60px rgba(19, 23, 34, .2); }
.updating-card .gears { width: 132px; height: 106px; }
.updating-card h1 { font-size: 1.45rem; margin: .9rem 0 .5rem; }
.updating-card p { margin: 0 0 .4rem; color: #4a5065; }
.updating-card p.small { margin-top: 1rem; color: #7a8097; }
/* a company that is only looked at: said above every page of it */
.notice.looked-only, .notice.plan-ending { margin-bottom: 1rem; padding: .7rem 1rem; border: 1px solid #f0d98a; border-radius: 10px; }
/* the blocks of a posted invoice - its payment, its sending, its entry: each under a heading on a strip of its own
   colour, so that the page is read by its blocks at a glance */
.panel.block { padding-top: 0; }
.panel.block > h2 { margin: 0 -1rem .9rem; padding: .6rem 1rem; font-size: 1.08rem; border-radius: 7px 7px 0 0; background: #eef1f6; border-bottom: 1px solid var(--line); }
.panel.block.pay-panel > h2 { background: #eef1f6; }
.panel.block.pay-panel-paid > h2 { background: #e4f4e8; }
.panel.block.pay-panel-overdue > h2 { background: #fde8e8; }
.panel.block.pay-panel-partial > h2 { background: #fff4d6; }
.panel.block.letters { border-left: 4px solid #2962ff; }
.panel.block.letters > h2 { background: #e8effe; }
.panel.block.entry-panel { border-left: 4px solid #7b61c9; }
.panel.block.entry-panel > h2 { background: #f0edfa; }
.panel.block.books-part { border-left: 4px solid #0e9aa7; }
.panel.block.books-part > h2 { background: #e3f4f5; }
.panel.block.pay-panel:not(.pay-panel-paid):not(.pay-panel-overdue):not(.pay-panel-partial) { border-left: 4px solid #8a93a6; }
/* every block of a page: its heading on a strip across the block, so that the page is read by its blocks at a glance;
   a block may bear a colour of its own - what is owed to us, what goes out, what has a day to be done by, what is counted */
main .panel:has(> h2:first-child) { padding-top: 0; }
main .panel > h2:first-child { margin: 0 -1rem .9rem; padding: .6rem 1rem; font-size: 1.08rem; border-radius: 7px 7px 0 0; background: #eef1f6; border-bottom: 1px solid var(--line); }
/* a block whose heading stands in a row with the arrows of its period: the row is the strip */
main .panel:has(> .utilities-period:first-child) { padding-top: 0; }
main .panel > .utilities-period:first-child { margin: 0 -1rem .9rem; padding: .6rem 1rem; border-radius: 7px 7px 0 0; background: #eef1f6; border-bottom: 1px solid var(--line); }
main .panel > .utilities-period:first-child h2 { margin: 0; font-size: 1.08rem; }
main .panel.accent-violet > .utilities-period:first-child { background: #f0edfa; }
main .panel.accent-green { border-left: 4px solid var(--ok, #2e7d32); }
main .panel.accent-green > h2:first-child { background: #e4f4e8; }
main .panel.accent-blue { border-left: 4px solid #2962ff; }
main .panel.accent-blue > h2:first-child { background: #e8effe; }
main .panel.accent-amber { border-left: 4px solid #e0a800; }
main .panel.accent-amber > h2:first-child { background: #fff4d6; }
main .panel.accent-violet { border-left: 4px solid #7b61c9; }
main .panel.accent-violet > h2:first-child { background: #f0edfa; }
main .panel.accent-teal { border-left: 4px solid #0e9aa7; }
main .panel.accent-teal > h2:first-child { background: #e3f4f5; }
/* a header row of a block (its heading and the controls beside it) and the heading of a block made of a fieldset:
   the same strip as a heading */
main .panel:has(> .title-row:first-child), main .panel:has(> fieldset.plain:first-child > h2:first-child) { padding-top: 0; }
main .panel > .title-row:first-child { margin: 0 -1rem .9rem; padding: .45rem 1rem; border-radius: 7px 7px 0 0; background: #eef1f6; border-bottom: 1px solid var(--line); }
main .panel > .title-row:first-child h2 { margin: 0; padding: 0; border: 0; background: none; font-size: 1.08rem; }
main .panel > fieldset.plain:first-child > h2:first-child { margin: 0 -1rem .9rem; padding: .6rem 1rem; font-size: 1.08rem; border-radius: 7px 7px 0 0; background: #eef1f6; border-bottom: 1px solid var(--line); }
/* every strip across the whole block, to its edges: as wide as the block's own padding (narrower on a phone) */
main .panel { --pad-x: 1.25rem; }
main .panel > h2:first-child, main .panel > .utilities-period:first-child, main .panel > .title-row:first-child, main .panel > fieldset.plain:first-child > h2:first-child,
  .panel.block > h2 { margin-left: calc(-1 * var(--pad-x, 1rem)); margin-right: calc(-1 * var(--pad-x, 1rem)); padding-left: var(--pad-x, 1rem); padding-right: var(--pad-x, 1rem); }
@media (max-width: 820px) { main .panel { --pad-x: .7rem; } }
/* a second heading inside a block: a strip across it, not a rounded top */
.panel.block > h2:not(:first-child) { margin-top: 1rem; border-radius: 0; border-top: 1px solid var(--line); }
/* the month of the rent and the utilities, by the same colours: what comes in, what is counted, what goes out */
.panel.block.rent-panel.waits { border-left: 4px solid #8a93a6; }
.panel.block.rent-panel.done { border-left: 4px solid var(--ok, #2e7d32); }
.panel.block.rent-panel.done > h2 { background: #e4f4e8; }
.panel.block.bills-block { border-left: 4px solid #0e9aa7; }
.panel.block.bills-block > h2 { background: #e3f4f5; }
.panel.block.lines-block { border-left: 4px solid #7b61c9; }
.panel.block.lines-block > h2 { background: #f0edfa; }
.panel.block.send-block { border-left: 4px solid #2962ff; }
.panel.block.send-block > h2 { background: #e8effe; }
/* the user's own menu, under the name at the right of the bar */
.topbar details.user-menu { position: relative; }
.topbar details.user-menu > summary { list-style: none; cursor: pointer; padding: .3rem .55rem; border-radius: 6px; white-space: nowrap; color: var(--muted); }
.topbar details.user-menu > summary::-webkit-details-marker { display: none; }
.topbar details.user-menu > summary::after { content: ' ▾'; }
.topbar details.user-menu > summary:hover, .topbar details.user-menu[open] > summary { background: var(--accent-soft, #eef4ff); color: inherit; }
.topbar details.user-menu.active > summary { background: var(--accent); color: var(--accent-text); }
.topbar details.user-menu .more-menu { position: absolute; top: calc(100% + .3rem); right: 0; left: auto; z-index: 30; min-width: 12rem; display: flex; flex-direction: column; gap: .1rem;
  padding: .35rem; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.14); }
.topbar details.user-menu .more-menu a, .topbar details.user-menu .more-menu button { display: block; width: 100%; box-sizing: border-box; text-align: left; padding: .4rem .6rem; border: 0; border-radius: 6px;
  background: none; color: inherit; font: inherit; text-decoration: none; cursor: pointer; }
.topbar details.user-menu .more-menu a:hover, .topbar details.user-menu .more-menu button:hover { background: var(--accent-soft, #eef4ff); }
.topbar details.user-menu .more-menu a.active, .topbar details.user-menu .more-menu button.on { font-weight: 600; }
.topbar details.user-menu .menu-label { padding: .45rem .6rem .1rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.topbar details.user-menu hr { width: 100%; margin: .25rem 0; border: 0; border-top: 1px solid var(--line); }
/* the language in the user's menu: three in a row, the one in use filled */
.topbar details.user-menu .lang-row { display: flex; gap: .25rem; padding: .2rem .35rem; }
.topbar details.user-menu .more-menu .lang-row button { flex: 1; text-align: center; padding: .3rem 0; border: 1px solid var(--line); font-size: .85rem; letter-spacing: .03em; color: var(--muted); }
.topbar details.user-menu .more-menu .lang-row button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text, #fff); font-weight: 600; }
/* the site was updated while the page stood open and something is being typed on it */
.new-version { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 350; display: flex; align-items: center; gap: 1.1rem; width: max-content; max-width: min(46rem, calc(100vw - 2rem)); box-sizing: border-box; padding: .7rem 1rem; border-radius: 10px; line-height: 1.4;
  background: #1f2a44; color: #fff; box-shadow: 0 8px 28px rgba(0,0,0,.28); font-size: .92rem; }
.update-notice { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .7rem 1.2rem; background: #fff6dd; border-bottom: 1px solid #ecd9a0; line-height: 1.5; }
.update-notice > div { flex: 1 1 20rem; min-width: 0; }
.update-notice button { margin: 0; }
body[data-test]::before { content: attr(data-test); position: fixed; left: .6rem; bottom: .6rem; z-index: 400; max-width: calc(100vw - 1.2rem); box-sizing: border-box; padding: .3rem .8rem; border-radius: 999px; background: #b3541e; color: #fff; font-size: .8rem; pointer-events: none; }
body[data-test]::after { content: ""; position: fixed; inset: 0 0 auto; height: 4px; z-index: 400; background: #b3541e; pointer-events: none; }
@media print { body[data-test]::before, body[data-test]::after, .update-notice { display: none; } }
.new-version button { margin: 0; flex: none; }
.debts-hint { justify-content: space-between; }
/* a "?" beside a heading the guide speaks of: a layer over the page, each mark right after its heading's words */
main { position: relative; }
.block-helps { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 3; }
.block-help { position: absolute; width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 1px solid var(--accent, #2f5fd0); background: #fff; color: var(--accent, #2f5fd0);
  font-size: .75rem; font-weight: 700; line-height: 18px; text-align: center; cursor: pointer; opacity: .65; }
.block-help:hover, .block-help:focus-visible { opacity: 1; background: var(--accent, #2f5fd0); color: #fff; }
@media print { .block-helps { display: none; } }
/* the place of the guide a "?" led to */
.guide-text .guide-at { background: #fff3c4; box-shadow: 0 0 0 4px #fff3c4; border-radius: 4px; transition: background 1.2s ease-out 1.2s, box-shadow 1.2s ease-out 1.2s; }
/* a page's heading with the cross that closes the page (the guide as a page) */
h1.with-close { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
h1.with-close .close { font-size: 1.6rem; line-height: 1; padding: 0 .4rem; text-decoration: none; }
/* a partner's payments in order: room under the choice for its list, the steps as a list */
.in-order { min-height: 21rem; }
.in-order ol { margin: .3rem 0 .8rem; padding-left: 1.3rem; }
.in-order ol li { margin: .35rem 0; }
/* the free version and the subscription side by side */
table.plan-compare { width: 100%; max-width: 54rem; margin: .4rem 0 1.2rem; border-collapse: separate; border-spacing: 0; }
table.plan-compare th, table.plan-compare td { padding: .5rem .8rem; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
table.plan-compare tbody th { text-align: left; font-weight: 400; }
table.plan-compare thead th { font-size: 1.05rem; padding-top: .8rem; border-bottom: 2px solid var(--line); }
table.plan-compare .price { font-size: 1.3rem; font-weight: 700; margin: .15rem 0 .25rem; }
table.plan-compare .mine { background: #eef4ff; }
table.plan-compare thead th.mine { border-radius: 8px 8px 0 0; box-shadow: inset 0 3px 0 var(--accent, #2f5fd0); }
table.plan-compare .yes { color: var(--ok, #2e7d32); font-weight: 700; }
table.plan-compare .no { color: var(--muted); }
.panel table.plan-compare > tbody > tr:nth-child(even) { background: none; }
/* the way to the subscription in the top bar */
.topbar a.button.upgrade { flex: none; padding: .3rem .7rem; border-radius: 999px; background: #fff4d6; border: 1px solid #e0a800; color: #6b4a00; text-decoration: none; font-weight: 600; white-space: nowrap; }
.topbar a.button.upgrade:hover { background: #ffe9a8; }
@media (max-width: 900px) { .topbar a.button.upgrade { display: none; } .topbar.menu-open a.button.upgrade { display: block; order: 6; text-align: center; } }
/* the profile: its blocks side by side while there is room, one under another on a narrow screen */
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(21rem, 1fr)); gap: 1rem; align-items: start; }
.profile-grid > .panel, .profile-grid > .unsaved-scope > .panel { margin-bottom: 0; max-width: none; }
/* the first page: the free version and the subscription, and who keeps the service */
.landing-plans { max-width: 980px; margin: 0 auto 2rem; padding: 0 1rem; }
.landing-plans h2 { font-size: 1.4rem; margin: 0 0 .4rem; }
.landing-plans table.plan-compare { background: var(--panel); border-radius: 10px; max-width: none; }
.service-footer { max-width: 980px; margin: 1rem auto 2rem; padding: 1rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .6rem 2.5rem; color: var(--muted); font-size: .9rem; }
/* the setting up of a company just registered, and where to begin */
.panel.setup { max-width: 760px; margin: 0 auto 1rem; }
/* the setting up over the whole program: the page behind it blurred, not to be clicked until the steps are done */
.setup-over { position: fixed; inset: 0; z-index: 60; background: rgba(23, 50, 90, .28); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  overflow-y: auto; padding: 4vh 1rem; }
.setup-over .panel.setup { width: min(860px, 100%); max-width: none; margin: 0 auto; box-shadow: 0 12px 40px rgba(16, 32, 64, .25); }
.setup-steps button.link { font: inherit; color: var(--accent, #2f5fd0); padding: 0; }
@media (max-width: 700px) { .setup-over { padding: .6rem; } }
.setup-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.setup-bar { height: 6px; border-radius: 3px; background: #dde4f5; margin: .2rem 0 .8rem; overflow: hidden; }
.setup-bar i { display: block; height: 100%; min-width: 8%; background: var(--accent, #2f5fd0); transition: width .3s; }
.setup-steps { display: flex; gap: 1.2rem; list-style: none; padding: 0; margin: 0 0 1rem; font-size: .9rem; color: var(--muted); flex-wrap: wrap; }
.setup-steps li.now { color: var(--heading, inherit); font-weight: 600; }
.setup-steps li.done::before { content: '\2713  '; color: var(--ok, #2e7d32); }
.start-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .8rem; margin: .6rem 0; }
.start-card { display: flex; flex-direction: column; gap: .35rem; text-align: left; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: inherit; text-decoration: none; cursor: pointer; font: inherit; }
.start-card:hover { border-color: var(--accent, #2f5fd0); box-shadow: 0 4px 14px rgba(47, 95, 208, .12); }
.start-card b { font-size: 1.05rem; color: var(--accent, #2f5fd0); }
.start-card span { color: var(--muted); font-size: .9rem; }
/* a page with nothing on it yet: what it is for and the one way on */
.panel.empty-state { text-align: center; padding: 2rem 1.5rem; }
.panel.empty-state h2 { border: 0; background: none; margin: 0 0 .5rem; }
.panel.empty-state p { max-width: 36rem; margin: 0 auto 1rem; color: var(--muted); }
/* the profile's sign-ins: the row of this browser marked */
.profile-grid > .sign-ins { grid-column: 1 / -1; }
.sign-ins tr.here td { background: #eef4ff; }
/* a small window: its fields one under another - and, where it has groups, each group a tinted block with its name */
dialog.dialog:not(.wide) .grid { grid-template-columns: 1fr; }
fieldset.form-group { margin: 0 0 .8rem; padding: .55rem .9rem .8rem; border: 1px solid var(--line); border-left: 4px solid #8a93a6; border-radius: 8px; background: #f7f9fc; }
/* the group's name inside its block (floated, the legend leaves the border and stays within), in the colour of its edge */
fieldset.form-group > legend { float: left; width: 100%; padding: 0 0 .3rem; margin: 0 0 .1rem; border-bottom: 1px solid rgba(0, 0, 0, .07);
  font-size: .9rem; font-weight: 600; color: #3d4556; }
fieldset.form-group > legend + * { clear: both; }
fieldset.form-group.money { border-left-color: var(--ok, #2e7d32); background: #f3faf5; }
fieldset.form-group.money > legend { color: #1b6b35; }
fieldset.form-group.paper { border-left-color: #2962ff; background: #f3f6fe; }
fieldset.form-group.paper > legend { color: #1d47b8; }
fieldset.form-group.what { border-left-color: #7b61c9; background: #f6f4fc; }
fieldset.form-group.what > legend { color: #5a43a6; }
fieldset.form-group > .grid > div > label:first-child, fieldset.form-group > label:first-of-type { margin-top: .3rem; }
/* a choice of two or three (Switch in ui.tsx): all seen at once, the chosen segment filled */
.switch { display: flex; width: 100%; border: 1px solid var(--line); border-radius: 6px; background: #fff; overflow: hidden; }
.switch label { flex: 1 1 0; min-width: 0; position: relative; display: flex; align-items: center; justify-content: center; text-align: center;
  margin: 0; padding: .4rem .6rem; min-height: 2.3rem; border-left: 1px solid var(--line); cursor: pointer;
  color: var(--text); font-size: .95rem; font-weight: 400; line-height: 1.25; }
.switch label:first-child { border-left: 0; }
.switch label:hover { background: #eef4ff; }
.switch label.on { background: var(--accent); color: var(--accent-text); }
.switch input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.switch label:has(input:focus-visible) { box-shadow: inset 0 0 0 3px rgba(31, 95, 191, .45); }
.switch label.on:has(input:focus-visible) { box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .6); }
.switch.disabled label { cursor: default; color: var(--muted); background: #f4f5f7; }
.switch.disabled label.on { background: #8a93a6; color: #fff; }
.switch.auto { width: auto; display: inline-flex; }
/* many short choices (the price decimals): on a narrow screen they go on to a second row */
.switch.wrap { flex-wrap: wrap; max-width: 100%; }
.switch.wrap label { flex: 1 0 auto; font-variant-numeric: tabular-nums; }
/* choices of a sentence each: a list, one under another, wherever it stands */
.switch.long { flex-direction: column; }
.switch.long label { flex: 0 0 auto; border-left: 0; border-top: 1px solid var(--line); justify-content: flex-start; text-align: left; }
.switch.long label:first-child { border-top: 0; }
/* a name with a line under it (the way of the utilities): the name bold, the line smaller, both in the segment */
.utilities-way .switch { max-width: 100%; margin-bottom: .3rem; }
.utilities-way .switch label > span { display: flex; flex-direction: column; gap: .1rem; }
.utilities-way .switch label small { font-size: .82rem; opacity: .85; }
/* a mailbox on the mail tab: a block of its own that folds; the one in use bears the green edge */
details.mail-box { margin: 0 0 1rem; padding: .2rem 1rem .6rem; border: 1px solid var(--line); border-left: 4px solid #8a93a6; border-radius: 8px; background: #fbfcfe; }
details.mail-box.active { border-left-color: var(--ok, #2e7d32); }
details.mail-box > summary { cursor: pointer; padding: .45rem 0; display: flex; align-items: center; gap: .6rem; list-style: none; }
details.mail-box > summary::-webkit-details-marker { display: none; }
details.mail-box > summary::before { content: '▸'; color: var(--muted); }
details.mail-box[open] > summary::before { content: '▾'; }
details.mail-box > summary h3 { margin: 0; font-size: 1.05rem; }
/* the ways of sending and the reminders: a block of their own, with its own saving */
div.mail-box.sending-box { margin: 0 0 1rem; padding: .4rem 1rem .8rem; border: 1px solid var(--line); border-left: 4px solid #2962ff; border-radius: 8px; background: #fbfcfe; }
div.mail-box.sending-box > h3:first-child { margin-top: .5rem; }
/* which mailbox the letters go from now: said first on the mail tab */
.mail-now { margin: 0 0 1rem; padding: .6rem .9rem; border-radius: 8px; border-left: 4px solid var(--ok, #2e7d32); background: #e4f4e8; }
.mail-now.system { border-left-color: #e0a800; background: #fff4d6; }
.mail-now.none { border-left-color: var(--danger, #c62828); background: #fde8e8; }
/* what of an invoice goes into the books: one line, until it is being changed */
.panel.books-line { padding: .55rem 1rem; border-left: 4px solid #0e9aa7; }
/* what cannot be taken back: set apart at the foot of its page */
.danger-zone { margin-top: 1.6rem; padding: .2rem 1rem 1rem; border: 1px solid #f0c2c2; border-radius: 10px; background: #fff8f8; }
.danger-zone h3 { color: var(--danger, #c62828); }
/* tabs inside a tab: lighter than the page's own */
.tabbar.sub { align-items: center; gap: .4rem; margin: -.4rem 0 1rem; padding: .45rem .7rem; border: 0; border-left: 3px solid var(--accent, #2f5fd0); border-radius: 0 8px 8px 0; background: #e8effe; }
.tabbar.sub .sub-of { font-size: .85rem; color: var(--muted, #6b7280); margin-right: .2rem; }
.tabbar.sub button { margin: 0; padding: .3rem .8rem; border: 1px solid transparent; border-radius: 999px; font-size: .92rem; }
.tabbar.sub button:hover { background: rgba(255, 255, 255, .6); }
.tabbar.sub button.on { background: var(--accent, #2f5fd0); color: #fff; border-color: var(--accent, #2f5fd0); }
/* the bank line whose form is open under it: the line and its form are one block, marked at the left */
tr.editing > td { background: #eef3ff; font-weight: 600; }
tr.editing > td:first-child, tr.editing-form > td:first-child { box-shadow: inset 4px 0 0 var(--accent, #2962ff); }
tr.editing-form > td { background: #f6f9ff; }
/* the record one came for from the bank: marked among the others */
table.data tr.marked td { background: #fff6d6; }
table.data tr.marked td:first-child { box-shadow: inset 3px 0 0 var(--accent, #2962ff); }
/* the exact bank lines before posting: a row is clicked anywhere to take its tick off */
.exact-list tbody tr { cursor: pointer; }
.exact-list tbody tr.muted td { opacity: .55; }
/* no way to the site: the bars of a signal, the tallest ones faded and blinking */
.updating-signal { display: inline-flex; align-items: flex-end; gap: 7px; height: 76px; }
.updating-signal i { width: 14px; border-radius: 4px; background: var(--accent, #2962ff); }
.updating-signal i:nth-child(1) { height: 22%; }
.updating-signal i:nth-child(2) { height: 46%; }
.updating-signal i:nth-child(3) { height: 72%; opacity: .25; animation: updating-blink 1.8s ease-in-out infinite; }
.updating-signal i:nth-child(4) { height: 100%; opacity: .25; animation: updating-blink 1.8s ease-in-out .3s infinite; }
@keyframes updating-blink { 50% { opacity: .08; } }
@media (prefers-reduced-motion: reduce) { .updating-signal i { animation: none; } }
/* a bar that moves while the work goes on: how long is not known, so it does not pretend to count */
.updating-bar { height: 6px; margin: 1.1rem auto 0; width: 78%; border-radius: 3px; background: #dde4f5; overflow: hidden; }
.updating-bar i { display: block; height: 100%; width: 38%; border-radius: 3px; background: var(--accent, #2962ff); animation: updating-run 1.6s ease-in-out infinite; }
@keyframes updating-run { 0% { transform: translateX(-110%); } 100% { transform: translateX(290%); } }
@media (prefers-reduced-motion: reduce) { .updating-back i, .updating-bar i { animation: none; } .updating-bar i { width: 100%; opacity: .5; } }
table.data tr.month td:first-child { padding-left: 1.6rem; }
.regime { margin: .2rem 0; }
/* what the tick of the books gives, said under it: a note, not wider than a line is read */
.books-note { margin: .1rem 0 .35rem; max-width: 34rem; white-space: normal; }
.regime select { width: auto; max-width: 100%; font-size: inherit; padding: .15rem .3rem; }

/* the company's other accounts: room for an IBAN or two */
input.ibans { width: 22rem; max-width: 100%; }

/* a month of the year's summary opened: the register's rows its sums are made of */
table.data tr.month-rows > td { padding: .4rem .6rem .8rem 1.6rem; background: var(--panel, #fff); }
table.data tr.month-rows table.data { margin: 0; }
button.link.expand { color: inherit; text-align: left; }

/* the "?" of a page: its section of the guide */
main { position: relative; }
a.help-link { position: absolute; z-index: 20; top: 1rem; left: 1rem; width: 1.8rem; height: 1.8rem; line-height: 1.8rem; text-align: center; border-radius: 50%;
  background: var(--accent, #3458b8); color: #fff; font-weight: 700; font-size: 1.05rem; text-decoration: none; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
a.help-link:hover { filter: brightness(1.15); }
/* the "?" stands before the page's title */
main:has(a.help-link) h1 { padding-left: 2.4rem; }
/* the guide as a window over the page: moved by its head, stretched by its corner */
.help-window { position: fixed; z-index: 50; display: flex; flex-direction: column; min-width: 280px; min-height: 200px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px);
  background: var(--panel, #fff); border: 1px solid var(--line, #dde1e8); border-radius: 10px; box-shadow: 0 10px 34px rgba(23, 50, 90, .28); resize: both; overflow: hidden; }
.help-window-head { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem; background: var(--accent-soft, #e7effb); border-bottom: 1px solid var(--line, #dde1e8);
  cursor: move; user-select: none; touch-action: none; flex: none; }
.help-window-head select { flex: 1; min-width: 0; width: auto; }
.help-window-head a, .help-window-head button.link { flex: none; font-size: 1.25rem; line-height: 1; text-decoration: none; padding: 0 .25rem; cursor: pointer; }
.help-window-text { flex: 1; overflow: auto; padding: .2rem 1rem 1.2rem; max-width: none; }
.help-window-text h2 { margin-top: .8rem; }
/* a name in the guide that is on the page, and the thing of the page it points at */
/* a picture of the guide: an example, as wide as the text, a click opens it in full size */
.guide-picture { margin: .6rem 0 1rem; }
.guide-picture img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.guide-picture figcaption { font-size: .85rem; color: var(--muted, #667); margin-top: .35rem; }
.guide-ref { border-bottom: 2px dotted var(--accent, #1f5fbf); cursor: pointer; background: var(--accent-soft, #e7effb); border-radius: 3px; padding: 0 .1rem; }
.guide-ref:hover, .guide-ref:focus-visible { background: #ffe9a8; outline: none; }
.guide-shown { outline: 3px solid #f5a300 !important; outline-offset: 3px; border-radius: 4px; animation: guide-ring 1.3s ease-out 2; position: relative; z-index: 2; }
@keyframes guide-ring { 0% { box-shadow: 0 0 0 0 rgba(245, 163, 0, .75); } 100% { box-shadow: 0 0 0 16px rgba(245, 163, 0, 0); } }
/* the guide: its sections beside the text */
.guide { display: grid; grid-template-columns: minmax(12rem, 17rem) minmax(0, 1fr); gap: 1rem; align-items: start; }
.guide-list { display: flex; flex-direction: column; gap: .1rem; position: sticky; top: 1rem; }
.guide-list a { padding: .35rem .6rem; border-radius: 6px; text-decoration: none; color: inherit; }
.guide-list a.active { background: #eef2fb; font-weight: 600; }
.guide-text { max-width: 60rem; line-height: 1.55; }
.guide-text h3 { margin: 1.3rem 0 .4rem; }
.guide-text li { margin: .3rem 0; }
@media (max-width: 800px) { .guide { grid-template-columns: 1fr; } .guide-list { position: static; } }

/* the suppliers whose bills are the utilities' */
.utility-suppliers { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; max-width: 34rem; }
.utility-supplier { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .3rem .6rem; border: 1px solid var(--line, #dde1e8); border-radius: 6px; background: var(--panel, #fff); }
.utility-supplier span.muted { white-space: nowrap; }
.utility-supplier button.link { font-size: 1.2rem; line-height: 1; padding: 0 .2rem; }
.utility-supplier-add { margin-top: .2rem; }

/* the gears of an update: as on the page shown while the site is stopped */
.gears { display: inline-block; position: relative; width: 120px; height: 96px; }
.gears .gear { position: absolute; fill: var(--accent, #1f5fbf); height: auto; }
.gears .g1 { width: 60%; left: 3%; top: 12%; animation: gear-spin 6s linear infinite; }
.gears .g2 { width: 38%; right: 3%; top: 0; opacity: .55; animation: gear-spin 4s linear infinite reverse; }
.gears.small { width: 34px; height: 27px; vertical-align: middle; margin-right: .35rem; }
@keyframes gear-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .gears .gear { animation: none; } }
.waiting-screen { display: grid; justify-items: center; gap: 1rem; margin: 18vh auto 0; max-width: 30rem; text-align: center; color: var(--muted, #6a7282); }

/* a form watched for changes not saved: no box of its own */
.unsaved-scope { display: contents; }
h2 label.check.inline { font-size: .9rem; font-weight: 400; margin-left: 1rem; }

/* a part of a form that is opened for changes by its own tick */
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
/* protected: the fields are dimmed, not what says whether the lease is in force */
fieldset.plain:disabled .grid, fieldset.plain:disabled table, fieldset.plain:disabled .utility-suppliers, fieldset.plain:disabled > p { opacity: .78; }
h2 label.lease-state { padding: .15rem .7rem .15rem .5rem; border-radius: 999px; font-weight: 600; }
h2 label.lease-state.on { background: #dff5e3; color: #17692d; border: 1px solid #9fd8ab; }
h2 label.lease-state.off { background: #fde8e8; color: #9b1c1c; border: 1px solid #f0b4b4; }
fieldset.plain:disabled .utility-supplier button.link, fieldset.plain:disabled .utility-supplier-add { display: none; }
.lease-unlock { display: block; margin-bottom: .8rem; padding: .45rem .7rem; background: var(--accent-soft, #e7effb); border-radius: 6px; }

/* the lease in blocks: the contract, the rent, the utilities - each apart, with its own colour at the edge */
.lease-block { border-left: 5px solid var(--accent, #1f5fbf); margin-bottom: 1.2rem; }
.lease-block > h2, .lease-block > fieldset > h2 { margin-top: 0; padding-bottom: .45rem; border-bottom: 1px solid var(--line, #dde1e8); }
.lease-block.rent { border-left-color: #2e9a4c; }
.lease-block.utilities { border-left-color: #d9861a; }
.lease-block h3 { margin: 1.3rem 0 .4rem; padding-top: .9rem; border-top: 1px dashed var(--line, #dde1e8); }
.lease-unlock { margin-top: .6rem; }
.lease-save { background: var(--panel, #fff); padding: .7rem 1rem; border: 1px solid var(--line, #dde1e8); border-radius: 8px; }

/* whether a lease is in force: on its tab and beside its title */
.lease-state { display: inline-block; margin-left: .6rem; padding: .08rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; vertical-align: middle; }
.lease-state.on { background: #dff5e3; color: #17692d; border: 1px solid #9fd8ab; }
.lease-state.off { background: #fde8e8; color: #9b1c1c; border: 1px solid #f0b4b4; }
/* a lease that has ended: grey, with its last day */
.lease-state.ended { background: #eef0f3; color: #5b6472; border: 1px solid #d5d9e0; }
h2 .lease-state { font-size: .9rem; margin-left: 1rem; }

/* a button that picks a file: a label over a hidden field */
label.button { display: inline-block; font: inherit; padding: .45rem .9rem; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--text); cursor: pointer; font-weight: 400; margin: 0; }
label.button:hover { border-color: var(--accent); }
label.button.busy { opacity: .6; cursor: default; }
.lease-files .file-list { margin-top: 0; }

/* the free version said on a page */
.plan-notice { margin: .6rem 0; }
/* the page of the texts: a text in its three languages at the left, where it is used and its picture at the right */
.texts-filter { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.texts-filter select { width: auto; max-width: 18rem; }
.texts-filter input { flex: 1 1 14rem; min-width: 10rem; }
.text-row { display: flex; gap: 1.2rem; align-items: flex-start; border-left: 4px solid var(--line); }
.text-row.text-reviewed { border-left-color: #8fd0a3; }
.text-row.text-approved { border-left-color: #1e7a3c; }
.text-former > div { margin: .3rem 0 .3rem .6rem; }
.text-row.text-changed { border-left-color: var(--accent); }
.text-langs { flex: 1 1 0; min-width: 0; }
.text-langs > label { display: block; margin: 0 0 .5rem; }
.text-lang { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.text-lang .badge { margin-left: .4rem; }
.text-langs textarea { width: 100%; resize: vertical; font: inherit; }
.text-langs textarea.invalid { border-color: var(--danger); }
.text-was { display: block; white-space: pre-wrap; }
.text-parts code { background: var(--accent-soft, #e7effb); border-radius: 4px; padding: 0 .3rem; margin-right: .25rem; }
.text-where { flex: 0 0 460px; max-width: 100%; }
.text-where > div { margin-bottom: .35rem; }
.text-noshot { padding: .6rem; border: 1px dashed var(--line); border-radius: 8px; }
.text-shot { position: relative; display: block; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: zoom-in; max-width: 100%; }
.text-shot img, .text-shot-full img { position: absolute; max-width: none; }
.text-shot i, .text-shot-full i { position: absolute; border: 3px solid #e0271a; border-radius: 6px; box-shadow: 0 0 0 9999px rgba(20, 30, 50, .14); pointer-events: none; }
.text-shot-full { position: fixed; inset: 0; z-index: 60; background: rgba(15, 23, 42, .6); padding: 2vh 2vw; cursor: zoom-out; }
.text-shot-full > div { width: 100%; height: 100%; overflow: auto; background: #fff; border-radius: 8px; }
.text-shot-full > div > div { position: relative; }
.text-shot-full img { left: 0; top: 0; }
@media (max-width: 1100px) { .text-row { flex-direction: column; } .text-where { flex-basis: auto; width: 100%; } }
/* what the subscription would do here: a line under the heading of the step that is done by hand */
.plan-hint { margin: .35rem 0 .6rem; padding: .4rem .7rem; border-radius: 8px; background: var(--accent-soft, #e7effb); color: var(--heading, #17325a); font-size: .9rem; }
.plan-hint a { font-weight: 600; white-space: nowrap; }
/* the free version's mark beside «+ New lease»: a small pill, its text dropping down on a click */
details.plan-drop { position: relative; align-self: center; }
details.plan-drop > summary { list-style: none; cursor: pointer; padding: .2rem .6rem; border-radius: 999px; background: #fff8e1; border: 1px solid #f0d98a; color: var(--heading, #17325a); font-size: .85rem; white-space: nowrap; }
details.plan-drop > summary::-webkit-details-marker { display: none; }
details.plan-drop .more-menu { position: absolute; top: calc(100% + .3rem); left: 0; z-index: 30; width: min(32rem, 85vw); padding: .7rem .9rem; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel); box-shadow: 0 6px 18px rgba(0, 0, 0, .12); font-size: .9rem; line-height: 1.45; }
/* a company's subscription in the table: one thing under another, so the table is no wider for it */
.subscription { display: grid; gap: .3rem; justify-items: start; max-width: 11rem; }
.subscription .lease-state { white-space: normal; border-radius: 10px; }
.subscription .date-input, .subscription input[type=date] { width: 10rem; }

/* under the sign-in form: the way to register, and back */
.register-link { margin: 1rem 0 0; font-size: .9rem; }
/* under the password, at the right: apart from the way to a new account, which stands under the button */
/* the settings of one company: what it is, then its ticks and choices one under another */
.company-settings h2 { margin-top: 0; }
dl.facts { display: flex; flex-wrap: wrap; gap: .6rem 2rem; margin: .6rem 0 1rem; }
dl.facts > div { min-width: 9rem; }
dl.facts dt { font-size: .8rem; color: var(--muted, #6b7280); }
dl.facts dd { margin: .15rem 0 0; }
/* the company's settings in groups: each under its name, with a rule above it */
.settings-group { margin: 0 0 .4rem; padding: .7rem 0 .5rem; border-top: 1px solid var(--border, #d9dde7); }
.settings-group:first-of-type { border-top: 0; padding-top: .2rem; }
.settings-group > h3 { margin: 0 0 .5rem; font-size: 1rem; color: var(--heading, inherit); }
.settings-group > dl.facts { margin: .2rem 0 .3rem; }
.settings-group .regime > span.muted:first-child, .settings-group label.inline > span.muted:first-child { display: inline-block; min-width: 11.5rem; }
.settings-group .regime select, .settings-group input.ibans { min-width: 20rem; max-width: 100%; }
.company-ticks { margin: 0; }
/* the tax regime and the contributions: the name, beside it the list of choices, and what follows it (the full rate's sum) */
.regime:has(.switch) { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .3rem .6rem; }
.regime:has(.switch) > span.muted:first-child { padding-top: .45rem; }
.regime > span:has(> .switch) { flex: 0 1 30rem; min-width: min(100%, 18rem); }
.regime:has(.switch) > label.inline { margin: 0; padding-top: .3rem; }
.company-ticks > label.check { display: block; margin: .45rem 0; font-size: inherit; }
.company-ticks > .regime, .company-ticks > .books-note { font-size: inherit; margin: .45rem 0; }
.company-ticks > .books-note { font-size: .9rem; margin-left: 1.5rem; }
.inbox-invoice { font-weight: 600; }
/* a letter: its row is marked while pointed at, and red while its cross is - what the cross would remove is seen */
.inbox-letters > li.inbox-letter { position: relative; padding: .4rem 2.4rem .4rem .6rem; margin: 0 -.6rem; border-radius: 8px; }
.inbox-letters > li.inbox-letter:hover { background: var(--hover, #f3f5f9); }
.inbox-letters > li.inbox-letter:has(.letter-x:hover), .inbox-letters > li.inbox-letter:has(.letter-x:focus-visible) { background: #fdecea; }
.letter-x { position: absolute; top: .25rem; right: .4rem; width: 1.7rem; height: 1.7rem; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted, #6b7280); font-size: 1.25rem; line-height: 1; cursor: pointer; }
.letter-x:hover, .letter-x:focus-visible { background: #f6c9c4; color: #9b1c1c; }
/* the mailboxes read for a company, one in a line */
.mailboxes { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .25rem; }
.mailboxes b { overflow-wrap: anywhere; }
.mailboxes .error-text { margin: 0; font-weight: 600; }
/* a page in tabs: one matter in each */
.tabbar { display: flex; gap: .25rem; flex-wrap: wrap; margin: 0 0 1rem; border-bottom: 1px solid var(--border, #d9dde7); }
.tabbar button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; padding: .55rem .9rem; margin-bottom: -1px; font-weight: 600; color: var(--muted, #6b7280); cursor: pointer; }
.tabbar button:hover { color: inherit; }
.tabbar button.on { color: var(--accent, #2f5fd0); border-bottom-color: var(--accent, #2f5fd0); }
.inbox-address { font-size: 1.1rem; display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin: .2rem 0 .4rem; }
.inbox-address b { user-select: all; overflow-wrap: anywhere; }
.forgot { text-align: right; font-size: .9rem; margin-top: .4rem; }

/* a supplier's bill template: the sample's pages with the regions on them, and what each region is beside */
.template-new { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.template-new > :first-child { min-width: 18rem; flex: 0 1 26rem; }
label.button.disabled { opacity: .55; cursor: default; }
.template-editor { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 1rem; align-items: start; }
.template-pages { min-width: 0; }
.template-page { cursor: crosshair; user-select: none; }
.template-text { position: absolute; border: 1px dotted rgba(31, 95, 191, .35); border-radius: 2px; pointer-events: none; overflow: hidden; white-space: nowrap; line-height: 1.1; }
.template-text.shown { color: var(--text); border-color: transparent; }
.template-region { position: absolute; border: 2px solid #1f5fbf; background: rgba(31, 95, 191, .16); border-radius: 2px; cursor: pointer; box-sizing: border-box; }
.template-region b { position: absolute; left: -2px; top: -1.25rem; font-size: .75rem; line-height: 1.1rem; min-width: 1.1rem; text-align: center; color: #fff; background: #1f5fbf; border-radius: 3px; padding: 0 .2rem; }
.template-region.kind-period, .template-number.kind-period { border-color: #8a4fbf; }
.template-region.kind-period { background: rgba(138, 79, 191, .16); } .template-region.kind-period b, .template-number.kind-period { background: #8a4fbf; }
.template-region.kind-quantity, .template-region.kind-reading { border-color: #1e7a3c; background: rgba(30, 122, 60, .16); }
.template-region.kind-quantity b, .template-region.kind-reading b, .template-number.kind-quantity, .template-number.kind-reading { background: #1e7a3c; }
.template-region.chosen { box-shadow: 0 0 0 3px rgba(240, 160, 0, .75); z-index: 1; }
.template-region.drawing { border-style: dashed; pointer-events: none; }
.template-side { position: sticky; top: .6rem; max-height: calc(100vh - 1.2rem); overflow-y: auto; margin: 0; }
.template-region-row { border: 1px solid var(--line); border-radius: 6px; padding: .4rem .5rem; margin-bottom: .45rem; display: grid; gap: .3rem; cursor: pointer; }
.template-region-row.chosen { border-color: #f0a000; box-shadow: 0 0 0 2px rgba(240, 160, 0, .35); }
.template-region-head { display: flex; gap: .4rem; align-items: center; }
.template-region-head select { flex: 1; min-width: 0; }
.template-number { display: inline-block; min-width: 1.3rem; text-align: center; color: #fff; background: #1f5fbf; border-radius: 3px; font-size: .8rem; padding: .05rem .25rem; }
.template-problems { margin: .4rem 0; padding-left: 1.1rem; color: #9b1c1c; font-size: .85rem; }
.ok-text { color: #17692d; } .error-text { color: #9b1c1c; }
@media (max-width: 900px) { .template-editor { grid-template-columns: 1fr; } .template-side { position: static; max-height: none; } }

/* ------------------------------------------------------------------ a phone
   The same pages on a narrow screen: the menu folded under a button, one column, tables that scroll inside their
   panel (the page itself never scrolls sideways), controls large enough for a finger. */
.menu-toggle { display: none; }
@media (max-width: 820px) {
  html { font-size: 16px; }
  .topbar { flex-wrap: wrap; gap: .5rem; padding: .5rem .6rem; }
  .topbar > select { flex: 1 1 8rem; min-width: 0; width: auto; max-width: none; }
  .menu-toggle { display: block; flex: none; margin-left: auto; min-width: 2.6rem; min-height: 2.4rem; font-size: 1.2rem; line-height: 1; padding: .2rem .6rem; }
  .topbar nav, .topbar .spacer, .topbar > select.language, .topbar > .user, .topbar > details.user-menu, .topbar > button:not(.menu-toggle) { display: none; }
  .topbar.menu-open { max-height: 100vh; max-height: 100dvh; overflow-y: auto; }
  .topbar.menu-open nav { display: flex; flex-direction: column; flex: 1 0 100%; order: 5; gap: .15rem; }
  .topbar.menu-open nav a, .topbar.menu-open nav details.more > summary { padding: .65rem .7rem; font-size: 1.05rem; white-space: normal; }
  .topbar.menu-open nav .more-menu { position: static; box-shadow: none; border: none; border-left: 3px solid var(--line); border-radius: 0; margin-left: .6rem; padding: 0 0 0 .3rem; min-width: 0; }
  .topbar.menu-open > details.user-menu { display: block; order: 6; flex: 1 0 100%; }
  .topbar.menu-open > details.user-menu > summary { padding: .65rem .7rem; font-size: 1.05rem; }
  .topbar.menu-open > details.user-menu .more-menu { position: static; box-shadow: none; border: none; border-left: 3px solid var(--line); border-radius: 0; margin-left: .6rem; padding: 0 0 0 .3rem; min-width: 0; }
  .topbar.menu-open > select.language { display: block; order: 6; flex: 1 1 5rem; }
  .topbar.menu-open > .user { display: block; order: 7; flex: 1 1 8rem; padding: .5rem 0; overflow: hidden; text-overflow: ellipsis; }
  .topbar.menu-open > button:not(.menu-toggle) { display: block; order: 8; min-height: 2.4rem; }

  main { padding: .6rem; }
  h1 { font-size: 1.2rem; margin-bottom: .7rem; }
  .panel { padding: .75rem .7rem; border-radius: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .narrow { margin: 1rem .6rem; max-width: none; }
  .grid { grid-template-columns: 1fr; }
  button, label.button, a.button, input, select, textarea { min-height: 2.5rem; }
  input[type=checkbox], input[type=radio] { min-height: 0; width: 1.25rem; height: 1.25rem; vertical-align: middle; }
  button.link { min-height: 0; }
  /* the "?" of a block stays a small circle: not stretched to a finger's height like the buttons */
  button.block-help { min-height: 0; }
  /* the tabs of a page in one row, moved sideways by the finger, not three rows of them */
  .tabbar:not(.sub) { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tabbar:not(.sub) button { flex: none; white-space: nowrap; }
  .actions { gap: .5rem; }
  table.data thead th, .panel table thead th { position: static; }
  th, td { padding-left: .4rem; padding-right: .4rem; }
  dialog.dialog, dialog.dialog.wide, dialog.dialog.message { width: calc(100vw - 1rem); max-width: none; max-height: calc(100dvh - 1rem); padding: .9rem .9rem 1rem; }
  dialog .actions.sticky-bar { margin: 1rem -.9rem -1rem; bottom: -1rem; }
  .dialog-head { margin: 0 -.9rem .4rem; padding: .9rem .9rem 0; }
  dialog.dialog:has(> .dialog-head) { padding-top: 0; }
  .title-row { flex-wrap: wrap; gap: .4rem; }
  .template-new > :first-child { min-width: 0; flex: 1 1 100%; }
  .lock-date { flex-wrap: wrap; }
}

/* a phone: the rows of a list are cards - each value beside the name of its column, nothing off the screen */
@media (max-width: 820px) {
  table.cards, table.cards > tbody, table.cards > tfoot { display: block; width: 100%; }
  table.cards > thead { display: none; }
  table.cards > tbody > tr { display: block; border: 1px solid var(--line); border-radius: 8px; margin: .5rem 0; padding: .45rem .65rem; background: var(--panel) !important; }
  table.cards > tbody > tr.clickable:active { background: var(--accent-soft) !important; }
  table.cards > tbody > tr > td { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border: none; padding: .14rem 0; text-align: right; white-space: normal; overflow-wrap: anywhere; }
  table.cards > tbody > tr > td[data-label]::before { content: attr(data-label); flex: none; max-width: 45%; text-align: left; color: var(--muted); font-size: .8rem; }
  table.cards > tbody > tr > td:empty { display: none; }
  table.cards > tbody > tr > td:first-child { font-weight: 600; font-size: 1.02rem; }
  table.cards > tbody > tr.group-row, table.cards > tbody > tr.empty { border: none; padding: .3rem 0; margin: .3rem 0 0; background: none !important; }
  table.cards > tbody > tr.group-row > td, table.cards > tbody > tr.empty > td, table.cards > tbody > tr.open-row > td { display: block; text-align: left; font-weight: 400; font-size: 1rem; }
  table.cards > tbody > tr.open-row { border-color: var(--accent); margin-top: -.3rem; }
  table.cards > tbody > tr.opened { border-color: var(--accent); }
  /* the totals under a list: a card of their own, each sum beside the name of its column, the words across it first */
  table.cards > tfoot > tr { display: block; border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: 8px; margin: .7rem 0 .3rem; padding: .45rem .65rem; background: var(--accent-soft); }
  table.cards > tfoot > tr > td { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border: none; padding: .14rem 0; text-align: right; }
  table.cards > tfoot > tr > td:not([data-label]) { display: block; text-align: left; margin-bottom: .15rem; }
  table.cards > tfoot > tr > td[data-label]::before { content: attr(data-label); flex: none; text-align: left; color: var(--muted); font-size: .8rem; font-weight: 400; }
  table.cards > tfoot > tr > td:empty { display: none; }
  /* a table written by hand (cards.ts names its cells by its heading): a cell across the columns is a line of text, a
     field or a choice in a cell takes what the name leaves, the widths of the wide screen do not hold */
  table.cards[data-cards-from] > tbody > tr > td { width: auto !important; min-width: 0 !important; align-items: center; }
  table.cards > tbody > tr > td[colspan]:not([colspan="1"]) { display: block; text-align: left; font-weight: 400; font-size: 1rem; }
  table.cards[data-cards-from] > tbody > tr > td > :where(input:not([type=checkbox]):not([type=radio]), select, textarea, .search-select) { flex: 1 1 8rem; min-width: 0; max-width: 64%; width: auto; }
  table.cards[data-cards-from] > tbody > tr > td:first-child:has(> input[type=checkbox]:only-child) { justify-content: flex-start; }
  table.cards[data-cards-from] { width: 100% !important; }
  /* a cell with more in it than a value: its name above it, what is in it as it is on the wide screen */
  table.cards > tbody > tr > td[data-rich] { display: block; text-align: left; }
  table.cards > tbody > tr > td[data-rich][data-label]::before { display: block; max-width: none; margin-bottom: .15rem; }
  table.cards[data-cards-from] > tbody > tr > td:first-child > :where(div, label, p, small) { font-weight: 400; font-size: .92rem; }
  /* the fields of a bill's line that stand under their names take the whole width */
  table.lines.cards[data-cards-from] > tbody > tr > td[data-rich] > :where(input, .search-select) { width: 100%; max-width: 100%; }
}
@media (max-width: 820px) {
  /* the colour of a row's payment: on the card's own edge, not over the first value */
  table.cards > tbody > tr[class*="pay-row-"] > td:first-child { box-shadow: none; }
  table.cards > tbody > tr.pay-row-overdue { border-left: 5px solid var(--danger); }
  table.cards > tbody > tr.pay-row-partial { border-left: 5px solid #e0a800; }
  table.cards > tbody > tr.pay-row-paid { border-left: 5px solid var(--ok); }
  table.cards tr.month td:first-child { padding-left: 0; }
}
@media (max-width: 820px) {
  /* the month's utilities: a line is a card, its readings typed with a finger */
  table.utilities-lines.cards > tbody > tr > td { align-items: center; }
  table.utilities-lines.cards input { width: 9rem; text-align: right; }
  table.utilities-lines.cards > tbody > tr > td:first-child::before { content: none; }
  table.utilities-lines.cards > tbody > tr > td:first-child { justify-content: flex-start; text-align: left; }
}
@media (max-width: 820px) {
  /* the widths of the columns of the wide screen do not hold on a card: a value takes the row's width, the field is large */
  table.data.utilities-lines.cards > tbody > tr > td { width: auto !important; min-height: 2.6rem; }
  table.data.utilities-lines.cards input { width: 9.5rem; flex: none; text-align: right; font-size: 1.05rem; }
  /* a table kept as a table scrolls inside its panel: its cells do not break into letters */
  .panel > table:not(.cards) th, .panel > table:not(.cards) td { white-space: nowrap; }
  .panel > table:not(.cards) td:first-child { white-space: normal; min-width: 9rem; }
}
@media (max-width: 820px) { .regime select, .regime input { max-width: 78vw; } }

/* paying for the subscription */
.pay-row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.pay-row select { width: auto; min-width: 12rem; }
table.pay-history { width: auto; margin-top: .8rem; }
table.pay-history td, table.pay-history th { padding-right: 1.5rem; }

/* the terms and the privacy policy: plain text as written */
.legal-text { white-space: pre-wrap; line-height: 1.5; }
.legal-page.standalone { max-width: 820px; margin: 2rem auto; }
.legal-over { max-width: 820px; margin: 2rem auto; }
/* the first steps of a new company */
.first-steps { border-left: 4px solid var(--accent); }
.first-steps .step { display: flex; gap: .7rem; align-items: flex-start; padding: .45rem 0; opacity: .6; }
.first-steps .step.now, .first-steps .step.done { opacity: 1; }
.first-steps .step > div { flex: 1; min-width: 0; }
.step-mark { flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #e7ecf4; color: #384356; font-weight: 600; font-size: .9rem; }
.step.now .step-mark { background: var(--accent); color: #fff; }
.step-mark.done { background: #dff5e3; color: #17692d; }

/* EDS: the way in kept (good, ending soon, refused), the choice of a certificate or a key, the server's address */
.eds-state { border: 1px solid var(--line-soft); border-left: 4px solid var(--ok); border-radius: 8px; padding: .55rem .8rem; margin: .4rem 0 .8rem; background: #f3faf5; }
.eds-state.soon { border-left-color: #c98a00; background: #fff8e1; }
.eds-state.bad { border-left-color: var(--danger); background: #fdecea; }
.eds-state > div { margin-top: .2rem; }
.eds-link .kind-choice label.kind { max-width: 26rem; }
.eds-link .kind-choice .badge { margin-left: .3rem; vertical-align: middle; font-size: .72rem; }
.eds-fields { align-items: start; }
.eds-term { display: flex; gap: .5rem; align-items: center; }
.eds-term select { width: auto; flex: none; }
.eds-ip { display: flex; flex-direction: column; gap: .15rem; border: 1px dashed var(--line); border-radius: 8px; padding: .5rem .8rem; margin: .6rem 0; max-width: 40rem; }
.eds-ip code { font-size: 1.05rem; letter-spacing: .03em; }
.eds-state-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .3rem; }
.eds-state-head b { font-size: 1.02rem; }
.eds-facts { display: grid; grid-template-columns: max-content 1fr; gap: .2rem 1rem; margin: .3rem 0 .2rem; font-size: .92rem; }
.eds-facts dt { color: var(--muted); }
.eds-facts dd { margin: 0; overflow-wrap: anywhere; }
.eds-state .actions { margin-top: .5rem; }
.eds-form { border: 1px solid var(--line-soft); border-radius: 10px; padding: .6rem .9rem; margin: .5rem 0; }
.eds-form h3 { margin: .2rem 0 .4rem; }
.eds-status { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
/* the figures of a report: the warning to heed as a block of its own; the filing's state in a line, its actions in a row */
.notice.prepared-notice { border: 1px solid #f0d98a; border-left: 4px solid #e0a800; border-radius: 8px; padding: .6rem .9rem; margin: 0 0 .8rem; color: #5c4400; }
.eds-filing-state { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: .2rem 0 .3rem; }
.eds-filing p { margin: .3rem 0; }
.eds-actions { align-items: center; margin-top: .5rem; }
.eds-actions > a.button { line-height: normal; }
/* the rows of buttons of the EDS screens: links that look like buttons, all on one line, the danger to the right */
.eds-link .actions, .eds-filing .actions { align-items: center; }
.eds-link .actions > a.button, .eds-filing .actions > a.button { line-height: normal; white-space: nowrap; }
.eds-link .actions > button.link { padding: .45rem .3rem; }
/* the certificate's file: a button as high as the fields beside it, the file's name after it */
.eds-file { display: flex; align-items: center; gap: .6rem; min-height: 2.6rem; }
.eds-file > label.button { flex: none; display: inline-flex; align-items: center; min-height: 2.6rem; color: var(--text); font-size: .95rem; }
.eds-file > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* Inbox: one block for taking the suppliers' bills - the address, what to forward, checking, the own mailbox's window */
.inbox-intake .inbox-address { font-size: 1.05rem; gap: .6rem; margin: .2rem 0 .3rem; }
.inbox-intake .inbox-address .muted { font-size: .85rem; }
.inbox-check { align-items: center; margin-top: .4rem; }
/* the letters' filter: what became of them, the days, a search */
.inbox-filters { margin: .4rem 0 .8rem; display: grid; gap: .4rem; }
.inbox-filters .switch { max-width: 44rem; }
.inbox-filter-row { display: flex; gap: .8rem; flex-wrap: wrap; align-items: flex-end; }
.inbox-filter-row label { margin-top: 0; }
.inbox-filter-row .inbox-search { flex: 1 1 16rem; }
@media (max-width: 600px) { .inbox-filters .switch { flex-wrap: wrap; } .inbox-filters .switch label { flex: 1 1 30%; } }
/* an object's history at the foot of its window, and the deleted objects: kept, marked, opened only to be looked at */
fieldset.view-only { border: 0; padding: 0; margin: 0; min-width: 0; }
.panel.history { margin-top: 1rem; }
.panel.history > .title-row button.link { font-size: .9rem; }
.history-toggle { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; }
.history-toggle .fold { color: var(--accent, #2f5fd0); font-size: 1.1em; width: 1em; }
/* folded: the head alone, no empty body under it */
main .panel.history.folded { padding-bottom: 0; }
main .panel.history.folded > .title-row:first-child { margin-bottom: 0; border-bottom: 0; border-radius: 7px; }
.history-list { list-style: none; margin: 0; padding: 0; }
.history-step { padding: .5rem 0 .55rem .8rem; border-left: 3px solid var(--line); margin-left: .2rem; }
.history-step + .history-step { border-top: 1px dashed var(--line-soft); }
.history-step.action-Added { border-left-color: #2962ff; }
.history-step.action-Posted, .history-step.action-PaymentAdded, .history-step.action-SettledOutside { border-left-color: var(--ok, #2e7d32); }
.history-step.action-ReturnedToDraft, .history-step.action-PaymentRemoved, .history-step.action-SettledOutsideOff { border-left-color: #e0a800; }
.history-step.action-Deleted { border-left-color: var(--danger); }
.history-head { display: flex; justify-content: space-between; gap: .8rem; flex-wrap: wrap; align-items: baseline; }
.history-who { margin-top: .1rem; overflow-wrap: anywhere; }
.history-changes { margin: .3rem 0 0; padding-left: 1.1rem; font-size: .9rem; }
.history-changes li { overflow-wrap: anywhere; }
.history-changes s.was { color: var(--muted); }
.history-step details summary { cursor: pointer; color: var(--muted); margin-top: .25rem; }
.badge.deleted { background: #fde2e0; color: var(--danger); }
tr.deleted-row td { color: var(--muted); }
tr.deleted-row td:first-child { text-decoration: none; }
.note.deleted-note { border-left: 4px solid var(--danger); }
label.show-deleted { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; margin: 0; cursor: pointer; }
label.show-deleted input { width: auto; margin: 0; }
/* the clock at the end of a row: its history in a box beside it, the row not opened */
.history-peek { display: inline-block; position: relative; }
button.peek { background: none; border: 0; padding: .15rem .25rem; margin: 0; color: var(--muted); cursor: pointer; line-height: 0; border-radius: 4px; vertical-align: middle; }
button.peek:hover, button.peek[aria-expanded="true"] { color: var(--accent); background: var(--accent-soft); }
td.peek-cell { width: 1.8rem; text-align: right; padding-left: 0; padding-right: .3rem; }
.history-pop { position: fixed; z-index: 60; width: min(380px, calc(100vw - 16px)); max-height: min(26rem, 55vh); overflow: auto; background: var(--panel); color: var(--text, inherit);
  border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 24px rgb(0 0 0 / .18); padding: .45rem .7rem .55rem; text-align: left; white-space: normal; font-weight: 400; font-size: .95rem; cursor: default; }
.history-pop-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .2rem; }
.history-pop-head button.link { font-size: 1.2rem; line-height: 1; padding: 0 .2rem; }
@media (max-width: 880px) {
  /* a card: the clock in its top right corner */
  table.cards > tbody > tr { position: relative; }
  table.cards > tbody > tr > td.peek-cell { position: absolute; top: .3rem; right: .35rem; width: auto; padding: 0; display: block; }
  table.cards > tbody > tr > td:first-child { padding-right: 1.8rem; }
}

/* a choice that may need a new one: the list, "+" beside it, the one chosen opened; an empty list is a button */
.choose-or-add { display: flex; gap: .3rem; align-items: stretch; }
.choose-or-add > .search-select { flex: 1; min-width: 0; }
.choose-or-add .icon-button { flex: none; min-width: 2.4rem; padding: 0 .55rem; font-size: 1.05rem; line-height: 1; }
.choose-or-add a.icon-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.choose-or-add .choose-empty { flex: 1; text-align: left; color: var(--muted); border-style: dashed; background: #fff; }
/* the roles and the kind of a partner on one row (a private person first: "приватперсона первой по порядку..") */
.partner-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.4rem; margin-bottom: .7rem; }
form.panel .partner-head { max-width: 46rem; }
.partner-head > .partner-roles { margin: 0; }
.partner-head > .partner-kind { flex: 1; min-width: 260px; margin: 0; }
.partner-kind { margin-bottom: .7rem; }

/* the lease: a new one not saved, the lock said plainly, the letter as the tenant reads it, the next steps */
.lease-state.new { background: #fff3cd; color: #7a5600; border: 1px solid #f0d98a; }
.notice.lease-lock { display: flex; align-items: center; gap: .8rem; padding: .6rem .9rem; margin-bottom: .8rem; border: 1px solid #f0d98a; border-left: 4px solid #e0a800; border-radius: 8px; flex-wrap: wrap; }
.notice.lease-lock > div { flex: 1 1 16rem; }
.notice.lease-lock.open { background: var(--accent-soft); border-color: #b9cdea; border-left-color: var(--accent); }
.lease-lock .lock-icon { font-size: 1.3rem; }
.letter-preview { margin: .5rem 0 .8rem; }
/* only to be read: grey, not a field */
.letter-sheet { border: 1px solid var(--line); border-radius: 6px; padding: .6rem .8rem; background: #eef1f5; color: #3a4656; margin-top: .25rem; cursor: default; }
/* the letter written beside the letter as it is read */
.letter-side { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; align-items: start; }
.letter-side .letter-preview { margin-top: 0; }
.letter-side textarea { width: 100%; }
@media (max-width: 900px) { .letter-side { grid-template-columns: 1fr; } }
/* a field of the grid that needs room for its whole text */
.grid > .wide-cell { grid-column: span 2; }
@media (max-width: 700px) { .grid > .wide-cell { grid-column: auto; } }
/* the lease's title, its tabs and its lock stay at the top while the page is scrolled */
@media (min-width: 761px) {
  .lease-head { position: sticky; z-index: 25; background: var(--bg, #f4f6f9); padding: .2rem 0 .3rem; margin-bottom: .4rem; }
  .lease-head h1 { margin-top: .3rem; }
  .lease-head .lease-lock { margin-bottom: 0; }
}
.letter-sheet .letter-body { white-space: pre-wrap; margin-top: .4rem; }
.utility-supplier input.supplier-address { display: block; margin-top: .3rem; font-size: .85rem; padding: .2rem .4rem; width: 100%; }
.next-steps ol, .template-steps { margin: .3rem 0 0; padding-left: 1.3rem; }
.next-steps li, .template-steps li { margin: .3rem 0; color: var(--muted); }
.next-steps li.now, .template-steps li.now { color: inherit; }
.next-steps li.done, .template-steps li.done { color: inherit; }
.next-steps li.done::marker, .template-steps li.done::marker { color: var(--ok, #2e7d32); }
.two-factor-about { font-size: .95rem; }
.two-factor-about ul { margin: .2rem 0 .6rem; padding-left: 1.2rem; }
.two-factor-steps { padding-left: 1.3rem; }
/* the authenticator connected: wide, what it is beside how - not one long column */
.narrow.two-factor-wide { max-width: 980px; }
.two-factor-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; align-items: start; }
.two-factor-columns > div > h2:first-child { margin-top: 0; }
@media (max-width: 760px) { .two-factor-columns { grid-template-columns: 1fr; } }
.mail-ways { padding-left: 1.2rem; margin: .3rem 0 .5rem; }
/* the setting up, step 2: the form of one's own mail framed under the name the text above gives it */
.own-mail { border: 1px solid #d5ddeb; border-radius: 10px; padding: .4rem 1rem 1rem; margin: .6rem 0 0; }
.own-mail > legend { font-weight: 600; padding: 0 .4rem; }
.mail-ways li { margin: .25rem 0; }
.warn { color: var(--warn, #b26a00); }

/* the tenant's own pages (the readings of the meters, their invoices): a phone first, no menu of the program */
.tenant-page { max-width: 34rem; margin: 0 auto; padding: .5rem .75rem 2rem; }
.tenant-head { display: flex; justify-content: space-between; align-items: center; padding: .5rem 0 .8rem; font-size: 1.1rem; }
.tenant-page h1 { font-size: 1.45rem; margin: .2rem 0 .6rem; }
.tenant-premises { margin: 0 0 .2rem; }
.tenant-meter { border: 1px solid var(--line); border-radius: 10px; padding: .75rem .85rem; margin: .7rem 0; }
.tenant-meter-input { display: flex; gap: .5rem; margin-top: .45rem; }
.tenant-meter-input input { flex: 1; min-width: 0; }
.reading-input { font-size: 1.35rem; letter-spacing: .08em; padding: .5rem .7rem; font-variant-numeric: tabular-nums; }
.reading-input.big { display: block; width: 100%; font-size: 1.8rem; text-align: center; margin: .35rem 0; }
.reading-input.warn { border-color: #d08a2a; background: #fff8ef; }
.reading-use { color: var(--ok); margin: .35rem 0 0; font-size: .92rem; }
.reading-warn { background: #fdf1e2; border-radius: 8px; padding: .6rem .75rem; margin: .5rem 0; font-size: .92rem; }
.reading-warn > div { margin-top: .2rem; }
.reading-warn button.link { margin-top: .35rem; padding: 0; }
.photo-button { white-space: nowrap; }
.photo-button.wide, .tenant-bottom .wide { display: block; width: 100%; margin-top: .6rem; }
.tenant-bottom { margin-top: 1rem; text-align: center; }
.tenant-bottom button.primary { padding: .75rem 1rem; font-size: 1.05rem; }
.tenant-view { display: block; margin: .9rem auto 0; }
.tenant-steps { display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.tenant-progress { display: flex; gap: .3rem; margin: .5rem 0 .9rem; }
.tenant-progress i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.tenant-progress i.on { background: var(--accent); }
.tenant-page .center { text-align: center; }
.tenant-review { border: 1px solid var(--line); border-radius: 10px; margin: .7rem 0; }
.tenant-review-row { display: flex; justify-content: space-between; gap: .6rem; align-items: center; padding: .7rem .85rem; }
.tenant-review-row + .tenant-review-row { border-top: 1px solid var(--line-soft, var(--line)); }
.tenant-done { text-align: center; }
.tenant-tick { width: 4rem; height: 4rem; margin: .5rem auto .8rem; border-radius: 50%; background: var(--accent-soft, #e7effb); color: var(--accent); font-size: 2rem; line-height: 4rem; }
.tenant-sent { width: 100%; margin: .8rem 0; text-align: left; background: var(--bg); border-radius: 10px; }
.tenant-sent td { padding: .4rem .7rem; }
.tenant-invoices-link { margin: .8rem 0; }
.tenant-invoice { border: 1px solid var(--line); border-radius: 10px; padding: .75rem .85rem; margin: .7rem 0; }
.tenant-invoice.open { border-color: var(--accent); }
.tenant-invoice-head { display: flex; justify-content: space-between; gap: .6rem; }
.tenant-invoice .button { margin-top: .55rem; }
.tenant-state { margin: .35rem 0 0; font-size: .92rem; }
.tenant-state.paid { color: var(--ok); }
.tenant-state.due { color: #8a5a00; }
.tenant-state.late { color: var(--danger); }

/* the owner's side: the meters of a lease, the tenant's readings in the month */
.meters-table { width: 100%; }
.meters-table input, .meters-table select { width: 100%; }
.meters-table input.unit { width: 5rem; }
.meters-link-row { display: flex; gap: .5rem; }
.meters-link-row input { flex: 1; min-width: 0; }
.tenant-readings { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; margin: 0 0 .9rem; background: var(--bg); }
.tenant-readings h3 { margin: 0 0 .4rem; }
.tenant-readings table { width: 100%; }
.tenant-readings tr.taken td { color: var(--muted); }
.letter-frame { display: block; width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #f3f5f9; }
/* settings a row each: what it is at the left, the choice at the right (one under another on a phone) */
.setting-rows { display: grid; grid-template-columns: minmax(10rem, 16rem) minmax(0, 41rem); gap: .2rem 1.4rem; align-items: center; margin: .8rem 0; }
/* a setting is a row of the box's two columns: lit under the mouse, and a little more while its field is typed in */
.setting-row { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; align-items: center; padding: .3rem .5rem; margin: 0 -.5rem;
  border-radius: 8px; transition: background-color .12s; }
.setting-row:hover { background: #f3f6fb; }
.setting-row:focus-within { background: #e8effb; }
/* a name stands level with the top of its choice, not in the middle of a long hint under it */
/* the names at the right edge of their column, each beside its field (the owner asked) */
.setting-row > label { margin: 0; font-weight: 600; align-self: start; padding-top: .45rem; text-align: right; }
.paid-mark { color: #c08a00; font-weight: 400; cursor: help; margin-left: .15rem; }
.setting-value > .muted { margin-top: .3rem; max-width: 40rem; }
.setting-rows input.num { width: 13rem; }
/* a date as short as a number: its calendar beside it, not at the far end (the owner: "даты не надо растягивать") */
.setting-value > .date-input { width: 13rem; }
.setting-value { min-width: 0; max-width: 40rem; }
.common-vat { margin-bottom: .6rem; }
.common-vat select { width: auto; }
.rent-day { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; }
.rent-day-said { color: var(--ok); }
/* a field as long as the others (a choice with its buttons included); a number keeps its short field */
.setting-value > input:not(.num), .setting-value > select { width: 100%; }
/* one right edge for all but numbers and dates: a choice fills the field's width, its parts alike */
.setting-value > .switch { width: 100%; }
/* a field and its button on one line, the field taking what the button leaves */
.field-with-button { display: flex; gap: .5rem; align-items: center; }
/* a supplier's card: the address as it stands in its bills the card's width, its template under it */
.utility-supplier > span { flex: 1; min-width: 0; }
.utility-supplier .supplier-address { width: 100%; }
.supplier-template { margin-top: .3rem; }
/* the rent's sum on its tab: read, the field itself is on the tab of the lease */
.rent-sum { padding-top: .45rem; } .rent-sum > b { font-size: 1.1rem; }
.field-with-button > input { flex: 1; min-width: 0; }
.field-with-button > .button { flex: none; margin: 0; white-space: nowrap; }
/* a block's settings, its tables and its text under a heading: the same left edge, air between the parts */
.lease-block .setting-rows + p.muted, .lease-block .setting-rows + .actions { margin-top: .2rem; }
@media (max-width: 640px) { .setting-rows { grid-template-columns: 1fr; gap: .3rem; } .setting-row > label { padding-top: 0; text-align: left; } .setting-value > .switch { min-width: 0; width: 100%; } }

/* the owner's letter written in its own look: as OwnerLetter lays it out (the same colours, sizes and spaces) */
/* the letter at the left; at its right a column: its subject, how to write it, the months to put in */
.letter-editor { margin-top: .4rem; display: grid; grid-template-columns: minmax(0, 584px) minmax(14rem, 22rem); gap: .4rem 1.4rem; align-items: start; }
.letter-editor > .letter-page { grid-column: 1; grid-row: 1 / span 2; }
.letter-editor > .letter-tools { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; gap: .4rem; }
.letter-editor > .letter-tools > label { margin: 0; font-weight: 600; }
.letter-editor > .warn { grid-column: 1 / -1; }
@media (max-width: 900px) { .letter-editor { grid-template-columns: 1fr; } .letter-editor > .letter-page, .letter-editor > .letter-tools { grid-column: 1; grid-row: auto; } }
.letter-words { display: flex; flex-direction: column; align-items: stretch; gap: .35rem; margin: .2rem 0 0; }
.letter-words button { text-align: left; display: flex; justify-content: space-between; gap: .5rem; }
.letter-words button { padding: .25rem .6rem; }
.month-word { display: inline-block; padding: 0 .35rem; border-radius: 5px; background: #e7effb; color: #1f5fbf; font-weight: 600; white-space: nowrap; }
.letter-page { max-width: 584px; padding: 24px 12px; background: #f3f5f9; border: 1px solid var(--line); border-radius: 10px;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; color: #1d2330; }
.letter-brand { display: flex; align-items: center; gap: 8px; padding: 0 4px 12px; font: 700 17px/26px 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; color: #17325a; }
.letter-logo { width: 26px; height: 26px; border-radius: 7px; background: #1f5fbf; color: #fff; font: 700 15px/26px 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; text-align: center; }
.letter-card { background: #fff; border: 1px solid #dde1e8; border-radius: 14px; padding: 28px 32px 24px; }
.letter-title { font-size: 22px; line-height: 1.3; font-weight: 700; color: #17325a; margin: 0 0 4px; }
.letter-premises { font-size: 15px; color: #6a7282; margin: 0 0 20px; }
.letter-premises-gap { height: 14px; }
.letter-paragraph { position: relative; margin: 0 0 14px; }
.letter-text { font-size: 16px; line-height: 1.55; min-height: 1.55em; padding: 2px 6px; margin: 0 -7px; border: 1px dashed transparent; border-radius: 6px; outline: none; white-space: pre-wrap; }
.letter-text:hover { border-color: #c9d3e6; }
.letter-text:focus { border-color: #1f5fbf; background: #f7faff; }
.letter-text:empty::before { content: '…'; color: #a2aaa6; }
.letter-remove { position: absolute; right: -28px; top: 2px; font-size: 1.1rem; color: var(--muted); visibility: hidden; }
.letter-paragraph:hover .letter-remove, .letter-paragraph:focus-within .letter-remove { visibility: visible; }
.letter-add { font-size: 14px; margin: -4px 0 6px; }
.letter-button { margin: 12px 0 4px; padding: 10px 16px; border: 2px solid #1f5fbf; border-radius: 10px; color: #1f5fbf; background: #fff; text-align: center; font-size: 16px; font-weight: 600; }
.letter-button.main { margin-top: 20px; padding: 13px 16px; background: #1f5fbf; color: #fff; }
.letter-files { font-size: 14px; color: #6a7282; margin-top: 14px; }
.letter-signature { margin-top: 24px; }
.letter-foot { padding: 14px 4px 0; font-size: 12px; color: #6a7282; text-align: center; }

/* a supplier of the utilities, a block of its own: its name, the address in its bills, its template, its lines */
.supplier-block { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .9rem .8rem; margin: .7rem 0; background: #fbfcfe; }
.supplier-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; font-size: 1.05rem; }
.supplier-block h4 { margin: .6rem 0 .3rem; font-size: .95rem; }
.supplier-block .setting-rows { margin: .4rem 0; }
.lease-lines-add { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .4rem; }
.lease-lines-add button.small { padding: .2rem .55rem; }

/* the suppliers of the utilities as cards in the colour of their kind (the meters of the readings have the same colours) */
.supplier-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .7rem; margin: .6rem 0; }
.supplier-card { border: 1px solid var(--line); border-left: 6px solid #9aa3b2; border-radius: 10px; padding: .6rem .8rem; background: #f7f8fa;
  cursor: pointer; display: flex; flex-direction: column; gap: .3rem; transition: box-shadow .12s; }
.supplier-card:hover, .supplier-card:focus-visible { box-shadow: 0 2px 10px rgba(23, 50, 90, .15); outline: none; }
.supplier-card-head { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.supplier-card-lines { margin: 0; padding-left: 1.1rem; font-size: .9rem; }
.supplier-card-open { color: var(--accent); margin-top: auto; }
.supplier-card.kind-electricity { border-left-color: #e0b400; background: #fffbe6; }
.supplier-card.kind-gas { border-left-color: #e8780c; background: #fff3e6; }
.supplier-card.kind-heat { border-left-color: #d23c2f; background: #fdf0ee; }
.supplier-card.kind-water { border-left-color: #2f74e0; background: #eef4fd; }
.supplier-card.kind-management { border-left-color: #2e9a5b; background: #edf8f1; }
.supplier-editor-foot { justify-content: space-between; margin-top: .8rem; }

/* the partner's window: who it is to you in one line at its top, then what it is */
.partner-roles { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: 0 0 .6rem; }
.partner-roles .check { margin: 0; }
input.invalid { border-color: var(--danger, #b3261e); }

/* the rent's prices by their days, on the lease's tab */
.rent-prices { margin: .35rem 0 0; padding-left: 1.1rem; }

/* the address the suppliers' bills are sent to, on the lease; the folder of an own mailbox folded under it */
.bills-address { margin: .3rem 0 .6rem; padding: .5rem .7rem; border-radius: 8px; background: var(--accent-soft, #e7effb); }
.bills-address b { font-size: 1.05rem; }
.lease-more { margin: .8rem 0 0; }
.lease-more > summary { cursor: pointer; color: var(--accent); font-weight: 600; }

/* an invoice of a security deposit: its mark, and the tick that makes one */
.badge.deposit { background: #fff3e6; color: #a35a17; border: 1px solid #f0c48a; }
.deposit-tick { margin: .6rem 0; }
.deposit-state { flex-basis: 100%; margin-bottom: .2rem; }

/* the rent's lines on the rent tab: read, as the invoice will have them */
table.lease-items.read td { padding: .45rem .5rem; }

/* the window of the deposit's end: an invoice ticked, the sum kept for it beside */
.deposit-keep { display: flex; gap: .5rem; align-items: center; margin-bottom: .25rem; }
.deposit-keep input.num { width: 7rem; }

/* the plans' table: the «?» of a row, and its pictures in their window */
.plan-shots-mark { width: 1.35rem; height: 1.35rem; padding: 0; border-radius: 50%; font-size: .8rem; line-height: 1; vertical-align: middle; }
.plan-shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; align-items: start; }
.plan-shots figure { margin: 0; }
.plan-shots figure.phone { max-width: 260px; justify-self: center; }
.plan-shots img { width: 100%; border: 1px solid #d5d9e0; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.plan-shots figcaption { margin-top: .35rem; font-size: .85rem; color: #4a5361; }

/* the reminder of the overdue invoices in the letter's preview: an example, said to be one */
.letter-overdue-example { margin-top: 18px; padding-top: 10px; border-top: 1px dashed #c9cfd8; }
.letter-example-note { font-size: 12px; color: #6a7282; margin-bottom: 6px; }
.letter-overdue { padding: 14px 16px; background: #fff6e5; border: 1px solid #f0d49a; border-radius: 10px; font-size: 15px; line-height: 1.5; opacity: .85; }
.letter-example-button { margin-top: 10px; padding: 8px 14px; border: 2px solid #1f5fbf; border-radius: 10px; color: #1f5fbf; background: #fff; text-align: center; font-size: 15px; font-weight: 600; }

/* the star of a subscription paid: calmer than the call to go over to it */
.button.upgrade.paid { background: #eef4fd; border-color: #b9cdee; color: #1f4f9e; }

/* the start page's story of the program: the words of a step at the left, its picture at the right; the strip of its steps */
.tour-step { display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: 1.5rem; align-items: center; min-height: 420px; }
.tour-step.phone { grid-template-columns: 1fr 1fr; }
.tour-words h3 { font-size: 1.6rem; line-height: 1.25; margin: .3rem 0 .7rem; color: #17325a; }
.tour-words p { font-size: 1.05rem; line-height: 1.55; color: #3a4352; }
.tour-number { font-size: .85rem; color: #6a7282; letter-spacing: .05em; }
.tour-arrows { display: flex; gap: .5rem; margin-top: 1.2rem; }
.tour-picture { display: block; text-align: center; padding: 0; border: 0; background: none; cursor: zoom-in; }
.tour-step.big { grid-template-columns: 1fr; min-height: 0; }
.tour-step.big .tour-picture { cursor: zoom-out; }
.tour-step.big .tour-picture img { max-height: none; width: 100%; }
.tour-step.big.phone .tour-picture img { width: auto; max-width: 100%; max-height: 80vh; }
.tour-picture img { max-width: 100%; max-height: 62vh; border: 1px solid #d5d9e0; border-radius: 10px; box-shadow: 0 6px 24px rgba(23, 50, 90, .14); }
.tour-step.phone .tour-picture img { max-height: 62vh; width: auto; border-radius: 22px; }
.slide-arrow { font-size: 1.8rem; line-height: 1; width: 2.6rem; height: 2.6rem; padding: 0; border-radius: 50%; }
.slide-dots { display: flex; justify-content: center; gap: .45rem; margin: .8rem 0 .4rem; }
.slide-dots button { width: .7rem; height: .7rem; padding: 0; border-radius: 50%; border: 1px solid #9fb3d6; background: #fff; }
.slide-dots button.on { background: #1f5fbf; border-color: #1f5fbf; }
.tour-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; max-width: 980px; margin: -1.5rem auto 2.5rem; padding: 0 1rem; }
.tour-strip button { padding: 0; border: 1px solid #d5d9e0; border-radius: 8px; overflow: hidden; background: #fff; display: flex; flex-direction: column; text-align: left; }
.tour-strip img { width: 100%; height: 130px; object-fit: cover; object-position: top center; display: block; border-bottom: 1px solid #e3e7ee; }
.tour-strip span { font-size: .9rem; font-weight: 600; line-height: 1.3; padding: .5rem .6rem .6rem; color: #17325a; }
.tour-strip button:hover { border-color: #1f5fbf; box-shadow: 0 2px 8px rgba(31, 95, 191, .18); }
@media (max-width: 700px) {
  .tour-step, .tour-step.phone { grid-template-columns: 1fr; min-height: 0; gap: .8rem; }
  .tour-words h3 { font-size: 1.3rem; }
  .tour-strip { grid-template-columns: repeat(2, 1fr); margin-top: 0; }
}

/* buying the subscription: its window over the blurred page; the terms as cards, the sum and the button last */
dialog.buy-window { max-width: 560px; }
dialog.buy-window::backdrop { background: rgba(20, 32, 52, .35); backdrop-filter: blur(5px); }
.term-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .7rem; margin: .4rem 0 .8rem; }
.term-cards button { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; padding: .8rem .9rem; border: 2px solid #d5d9e0; border-radius: 12px; background: #fff; text-align: left; }
.term-cards button b { font-size: 1.1rem; color: #17325a; }
.term-cards .term-sum { font-size: 1.25rem; font-weight: 700; color: #1d2330; }
.term-cards button.on { border-color: #1f5fbf; background: #eef4fd; box-shadow: 0 0 0 3px rgba(31, 95, 191, .15); }
.term-until { margin: .2rem 0 .8rem; font-weight: 600; color: #17325a; }
.buy-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid #e3e7ee; margin-top: 1rem; padding-top: .8rem; font-size: 1.05rem; }
.buy-total b { font-size: 1.5rem; color: #17325a; }
.buy-go { width: 100%; margin: .8rem 0 .4rem; padding: .8rem; font-size: 1.05rem; }
.plan-buy { margin-top: .5rem; }
table.plan-compare tfoot td { border-bottom: 0; padding-top: .9rem; }

/* after a lease is saved: what is not set up yet, each with the tab to do it on */
.lease-todo { display: block; }
.lease-todo-head { display: flex; justify-content: space-between; align-items: center; }
.lease-todo ul { margin: .5rem 0 0; padding-left: 1.1rem; }
.lease-todo li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .25rem 0; }
.lease-todo li .muted { font-size: .9em; }

/* the items of "More" measured for the room on the bar: laid out as the bar's, seen by nobody */
.topbar-measure { position: absolute; visibility: hidden; pointer-events: none; white-space: nowrap; left: -9999px; top: 0; }
.topbar-measure a { padding: .3rem .55rem; }

/* the session ended while the program was open: the page blurred under the reason, until the user goes to sign in */
.session-ended { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px;
  background: rgba(233, 237, 245, .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.session-ended-card { width: min(420px, 100%); padding: 24px 24px 20px; background: var(--panel, #fff); border-radius: 14px;
  box-shadow: 0 18px 60px rgba(19, 23, 34, .25); text-align: center; }
.session-ended-card h2 { margin: 0 0 8px; font-size: 1.25rem; }
.session-ended-card p { margin: 0 0 18px; }

/* by the button that sends the tenant's letter: bring the bank up to date first */
.bank-behind { display: block; margin: .5rem 0 .75rem; }
.bank-behind p { margin: .35rem 0; }

/* the sign-in by a fingerprint or the face, beside «Далее» */
/* beside «Далее», or under it where the row is narrow: at the left edge as the button above (the gap of .actions apart) */
.passkey-button { margin-left: 0; }

/* how to let the notifications through on the phone: the makes to choose from, the steps */
.push-help { margin-top: .5rem; }
.push-help summary { cursor: pointer; color: var(--link, #1f5fbf); }
.push-makes { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0; }
.push-makes button { padding: .3rem .6rem; border-radius: 999px; border: 1px solid #c9d3e6; background: #fff; font-size: .85rem; }
.push-makes button.on { background: #1f5fbf; border-color: #1f5fbf; color: #fff; }
.push-help ol { margin: .25rem 0 0; padding-left: 1.2rem; display: grid; gap: .35rem; }

/* a partner's card: the fields one under another, each name at the left of its field (the owner: "наверное здесь надо,
   чтобы данные шли друг под другом.. взгляд бегает и плохо понимает всю картину целиком") */
/* compact, so the whole card fits a window without scrolling where it can ("если позволяет окно... чтобы сразу все данные поместились.. без прокрутки") */
.grid.partner-fields { grid-template-columns: 1fr; max-width: 46rem; gap: .35rem; }
dialog .partner-head { margin-bottom: .5rem; }
.partner-fields > div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); align-items: center; column-gap: 1rem; }
.partner-fields > div > label { margin: 0; text-align: right; }
.partner-fields > div > :not(label) { grid-column: 2; }
@media (max-width: 640px) {
  .partner-fields > div { grid-template-columns: 1fr; }
  .partner-fields > div > label { text-align: left; }
  .partner-fields > div > :not(label) { grid-column: 1; }
}
/* the partner's window: lower rows, so the whole card fits a low window too ("немного не влезает..") */
dialog .grid.partner-fields { gap: .2rem; }
dialog .partner-fields input, dialog .partner-fields select { padding-top: .3rem; padding-bottom: .3rem; min-height: 0; }
dialog .partner-head .switch label { padding-top: .25rem; padding-bottom: .25rem; min-height: 2rem; }

/* the page or a window scrolled: what stays on top casts a shadow over what went under it (see scrolled.ts) */
.topbar, .lease-head, .dialog-head { transition: box-shadow .15s; }
html.scrolled .topbar { box-shadow: 0 6px 16px rgba(16, 32, 64, .16); }
html.scrolled .lease-head { box-shadow: 0 10px 12px -10px rgba(16, 32, 64, .3); }
dialog.scrolled .dialog-head { box-shadow: 0 8px 10px -8px rgba(16, 32, 64, .3); }
