/* PAM — тёмная рабочая среда. Все ресурсы локальны, внешние шрифты не требуются. */
:root {
  color-scheme: dark;
  --bg: #101415;
  --card: #181d1f;
  --surface: #202628;
  --text: #edf2f0;
  --muted: #a0aca9;
  --muted-2: #899793;
  --line: #2a3233;
  --line-strong: #3b4747;
  --accent: #8ce4bd;
  --accent-hover: #b1f1d3;
  --accent-soft: #203c31;
  --accent-ink: #a1edc8;
  --on-accent: #102c20;
  --ok: #8ce4bd;
  --ok-soft: #20382e;
  --warn: #edc382;
  --warn-soft: #3b3020;
  --err: #f49f9f;
  --err-soft: #3e282c;
  --info: #9fbfec;
  --info-soft: #253347;
  --focus: #8ce4bd;
  --sidebar: #14191a;
  --sidebar-raised: #222a2b;
  --dark: #101415;
  --radius: 14px;
  --radius-sm: 9px;
  --side: 252px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
  --shadow-card: 0 0 0 1px var(--line), 0 2px 4px #0000000d;
  --shadow-card-hover: 0 0 0 1px #4b665a, 0 8px 24px #00000026;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { color: var(--on-accent); background: var(--accent); }
a { color: var(--accent); text-decoration-thickness: from-font; text-underline-offset: .16em; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { color: var(--text); font-weight: 650; letter-spacing: -.018em; text-wrap: balance; }
h1 { line-height: 1.2; overflow-wrap: anywhere; }
h2, h3 { line-height: 1.25; }
p { text-wrap: pretty; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- Каркас: сайдбар + основная область ---------- */
.skip-link { position: fixed; inset-block-start: 10px; inset-inline-start: -999px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-card); color: var(--text); }
.skip-link:focus { inset-inline-start: 12px; }
.layout { display: flex; min-height: 100vh; }
.sidebar { position: sticky; inset-block-start: 0; display: flex; flex: 0 0 var(--side); flex-direction: column; width: var(--side); height: 100vh; overflow: hidden; color: var(--muted); background: var(--sidebar); border-inline-end: 1px solid var(--line); }
.brand { display: flex; align-items: center; justify-content: space-between; padding: 22px 18px 15px; }
.brand > a { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 15px; font-weight: 700; letter-spacing: -.01em; text-decoration: none; }
.brand > a:hover { text-decoration: none; }
.brand-mark { display: inline-grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: var(--on-accent); background: var(--accent); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); font-size: 14px; font-weight: 800; }
.brand-mark.small { width: 28px; height: 28px; border-radius: 8px; font-size: 12px; }
.brand-mark svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark.small svg { width: 17px; height: 17px; }
.burger { display: none; min-width: 44px; min-height: 44px; border: 0; border-radius: 9px; color: var(--text); background: transparent; cursor: pointer; font-size: 20px; }
.burger:hover { background: var(--sidebar-raised); }
.nav { flex: 1; overflow: auto; padding: 4px 12px 16px; scrollbar-width: thin; }
.nav-title { padding: 22px 10px 7px; color: var(--muted-2); font-size: 10.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; }
.nav a { display: flex; align-items: center; gap: 10px; min-height: 40px; margin-block: 2px; padding: 9px 11px; border-radius: 7px; color: var(--muted); font-size: 13px; font-weight: 520; text-decoration: none; }
.nav a:hover { color: var(--text); background: var(--sidebar-raised); }
.nav a.active { color: var(--accent-ink); background: var(--accent-soft); box-shadow: inset 0 0 0 1px #345244; font-weight: 650; }
.nav .ico { display: inline-grid; flex: 0 0 21px; width: 21px; place-items: center; }
.nav .ico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav .count { margin-inline-start: auto; padding: 1px 7px; border-radius: 999px; background: var(--sidebar-raised); color: var(--muted); font-size: 11px; font-weight: 600; }
.side-user { padding: 17px 18px calc(17px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: 12.5px; }
.side-user .name { overflow: hidden; color: var(--text); font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.side-user .muted { color: var(--muted); }
.side-user a { color: var(--muted); }
.side-user form { margin: 0; }
.main { min-width: 0; width: 100%; max-width: 1540px; margin-inline: auto; padding: 32px 36px 48px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-block-end: 22px; }
.page-head h1 { margin: 1px 0 0; font-size: 30px; }
.page-head .sub { max-width: 72ch; margin-block-start: 6px; color: var(--muted); }
.eyebrow { display: block; margin-block-end: 8px; color: var(--muted); font-size: 10.5px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.actions, .form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.actions form, .form-actions form { margin: 0; }
.form-actions { margin-block-start: 6px; }

/* ---------- Карточки, сетки, показатели ---------- */
.card { margin-block-end: 18px; padding: 20px 22px; border: 0; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-card); }
.card h2 { margin: 0 0 14px; font-size: 16.5px; }
.card h3 { margin: 20px 0 9px; font-size: 14px; }
.card p { margin: 8px 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-block-end: 16px; }
.card-head h2 { margin: 0; }
.card.danger { box-shadow: inset 0 0 0 1px #684248; background: var(--err-soft); }
.grid { display: grid; gap: 18px; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.split-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.split > *, .split-3 > * { min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-block-end: 20px; }
.stat { min-height: 152px; padding: 20px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-card); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 28px; margin-block-end: 10px; }
.stat-icon { display: inline-grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; color: var(--accent); background: var(--accent-soft); font-size: 11px; font-weight: 750; }
.stat .v { font-size: 34px; font-weight: 720; font-variant-numeric: tabular-nums; letter-spacing: -.035em; line-height: 1.08; overflow-wrap: anywhere; }
.stat .v.small { font-size: 20px; letter-spacing: -.02em; }
.stat .l { margin-block-start: 5px; color: var(--muted); font-size: 12.5px; }
.stat .d { margin-block-start: 6px; color: var(--muted-2); font-size: 11.5px; }
.stat-list { display: flex; flex-direction: column; margin: 0; padding: 0; font-size: 13.5px; }
.stat-list > * { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line); }
.stat-list > *:last-child { border-bottom: 0; }
.stat-list .k, .stat-list dt { color: var(--muted); }
.stat-list .v, .stat-list dd { margin: 0; min-width: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: end; overflow-wrap: anywhere; }

/* ---------- Таблицы ---------- */
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { padding: 12px 14px; background: #1d2425; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .055em; text-align: start; text-transform: uppercase; white-space: nowrap; }
.table td { padding: 15px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface); }
.table .num { font-variant-numeric: tabular-nums; text-align: end; }
.table td form { margin: 0; }
.table-wrap { position: relative; overflow-x: auto; border-radius: 8px; }
.table .empty { border: 0 !important; }
.actions-cell { text-align: end; white-space: nowrap; }
.actions-cell form { display: inline; margin: 0; }
.actions-cell .btn + .btn, .actions-cell form + form, .actions-cell form + .btn, .actions-cell .btn + form { margin-inline-start: 6px; }
.actions-cell .btn { vertical-align: middle; }

/* ---------- Кнопки, бейджи, теги ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 9px 15px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--text); background: var(--surface); box-shadow: 0 1px 2px rgba(18,24,38,.035); cursor: pointer; font-family: inherit; font-size: 13.5px; font-weight: 620; line-height: 1.2; text-align: center; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: #596a65; background: var(--surface); text-decoration: none; }
.btn.primary { border-color: var(--accent); color: var(--on-accent); background: var(--accent); box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 2px rgba(18,24,38,.12); }
.btn.primary:hover { border-color: var(--accent-hover); background: var(--accent-hover); }
.btn.danger { border-color: #684248; color: var(--err); background: var(--surface); }
.btn.danger:hover { background: var(--err-soft); }
.btn.sm { min-height: 32px; padding: 6px 10px; font-size: 12px; }
.btn.large { min-height: 48px; padding-inline: 19px 17px; font-size: 14px; }
.btn.ghost { border-color: transparent; color: inherit; background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface); }
.btn.light { border-color: var(--line-strong); color: var(--accent-ink); background: var(--surface); }
.btn.block { width: 100%; }
.btn[disabled], .btn.disabled { cursor: not-allowed; opacity: .55; box-shadow: none; pointer-events: none; }
.btn.loading::before { content: ""; width: 13px; height: 13px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; }
.text-link { color: var(--accent); font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 3px 8px; border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 11.5px; font-weight: 650; line-height: 1.2; white-space: nowrap; vertical-align: middle; }
.badge.ok { color: var(--ok); background: var(--ok-soft); }
.badge.warn { color: var(--warn); background: var(--warn-soft); }
.badge.err { color: var(--err); background: var(--err-soft); }
.badge.info { color: var(--info); background: var(--info-soft); }
.badge.accent { color: var(--accent-ink); background: var(--accent-soft); }
.badge.muted { color: var(--muted-2); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.tag { display: inline-block; margin: 0 4px 4px 0; padding: 2px 7px; border-radius: 5px; color: var(--muted); background: var(--surface); box-shadow: inset 0 0 0 1px rgba(18,24,38,.05); font-family: var(--mono); font-size: 11.5px; line-height: 1.5; white-space: nowrap; vertical-align: middle; }
.dot { display: inline-block; width: 8px; height: 8px; margin-inline-end: 6px; border-radius: 50%; background: #98a2b2; vertical-align: middle; }
.dot.live, .dot.on { background: #20a465; box-shadow: 0 0 0 3px rgba(32,164,101,.2); }
.dot.off { background: #98a2b2; box-shadow: none; }
.dot.err { background: var(--err); }
.dot.warn { background: #d99a1e; }

/* ---------- Формы ---------- */
.field { margin-block-end: 14px; }
.field label, .field-label { display: block; margin-block-end: 5px; color: var(--text); font-size: 12.5px; font-weight: 600; }
.field .help, .help { margin-block-start: 5px; color: var(--muted); font-size: 11.75px; font-weight: 400; line-height: 1.45; }
.field .error-text, .error-text { margin-block-start: 4px; color: var(--err); font-size: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 14px; }
.row > .field { flex: 1 1 220px; min-width: 0; }
input:where(:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]):not([type=submit]):not([type=button]):not([type=hidden])), select, textarea { width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--text); background: var(--surface); }
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
textarea.mono, input.mono { font-family: var(--mono); font-size: 13px; }
input::placeholder, textarea::placeholder { color: var(--muted-2); opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: #596a65; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 3px solid rgba(140,228,189,.16); outline-offset: 0; }
input[disabled], select[disabled], textarea[disabled], input[readonly] { color: var(--muted); background: var(--surface); }
input[type=file] { width: 100%; padding: 8px 0; }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; margin: 0; flex: 0 0 auto; accent-color: var(--accent); }
.checks { display: flex; flex-direction: column; gap: 8px; margin-block-end: 14px; }
.checks label, .check { display: inline-flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; color: var(--text); font-size: 13.5px; font-weight: 500; }
.checks .help { margin: 0 0 0 25px; }
.input-group { display: flex; gap: 8px; }
.input-group > * { flex: 1 1 auto; min-width: 0; }
.input-group > .btn { flex: 0 0 auto; }
.filters { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin-block-end: 16px; }
.filters .field { margin: 0; }
.filters label { display: block; margin-block-end: 4px; color: var(--muted); font-size: 11px; font-weight: 600; }
.filters input:not([type=checkbox]):not([type=radio]), .filters select { width: auto; min-width: 140px; }
.filters input[type=search] { min-width: 200px; }
.filters .check { min-height: 40px; }

/* ---------- Сообщения, пустые состояния, вспомогательные классы ---------- */
.flash { max-width: 72ch; margin-block-end: 18px; padding: 11px 14px; border-radius: 10px; font-weight: 550; transition: opacity .5s ease-out; }
.flash.ok { color: var(--ok); background: var(--ok-soft); box-shadow: inset 0 0 0 1px #3b5c4b; }
.flash.err { color: var(--err); background: var(--err-soft); box-shadow: inset 0 0 0 1px #684248; }
.flash.info { color: var(--info); background: var(--info-soft); box-shadow: inset 0 0 0 1px #3d536e; }
.flash.warn { color: var(--warn); background: var(--warn-soft); box-shadow: inset 0 0 0 1px #675238; }
.flash.fade { opacity: 0; }
.empty { padding: 28px 18px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); color: var(--muted); text-align: center; }
.empty p { margin: 4px 0; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-block-start: 14px; color: var(--muted); font-size: 12.5px; }
.pager .btn { min-height: 32px; }
.mono { font-family: var(--mono); font-size: .92em; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.right { text-align: end; }
.nowrap { white-space: nowrap; }
.break { overflow-wrap: anywhere; }
.code, pre.code { max-width: 100%; margin: 0 0 12px; overflow: auto; padding: 12px 14px; border-radius: 9px; color: #e2e8f0; background: #121a17; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; white-space: pre; tab-size: 4; }
.code-wrap { position: relative; }
.code-wrap .copy { position: absolute; inset-block-start: 8px; inset-inline-end: 8px; border-color: rgba(255,255,255,.14); color: var(--text); background: rgba(255,255,255,.08); }
.kbd, kbd { display: inline-block; padding: 1px 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; background: var(--card); color: var(--muted); font-family: var(--font); font-size: 10.5px; font-weight: 600; line-height: 1.5; vertical-align: middle; }
code { padding: 1px 5px; border-radius: 5px; background: var(--surface); font-family: var(--mono); font-size: .9em; }
.code code, pre code { padding: 0; background: none; font-size: inherit; }
details.more summary { width: fit-content; cursor: pointer; color: var(--accent); font-weight: 600; }
.qr { display: flex; justify-content: center; margin: 12px auto 16px; }
.qr img { display: block; width: 200px; height: 200px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; image-rendering: pixelated; outline: 1px solid #ffffff1a; }

/* ---------- Ресурсы (карточки) ---------- */
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.asset-card { position: relative; display: flex; flex-direction: column; min-width: 0; margin: 0; padding: 18px 18px 14px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-card); }
.asset-card:hover { box-shadow: var(--shadow-card-hover); }
.asset-kind { position: absolute; inset-block-start: 14px; inset-inline-end: 14px; padding: 3px 8px; border-radius: 6px; color: var(--muted); background: var(--surface); font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.asset-kind.ssh { color: var(--ok); background: var(--ok-soft); }
.asset-kind.rdp { color: var(--accent-ink); background: var(--accent-soft); }
.asset-kind.vnc { color: #c7ace7; background: #342b41; }
.asset-name { padding-inline-end: 60px; font-size: 15px; font-weight: 650; letter-spacing: -.01em; overflow-wrap: anywhere; }
.asset-name a { color: inherit; text-decoration: none; }
.asset-name a:hover { color: var(--accent); }
.asset-host { margin-block-start: 3px; color: var(--muted); font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }
.asset-desc { margin-block-start: 8px; color: var(--muted); font-size: 12.5px; }
.asset-tags { margin-block-start: 8px; }
.asset-accounts { display: flex; flex-direction: column; margin-block-start: 14px; padding-block-start: 6px; border-top: 1px solid var(--line); }
.asset-accounts > * { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.asset-accounts > *:last-child { border-bottom: 0; }
.asset-accounts .account, .asset-accounts .login { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 13px; }
.asset-accounts .actions, .asset-accounts form { display: flex; flex: 0 0 auto; gap: 6px; margin: 0; }

/* ---------- Сессии: шапка, команды, события ---------- */
.session-head { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-block-end: 18px; }
.kv { min-width: 0; }
.kv .k { display: block; margin-block-end: 2px; color: var(--muted); font-size: 10.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; }
.kv .v { font-size: 14px; font-weight: 550; overflow-wrap: anywhere; }
.cmd-list { margin: 0; padding: 0; list-style: none; max-height: 540px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--mono); font-size: 12.5px; }
.cmd { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; padding: 6px 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.cmd:last-child { border-bottom: 0; }
.cmd:hover { background: var(--accent-soft); }
.cmd.active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.cmd > :first-child { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmd > :last-child { overflow-wrap: anywhere; white-space: pre-wrap; }
.cmd.hidden { color: var(--muted); font-style: italic; }
.cmd.inexact > :first-child::after { content: "≈"; margin-inline-start: 4px; color: var(--warn); font-weight: 700; }
.timeline { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.ev { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 6px 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.ev:last-child { border-bottom: 0; }
.ev-time { flex: 0 0 auto; min-width: 72px; color: var(--muted); font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-kind { flex: 0 0 auto; }
.ev-text { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.ev-text .mono { color: var(--muted); }

/* ---------- Плеер записей ---------- */
.player { min-width: 0; }
.player-screen { position: relative; display: flex; align-items: flex-start; justify-content: center; min-height: 300px; overflow: hidden; padding: 10px; border-radius: 10px; background: #000; color: #e2e8f0; }
.player-screen .xterm { max-width: 100%; }
.player-screen .xterm-viewport { overflow-y: hidden !important; }
#player-display { display: inline-block; line-height: 0; }
.player-msg { align-self: center; padding: 14px 18px; border-radius: 9px; background: rgba(15,23,42,.85); color: #e2e8f0; font-size: 13.5px; text-align: center; }
.player-msg.error { color: #fecaca; }
.player-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 0; }
.player-bar .btn.sm { min-width: 40px; }
.player-progress { flex: 1 1 200px; min-width: 120px; accent-color: var(--accent); cursor: pointer; }
.player-time { min-width: 110px; font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.player-speed { width: auto; min-height: 32px; padding: 4px 8px; font-size: 12.5px; }
.player-bar .check { font-size: 12.5px; }

/* ---------- Полноэкранные страницы подключения (layout "bare") ---------- */
body.bare { min-height: 100vh; background: var(--bg); }
body.bare.dark, body.bare:has(> .term-page) { background: var(--dark); }
.term-page { display: flex; flex-direction: column; width: 100%; height: 100vh; height: 100dvh; overflow: hidden; background: var(--dark); color: #cbd5e1; }
.term-top { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; height: auto; padding: 10px 18px; border-bottom: 1px solid rgba(255,255,255,.08); color: #cbd5e1; font-size: 13px; }
.term-top > * { display: flex; align-items: center; gap: 10px; min-width: 0; }
.term-title { overflow: hidden; color: #f1f5f9; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.term-title .mono { color: #94a3b8; font-weight: 400; }
.term-status { color: #94a3b8; white-space: nowrap; }
.term-status .dot { margin-inline-end: 2px; }
.term-top .btn.sm.ghost { color: #e2e8f0; border-color: rgba(255,255,255,.14); }
.term-top .btn.sm.ghost:hover { background: rgba(255,255,255,.1); }
.term-top .btn.sm.danger { color: #fca5a5; border-color: rgba(252,165,165,.3); background: transparent; }
.term-top .btn.sm.danger:hover { background: rgba(252,165,165,.12); }
.term-body { position: relative; flex: 1 1 auto; min-height: 0; padding: 6px; }
#terminal { width: 100%; height: 100%; }
#terminal .xterm, #terminal .terminal { height: 100%; }
.rdp-body { position: relative; display: flex; flex: 1 1 auto; align-items: center; justify-content: center; min-height: 0; overflow: hidden; }
#display { display: inline-block; position: relative; line-height: 0; cursor: none; }
#display > * { display: inline-block; }
.term-overlay { position: absolute; inset-block-start: 50%; inset-inline-start: 50%; z-index: 5; width: min(420px, calc(100% - 32px)); padding: 18px 22px; border-radius: 12px; color: #f8fafc; background: rgba(15,23,42,.9); box-shadow: 0 12px 40px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.08); font-size: 14px; text-align: center; transform: translate(-50%, -50%); white-space: pre-line; }
.term-overlay.error { color: #fecaca; box-shadow: 0 12px 40px rgba(0,0,0,.45), inset 0 0 0 1px rgba(248,113,113,.4); }
.term-overlay .btn { margin-block-start: 12px; }
.term-overlay .sub { margin-block-start: 6px; color: #94a3b8; font-size: 12.5px; }

/* ---------- Вход ---------- */
.auth { display: flex; flex-direction: column; width: 100%; max-width: 400px; margin: 8vh auto; padding: 0 16px; }
.auth .card { padding: 26px; margin-block-end: 14px; }
.auth h1 { margin: 0 0 14px; font-size: 20px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-block-end: 18px; color: var(--text); font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.auth-banner { margin-block-end: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--surface); font-size: 12.5px; line-height: 1.5; white-space: pre-line; }
.auth .btn.primary { width: 100%; }
.auth-foot { margin-block-start: 14px; color: var(--muted); font-size: 12px; text-align: center; }

/* ---------- Общая рабочая область ---------- */
.icon { display: inline-block; flex: 0 0 auto; width: 19px; height: 19px; vertical-align: middle; }
.workspace { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.workspace-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 70px; padding: 12px 36px; border-bottom: 1px solid var(--line); }
.workspace-crumb, .workspace-tools { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12px; }
.workspace-crumb { min-width: 0; }
.crumb-current { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb-divider { color: #64736d; }
.workspace-date { font-variant-numeric: tabular-nums; }
.workspace-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: auto; padding: 18px 36px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 11px; }
.footer-divider { padding: 0 10px; color: #53635c; }
.brand { min-height: 86px; padding: 20px; }
.brand > a { min-width: 0; }
.brand-text { font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }
.brand-text small { display: block; margin-top: 3px; color: var(--muted-2); font-size: 10px; font-weight: 400; letter-spacing: .025em; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; }
.side-workspace { display: flex; align-items: center; gap: 9px; margin: 0 16px 10px; padding: 11px 9px; border: 1px solid var(--line); border-radius: 9px; font-size: 10.5px; color: var(--text); }
.side-workspace small { display: block; margin-top: 3px; color: var(--muted-2); font-size: 9px; }
.side-workspace > .icon { width: 13px; height: 13px; margin-left: auto; color: var(--muted); }
.workspace-symbol { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid #46564e; border-radius: 7px; background: #29382f; font-family: var(--mono); color: #c6d7cb; }
.nav { padding-inline: 14px; }
.nav-title { padding: 20px 12px 8px; font-size: 9px; letter-spacing: .13em; }
.nav a { min-height: 38px; padding: 8px 10px; gap: 9px; font-size: 12px; }
.nav-label { min-width: 0; }
.nav a.active .ico { color: var(--accent); }
.nav .count { background: #304c3d; color: #b9e3c9; min-width: 20px; text-align: center; }
.side-user { display: flex; align-items: center; gap: 8px; padding: 18px 16px; }
.user-profile { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; }
.user-profile:hover { text-decoration: none; }
.user-info { display: flex; flex-direction: column; min-width: 0; gap: 3px; font-size: 10px; }
.user-info .name { display: block; font-size: 12px; }
.avatar { display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid #566049; color: #d3dcc6; background: #353d2f; font-size: 12px; font-weight: 600; }
.icon-button { display: inline-grid; flex: 0 0 auto; place-items: center; min-width: 36px; min-height: 36px; padding: 7px; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.icon-button:hover { background: var(--surface); color: var(--text); }
.main > .page-head .actions { justify-content: flex-end; }
.page-head .sub { font-size: 13px; line-height: 1.65; margin-bottom: 0; }
.page-head .eyebrow { color: var(--accent); font-size: 10px; letter-spacing: .13em; }
.page-head > div:first-child { min-width: 0; }
.card-head { align-items: center; }
.card-head .text-link { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; }
.card-head .text-link .icon { width: 15px; height: 15px; }
.card-sub { margin-top: 5px !important; color: var(--muted); font-size: 11px; }
.btn .icon { width: 16px; height: 16px; }
.btn.ghost { color: var(--muted); }
.stat-period { color: var(--muted-2); font-size: 10px; }
.stat .l { font-size: 12px; margin-top: 10px; }
.stat .d { font-size: 10px; margin-top: 8px; }
.stat .d a { color: var(--muted); text-decoration: none; }
.stat .d a:hover { color: var(--accent); }
.stat-icon .icon { width: 17px; height: 17px; }
.stat-icon.warn { color: var(--warn); background: var(--warn-soft); }
.stat-icon.info { color: var(--info); background: var(--info-soft); }
.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.overview-banner { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-bottom: 24px; padding: 24px 28px; border: 1px solid #375144; border-radius: var(--radius); background: linear-gradient(105deg, #213b30, #1a2823 65%, #1b3027); }
.overview-banner h2 { margin: 0 0 7px; font-size: 19px; }
.overview-banner p { margin: 0; color: #b1c8ba; font-size: 12px; max-width: 65ch; }
.overview-banner .banner-icon { display: grid; flex: 0 0 auto; place-items: center; width: 62px; height: 62px; border: 1px solid #527461; border-radius: 18px; background: #2c4a3b; color: #b3e4c8; }
.banner-icon .icon { width: 31px; height: 31px; }
.banner-content { flex: 1; }
.banner-link { display: inline-flex; align-items: center; gap: 10px; color: #c6efda; font-size: 12px; white-space: nowrap; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 26px 0 15px; }
.section-heading h2 { margin: 0; font-size: 16px; }
.section-heading p { margin: 0; font-size: 11px; color: var(--muted); }
.card-title { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.card-title h2 { margin: 0; }
.live-label { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 10px; }
.live-label .dot { width: 5px; height: 5px; margin: 0; box-shadow: none; }
.chart-area { position: relative; display: flex; align-items: flex-end; gap: 10px; height: 158px; margin: 22px 0 10px; padding: 0 4px; border-bottom: 1px solid var(--line-strong); background: repeating-linear-gradient(to top, transparent 0, transparent 38px, var(--line) 39px, transparent 40px); }
.chart-column { position: relative; display: flex; align-items: flex-end; justify-content: center; flex: 1; min-width: 0; height: 100%; }
.chart-bar { display: block; width: 100%; max-width: 28px; min-height: 2px; border: 1px solid #72b798; border-bottom: 0; border-radius: 4px 4px 0 0; background: #4d9273; }
.chart-column:last-child .chart-bar { background: var(--accent); }
.chart-tooltip { position: absolute; bottom: calc(100% + 5px); left: 50%; transform: translateX(-50%); z-index: 2; padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--text); background: var(--surface); font-size: 10px; white-space: nowrap; opacity: 0; pointer-events: none; }
.chart-column:nth-child(-n+3) .chart-tooltip { left: 0; transform: none; }
.chart-column:nth-last-child(-n+3) .chart-tooltip { left: auto; right: 0; transform: none; }
.chart-column:hover .chart-tooltip, .chart-column:focus-visible .chart-tooltip { opacity: 1; }
.chart-caption { display: flex; justify-content: space-between; color: var(--muted-2); font-size: 10px; }
.empty { padding: 42px 22px; background: #171d1c; border-color: #394440; }
.empty .empty-icon { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 14px; border-radius: 13px; background: #25332b; color: #a4c5b2; }
.empty h3 { margin: 0 0 7px; font-size: 14px; }
.empty p { margin: 0 auto; max-width: 45ch; font-size: 12px; }
.empty .btn { margin-top: 18px; }
.card > .empty { border: 0; background: transparent; }
.filters { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.filters input:not([type=checkbox]):not([type=radio]), .filters select { min-width: 0; max-width: 100%; }
.filters input[type=search] { min-width: 190px; flex: 1; }
.search-field { position: relative; flex: 1; min-width: 160px; }
.search-field .icon { position: absolute; left: 13px; top: 12px; color: var(--muted-2); width: 17px; height: 17px; }
.search-field input[type=search] { width: 100%; padding-left: 39px; }
.catalog-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 24px 0 20px; }
.catalog-search { display: flex; align-items: center; gap: 8px; min-width: 0; margin-left: auto; flex: 0 1 380px; }
.protocol-tabs { display: inline-flex; flex-wrap: wrap; gap: 5px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--sidebar); }
.protocol-tab { padding: 7px 12px; min-height: 34px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: 11px; cursor: pointer; }
.protocol-tab[aria-pressed=true] { background: #303b35; color: var(--text); box-shadow: 0 1px 3px #0002; }
.protocol-tab:hover { color: var(--accent); }
.asset-card { padding: 22px; }
.asset-card .card-head { align-items: flex-start; }
.asset-card .asset-name { padding: 0; margin-top: 16px; font-size: 17px; }
.asset-card .asset-host { margin-top: 5px; font-size: 11px; }
.resource-icon { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #345347; border-radius: 11px; background: #223b2f; color: var(--accent); }
.resource-icon.rdp { border-color: #3a4a62; background: var(--info-soft); color: var(--info); }
.resource-icon.vnc { border-color: #514063; background: #342b41; color: #c7ace7; }
.asset-desc { flex: 1; margin: 4px 0 14px; font-size: 12px; }
.asset-tags { margin: 0 0 5px; }
.asset-accounts { margin-top: 15px; padding-top: 9px; }
.asset-account .actions { flex-wrap: nowrap; width: auto; }
.asset-account .mono { overflow-wrap: anywhere; min-width: 0; }
.asset-footer { display: flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--muted-2); font-size: 10px; }
.asset-footer .icon { width: 13px; height: 13px; }
.ssh-help { margin-top: 26px; border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; background: var(--sidebar); }
.ssh-help summary { display: flex; align-items: center; gap: 9px; width: fit-content; cursor: pointer; font-size: 12px; color: var(--muted); }
.ssh-help[open] summary { margin-bottom: 15px; }
.ssh-help .code { margin: 0; }
.form-actions { gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.field { margin-bottom: 20px; }
.field label { font-size: 12px; margin-bottom: 7px; }
.field .help { line-height: 1.65; }
.check { line-height: 1.6; min-height: 30px; }
select[multiple] { padding: 6px; }
select[multiple] option { padding: 8px 9px; border-radius: 5px; }
.stat-list > * { flex-wrap: wrap; }
.timeline .ev > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.table a:not(.btn) { text-decoration: none; }
.table a:not(.btn):hover { text-decoration: underline; }
.table-wrap:focus-visible { outline-offset: -2px; }
/* ---------- Вход и подтверждение ---------- */
.auth { max-width: 460px; margin: 8vh auto; }
.auth .card { padding: 34px; }
.auth-brand { justify-content: flex-start; }
.auth h1 { font-size: 27px; }
.auth .field { margin-bottom: 22px; }
.auth input:not([type=hidden]) { min-height: 46px; }
.auth .btn.primary { min-height: 46px; }
.login-page { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; min-height: 100dvh; }
.login-story { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 42px 52px; border-right: 1px solid #34443a; background: #1b2a22; }
.login-story .auth-brand { color: #e1ece2; margin: 0; }
.login-story .brand-mark { width: 42px; height: 42px; }
.login-story-content { position: relative; z-index: 1; max-width: 480px; margin: 50px 0; }
.login-story .eyebrow { color: #a5c8b2; font-size: 10px; letter-spacing: .16em; }
.login-story h2 { font-size: clamp(32px, 3.2vw, 48px); font-weight: 550; line-height: 1.13; letter-spacing: -.045em; margin: 20px 0; }
.login-story h2 span { color: #95d4ae; }
.login-story-content > p { max-width: 40ch; color: #b2c3b7; font-size: 14px; line-height: 1.8; }
.access-visual { position: relative; margin: 45px 0 0; max-width: 390px; padding: 24px; border: 1px solid #49604e; border-radius: 16px; background: #213429; }
.access-node { display: flex; align-items: center; gap: 11px; color: #d5e4d9; font-size: 12px; }
.access-node > .icon { width: 30px; height: 30px; padding: 6px; border: 1px solid #526b58; border-radius: 7px; }
.access-node small { display: block; color: #a0b5a5; font-size: 10px; margin-top: 3px; }
.access-node > .badge { margin-left: auto; }
.access-line { width: 1px; height: 25px; background: #5b7961; margin-left: 15px; }
.access-destinations { display: flex; gap: 10px; margin: 0 0 0 0; }
.access-destinations span { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 13px 9px; border: 1px solid #49604e; border-radius: 8px; color: #c2d6c8; font-family: var(--mono); font-size: 11px; }
.login-story-foot { display: flex; align-items: center; gap: 8px; color: #a4b9ab; font-size: 11px; }
.login-main { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px; }
.login-main .auth { max-width: 370px; margin: auto 0; padding: 50px 0; }
.login-main .auth .card { padding: 0; background: none; box-shadow: none; }
.login-main .auth h1 { font-size: 30px; margin: 15px 0 12px; }
.login-main .auth-intro { margin: 0 0 30px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.auth-overline { display: flex; align-items: center; gap: 7px; color: var(--accent); font-size: 11px; }
.auth-overline .icon { width: 15px; height: 15px; }
.login-main .auth-banner { margin-top: 22px; font-size: 11px; line-height: 1.7; background: transparent; border-style: dashed; }
.auth-password { position: relative; }
.auth-password input { padding-right: 92px !important; }
.auth-password .btn { position: absolute; right: 5px; top: 5px; min-height: 36px; font-size: 10px; padding-inline: 8px; }
.auth-divider { margin: 26px 0 18px; display: flex; align-items: center; gap: 12px; color: var(--muted-2); font-size: 10px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.login-main .code { border: 1px solid var(--line); background: #171d1b; font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; }
.login-foot { color: var(--muted-2); font-size: 10px; text-align: center; }
.auth #code { font-size: 26px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }

/* ---------- Анимации и адаптив ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background-color 140ms ease-out, border-color 140ms ease-out, box-shadow 140ms ease-out, transform 100ms ease-out; }
  .btn:active { transform: scale(.96); }
  .card, .asset-card { transition: box-shadow 160ms ease-out; }
  .nav a { transition: color 120ms ease-out, background-color 120ms ease-out; }
  .btn.loading::before { animation: spin .8s linear infinite; }

}
@media (max-width: 1000px) {
  .split, .split-3, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .layout { display: block; }
  .sidebar { position: sticky; z-index: 20; width: 100%; height: auto; }
  .brand { min-height: 64px; padding: 12px 16px; }
  .burger { display: inline-grid; place-items: center; }
  .nav { display: none; max-height: calc(100vh - 64px); padding-block-end: 18px; }
  .sidebar.open .nav { display: block; }
  .side-user { display: none; }
  .sidebar.open .side-user { display: block; }
  .main { max-width: none; padding: 22px 20px 64px; }
  .grid-2 { grid-template-columns: 1fr; }
  .session-head { gap: 12px 20px; }
}
@media (max-width: 600px) {
  body { font-size: 14px; }
  .main { padding: 18px 14px 58px; }
  .page-head { flex-direction: column; gap: 14px; margin-block-end: 18px; }
  .page-head h1 { font-size: 23px; }
  .actions { width: 100%; }
  .card { padding: 17px 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { min-height: 108px; padding: 14px; }
  .stat .v { font-size: 25px; }
  .nav a, .btn.sm { min-height: 44px; }
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px; }
  .filters input:not([type=checkbox]):not([type=radio]), .filters select, .filters .field { width: 100%; min-width: 0; flex: 1 1 100%; }
  .asset-grid { grid-template-columns: 1fr; }
  .cmd { grid-template-columns: 60px minmax(0, 1fr); }
  .player-time { min-width: 0; }
  .term-top { padding: 0 8px; gap: 8px; }
  .term-title { flex: 1 1 100%; white-space: normal; }
  .term-top { flex-wrap: wrap; }
  .term-top > span:last-child { flex-wrap: wrap; }
  .auth { margin-block-start: 4vh; }
}
@media (max-width: 400px) {
  .stats { grid-template-columns: 1fr; }
  .actions .btn { flex: 1 1 auto; }
}
@media (forced-colors: active) {
  .brand-mark, .nav a.active, .btn.primary { border: 1px solid ButtonText; }
  .dot { forced-color-adjust: none; }
}

@media (min-width: 1280px) { .stats { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 1150px) {
  .main { padding-inline: 24px; }
  .workspace-bar, .workspace-footer { padding-inline: 24px; }
  .page-head { flex-wrap: wrap; }
  .overview-banner { gap: 18px; padding: 20px; }
  .banner-link { white-space: normal; }
  .login-story { padding: 32px; }
  .login-main { padding: 32px; }
}
@media (max-width: 900px) {
  .sidebar { border-bottom: 1px solid var(--line); }
  .brand { min-height: 68px; padding: 12px 20px; }
  .brand-text small { display: none; }
  .side-workspace { display: none; }
  .sidebar.open { max-height: 100dvh; }
  .sidebar.open .nav { flex: 1; min-height: 0; }
  .sidebar.open .side-user { display: flex; flex: 0 0 auto; }
  .workspace-bar { min-height: 58px; }
  .login-page { grid-template-columns: 1fr 1fr; }
  .login-story { padding: 28px; }
  .login-story h2 { font-size: 32px; }
  .access-visual { padding: 16px; }
  .access-destinations { flex-wrap: wrap; }
}
@media (max-width: 680px) {
  .login-page { display: flex; flex-direction: column; }
  .login-story { padding: 22px 24px; border-right: 0; border-bottom: 1px solid var(--line); }
  .login-story-content, .login-story-foot { display: none; }
  .login-main { padding: 12px 24px 24px; flex: 1; }
  .login-main .auth { padding: 30px 0; }
  .overview-banner { align-items: flex-start; flex-wrap: wrap; }
  .overview-banner .banner-icon { width: 42px; height: 42px; border-radius: 12px; }
  .banner-icon .icon { width: 23px; height: 23px; }
  .banner-content { flex: 1 1 180px; }
  .banner-link { width: 100%; padding-top: 12px; border-top: 1px solid #375144; }
}
@media (max-width: 600px) {
  .main { padding: 24px 16px 40px; }
  .table { min-width: 680px; }
  .table td { max-width: 260px; }
  .workspace-bar { padding-inline: 16px; }
  .workspace-crumb { gap: 8px; font-size: 10px; }
  .workspace-crumb > .icon, .workspace-crumb > span:first-of-type, .crumb-divider, .workspace-date { display: none; }
  .workspace-footer { padding-inline: 16px; font-size: 9px; }
  .workspace-footer > span:last-child { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 16px; min-height: 150px; }
  .stat .v { font-size: 30px; }
  .page-head .actions, .page-head > .filters { width: 100%; justify-content: flex-start !important; }
  .card { padding: 20px 16px; }
  .filters { padding: 12px; }
  .filters .btn { min-height: 44px; }
  .catalog-search { flex: 1 1 100%; width: 100%; }
  .protocol-tab { min-height: 40px; }
  .icon-button { min-height: 44px; min-width: 44px; }
  .section-heading { flex-wrap: wrap; gap: 6px; }
  .form-actions { flex-wrap: wrap; }
  .form-actions .btn { flex: 1; }
  .asset-card .actions .btn { min-width: 0; flex: initial; }
  .asset-account { flex-wrap: wrap; }
  .term-top .btn.sm { min-height: 36px; padding: 7px 9px; font-size: 11px; }
  .term-title { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
