* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root {
  --ink: #172c42; --muted: #516579; --link: #21547c; --blue: #c4e1fa;
  --line: #d7e3ed; --mist: #f1f7fb; --paper: #fff;
  color-scheme: light;
}
body { margin: 0; background: var(--mist); color: var(--ink); font: 16px/1.48 "Segoe UI", Arial, sans-serif; }
header { background: var(--blue); padding: 14px max(4vw, calc((100vw - 1320px)/2)); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px; }
.brand { color: var(--ink); font-size: 22px; font-weight: 700; letter-spacing: -.025em; text-decoration: none; }
nav, .bar, .filters, .title-row, .item-actions, .list-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
nav { font-size: 14px; } nav a { text-decoration: none; font-weight: 600; }
nav span, small, dt, .identifier, .crumb, .mobile-label { color: var(--muted); }
main { max-width: 1344px; margin: 24px auto; padding: 26px clamp(18px,3vw,44px) 40px; background: white; border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
h1,h2 { margin: 0; line-height: 1.2; overflow-wrap: anywhere; }
h1 { font-size: clamp(26px,3vw,38px); letter-spacing: -.028em; margin-bottom: 18px; }
h2 { font-size: 20px; margin: 24px 0 12px; }
p { margin: 10px 0; } .crumb { font-size: 14px; margin: 0 0 18px; } .crumb a { text-underline-offset: 3px; }
.title-row { justify-content: space-between; margin-bottom: 16px; } .title-row h1 { margin: 0; }
a,.link { color: var(--link); text-underline-offset: .17em; } a:hover,.link:hover { color: #122e4d; text-decoration: underline; }
button,.btn,input { font: inherit; }
button,.btn { display: inline-block; border: 1px solid #aecee7; background: var(--blue); color: #173953; font-weight: 600; border-radius: 8px; padding: 8px 15px; text-decoration: none; cursor: pointer; }
button:hover,.btn:hover { background: #b3d8f5; color: #123650; }
.link { padding: 0; border: 0; background: transparent; font-weight: 500; text-decoration: underline; } .link:hover { background: transparent; }
a:focus-visible,button:focus-visible,input:focus-visible,summary:focus-visible { outline: 3px solid #3c78a8; outline-offset: 2px; }
::selection { background: #cde4f7; color: #163754; }
input { padding: 9px 12px; color: var(--ink); background: white; border: 1px solid #a8bbcb; border-radius: 7px; max-width: 100%; }
input::placeholder { color: #5b6b7a; } input[type=checkbox] { width: 18px; height: 18px; margin: 2px; accent-color: #32638a; cursor: pointer; vertical-align: middle; }
.registry-search { width: min(620px,100%); min-height: 44px; } .filters { margin: 16px 0 8px; gap: 8px; }
.chip { border-radius: 18px; padding: 6px 12px; border-color: var(--line); background: #f6f8fa; color: var(--ink); font-weight: 500; }
.chip small { margin-left: 3px; } .chip.on { background: var(--blue); border-color: #a9cce8; color: #123952; font-weight: 650; }
.list-tools { font-size: 14px; margin: 10px 0 16px; }
.bar { margin: 14px 0; } .bar input[type=search] { width: min(400px,100%); } .grow { flex: 1; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th,td { padding: 10px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
th { font-size: 14px; color: var(--muted); font-weight: 600; background: #f7fafc; } tfoot { background: var(--mist); font-weight: 650; } tbody tr:hover { background: #f8fbfe; }
small { font-size: 13px; } .scroll { overflow-x: auto; } .serial,.expires,.dates { font-variant-numeric: tabular-nums; }
.st { display: inline-block; max-width: 100%; padding: 3px 9px; border-radius: 7px; font-size: 14px; font-weight: 600; line-height: 1.4; }
.over { color: #8d3041; background: #fbe2e6; } .d30 { color: #794812; background: #ffe9cb; }
.d60 { color: #705915; background: #faf0c8; } .ok { color: #245c49; background: #dbf1e5; } .none { color: #526072; background: #e9eef3; }
.pick-cell { width: 38px; padding: 8px; } .equip-name { width: 27%; }
.row-number { color: var(--muted); font-size: 13px; }
.toggle { text-align: left; }
.equip-name a,.site-name a { font-weight: 650; color: var(--ink); text-decoration: none; } .equip-name a:hover,.site-name a:hover { text-decoration: underline; }
.equip-name small,.site-name small,.state small,.actions a,.docs small { display: block; }
.equipment td,.sites td { overflow-wrap: anywhere; } .equipment .expires { white-space: nowrap; }
.actions { font-size: 14px; } .actions a + a { margin-top: 3px; }
.group td { background: #eff5fa; } .toggle { font-weight: 650; color: var(--ink); text-decoration: none; } .group-status { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 4px 10px; } .group-status .st { font-size: 12px; }
.mobile-label { display: none; } #bulk { position: sticky; top: 0; z-index: 1; background: #e6f2fc; border: 1px solid #b8d4e9; padding: 10px; border-radius: 8px; }
.catalog-section td { background: #e2edf5; }
.catalog-section .toggle { padding: 4px 8px; }
.catalog-section .st { margin-left: 8px; font-size: 12px; }
#letter { display: block; width: 100%; margin-top: 4px; padding: 10px; font: inherit; }
label { display: block; margin-bottom: 14px; } label input { display: block; width: 100%; margin-top: 4px; }
.ch { margin-bottom: 6px; } .ch input { display: inline; margin-right: 8px; } fieldset { border: 1px solid var(--line); margin: 0 0 14px; }
.card { border: 1px solid var(--line); border-radius: 12px; padding: 20px; max-width: 820px; } form.card { max-width: 480px; }
.flash { background: #e6f2fc; padding: 12px 16px; border-radius: 8px; }
.instrument { max-width: 760px; } .instrument h1 { margin-bottom: 4px; }
.identifier { margin: 0 0 14px; font-variant-numeric: tabular-nums; }
dl { margin: 0; display: grid; grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); gap: 8px 16px; } dd { margin: 0; overflow-wrap: anywhere; }
.dates { margin: 18px 0; max-width: 420px; } .dates dd { font-weight: 650; }
.instrument section,.instrument details { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; }
.instrument h2 { margin-top: 0; } summary { cursor: pointer; color: var(--link); font-weight: 600; }
.equipment-admin form { margin-top: 16px; }
.equipment-admin select, .card select { display: block; max-width: 100%; margin-top: 4px; padding: 8px; font: inherit; color: var(--ink); border: 1px solid #a8bbcb; border-radius: 7px; background: white; }
.docs { margin: 0; padding: 0; list-style: none; } .docs li { padding: 7px 0; overflow-wrap: anywhere; }
@media (max-width: 1380px) { main { margin-inline: 2vw; } }
@media (max-width: 760px) {
  body { font-size: 15px; } header { padding: 12px 16px; } nav { gap: 6px 12px; }
  main { padding: 20px 14px 36px; margin: 10px 6px; border-radius: 10px; }
  .title-row { gap: 8px; } .filters { gap: 6px; } .chip { font-size: 14px; }
  .equipment,.equipment tbody,.sites,.sites tbody,.sites tfoot { display: block; }
  .equipment thead,.equipment thead tr { display: block; } .equipment th { display: none; }
  .equipment thead .pick-cell { display: block; width: auto; font-weight: 500; padding: 6px; }
  .equipment thead .pick-cell::after { content: 'Выбрать все по фильтру'; margin-left: 7px; }
  .equipment tbody tr { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; gap: 4px 8px; align-items: start; padding: 10px 2px; border-bottom: 1px solid var(--line); }
  .equipment td { display: block; width: auto; padding: 0; border: 0; }
  .equipment .pick-cell { grid-column: 1; grid-row: 1; } .equip-name { grid-column: 2; grid-row: 1; }
  .equipment .state { grid-column: 3; grid-row: 1; text-align: right; }
  .equipment .state .st { font-size: 12px; white-space: nowrap; padding-inline: 6px; }
  .equipment .serial { grid-column: 2; grid-row: 2; } .equipment .expires { grid-column: 3; grid-row: 2; text-align: right; }
  .equipment .quantity { grid-column: 2; grid-row: 3; }
  .equipment .verified { grid-column: 3; grid-row: 3; text-align: right; }
  .equipment .actions { grid-column: 2/-1; grid-row: 4; display: flex; flex-wrap: wrap; gap: 6px 16px; }
  .equipment .actions a + a { margin: 0; }
  .mobile-label { display: inline; } .serial,.expires,.quantity,.verified { font-size: 13px; }
  .equipment tr.group { background: #eff5fa; } .group td:last-child { grid-column: 2/-1; } .group-status { display: flex; margin: 5px 0 0; }
  .equipment tr.catalog-section { background: #e2edf5; } .catalog-section td:only-child { grid-column: 1/-1; }
  .equipment:not(:has(.pick-cell)) tbody tr { grid-template-columns: 0 minmax(0,1fr) auto; }
  .sites thead { display: none; } .sites tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 10px 4px; gap: 4px 16px; border-bottom: 1px solid var(--line); }
  .sites td { padding: 2px 0; border: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 4px; font-size: 14px; }
  .sites .site-name { grid-column: 1/-1; font-size: 18px; } .sites td[data-label]::before { content: attr(data-label); color: var(--muted); }
  .item-actions { align-items: stretch; flex-direction: column; text-align: center; }
  #bulk { gap: 8px; } .card { padding: 15px; }
}
