@font-face { font-family: "Golos Text"; font-weight: 400; font-display: swap; src: url(fonts/golos-text-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-weight: 500; font-display: swap; src: url(fonts/golos-text-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-weight: 600; font-display: swap; src: url(fonts/golos-text-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-weight: 400; font-display: swap; src: url(fonts/golos-text-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Golos Text"; font-weight: 500; font-display: swap; src: url(fonts/golos-text-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Golos Text"; font-weight: 600; font-display: swap; src: url(fonts/golos-text-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }

:root {
  --bg: #f2f4f3; --surface: #ffffff; --head: #e9eeec; --hover: #f6f9f8;
  --ink: #15201e; --ink-2: #46524f; --ink-3: #5f6b68;
  --line: #dde3e1; --line-2: #c9d1ce; --sel: #e3efed;
  --acc: #0f5c56; --on-acc: #ffffff;
  --red: #b3261e; --amber: #8a5300; --amber-tint: #fbf0d9; --green: #1b6b45;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0d1312; --surface: #131a19; --head: #192220; --hover: #18211f;
  --ink: #e5ecea; --ink-2: #b0bcb9; --ink-3: #8a9794;
  --line: #232d2b; --line-2: #344240; --sel: #17302d;
  --acc: #5fc4b8; --on-acc: #0d1312;
  --red: #ff9a90; --amber: #f0b860; --amber-tint: #33290f; --green: #66d19a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.4 "Golos Text", system-ui, sans-serif; font-variant-numeric: tabular-nums; overflow-x: hidden; }
a { color: var(--acc); font-weight: 500; text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 20px; line-height: 1.3; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
h2 { font-size: 12px; font-weight: 400; color: var(--ink-2); margin: 0 0 6px; }
h3 { font-size: 14px; font-weight: 600; margin: 20px 0 8px; }
p { margin: 0; }
small { display: block; font-weight: 400; margin-top: 3px; font-size: 12px; }
.muted { color: var(--ink-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 1px; }

label { display: block; font-size: 12px; color: var(--ink-2); }
input, select, textarea, button { font: inherit; color: var(--ink); }
input:not([type=checkbox]), select, textarea { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 2px; background: var(--surface); font-size: 14px; }
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: 1; }
textarea { resize: vertical; }
button { cursor: pointer; }
button.primary { min-height: 40px; padding: 0 16px; background: var(--acc); color: var(--on-acc); border: 1px solid var(--acc); border-radius: 2px; font-weight: 500; }
button.link { background: none; border: 0; padding: 0; color: var(--acc); font-weight: 500; }
button.link:hover { text-decoration: underline; }
.button { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; background: transparent; border: 1px solid var(--ink); border-radius: 2px; color: var(--ink); font-weight: 500; white-space: nowrap; }
.button:hover { background: var(--hover); text-decoration: none; }

/* Header */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-height: 56px; padding: 8px 24px; background: var(--surface); border-bottom: 1px solid var(--line-2); }
.brand { color: var(--ink); font-weight: 600; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand span { color: var(--ink-3); font-weight: 400; }
.progress { display: flex; align-items: center; gap: 12px; white-space: nowrap; color: var(--ink-2); }
.progress b { color: var(--ink); font-weight: 600; }
progress { appearance: none; display: block; width: 160px; height: 4px; border: 0; background: var(--line-2); }
progress::-webkit-progress-bar { background: var(--line-2); }
progress::-webkit-progress-value { background: var(--acc); }
progress::-moz-progress-bar { background: var(--acc); }
.top-gap { flex: 1; }
.updated { color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.who { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; background: var(--head); border-radius: 2px; font-size: 12px; font-weight: 600; }
.top nav { display: flex; align-items: center; gap: 12px; font-size: 13px; white-space: nowrap; }
.top nav form { margin: 0; }

.banner { padding: 8px 24px; background: var(--amber-tint); color: var(--amber); border-bottom: 1px solid var(--line-2); }
.page { max-width: 880px; margin: 0 auto; padding: 24px; }
.narrow { max-width: 400px; margin: 8vh auto 0; padding: 24px; }
.narrow h1 { margin-bottom: 8px; }
.stack { display: grid; gap: 14px; margin-top: 16px; }
.error { color: var(--red); font-weight: 500; margin-top: 12px; }
.notice { background: var(--amber-tint); color: var(--amber); padding: 8px 12px; border-left: 3px solid var(--amber); margin: 8px 0; }
.notice p { margin-bottom: 6px; }
.notice input { color: var(--ink); }

/* Work area */
.desk { display: flex; align-items: stretch; min-height: calc(100vh - 57px); }
.queue { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; padding: 16px 24px 24px; }
.search { display: flex; align-items: center; gap: 16px; margin: 0; }
.search-field { position: relative; flex: 1; min-width: 0; color: var(--ink-2); }
.search-field svg { position: absolute; left: 12px; top: 12px; }
.search-field input { margin: 0; height: 40px; padding-left: 36px; }
.search-field input { padding-right: 40px; }
.search-clear { position: absolute; right: 0; top: 0; display: grid; place-items: center; width: 40px; height: 100%; color: var(--ink-2); font-size: 18px; font-weight: 400; }
.search-clear:hover { color: var(--ink); text-decoration: none; }
.found { color: var(--ink-2); white-space: nowrap; }
.found b { color: var(--ink); font-weight: 600; }
.found-time { display: none; }
.query { color: var(--ink-2); font-size: 13px; }
#notes:empty, .soon:empty { display: none; }
.soon { font-size: 13px; color: var(--ink-2); }
.soon b { color: var(--ink); font-weight: 600; }

.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
.tabs a { display: flex; align-items: center; gap: 6px; height: 40px; color: var(--ink-2); font-weight: 400; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--acc); }
.tabs span { color: var(--ink-2); font-weight: 400; }

.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chips-label { font-size: 12px; color: var(--ink-2); margin-right: 6px; }
.chips a { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: 2px; color: var(--ink); font-size: 13px; font-weight: 400; white-space: nowrap; }
.chips a:hover { background: var(--hover); text-decoration: none; }
.chips a span { color: var(--ink-2); }
.chips a.active { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chips a.active span { color: var(--surface); }

/* The list */
.list-box { container-type: inline-size; background: var(--surface); border: 1px solid var(--line-2); }
.lots { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) 150px 124px; gap: 20px; padding: 11px 20px 11px 17px; border-left: 3px solid transparent; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 400; }
li:last-child > .row { border-bottom: 0; }
.row:hover { background: var(--hover); text-decoration: none; }
.row[aria-current="true"] { background: var(--sel); border-left-color: var(--acc); }
.row:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; }
.c-lot, .c-money, .c-status { display: block; min-width: 0; }
.title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; font-size: 15px; line-height: 1.35; font-weight: 500; overflow-wrap: anywhere; }
.sub { display: flex; align-items: center; gap: 8px; margin-top: 3px; font-size: 13px; color: var(--ink-2); min-width: 0; }
.sub-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.flag { flex: none; padding: 0 6px 0 5px; background: var(--amber-tint); border-left: 3px solid var(--amber); color: var(--amber); font-size: 12px; font-weight: 600; white-space: nowrap; }
.c-money { text-align: right; }
.amt { display: block; font-size: 16px; font-weight: 600; white-space: nowrap; }
.amt i { font-style: normal; font-weight: 400; color: var(--ink-3); }
.cur { display: inline; margin: 0; font-size: 12px; font-weight: 400; color: var(--ink-2); }
.cur-note { margin-top: 3px !important; font-size: 12px; color: var(--ink-2); }
.due { display: block; margin-top: 3px; font-size: 13px; color: var(--ink-2); }
.due.red { color: var(--red); font-weight: 600; }
.due.amber { color: var(--amber); font-weight: 600; }
.st { display: flex; align-items: center; gap: 7px; font-weight: 500; }
.st-no { color: var(--ink-3); font-weight: 400; }
.dot, .ring { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.dot { background: var(--acc); }
.ring { border: 1.5px solid var(--ink-3); }
.tick { flex: none; color: var(--green); }
.owner { color: var(--ink-2); }
.owner-ini { display: none; }
.is-no .title { color: var(--ink-3); }
.also summary { padding: 11px 20px; border-top: 1px solid var(--line-2); background: var(--hover); color: var(--ink-2); font-size: 13px; cursor: pointer; }
.is-rejected .title { color: var(--ink-2); }
.empty { padding: 24px; color: var(--ink-2); }

@container (max-width: 640px) {
  .row { grid-template-columns: minmax(0, 1fr) 130px; gap: 6px 16px; }
  .c-status { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
  .c-status:empty { display: none; }
  .c-status small { margin: 0; }
}

/* The lot panel */
.panel { flex: none; width: 420px; display: flex; flex-direction: column; gap: 20px; padding: 24px; background: var(--surface); border-left: 1px solid var(--line-2); min-width: 0; }
.panel-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 12px; color: var(--ink-2); }
.panel-top span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal { justify-content: center; min-height: 40px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; margin: 0; }
.grid > div { min-width: 0; }
.grid dt { font-size: 12px; color: var(--ink-2); margin-bottom: 3px; }
.grid dd { margin: 0; overflow-wrap: anywhere; }
.grid .big { font-size: 18px; font-weight: 600; }
.clarify { padding: 10px 12px; background: var(--amber-tint); border-left: 3px solid var(--amber); }
.clarify b { display: block; color: var(--amber); font-weight: 600; margin-bottom: 2px; }
.reason { font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
.decide, .details { margin: 0; display: flex; flex-direction: column; gap: 0; }
.choices { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: 8px; }
.choices button { min-height: 44px; padding: 0 6px; background: transparent; border: 1px solid var(--line-2); border-radius: 2px; font-weight: 500; white-space: nowrap; }
.choices button:hover { background: var(--hover); }
.choices button[aria-pressed="true"] { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
kbd { display: inline-block; min-width: 18px; padding: 0 3px; margin-left: 3px; border: 1px solid currentColor; border-radius: 2px; font: inherit; font-size: 11px; line-height: 16px; text-align: center; opacity: .75; }
.hint { margin-top: 8px; font-size: 12px; color: var(--ink-2); }
.details { gap: 20px; }
.details select { height: 44px; }
.save { align-self: flex-start; }
.js .save { display: none; }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); }

/* Administration tables */
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line-2); }
th { text-align: left; font-size: 12px; color: var(--ink-2); font-weight: 400; padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.num { text-align: right; white-space: nowrap; }
.page h1 { margin: 8px 0 16px; }
.page h2 { font-size: 16px; font-weight: 600; color: var(--ink); margin: 28px 0 10px; }
.page .facts { display: grid; grid-template-columns: 170px 1fr; gap: 6px 14px; margin: 14px 0; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inline label { min-width: 200px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.row-actions form { margin: 0; }

@media (min-width: 901px) {
  .panel { position: sticky; top: 0; align-self: flex-start; min-height: 100vh; max-height: 100vh; overflow-y: auto; }
}
@media (max-width: 1120px) {
  .panel { width: 360px; }
  kbd { display: none; }
}
@media (max-width: 900px) {
  .desk { flex-direction: column; }
  .panel { width: 100%; border-left: 0; border-top: 1px solid var(--line-2); }
  .updated, .who-name { display: none; }
}
@media (max-width: 640px) {
  .top { position: relative; min-height: 52px; padding: 8px 16px; gap: 8px 10px; }
  .top-gap { order: 1; }
  .brand { order: 0; }
  .excel { order: 2; width: 44px; height: 44px; padding: 0; justify-content: center; }
  .excel span { display: none; }
  .who { order: 3; }
  .top nav { order: 4; }
  .progress { order: 5; width: 100%; height: 32px; gap: 10px; }
  progress { flex: 1; width: auto; min-width: 0; }
  .avatar { width: 32px; height: 32px; }
  .queue { padding: 12px 16px 16px; }
  .search { flex-direction: column; align-items: stretch; gap: 8px; }
  .search-field svg { top: 14px; }
  .search-field input { height: 44px; font-size: 16px; }
  .found-time { display: inline; }
  .tabs { margin: 0 -16px; padding: 0 16px; }
  .tabs a { height: 44px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
  .chips-label { display: none; }
  .chips a { height: 44px; padding: 0 12px; }
  .list-box { margin: 0 -16px; border-width: 1px 0; }
  .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title title" "due amt" "sub status"; gap: 4px 12px; padding: 12px 16px 12px 13px; }
  .c-lot, .c-money, .c-status { display: contents; }
  .title { grid-area: title; }
  .amt { grid-area: amt; text-align: right; font-size: 15px; }
  .due { grid-area: due; margin: 0; align-self: center; text-align: left; }
  .sub { grid-area: sub; margin: 0; }
  .st { grid-area: status; justify-self: end; font-size: 12px; }
  .owner { display: none; }
  .owner-ini { display: block; grid-area: status; justify-self: end; margin: 0; color: var(--ink-2); }
  .st:has(~ .owner-ini) { margin-right: 26px; }
  .panel { padding: 16px; }
  .panel.in-place { border: 0; border-bottom: 1px solid var(--line-2); background: var(--sel); gap: 12px; padding: 4px 16px 14px 13px; border-left: 3px solid var(--acc); }
  .panel.in-place .panel-top { order: -5; }
  .panel.in-place .portal { order: -4; min-height: 44px; }
  .panel.in-place .clarify { order: -3; }
  .panel.in-place .decide { order: -2; }
  .panel.in-place .details { order: -1; }
  .panel.in-place h1 { font-size: 15px; }
  .panel.in-place .hint { display: none; }
  .panel.in-place .save { display: none; }
  .js .panel:not(.in-place) { display: none; }
  .js .panel.loose { display: flex; }
  input:not([type=checkbox]), select, textarea { font-size: 16px; }
  .page, .narrow { padding: 16px; }
  .page .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
}
