:root {
    --paper: #f5f3ed;
    --white: #fffefb;
    --ink: #26352c;
    --muted: #626b63;
    --line: #d7dbd1;
    --soft: #eeeee7;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.5 'Avenir Next', 'Trebuchet MS', sans-serif; }
a { color: inherit; text-decoration: none; }
header { display: flex; justify-content: space-between; align-items: center; padding: 30px 4.5vw; border-bottom: 1px solid var(--line); }
.wordmark { font-size: 21px; letter-spacing: .08em; font-weight: 650; }
.wordmark span { display: block; font-size: 9px; letter-spacing: .24em; font-weight: 500; margin-top: 5px; }
.edition { font-size: 13px; letter-spacing: .04em; }
nav { display: flex; gap: 32px; align-items: center; padding: 0 4.5vw; border-bottom: 1px solid var(--line); }
nav a { padding: 18px 0; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
nav a.selected { border-color: var(--ink); color: var(--ink); }
nav b { font-size: 11px; border-radius: 30px; background: var(--line); padding: 3px 7px; }
nav form { margin-left: auto; }
main { padding: 26px 4.5vw 36px; min-height: 65vh; }
.title { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
h1 { font-size: 26px; line-height: 1.25; font-weight: 600; margin: 0; }
h2 { font-size: 16px; line-height: 1.4; font-weight: 600; margin: 0 0 12px; }
p { margin: 0 0 12px; }
.date { margin: 0; text-align: right; color: var(--muted); font-size: 12px; white-space: nowrap; }
.date span { margin-left: 6px; }
section { margin-bottom: 24px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--white); border: 1px solid var(--line); }
.metrics article { padding: 14px 18px; border-right: 1px solid var(--line); }
.metrics article:last-child { border-right: 0; }
.metrics span { color: var(--muted); font-size: 12px; }
.metrics strong { display: block; font-size: 28px; line-height: 1.2; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 6px; }
.metrics .attention { color: #86551f; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.section-title h2, .section-title p { margin: 0; }
.section-title > span, .table-note, .note, .intro { color: var(--muted); font-size: 12px; }
.count { color: var(--muted); font-size: 12px; font-weight: 500; margin-left: 6px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); background: var(--white); scrollbar-color: #bec5b9 var(--soft); }
.table-scroll { max-height: 360px; }
table { border-collapse: separate; border-spacing: 0; width: 100%; text-align: left; }
th { background: var(--soft); padding: 9px 12px; color: var(--muted); font-weight: 600; font-size: 12px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.table-scroll th { position: sticky; top: 0; z-index: 1; }
td { padding: 9px 12px; vertical-align: top; border-bottom: 1px solid var(--line); font-size: 13px; overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #f8f8f2; }
td small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.object-code { max-width: 240px; }
.mono, pre { font-family: 'SFMono-Regular', Consolas, monospace; font-size: 12px; }
.nowrap { white-space: nowrap; font-variant-numeric: tabular-nums; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.result-cell { min-width: 210px; max-width: 460px; }
.issues-table { min-width: 680px; }
.runs-table { min-width: 820px; }
.queue-table { min-width: 580px; }
.events-table { min-width: 800px; }
.settings-table { min-width: 680px; }
.tag { display: inline-block; border-radius: 3px; padding: 2px 7px; background: #eceee8; color: #515b52; font-size: 11px; line-height: 1.7; white-space: nowrap; }
.tag.success { background: #e7eee3; color: #36543a; }
.tag.partial, .tag.warning, .tag.interrupted { background: #f4ecdb; color: #77531e; }
.tag.failed, .tag.error { background: #f7e8e4; color: #943b30; }
.tag.running { background: #e8edf0; color: #3e5c69; }
.empty { padding: 18px; border: 1px solid var(--line); background: var(--white); color: var(--muted); margin: 0; }
.table-note { margin: 8px 0 0; }
.note { max-width: 820px; margin-bottom: 6px; }
button { cursor: pointer; background: var(--ink); border: 1px solid var(--ink); border-radius: 3px; color: var(--white); padding: 9px 16px; font: inherit; line-height: 1.4; }
button:hover { background: #405143; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible, .table-wrap:focus-visible { outline: 2px solid #647b51; outline-offset: 3px; }
.compact { padding: 7px 12px; font-size: 12px; white-space: nowrap; }
.link { border: 0; background: none; color: var(--muted); padding: 6px 0; font-size: 12px; }
.link:hover { color: var(--ink); background: none; text-decoration: underline; }
.text-link { text-decoration: underline; text-underline-offset: 3px; }
.flow-list { border-top: 1px solid var(--line); max-width: 760px; }
.flow-list > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
label { display: block; font-size: 13px; margin-bottom: 16px; }
input { display: block; margin-top: 5px; padding: 8px 10px; border: 1px solid #b9c0b4; border-radius: 3px; background: var(--white); font: inherit; width: 100%; min-width: 0; color: var(--ink); }
input::placeholder { color: var(--muted); }
.login { max-width: 400px; margin: 48px auto; padding: 0 20px; min-height: 56vh; }
.login h1 { font-size: 25px; }
.login > p { margin: 10px 0 24px; color: var(--muted); font-size: 13px; }
.login button { width: 100%; }
.error { color: #943b30; font-size: 12px; margin-top: 12px; }
.filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 18px; }
.filter label { margin: 0; width: 180px; }
.filter .text-link { font-size: 12px; padding: 8px 0; }
details { margin-top: 3px; }
summary { cursor: pointer; color: var(--muted); font-size: 11px; width: fit-content; padding: 2px 0; }
summary:hover { color: var(--ink); }
pre { margin: 8px 0 2px; padding: 10px; background: var(--soft); white-space: pre-wrap; overflow-wrap: anywhere; max-width: 560px; line-height: 1.5; }
.migration { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 16px 18px; border: 1px solid var(--line); background: var(--white); }
.migration h2 { font-size: 14px; margin-bottom: 6px; }
.migration p { font-size: 12px; margin-bottom: 6px; }
.migration p:last-child { margin-bottom: 0; }
.migration small { color: var(--muted); }
.migration .history-count { font-size: 15px; font-weight: 600; }
progress { display: block; width: 100%; max-width: 420px; height: 4px; margin-top: 10px; accent-color: #617852; }
footer { padding: 18px 4.5vw; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; font-size: 10px; letter-spacing: .08em; }
footer span { color: var(--muted); letter-spacing: 0; }
@media (max-width: 720px) {
    header { padding: 20px; }
    .wordmark { font-size: 15px; }
    .edition { font-size: 10px; }
    nav { gap: 20px; padding: 0 20px; overflow: auto; white-space: nowrap; }
    nav a { padding: 16px 0; }
    nav form { flex-shrink: 0; }
    main { padding: 20px 20px 28px; }
    h1 { font-size: 23px; }
    .title { align-items: flex-start; gap: 12px; margin-bottom: 16px; }
    .date { font-size: 11px; }
    .date span { display: block; margin: 2px 0 0; }
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .metrics article { padding: 12px 14px; }
    .metrics article:nth-child(2) { border-right: 0; }
    .metrics article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .metrics strong { font-size: 25px; }
    .metrics span { font-size: 11px; }
    .section-title { display: block; }
    .section-title > span { display: block; margin-top: 4px; }
    .migration { grid-template-columns: 1fr; gap: 14px; padding: 14px; }
    .migration > div + div { padding-top: 12px; border-top: 1px solid var(--line); }
    .login { margin: 32px auto; padding: 0 24px; min-height: 60vh; }
    .flow-list { font-size: 13px; }
    .issues-table, .runs-table, .queue-table { min-width: 0; }
    .issues-table thead, .runs-table thead, .queue-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .issues-table tbody, .runs-table tbody, .queue-table tbody { display: block; }
    .issues-table tr, .runs-table tr, .queue-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
    .issues-table tr:last-child, .runs-table tr:last-child, .queue-table tr:last-child { border-bottom: 0; }
    .issues-table td, .runs-table td, .queue-table td { display: block; padding: 0; border: 0; }
    .issues-table td:nth-child(1), .runs-table td:nth-child(1) { grid-column: 1; grid-row: 1; }
    .issues-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
    .issues-table td:nth-child(3) { grid-column: 1; grid-row: 3; text-align: left; font-size: 11px; color: var(--muted); }
    .issues-table td:nth-child(3)::before { content: 'Перевірок: '; }
    .issues-table td:nth-child(4) { grid-column: 2; grid-row: 1; font-size: 11px; color: var(--muted); }
    .runs-table td:nth-child(2) { grid-column: 1; grid-row: 2; }
    .runs-table td:nth-child(3) { grid-column: 2; grid-row: 1; text-align: right; }
    .runs-table td:nth-child(4) { grid-column: 2; grid-row: 2; font-size: 11px; color: var(--muted); }
    .runs-table .result-cell { grid-column: 1 / -1; grid-row: 3; min-width: 0; max-width: none; }
    .queue-table td:nth-child(2) { font-size: 11px; color: var(--muted); }
    .queue-table td:nth-child(2)::before { content: 'Спроб: '; }
    .queue-table td:nth-child(3), .queue-table td:nth-child(4) { grid-column: 1 / -1; }
    .queue-table td:nth-child(3) { white-space: normal; font-size: 12px; margin-bottom: 4px; }
    .queue-table td:nth-child(3)::before { content: 'Наступна перевірка: '; }
    footer { display: block; padding: 16px 20px; }
    footer span { display: block; margin-top: 4px; }
}
@media (max-width: 360px) {
    header { padding: 16px; gap: 12px; }
    .wordmark { font-size: 13px; }
    .wordmark span { font-size: 8px; }
    .edition { font-size: 9px; }
    main { padding-right: 16px; padding-left: 16px; }
    nav { padding-right: 16px; padding-left: 16px; }
    h1 { font-size: 21px; }
    .date { font-size: 10px; }
}
