@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/static/fonts/golos-text-cyrillic.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-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/static/fonts/golos-text-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --bg: #f5f6f4;
  --surface: #fff;
  --rail: #eef0ed;
  --subtle: #f2f4f1;
  --hover: #eef2ee;
  --text: #242d27;
  --muted: #626e66;
  --faint: #7b847d;
  --accent: #285c40;
  --accent-hover: #1d4931;
  --accent-text: #fff;
  --accent-soft: #e3eee6;
  --line: #dce1da;
  --input-line: #b6c0b7;
  --danger: #ad3e36;
  --danger-bg: #fbece9;
  --success: #286341;
  --success-bg: #e9f2eb;
  --warning: #835d15;
  --focus: #47845b;
  --radius: 7px;
  --shadow: 0 20px 64px rgba(18, 33, 22, .2);
  --link-cols: minmax(170px, 1.35fr) minmax(115px, .9fr) minmax(110px, .8fr) 82px 206px;
  font-family: "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #161b18;
  --surface: #1d2420;
  --rail: #121713;
  --subtle: #242d27;
  --hover: #28332b;
  --text: #e5ebe6;
  --muted: #a7b3aa;
  --faint: #929f95;
  --accent: #a5d1b3;
  --accent-hover: #c0e2ca;
  --accent-text: #15281c;
  --accent-soft: #2b4032;
  --line: #364039;
  --input-line: #546258;
  --danger: #ffafa5;
  --danger-bg: #3c2926;
  --success: #a2d3b2;
  --success-bg: #253b2e;
  --warning: #e4c57e;
  --focus: #98c7a5;
  --shadow: 0 20px 64px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-underline-offset: 3px; }
button, input, select, a, summary { outline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); }
::selection { color: var(--text); background: var(--accent-soft); }
input { caret-color: var(--accent); }
[hidden] { display: none !important; }
strong { font-weight: 600; }
svg { display: block; width: 18px; height: 18px; flex: 0 0 auto; }
.truncate { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted { color: var(--muted); }
h1, h2, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: 28px; line-height: 1.25; font-weight: 600; letter-spacing: -.025em; }
h2 { margin: 0; font-size: 21px; line-height: 1.3; font-weight: 600; letter-spacing: -.02em; }
p { margin-top: 0; }
.skip-link { position: fixed; z-index: 30; top: 12px; left: 12px; padding: 10px 14px; border-radius: var(--radius); background: var(--accent); color: var(--accent-text); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; display: flex; flex-direction: column; width: 208px; padding: 29px 15px 18px; border-right: 1px solid var(--line); background: var(--rail); }
.sidebar-top { padding: 0 13px 35px; }
.brand { display: inline-flex; align-items: baseline; gap: 5px; color: var(--text); font-size: 21px; font-weight: 600; line-height: 1.25; text-decoration: none; letter-spacing: -.035em; }
.brand > span { color: var(--muted); font-weight: 400; }
.tabs { display: grid; gap: 4px; margin: 0; }
.tab { display: flex; min-height: 42px; width: 100%; align-items: center; gap: 11px; padding: 9px 12px; border: 0; border-radius: var(--radius); background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 500; text-align: left; transition: background-color .15s ease, color .15s ease; }
.tab:hover { background: var(--hover); color: var(--text); }
.tab.is-active { background: var(--surface); color: var(--text); }
.tab.is-active .nav-icon { color: var(--accent); }
.tab > span { display: flex; align-items: center; gap: 8px; }
.badge { display: inline-flex; min-width: 19px; height: 19px; align-items: center; justify-content: center; padding: 0 5px; border-radius: 4px; background: var(--accent); color: var(--accent-text); font-size: 11px; line-height: 1; font-variant-numeric: tabular-nums; }
.sidebar-bottom { display: grid; gap: 16px; margin-top: auto; padding: 25px 0 0; }
.theme-toggle { display: flex; min-height: 40px; align-items: center; gap: 10px; padding: 8px 12px; border: 0; border-radius: var(--radius); background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; text-align: left; transition: color .15s ease, background-color .15s ease; }
.theme-toggle:hover, .logout-button:hover { color: var(--text); background: var(--hover); }
.account { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 6px; padding: 15px 7px 0 12px; border-top: 1px solid var(--line); }
.account-copy { display: grid; min-width: 0; }
.account-copy strong { font-size: 12px; }
.account-copy span { color: var(--muted); font-size: 11px; }
.logout-button { display: grid; width: 36px; height: 36px; place-items: center; padding: 0; border: 0; border-radius: var(--radius); background: transparent; color: var(--muted); cursor: pointer; }
.app-shell { width: calc(100% - 272px); max-width: 1336px; margin-left: 240px; padding: 33px 0 56px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 27px; }
.section-description { max-width: 75ch; margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.section-heading + .section-description { margin: -14px 0 24px; }

.button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 7px; padding: 8px 13px; border: 1px solid transparent; border-radius: var(--radius); cursor: pointer; font-size: 13px; font-weight: 500; line-height: 1.3; text-decoration: none; white-space: nowrap; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.button:active:not(:disabled) { transform: translateY(1px); }
.button:disabled { cursor: default; opacity: .5; }
.button[aria-disabled="true"] { cursor: not-allowed; opacity: .45; }
.button-primary { background: var(--accent); color: var(--accent-text); }
.button-primary:hover:not(:disabled) { background: var(--accent-hover); }
.button-secondary { border-color: var(--input-line); background: transparent; color: var(--text); }
.button-secondary:hover:not(:disabled):not([aria-disabled="true"]) { border-color: var(--muted); background: var(--hover); }
.button-quiet { background: transparent; color: var(--muted); }
.button-quiet:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.button-danger { background: var(--danger-bg); color: var(--danger); }
.button-danger:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--danger); }
.button-wide { width: 100%; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.icon-button { display: grid; width: 34px; height: 34px; place-items: center; flex: 0 0 auto; padding: 0; border: 0; border-radius: var(--radius); background: transparent; color: var(--muted); cursor: pointer; font-size: 23px; line-height: 1; }
.icon-button:hover { background: var(--hover); color: var(--text); }
.button-icon, .copy-action { width: 34px; min-width: 34px; padding: 0; }

.counters { display: flex; flex-wrap: wrap; align-items: baseline; gap: 28px; margin-bottom: 7px; }
.counter { display: flex; min-width: 0; align-items: baseline; gap: 8px; }
.counter span { color: var(--muted); font-size: 12px; }
.counter strong { order: -1; font-size: 20px; font-weight: 500; line-height: 1.4; font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.status-line { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 7px 20px; margin-bottom: 26px; color: var(--muted); font-size: 11px; }
#links-updated { font-variant-numeric: tabular-nums; }

.list-heading, .data-row { display: grid; grid-template-columns: var(--link-cols); align-items: center; column-gap: 16px; }
.list-heading.no-owner, .data-row.no-owner { --link-cols: minmax(200px, 1.6fr) minmax(110px, .8fr) 82px 206px; }
.list-heading { padding: 0 17px 10px; color: var(--muted); font-size: 11px; }
.heading-actions { text-align: right; }
.list-heading:has(+ .links-list[hidden]) { display: none; }
.data-list { overflow: visible; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.data-row { min-height: 77px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: transparent; transition: background-color .15s ease; }
.data-row:last-child { border-bottom: 0; }
.data-row:first-child { border-radius: 10px 10px 0 0; }
.data-row:last-child { border-radius: 0 0 10px 10px; }
.data-row:hover { background: var(--hover); }
.data-row.is-disabled { color: var(--muted); }
.data-row.is-disabled .row-primary strong { font-weight: 500; }
.row-primary { min-width: 0; }
.row-primary strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 14px; font-weight: 500; }
.row-primary > span, .cell-label { color: var(--muted); font-size: 11px; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 3px; color: var(--muted); font-size: 11px; }
.link-status { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 400; }
.link-status::before { width: 5px; height: 5px; flex: 0 0 auto; border-radius: 50%; background: currentColor; content: ""; }
.link-status.is-enabled, .openflux-status.is-running { color: var(--success); }
.link-status.is-disabled, .openflux-status.is-stopped { color: var(--muted); }
.cell { min-width: 0; overflow-wrap: anywhere; font-size: 12px; }
.cell-number, .connections { font-variant-numeric: tabular-nums; }
.connections { color: var(--muted); }
.row-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: nowrap; gap: 4px; }
.row-actions .button { min-height: 32px; padding: 6px 9px; font-size: 12px; }
.row-actions .button-icon, .row-actions .copy-action { padding: 0; }
.list-divider { margin: 0; padding: 12px 16px 10px; border-bottom: 1px solid var(--line); background: var(--subtle); color: var(--muted); font-size: 11px; font-weight: 500; }
.list-divider:first-child { border-radius: 10px 10px 0 0; }
.usage { display: grid; max-width: 118px; gap: 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.usage-copy { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.usage .track, .usage .usage-track { display: block; width: 100%; height: 3px; overflow: hidden; border-radius: 3px; background: var(--line); }
.usage .fill, .usage .usage-fill { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.usage .fill.is-over { background: var(--danger); }
.usage .unlimited, .usage-note { color: var(--muted); font-size: 11px; }
.unlimited { display: flex; flex-wrap: wrap; gap: 3px 7px; }

.user-row { grid-template-columns: minmax(145px, 1.2fr) minmax(150px, 1.1fr) minmax(125px, .8fr) minmax(125px, .8fr); min-height: 92px; }
.user-row .cell[data-label]::before { display: block; margin-bottom: 3px; color: var(--muted); content: attr(data-label); font-size: 11px; }
.user-row .row-actions { justify-content: flex-start; margin: 4px 0 0 -9px; }
.user-row .row-actions .button { min-height: 28px; padding: 4px 9px; border: 0; color: var(--accent); }
.request-row { grid-template-columns: minmax(145px, 1fr) minmax(120px, .7fr) minmax(130px, .7fr) auto; }
.request-row .button-danger { background: transparent; color: var(--muted); }
.request-row .button-danger:hover { background: var(--danger-bg); color: var(--danger); box-shadow: none; }

.openflux-stock-note { max-width: 75ch; margin: -13px 0 21px; color: var(--muted); font-size: 12px; }
.pool-count { display: inline-flex; min-height: 38px; align-items: center; padding: 0 6px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.openflux-instruction { margin: 0 0 23px; color: var(--muted); font-size: 12px; }
.openflux-instruction summary { width: fit-content; padding: 4px 0; color: var(--text); cursor: pointer; font-size: 13px; }
.openflux-instruction ol { max-width: 75ch; margin: 10px 0; padding-left: 19px; line-height: 1.7; }
.openflux-instruction a { color: var(--accent); }
.openflux-instruction p { margin: 8px 0 0; }
.openflux-card { display: grid; gap: 12px; padding: 18px; border-bottom: 1px solid var(--line); }
.openflux-card:last-child { border-bottom: 0; }
.openflux-card.is-disabled { color: var(--muted); }
.openflux-card-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.openflux-card-head > .cell { color: var(--muted); text-align: right; }
.openflux-url { display: grid; min-width: 0; gap: 3px; }
.openflux-url code { width: fit-content; max-width: 100%; overflow-wrap: anywhere; color: var(--text); font-family: "Golos Text", sans-serif; font-size: 12px; }
.openflux-device-note, .dialog-note { max-width: 75ch; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.openflux-profile-error { margin: 0; padding: 10px 12px; border-radius: var(--radius); background: var(--danger-bg); color: var(--danger); font-size: 12px; }
.openflux-status.is-error { color: var(--danger); }
.openflux-status.is-pending, .openflux-status.is-creating { color: var(--warning); }
.openflux-status.is-pool { color: var(--accent); }
.pool-instruction { padding: 12px 14px; border-radius: var(--radius); background: var(--subtle); }
.pool-instruction ol { margin: 0; padding-left: 18px; color: var(--muted); font-size: 12px; line-height: 1.7; }

.notice, .alert { margin-bottom: 18px; padding: 12px 14px; border-radius: var(--radius); background: var(--subtle); color: var(--text); font-size: 13px; }
.alert-error, .notice.is-error { background: var(--danger-bg); color: var(--danger); }
.notice.is-success { background: var(--success-bg); color: var(--success); }
.state-block { padding: 38px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 13px; text-align: center; }
.state-error { border-color: transparent; background: var(--danger-bg); color: var(--danger); }
.credentials { margin: 0 0 24px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.credentials-head { display: flex; align-items: center; justify-content: space-between; }
.credentials-head strong { font-size: 15px; }
.credentials p { margin: 4px 0 16px; color: var(--muted); font-size: 12px; }
.credentials dl { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 0 16px; }
.credentials dl div { min-width: 0; }
.credentials dt { color: var(--muted); font-size: 11px; }
.credentials dd { margin: 5px 0 0; overflow-wrap: anywhere; color: var(--text); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }

.stack-form, .dialog-card { display: grid; gap: 19px; }
label { display: grid; gap: 7px; color: var(--text); font-size: 12px; font-weight: 500; }
label small { color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.55; }
input, select { width: 100%; min-height: 42px; border: 1px solid var(--input-line); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 10px 11px; line-height: 1.3; }
input:hover, select:hover { border-color: var(--muted); }
input::placeholder { color: var(--muted); opacity: 1; }
input:disabled, select:disabled, input[readonly] { background: var(--subtle); color: var(--muted); }
.dialog { width: min(94vw, 456px); max-height: calc(100dvh - 32px); padding: 0; overflow: auto; border: 0; border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.dialog::backdrop { background: rgba(13, 23, 16, .5); }
.dialog-card { margin: 0; padding: 25px; background: var(--surface); }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.dialog-head .icon-button { margin: -5px -6px 0 0; }
.dialog-actions { display: flex; justify-content: flex-end; align-items: center; gap: 9px; padding-top: 4px; }
.result-box { padding: 14px; border-radius: var(--radius); background: var(--success-bg); color: var(--success); }
.result-box p { margin: 5px 0 14px; font-size: 12px; }
.result-box .result-meta { margin-top: -8px; }
.action-sheet { max-width: 390px; }
.action-sheet .dialog-card { gap: 7px; padding: 20px; }
.action-sheet .dialog-head { margin-bottom: 10px; }
.action-sheet .menu-action { display: flex; width: 100%; min-height: 44px; align-items: center; justify-content: flex-start; gap: 10px; padding: 10px 12px; border: 0; border-radius: var(--radius); background: transparent; color: var(--text); cursor: pointer; font-size: 14px; text-align: left; }
.action-sheet .menu-action:hover { background: var(--hover); }
.action-sheet .menu-action.button-danger, .action-sheet .menu-action.is-danger { margin-top: 6px; color: var(--danger); }
.action-sheet .menu-action.button-danger:hover, .action-sheet .menu-action.is-danger:hover { background: var(--danger-bg); box-shadow: none; }
.delete-confirm { color: var(--text); }
.delete-confirm p { margin: 0; font-size: 13px; }
.delete-confirm input { color: var(--text); }

.login-page { min-height: 100dvh; }
.login-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 27px 36px; }
.login-topbar .theme-toggle { min-height: 40px; }
.login-shell { display: grid; min-height: calc(100dvh - 94px); align-items: center; justify-items: center; padding: 24px 24px 130px; }
.login-card { width: min(100%, 364px); }
.login-heading { margin-bottom: 30px; }
.login-heading h1 { font-size: 26px; }
.login-heading .muted { margin: 12px 0 0; font-size: 13px; line-height: 1.65; }
.login-card label { font-size: 13px; }
.login-card input { min-height: 46px; background: var(--surface); }
.login-card .button { min-height: 44px; margin-top: 7px; }

@media (min-width: 1610px) {
  .app-shell { width: calc(100% - 312px); margin-left: 260px; }
}

@media (max-width: 1190px) and (min-width: 1001px) {
  .sidebar { width: 184px; padding-inline: 11px; }
  .app-shell { width: calc(100% - 232px); margin-left: 208px; }
  :root { --link-cols: minmax(135px, 1.2fr) minmax(95px, .85fr) minmax(95px, .8fr) 68px 184px; }
  .list-heading, .data-row { column-gap: 11px; }
  .row-actions .button { padding-inline: 7px; }
  .user-row { grid-template-columns: minmax(120px, 1.1fr) minmax(125px, 1fr) minmax(120px, .9fr) minmax(110px, .9fr); }
}

@media (max-width: 1000px) {
  .sidebar { position: static; display: grid; grid-template-columns: 1fr auto; width: 100%; padding: 17px 24px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-top { align-self: center; padding: 0; }
  .tabs { grid-column: 1 / -1; grid-row: 2; display: flex; gap: 5px; width: 100%; margin: 14px 0 0; padding: 0 0 11px; overflow-x: auto; }
  .tab { width: auto; min-height: 40px; padding: 9px 12px; flex: 0 0 auto; font-size: 12px; }
  .nav-icon { width: 16px; height: 16px; }
  .sidebar-bottom { grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 13px; margin: 0; padding: 0; }
  .theme-toggle { width: 40px; min-height: 40px; justify-content: center; padding: 0; }
  .sidebar .theme-toggle > span { display: none; }
  .account { gap: 13px; padding: 0 0 0 15px; border-top: 0; border-left: 1px solid var(--line); }
  .account-copy { max-width: 180px; }
  .app-shell { width: calc(100% - 48px); max-width: none; margin: 0 auto; padding-top: 27px; }
  :root { --link-cols: minmax(155px, 1.2fr) minmax(120px, .9fr) minmax(100px, .8fr) 75px 200px; }
  .list-heading, .data-row { column-gap: 12px; }
  .login-topbar .theme-toggle { width: auto; padding: 8px 12px; }
}

@media (max-width: 760px) {
  body { min-width: 320px; }
  .sidebar { padding: 14px 17px 0; }
  .brand { font-size: 20px; }
  .sidebar-bottom { gap: 3px; }
  .account { padding-left: 3px; border-left: 0; gap: 3px; }
  .account-copy { display: none; }
  .logout-button { width: 40px; height: 40px; }
  .tabs { margin-top: 11px; gap: 3px; padding-bottom: 10px; }
  .tab { min-height: 44px; gap: 6px; padding: 9px 10px; }
  .tab .nav-icon { display: none; }
  .app-shell { width: calc(100% - 32px); padding-top: 24px; }
  h1 { font-size: 25px; }
  .section-heading { align-items: center; gap: 14px; margin-bottom: 22px; }
  .section-heading .button { min-height: 42px; padding: 9px 11px; font-size: 12px; }
  .section-heading > .button-row { justify-content: flex-end; }
  .counters { gap: 12px 19px; margin-bottom: 10px; }
  .counter { gap: 5px; }
  .counter span { font-size: 11px; }
  .counter strong { font-size: 18px; }
  .status-line { margin-bottom: 20px; font-size: 11px; }
  .list-heading { display: none; }
  .data-row, .data-row.no-owner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 18px; min-height: 0; padding: 17px; }
  .link-row > .row-primary { grid-column: 1 / -1; }
  .link-row:not(.no-owner) > .cell:nth-child(2) { grid-column: 1 / -1; margin-top: -6px; color: var(--muted); }
  .link-row .row-actions { grid-column: 1 / -1; justify-content: flex-start; margin-top: 0; padding-top: 2px; }
  .link-row .row-actions .button { min-height: 44px; padding: 9px 12px; }
  .link-row .row-actions .button-icon, .link-row .row-actions .copy-action { width: 44px; min-width: 42px; padding: 0; }
  .cell[data-label]::before { display: block; margin-bottom: 4px; color: var(--muted); content: attr(data-label); font-size: 11px; }
  .link-row:not(.no-owner) > .cell:nth-child(2)::before { display: none; }
  .row-primary strong { font-size: 15px; }
  .usage { max-width: 150px; }
  .user-row > .row-primary { grid-column: 1 / -1; }
  .user-row .cell:nth-child(2) { grid-row: span 2; }
  .user-row .row-actions { margin-left: -9px; }
  .user-row .row-actions .button { min-height: 42px; padding-block: 8px; }
  .request-row > .row-primary { grid-column: 1 / -1; }
  .request-row .row-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .request-row .button { min-height: 44px; padding: 9px 13px; }
  .openflux-card { padding: 17px; }
  .openflux-card-head { flex-wrap: wrap; gap: 5px; }
  .openflux-card-head > .cell { text-align: left; }
  .openflux-card-head > .cell::before { display: none; }
  .openflux-card .row-actions { justify-content: flex-start; flex-wrap: wrap; }
  .openflux-card .row-actions .button { min-height: 44px; }
  .openflux-url code { font-size: 11px; }
  .pool-count { min-height: 25px; }
  .openflux-stock-note { margin-top: -10px; }
  .credentials dl { gap: 13px; }
  .dialog-card { padding: 22px; }
  .dialog-actions .button, .dialog-card input, .dialog-card select { min-height: 44px; }
  .theme-toggle, .logout-button, .icon-button { min-height: 44px; min-width: 44px; }
  .login-topbar { padding: 18px 20px; }
  .login-shell { min-height: calc(100dvh - 80px); align-items: start; padding: 72px 28px 50px; }
  .login-heading h1 { font-size: 25px; }
}

@media (max-width: 430px) {
  .tab { padding-inline: 8px; font-size: 11px; }
  .tabs { gap: 0; }
  .section-heading { flex-wrap: wrap; }
  .section-heading > .button-row { width: 100%; justify-content: flex-start; }
  .section-heading > .button { margin-left: auto; }
  .counters { gap: 9px 13px; }
  .counter span { font-size: 11px; }
  .counter strong { font-size: 18px; }
  .status-line { gap: 5px; }
  .credentials dl { grid-template-columns: minmax(0, 1fr); }
  .login-topbar .theme-toggle { width: 42px; padding: 0; }
  .login-topbar .theme-toggle > span { display: none; }
  .login-shell { padding-top: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
