/* Компоненти .rgt-* (design-code §5). Єдиний файл, що знає про Bootstrap. Лише var(--…), без кольорів. */

/* Шрифти бренду (OFL-1.1, ліцензії — vendor/<родина>/LICENSE), локально: змінні woff2 з Google Fonts, лише latin і cyrillic (ADR-70).
   Onest — інтерфейс; Geologica — заголовки від 22 px і слово в логотипі; JetBrains Mono — лише коди одиниць і лоти. */
@font-face { font-family: "Geologica"; font-style: normal; font-weight: 500 600; font-display: swap; src: url("../vendor/geologica/geologica-cyrillic.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Geologica"; font-style: normal; font-weight: 500 600; font-display: swap; src: url("../vendor/geologica/geologica-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; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../vendor/onest/onest-cyrillic.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../vendor/onest/onest-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; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../vendor/jetbrains-mono/jetbrains-mono-cyrillic.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../vendor/jetbrains-mono/jetbrains-mono-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; }

/* --- Bootstrap: змінні й перевизначення --- */
:root {
  --bs-body-font-family: var(--sl-font); --bs-body-font-size: var(--sl-text-body); --bs-body-line-height: var(--sl-lh-body);
  --bs-body-bg: var(--sl-surface); --bs-body-color: var(--sl-on-surface);
  --bs-border-color: var(--sl-outline-variant);
  --bs-emphasis-color: var(--sl-on-surface); --bs-secondary-color: var(--sl-on-surface-variant);
}
.form-control::placeholder { color: transparent; }
.form-floating > .form-control, .form-floating > .form-select { height: var(--sl-control-h); min-height: var(--sl-control-h); border: 0; background-image: none; padding: calc(var(--sl-control-h) - var(--sl-lh-body) - var(--sl-space-1)) var(--sl-space-12) var(--sl-space-1) var(--sl-space-4); line-height: var(--sl-lh-body); }
.form-floating > label { color: var(--sl-on-surface-variant); height: auto; padding: 0 var(--sl-space-4); line-height: var(--sl-lh-body); transform: translateY(calc((var(--sl-control-h) - var(--sl-lh-body)) / 2)); }
.form-floating > .form-control:focus ~ label, .form-floating > .form-control:not(:placeholder-shown) ~ label, .form-floating > .form-select ~ label { transform: translateY(var(--sl-space-1)) scale(.75); opacity: 1; }
.form-floating > .form-control:focus ~ label::after, .form-floating > .form-control:not(:placeholder-shown) ~ label::after, .form-floating > .form-select ~ label::after { background: transparent; }
.form-floating > .form-control:focus ~ label { color: var(--sl-primary); }
.rgt-field__box.form-floating > .rgt-field__input ~ .rgt-field__label { color: var(--sl-on-surface-variant); }
.rgt-field__box.form-floating > .rgt-field__input:focus ~ .rgt-field__label { color: var(--sl-primary); }
.table { --bs-table-bg: transparent; --bs-table-color: var(--sl-on-surface); }
/* --- кінець перевизначень Bootstrap --- */

/* Основа */
html { margin: 0; background: var(--sl-surface); }
body.rgt-body { margin: 0; font-family: var(--sl-font); font-size: var(--sl-text-body); line-height: var(--sl-lh-body); background: var(--sl-surface); color: var(--sl-on-surface); }
h1 { margin: 0 0 var(--sl-space-3); font: var(--sl-headline-s); color: var(--sl-on-surface); text-wrap: balance; }
/* Geologica 600 від 22 px (05-visual-identity): щільний трекінг для всіх, хто бере display/headline/title-l */
h1, h2, .rgt-card__title, .rgt-dialog__title, .rgt-unit__name, .rgt-unit-confirm__title, .rgt-history__name, .rgt-table__caption, .rgt-scan-screen__title { letter-spacing: var(--sl-display-tracking); }
h2 { margin: 0 0 var(--sl-space-3); font: var(--sl-title-l); color: var(--sl-on-surface); text-wrap: balance; }
p { margin: 0 0 var(--sl-space-3); }
a { color: var(--sl-primary); }
.rgt-num, .rgt-table__num { font-variant-numeric: tabular-nums; }
.rgt-code { font-family: var(--sl-font-mono); font-variant-numeric: tabular-nums; letter-spacing: var(--sl-code-tracking); overflow-wrap: anywhere; }
.rgt-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

/* Розкладка */
.rgt-stack { display: flex; flex-direction: column; gap: var(--sl-space-4); }
.rgt-row { display: flex; flex-wrap: wrap; gap: var(--sl-space-3); align-items: center; }
.rgt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: var(--sl-space-4); }
.rgt-actions { display: flex; flex-wrap: wrap; gap: var(--sl-space-3); align-items: center; justify-content: flex-end; }
.rgt-card { background: var(--sl-card); border: 1px solid var(--sl-divider); border-radius: var(--sl-radius-lg); padding: var(--sl-space-5); box-shadow: var(--sl-shadow-card); }
.rgt-dl > div { display: flex; justify-content: space-between; gap: var(--sl-space-4); padding: var(--sl-space-3) 0; border-bottom: 1px solid var(--sl-divider); }
.rgt-dl > div:last-child { border-bottom: 0; }
.rgt-dl dt { font-weight: 400; color: var(--sl-on-surface-variant); }
.rgt-dl dd { margin: 0; font-weight: 500; text-align: right; color: var(--sl-on-surface); }

/* Каркас */
.rgt-topbar { display: flex; align-items: center; box-sizing: border-box; }
.rgt-topbar--desk { position: sticky; top: var(--sl-size-header-inset); z-index: var(--sl-z-header); height: var(--sl-header-h); margin: var(--sl-size-header-inset) var(--sl-space-4) 0; padding: 0 var(--sl-space-2) 0 var(--sl-space-3); gap: var(--sl-space-3); background: var(--sl-card); border: 1px solid var(--sl-divider); border-radius: var(--sl-radius-control); box-shadow: var(--sl-shadow-bar); }
.rgt-brand { display: flex; align-items: center; flex: 0 1 auto; min-width: 0; gap: calc(var(--sl-space-2) + 2px); color: var(--sl-on-surface); text-decoration: none; border-radius: var(--sl-radius-sm); }
.rgt-brand:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-brand__mark { display: inline-grid; place-items: center; flex: none; width: var(--sl-size-brand-mark); height: var(--sl-size-brand-mark); border-radius: var(--sl-radius-sm); background: var(--sl-secondary-container); color: var(--sl-on-secondary-container); }
.rgt-brand__name { min-width: 0; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9375rem; line-height: 1rem; font-weight: 700; }
.rgt-topbar__scan { margin-left: auto; min-width: 0; }
.rgt-topbar__actions { display: flex; align-items: center; flex: none; gap: var(--sl-space-2); }
.rgt-topbar--desk .rgt-icon-btn { width: var(--sl-header-item-h); height: var(--sl-header-item-h); }
.rgt-topbar__me[aria-current="page"] { background: var(--sl-secondary-container); color: var(--sl-on-secondary-container); }
.rgt-topbar__avatar { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: var(--sl-radius-full); background: var(--sl-tertiary-container); color: var(--sl-on-tertiary-container); font-size: var(--sl-text-label); line-height: 1; font-weight: 600; }
/* RGT-135 (ADR-62 §1): дзвіночок сповіщень; лічильник — ледачий фрагмент htmx */
.rgt-topbar__bell[aria-current="page"] { background: var(--sl-secondary-container); color: var(--sl-on-secondary-container); }
.rgt-topbar__badge { position: absolute; top: 0; right: 0; box-sizing: border-box; min-width: 1.125rem; height: 1.125rem; padding: 0 var(--sl-space-1); border-radius: var(--sl-radius-full); background: var(--sl-error); color: var(--sl-on-error); font-size: .6875rem; line-height: 1.125rem; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; pointer-events: none; }
.rgt-topbar--pult { height: var(--sl-pult-header-h); padding: var(--sl-space-2) var(--sl-space-1) 0 var(--sl-space-4); gap: var(--sl-space-3); }
.rgt-topbar--pult .rgt-brand__name { font-size: 1rem; line-height: 1.125rem; }
.rgt-topbar--pult .rgt-brand { min-height: var(--sl-size-target-touch); }
.rgt-topbar--pult .rgt-topbar__actions { margin-left: auto; gap: var(--sl-space-1); }
.rgt-topbar--pill { margin: var(--sl-space-2) var(--sl-space-2) 0; padding: 0 var(--sl-space-1); gap: var(--sl-space-1); background: var(--sl-card); border: 1px solid var(--sl-divider); border-radius: var(--sl-radius-control); box-shadow: var(--sl-shadow-bar); }
.rgt-topbar__title { flex: 1; min-width: 0; margin: 0; font-family: var(--sl-font-display); font-size: var(--sl-text-button); line-height: var(--sl-lh-button); font-weight: 600; letter-spacing: var(--sl-display-tracking); }
.rgt-main { min-width: 0; padding: var(--sl-space-2) var(--sl-page-pad) var(--sl-space-8); }
.rgt-page { max-width: var(--rgt-page-max); margin-inline: auto; }
.rgt-pult { max-width: var(--rgt-pult-max); margin-inline: auto; padding-bottom: calc(var(--sl-bottom-nav-h) + env(safe-area-inset-bottom)); }
/* Екран входу (ADR-70): тепле тло з м'якими плямами, плетіння стрічок, знак, що сплітається, картка з тінню */
.rgt-auth { position: relative; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sl-space-4); padding: var(--sl-space-6) var(--sl-space-4) var(--sl-space-8); box-sizing: border-box; overflow: hidden; background: radial-gradient(60% 50% at 85% 10%, var(--sl-tint-sky), transparent 70%), radial-gradient(50% 45% at 0% 95%, var(--sl-tint-sand), transparent 70%), radial-gradient(40% 35% at 55% 100%, var(--sl-tint-glass), transparent 70%), var(--sl-surface); }
.rgt-auth__card { position: relative; width: min(var(--sl-size-auth-card), 100%); border-radius: var(--sl-radius-xl); padding: var(--sl-space-6); }
.rgt-auth__card > h1 { font: var(--sl-headline-s); letter-spacing: var(--sl-display-tracking); }

/* Кнопка */
.rgt-btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: var(--sl-space-2);
  min-height: var(--sl-control-h); padding: 0 var(--sl-space-6); border: 0; border-radius: var(--sl-radius-control);
  font: inherit; font-size: var(--sl-text-button); line-height: var(--sl-lh-button); font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color var(--sl-duration-short) var(--sl-easing), box-shadow var(--sl-duration-medium) var(--sl-easing), transform var(--sl-duration-medium) var(--sl-easing);
}
.rgt-btn:has(> .rgt-icon:first-child) { padding-left: var(--sl-space-4); }
.rgt-btn > .rgt-icon { width: var(--sl-icon); height: var(--sl-icon); }
.rgt-btn::before { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); opacity: 0; transition: opacity var(--sl-duration-short) var(--sl-easing); }
.rgt-btn:hover::before { opacity: 1; }
.rgt-btn:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-btn:focus-visible::before, .rgt-btn:active::before { opacity: 1; background: color-mix(in srgb, currentColor var(--sl-state-pressed), transparent); }
.rgt-btn--filled { background: var(--sl-primary); color: var(--sl-on-primary); box-shadow: var(--sl-shadow-btn); }
.rgt-btn--filled:hover { background: var(--sl-primary-hover); box-shadow: var(--sl-shadow-btn-hover); transform: translateY(-1px); }
.rgt-btn--filled:active { transform: none; box-shadow: var(--sl-shadow-btn); }
.rgt-btn--tonal { background: var(--sl-secondary-container); color: var(--sl-on-secondary-container); }
.rgt-btn--outlined { background: color-mix(in srgb, var(--sl-card) 65%, transparent); color: var(--sl-primary); box-shadow: inset 0 0 0 1px var(--sl-outline); }
.rgt-btn--text { background: transparent; color: var(--sl-primary); padding: 0 var(--sl-space-3); }
.rgt-btn--danger { background: var(--sl-error); color: var(--sl-on-error); }
.rgt-btn--touch { min-height: var(--sl-size-target-touch); font-size: var(--md-type-touch-button); border-radius: var(--sl-radius-md); }
.rgt-btn--block { width: 100%; }
.rgt-card__header .rgt-btn, .rgt-table-toolbar .rgt-btn { min-height: var(--sl-control-h-sm); }
.rgt-btn:disabled, .rgt-btn[aria-disabled="true"] { background: color-mix(in srgb, var(--sl-on-surface) var(--sl-disabled-container), transparent); color: color-mix(in srgb, var(--sl-on-surface) var(--sl-disabled-content), transparent); box-shadow: none; cursor: not-allowed; }
.rgt-btn--text:disabled, .rgt-btn--text[aria-disabled="true"] { background: transparent; }
.rgt-btn--outlined:disabled, .rgt-btn--outlined[aria-disabled="true"] { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sl-on-surface) var(--sl-disabled-container), transparent); }
.rgt-btn:disabled::before, .rgt-btn[aria-disabled="true"]::before { opacity: 0; }
.rgt-is-loading { cursor: progress; opacity: .7; }
.rgt-btn__label { position: relative; }
.rgt-btn-reason { display: flex; flex-direction: column; gap: var(--sl-space-1); }
.rgt-btn-reason__text { margin: 0; font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }

/* Іконка */
.rgt-icon { width: var(--sl-icon); height: var(--sl-icon); fill: currentColor; flex: none; }
.rgt-icon--s { width: 1.125rem; height: 1.125rem; }
.rgt-icon--l { width: 1.75rem; height: 1.75rem; }

/* Іконкова кнопка (design-code §5; у панелі — розмір header-item) */
.rgt-icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; width: var(--sl-control-h); height: var(--sl-control-h); padding: 0; border: 0; border-radius: var(--sl-radius-full); background: transparent; color: var(--sl-on-surface-variant); text-decoration: none; cursor: pointer; }
.rgt-icon-btn::before { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.rgt-icon-btn:hover::before { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-icon-btn:active::before { background: color-mix(in srgb, currentColor var(--sl-state-pressed), transparent); }
.rgt-icon-btn:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-icon-btn__on, .rgt-icon-btn__off { display: inline-flex; }
.rgt-icon-btn[aria-pressed="true"] .rgt-icon-btn__off, .rgt-icon-btn:not([aria-pressed="true"]) .rgt-icon-btn__on { display: none; }
.rgt-icon-btn--filled { background: var(--sl-primary); color: var(--sl-on-primary); }

/* Поле / select (фон і підпис: див. перевизначення Bootstrap вище) */
.rgt-field { display: block; }
.rgt-field__box { position: relative; }
.rgt-field__box > .rgt-field__input {
  width: 100%; height: var(--sl-control-h); min-height: var(--sl-control-h); box-sizing: border-box; margin: 0; border: 0; border-radius: var(--sl-radius-md) var(--sl-radius-md) 0 0;
  background: var(--sl-surface-container); background-image: none; color: var(--sl-on-surface);
  box-shadow: inset 0 -1px 0 var(--sl-on-surface-variant); font-family: inherit; font-size: var(--sl-text-body);
}
.rgt-field__box > .rgt-field__input:focus { box-shadow: inset 0 -2px 0 var(--sl-primary); }
.rgt-field__input:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-field__label { color: var(--sl-on-surface-variant); }
.rgt-field__input:focus ~ .rgt-field__label { color: var(--sl-primary); }
.rgt-field--outlined .rgt-field__input { background: transparent; box-shadow: inset 0 0 0 1px var(--sl-outline); border-radius: var(--sl-radius-md); }
.rgt-field--outlined .rgt-field__input:focus { box-shadow: inset 0 0 0 2px var(--sl-primary); }
.rgt-field--outlined .rgt-field__input:focus-visible { outline: none; }
.rgt-is-invalid .rgt-field__input, .rgt-is-invalid .rgt-field__input:focus { box-shadow: inset 0 -2px 0 var(--sl-error); }
.rgt-is-invalid.rgt-field--outlined .rgt-field__input, .rgt-is-invalid.rgt-field--outlined .rgt-field__input:focus { box-shadow: inset 0 0 0 2px var(--sl-error); }
.rgt-is-invalid .rgt-field__label, .rgt-is-invalid .rgt-field__box > .rgt-field__input ~ .rgt-field__label, .rgt-is-invalid .rgt-field__box > .rgt-field__input:focus ~ .rgt-field__label { color: var(--sl-error); }
.rgt-field__suffix { position: absolute; top: 50%; right: var(--sl-space-3); transform: translateY(-50%); color: var(--sl-on-surface-variant); pointer-events: none; }
.rgt-field__chevron { position: absolute; top: 50%; right: var(--sl-space-3); display: inline-flex; transform: translateY(-50%); color: var(--sl-on-surface-variant); pointer-events: none; }
.rgt-field__icon { display: inline-flex; }
.rgt-field__box:not(.form-floating) > .rgt-field__input { padding: 0 var(--sl-space-12) 0 var(--sl-space-4); }
.rgt-field__box:has(> .rgt-field__icon) > .rgt-field__input { padding-right: var(--sl-space-12); }
.rgt-field__input[readonly] { color: var(--sl-on-surface-variant); }
.rgt-field--outlined .rgt-field__input[readonly] { background: var(--sl-inset); box-shadow: inset 0 0 0 1px var(--sl-outline-variant); }
.rgt-field--outlined .rgt-field__input[readonly]:focus { box-shadow: inset 0 0 0 2px var(--sl-primary); }
.rgt-field__hint { margin: var(--sl-space-1) var(--sl-space-4) 0; font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-field__error { margin: var(--sl-space-1) var(--sl-space-4) 0; display: flex; align-items: center; gap: var(--sl-space-1); font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-error); }
.rgt-field__error .rgt-icon { flex: none; height: var(--sl-lh-label); }
.rgt-field__input:disabled { color: color-mix(in srgb, var(--sl-on-surface) var(--sl-disabled-content), transparent); box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--sl-on-surface) var(--sl-disabled-container), transparent); }
.rgt-field--outlined .rgt-field__input:disabled { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sl-on-surface) var(--sl-disabled-container), transparent); }
.rgt-field--outlined .rgt-field__box.form-floating > .rgt-field__label { top: 0; left: var(--sl-space-3); height: auto; max-width: calc(100% - 2 * var(--sl-space-3)); padding: 0 var(--sl-space-1); border: 0; font-size: var(--sl-text-label); line-height: var(--sl-lh-label); background: var(--sl-card); transform: translateY(-50%); }
.rgt-field--outlined .rgt-field__box.form-floating > .rgt-field__input { padding-top: 0; padding-bottom: 0; }
.rgt-field__box > .rgt-field__input:disabled ~ .rgt-field__label { color: color-mix(in srgb, var(--sl-on-surface) var(--sl-disabled-content), transparent); }
.rgt-field--outlined .rgt-field__box.form-floating > .rgt-field__input:disabled ~ .rgt-field__label::after { background: transparent; }

/* Чип */
.rgt-chip { display: inline-flex; align-items: center; gap: var(--sl-space-1); height: var(--sl-status-h); box-sizing: border-box; padding: 0 var(--sl-space-3) 0 var(--sl-space-2); border-radius: var(--sl-radius-full); font-size: var(--sl-text-label); line-height: var(--sl-lh-label); font-weight: 500; white-space: nowrap; background: var(--sl-surface-container-highest); color: var(--sl-on-surface); }
.rgt-chip > .rgt-icon { width: 1rem; height: 1rem; }
.rgt-chip__label { line-height: 1; }
.rgt-chip--ok { background: var(--sl-st-ok-bg); color: var(--sl-st-ok-fg); }
.rgt-chip--ok > .rgt-icon { color: var(--sl-st-ok-ic); }
.rgt-chip--warn { background: var(--sl-st-warn-bg); color: var(--sl-st-warn-fg); }
.rgt-chip--warn > .rgt-icon { color: var(--sl-st-warn-ic); }
.rgt-chip--expired { background: var(--sl-st-expired-bg); color: var(--sl-st-expired-fg); }
.rgt-chip--expired > .rgt-icon { color: var(--sl-st-expired-ic); }
.rgt-chip--quarantine { background: var(--sl-st-quarantine-bg); color: var(--sl-st-quarantine-fg); }
.rgt-chip--quarantine > .rgt-icon { color: var(--sl-st-quarantine-ic); }
.rgt-chip--recalled { background: var(--sl-st-recalled-bg); color: var(--sl-st-recalled-fg); }
.rgt-chip--recalled > .rgt-icon { color: var(--sl-st-recalled-ic); }
.rgt-chip--transit { background: var(--sl-st-transit-bg); color: var(--sl-st-transit-fg); }
.rgt-chip--transit > .rgt-icon { color: var(--sl-st-transit-ic); }
.rgt-chip--finished { background: var(--sl-st-finished-bg); color: var(--sl-st-finished-fg); }
.rgt-chip--finished > .rgt-icon { color: var(--sl-st-finished-ic); }
.rgt-chip--neutral { background: var(--sl-surface-container-highest); color: var(--sl-on-surface); }

/* Етап і мітка (§1.3) */
.rgt-chip--stage { background: transparent; box-shadow: inset 0 0 0 1px var(--sl-outline-variant); color: var(--sl-on-surface); }
.rgt-chip--stage > .rgt-icon { color: var(--sl-on-surface-variant); }
.rgt-mark { display: inline-flex; align-items: center; gap: var(--sl-space-1); height: var(--sl-status-h); box-sizing: border-box; padding: 0 var(--sl-space-2); border: 1px solid var(--sl-outline); border-radius: var(--sl-radius-sm); background: transparent; color: var(--sl-on-surface); font-size: var(--sl-text-label); line-height: var(--sl-lh-label); font-weight: 500; white-space: nowrap; }
.rgt-mark > .rgt-icon { width: 1rem; height: 1rem; }
.rgt-mark--expired { border-color: var(--sl-st-expired-ic); color: var(--sl-st-expired-fg); }
.rgt-mark--expired > .rgt-icon { color: var(--sl-st-expired-ic); }
.rgt-mark--quarantine { border-color: var(--sl-st-quarantine-ic); color: var(--sl-st-quarantine-fg); }
.rgt-mark--quarantine > .rgt-icon { color: var(--sl-st-quarantine-ic); }
.rgt-mark--recalled { border-color: var(--sl-st-recalled-ic); color: var(--sl-st-recalled-fg); }
.rgt-mark--recalled > .rgt-icon { color: var(--sl-st-recalled-ic); }
.rgt-mark--storage { border-color: var(--sl-st-warn-ic); color: var(--sl-st-warn-fg); }
.rgt-mark--storage > .rgt-icon { color: var(--sl-st-warn-ic); }

/* Фільтр-чип, вхідний чип (§8.2) */
.rgt-filter-chip { position: relative; display: inline-flex; align-items: center; gap: var(--sl-space-2); height: var(--sl-chip-h); box-sizing: border-box; padding: 0 var(--sl-space-4); border: 0; border-radius: var(--sl-radius-full); background: transparent; box-shadow: inset 0 0 0 1px var(--sl-outline); color: var(--sl-on-surface-variant); font: inherit; font-size: var(--sl-text-body); line-height: var(--sl-lh-body); font-weight: 500; white-space: nowrap; cursor: pointer; }
.rgt-filter-chip:hover { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-filter-chip:focus-visible, .rgt-filter-chip:has(> :focus-visible) { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-filter-chip__input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.rgt-filter-chip > .rgt-icon { display: none; width: 1.125rem; height: 1.125rem; }
.rgt-filter-chip[aria-pressed="true"], .rgt-filter-chip:has(> :checked) { padding-left: var(--sl-space-2); background: var(--sl-secondary-container); color: var(--sl-on-secondary-container); box-shadow: none; }
.rgt-filter-chip[aria-pressed="true"] > .rgt-icon, .rgt-filter-chip:has(> :checked) > .rgt-icon { display: block; }
.rgt-input-chip { display: inline-flex; align-items: center; gap: var(--sl-space-1); height: var(--sl-chip-h); box-sizing: border-box; padding: 0 var(--sl-space-1) 0 var(--sl-space-3); border-radius: var(--sl-radius-full); box-shadow: inset 0 0 0 1px var(--sl-outline); color: var(--sl-on-surface); font-size: var(--sl-text-body); line-height: var(--sl-lh-body); font-weight: 500; white-space: nowrap; }
.rgt-input-chip__remove { display: inline-grid; place-items: center; width: var(--sl-size-chip-close); height: var(--sl-size-chip-close); padding: 0; border: 0; border-radius: var(--sl-radius-full); background: transparent; color: var(--sl-on-surface-variant); cursor: pointer; }
.rgt-input-chip__remove:hover { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-input-chip__remove:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-input-chip__remove > .rgt-icon { width: 1.125rem; height: 1.125rem; }

/* Банер */
.rgt-banner { display: flex; align-items: flex-start; gap: var(--sl-space-3); padding: var(--sl-space-4); border-radius: var(--sl-radius-lg); background: var(--sl-surface-container-highest); color: var(--sl-on-surface); }
.rgt-banner > .rgt-icon { color: var(--sl-on-surface-variant); }
.rgt-banner__body { flex: 1; min-width: 0; }
.rgt-banner__title { margin: 0 0 var(--sl-space-1); font-weight: 600; }
.rgt-banner__text { margin: 0; }
.rgt-banner--info { background: var(--sl-st-transit-bg); color: var(--sl-st-transit-fg); }
.rgt-banner--info > .rgt-icon { color: var(--sl-st-transit-ic); }
.rgt-banner--warning { background: var(--sl-st-warn-bg); color: var(--sl-st-warn-fg); }
.rgt-banner--warning > .rgt-icon { color: var(--sl-st-warn-ic); }
.rgt-banner--error { background: var(--sl-error-container); color: var(--sl-on-error-container); }
.rgt-banner--error > .rgt-icon { color: var(--sl-error); }
.rgt-banner--offline { background: var(--sl-surface-container-highest); color: var(--sl-on-surface); }
.rgt-banner--offline > .rgt-icon { color: var(--sl-on-surface-variant); }

/* Снекбар */
.rgt-snackbar-region { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--sl-space-6) + env(safe-area-inset-bottom)); z-index: var(--sl-z-snackbar); width: min(var(--sl-size-dialog), calc(100vw - 2 * var(--sl-space-4))); }
.rgt-snackbar { display: flex; align-items: center; gap: var(--sl-space-3); padding: var(--sl-space-3) var(--sl-space-2) var(--sl-space-3) var(--sl-space-4); border-radius: var(--sl-radius-md); background: var(--sl-inverse-surface); color: var(--sl-inverse-on-surface); }
.rgt-snackbar--error { background: var(--sl-error); color: var(--sl-on-error); }
.rgt-snackbar__text { flex: 1; min-width: 0; }
.rgt-snackbar__close { position: relative; width: var(--sl-control-h-sm); height: var(--sl-control-h-sm); flex: none; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: var(--sl-radius-full); background: transparent; color: inherit; cursor: pointer; }
.rgt-snackbar__close:hover { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-snackbar__close:focus-visible { outline: var(--sl-focus-width) solid currentColor; outline-offset: var(--sl-focus-offset); }

/* Діалог */
.rgt-dialog { width: 100%; max-width: min(var(--sl-size-dialog), 100vw - 2 * var(--sl-space-4)); box-sizing: border-box; padding: var(--sl-space-6); border: 0; border-radius: var(--sl-radius-xl); background: var(--sl-card); color: var(--sl-on-surface); box-shadow: var(--sl-shadow-3); }
.rgt-dialog--form { max-width: min(var(--sl-size-dialog), 100vw - 2 * var(--sl-space-4)); }
.rgt-dialog--narrow { max-width: min(var(--sl-size-dialog-narrow), 100vw - 2 * var(--sl-space-4)); }
.rgt-dialog--wide { max-width: min(var(--sl-size-dialog-wide), 100vw - 2 * var(--sl-space-4)); }
.rgt-dialog::backdrop { background: color-mix(in srgb, var(--sl-scrim) var(--sl-scrim-opacity), transparent); }
.rgt-dialog__title { margin: 0 0 var(--sl-space-3); font: var(--sl-title-l); }
.rgt-dialog__text { margin: 0 0 var(--sl-space-5); color: var(--sl-on-surface-variant); }
.rgt-dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: flex-start; gap: var(--sl-space-2); }
@media (max-width: 599px) {
  .rgt-dialog, .rgt-dialog--form, .rgt-dialog--narrow, .rgt-dialog--wide { margin: auto 0 0; width: 100%; max-width: none; border-radius: var(--sl-radius-xl) var(--sl-radius-xl) 0 0; }
}

/* Порожній стан */
.rgt-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--sl-space-2); padding: var(--sl-space-8); }
.rgt-empty > .rgt-icon { width: var(--sl-size-empty-icon); height: var(--sl-size-empty-icon); color: var(--sl-on-surface-variant); }
.rgt-empty__title { margin: 0; font: var(--sl-title-m); }
.rgt-empty__text { margin: 0; color: var(--sl-on-surface-variant); }

/* Таблиця */
.rgt-table-block { display: flex; flex-direction: column; gap: var(--sl-space-3); }
.rgt-table-toolbar { display: flex; flex-wrap: wrap; gap: var(--sl-space-2); align-items: center; justify-content: flex-end; }
.rgt-table-wrap { overflow-x: auto; background: var(--sl-card); border: 1px solid var(--sl-divider); border-radius: var(--sl-radius-lg); box-shadow: var(--sl-shadow-card); }
/* таблиця всередині картки — без власної тіні (підняття тоном) */
.rgt-card .rgt-table-wrap, .rgt-dialog .rgt-table-wrap { box-shadow: none; }
.rgt-table-wrap:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-table { margin: 0; min-width: var(--sl-size-table-min); border-collapse: separate; border-spacing: 0; font-size: var(--sl-text-table); line-height: var(--sl-lh-table); color: var(--sl-on-surface); }
.rgt-table th, .rgt-table td { height: var(--sl-row-h); padding: 0 var(--sl-space-4); vertical-align: middle; border-bottom: 1px solid var(--sl-divider); background: transparent; text-align: left; }
.rgt-table tbody tr:last-child > * { border-bottom: 0; }
.rgt-table thead th { position: sticky; top: 0; z-index: var(--sl-z-raised); font-weight: 500; font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); background: var(--sl-card); }
.rgt-table__caption { caption-side: top; text-align: left; padding: var(--sl-space-4) var(--sl-space-4) var(--sl-space-2); font: var(--sl-title-l); color: var(--sl-on-surface); }
/* числова колонка праворуч (мокапи Е1, Е2, Є1, Є2, З1, В1): 0,2,0 перемагає .rgt-table th/td (0,1,1) — RGT-272 G2 */
.rgt-table .rgt-table__num { text-align: right; }
.rgt-table__sub { display: var(--rgt-sub-display, block); font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-table__row--link { position: relative; }
.rgt-table__row--link:hover > * { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-table__link { color: inherit; text-decoration: none; }
.rgt-table__link::after { content: ""; position: absolute; inset: 0; }
.rgt-table__link:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-table__sort { display: inline-flex; align-items: center; gap: var(--sl-space-1); padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-decoration: none; cursor: pointer; }
.rgt-table__sort:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-table th[aria-sort="ascending"], .rgt-table th[aria-sort="descending"] { color: var(--sl-on-surface); }
.rgt-table__row--selected > *, .rgt-table tr[aria-selected="true"] > * { background: var(--sl-selected); }
.rgt-table .rgt-table__group > * { height: var(--sl-group-h); background: var(--sl-group-row); font-size: var(--sl-text-body); line-height: var(--sl-lh-body); font-weight: 600; color: var(--sl-on-surface); }
.rgt-table__group-label { display: inline-flex; align-items: center; gap: var(--sl-space-2); }
.rgt-table__group-toggle { display: inline-grid; place-items: center; width: var(--sl-size-node-icon); height: var(--sl-size-node-icon); padding: 0; border: 0; border-radius: var(--sl-radius-full); background: transparent; color: var(--sl-on-surface-variant); cursor: pointer; }
.rgt-table__group-toggle:hover { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-table__group-toggle:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-table__group-toggle > .rgt-icon { transition: transform var(--sl-duration-short) var(--sl-easing); }
.rgt-table__group-toggle[aria-expanded="false"] > .rgt-icon { transform: rotate(-90deg); }
.rgt-table__count { display: inline-flex; align-items: center; justify-content: center; min-width: var(--sl-space-6); height: var(--sl-space-5); box-sizing: border-box; padding: 0 var(--sl-space-2); border-radius: var(--sl-radius-full); background: var(--sl-surface-container-high); color: var(--sl-on-surface-variant); font-size: var(--sl-text-label); font-weight: 500; font-variant-numeric: tabular-nums; }

/* Картка одиниці */
.rgt-unit-card { max-width: 100%; border-radius: var(--sl-radius-xl); }
.rgt-unit-card__title { margin: 0 0 var(--sl-space-3); font: var(--sl-headline-s); }

/* Скан (§8.4: пігулка; на пульті — велике поле) */
.rgt-scan { display: flex; align-items: center; gap: var(--sl-space-2); }
.rgt-scan__input { flex: 1; min-width: 0; height: var(--sl-control-h); box-sizing: border-box; padding: 0 var(--sl-space-4); border: 0; border-radius: var(--sl-radius-control); background: var(--sl-surface-container); color: var(--sl-on-surface); font: inherit; font-size: var(--sl-text-body); box-shadow: inset 0 0 0 1px var(--sl-outline); }
.rgt-scan__input::placeholder { color: var(--sl-on-surface-variant); }
.rgt-scan__input:focus { background: var(--sl-surface-container-high); color: var(--sl-on-surface); box-shadow: inset 0 0 0 2px var(--sl-primary); }
.rgt-scan__input:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-scan > .rgt-icon { color: var(--sl-on-surface-variant); }
.rgt-scan--header { width: var(--sl-header-scan-w); max-width: 100%; height: var(--sl-header-item-h); box-sizing: border-box; padding: 0 var(--sl-header-item-pad); gap: calc(var(--sl-space-2) + 2px); border-radius: var(--sl-radius-control); background: var(--sl-surface-container-low); color: var(--sl-on-surface-variant); }
.rgt-scan--header .rgt-scan__input, .rgt-scan--header .rgt-scan__input:focus { height: 100%; padding: 0; border-radius: 0; background: transparent; box-shadow: none; }
.rgt-scan--header .rgt-scan__input:focus-visible { outline: none; }
.rgt-scan--header:focus-within { box-shadow: inset 0 0 0 2px var(--sl-primary); }
.rgt-scan--touch { height: var(--sl-size-scan-touch); box-sizing: border-box; padding: 0 var(--sl-space-1) 0 var(--sl-space-5); gap: var(--sl-space-3); border: 2px solid var(--sl-primary); border-radius: var(--sl-radius-md); background: var(--sl-card); box-shadow: var(--sl-shadow-card); }
.rgt-scan--touch > .rgt-icon { color: var(--sl-primary); }
.rgt-scan--touch .rgt-scan__input, .rgt-scan--touch .rgt-scan__input:focus { height: 100%; padding: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: var(--sl-text-button); }
.rgt-scan--touch .rgt-scan__input:focus-visible { outline: none; }
.rgt-scan--touch:focus-within { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-scan--touch .rgt-icon-btn { width: var(--sl-size-target-touch); height: var(--sl-size-target-touch); }
.rgt-camera { width: 100%; max-width: 30rem; border-radius: var(--sl-radius-xl); overflow: hidden; }

/* Навігація */
.rgt-nav { display: block; min-width: 0; }
.rgt-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--sl-space-1); }
.rgt-nav__item { position: relative; display: flex; align-items: center; gap: var(--sl-space-3); border-radius: var(--sl-radius-control); color: var(--sl-on-surface-variant); text-decoration: none; font-weight: 500; }
.rgt-nav__item:hover::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-nav__item:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-nav__label { min-width: 0; }
.rgt-nav--top { flex: 0 1 auto; overflow-x: auto; }
.rgt-nav--top .rgt-nav__list { gap: 2px; }
.rgt-nav--top .rgt-nav__item { height: var(--sl-header-item-h); padding: 0 var(--sl-header-item-pad); white-space: nowrap; }
.rgt-nav--top .rgt-nav__item.rgt-is-active { padding: 0 var(--sl-space-4); background: var(--sl-secondary-container); color: var(--sl-on-secondary-container); font-weight: 600; }
/* RGT-342 (ADR-30 доп. RGT-342): від 1200 px пункти розділів не стискаються й не прокручуються — місце віддають назва бренду й поле скану (не вужче 10rem); 840–1199 — шухляда «Меню» (RGT-358) */
@media (min-width: 1200px) {
  .rgt-nav--top { flex: none; }
  .rgt-topbar__scan { min-width: 10rem; }
}
.rgt-nav--sub { height: var(--sl-subnav-h); box-sizing: border-box; padding: 0 var(--sl-page-pad) 0 calc(var(--sl-page-pad) + var(--sl-space-1)); overflow-x: auto; }
.rgt-nav--sub .rgt-nav__list { height: 100%; align-items: stretch; }
.rgt-nav--sub .rgt-nav__item { height: 100%; flex: none; padding: 0 var(--sl-space-3); border-radius: 0; }
.rgt-nav--sub .rgt-nav__item:focus-visible { outline-offset: calc(-1 * (var(--sl-focus-width) + var(--sl-focus-offset))); }
.rgt-nav--sub .rgt-nav__item.rgt-is-active { color: var(--sl-on-surface); font-weight: 600; }
.rgt-nav--sub .rgt-nav__item.rgt-is-active::after { content: ""; position: absolute; left: var(--sl-space-3); right: var(--sl-space-3); bottom: var(--sl-space-1); height: var(--sl-size-selected-bar); border-radius: var(--sl-radius-full); background: var(--sl-primary); }
.rgt-nav--bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--sl-z-header); box-sizing: border-box; min-height: calc(var(--sl-bottom-nav-h) + env(safe-area-inset-bottom)); padding: var(--sl-space-2) var(--sl-space-1) calc(var(--sl-space-3) + env(safe-area-inset-bottom)); background: var(--sl-card); border-top: 1px solid var(--sl-divider); }
.rgt-nav--bar .rgt-nav__list { max-width: var(--sl-size-pult-max); margin-inline: auto; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; }
.rgt-nav--bar .rgt-nav__item { flex-direction: column; justify-content: flex-start; gap: var(--sl-space-1); padding: 0; border-radius: var(--sl-radius-md); font: var(--sl-label-m); text-align: center; }
.rgt-nav--bar .rgt-nav__item:hover::before { background: none; }
.rgt-nav--bar .rgt-nav__item:not(.rgt-is-active):hover .rgt-nav__icon { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-nav__icon { display: inline-flex; align-items: center; justify-content: center; width: var(--sl-nav-indicator-w); height: var(--sl-nav-indicator-h); border-radius: var(--sl-radius-full); }
.rgt-nav--bar .rgt-nav__item.rgt-is-active { color: var(--sl-on-surface); font-weight: 600; }
.rgt-nav--bar .rgt-is-active .rgt-nav__icon { background: var(--sl-secondary-container); color: var(--sl-on-secondary-container); }
.rgt-nav__item--fab { color: var(--sl-primary); font-weight: 600; }
.rgt-nav__item--fab .rgt-nav__icon { box-sizing: border-box; width: var(--sl-scan-fab); height: var(--sl-scan-fab); margin-top: calc(-1 * var(--sl-size-fab-lift)); border: var(--sl-size-fab-ring) solid var(--sl-surface); background: var(--sl-primary); color: var(--sl-on-primary); }
.rgt-nav__item--fab .rgt-icon { width: 1.75rem; height: 1.75rem; }

/* Індикатор htmx (design-code §5) */
.rgt-indicator { opacity: 0; visibility: hidden; }
.rgt-is-requesting .rgt-indicator, .rgt-is-requesting.rgt-indicator { opacity: 1; visibility: visible; transition: opacity var(--md-dur-short) var(--md-ease-standard) var(--rgt-indicator-delay), visibility 0s linear var(--rgt-indicator-delay); }
[aria-busy="true"]:not(.rgt-btn) { opacity: .6; cursor: progress; transition: opacity var(--md-dur-short) var(--md-ease-standard) var(--rgt-indicator-delay); }
.rgt-btn.rgt-is-requesting { cursor: progress; }

/* Перемикач, прапорець (design-code §5) */
.rgt-switch, .rgt-checkbox { display: block; }
.rgt-switch__row, .rgt-checkbox__row { position: relative; display: flex; align-items: center; gap: var(--sp-3); min-height: var(--rgt-target); cursor: pointer; }
.rgt-switch__row { justify-content: space-between; gap: var(--sp-4); }
.rgt-checkbox__row { display: inline-flex; }
.rgt-switch__row:has(> :disabled), .rgt-checkbox__row:has(> :disabled) { opacity: .38; cursor: not-allowed; }
.rgt-switch__label, .rgt-checkbox__label { min-width: 0; }
.rgt-switch__label { flex: 1; }
.rgt-switch__input, .rgt-checkbox__input, .rgt-segmented__input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.rgt-switch__track { position: relative; flex: none; box-sizing: border-box; width: 3.25rem; height: 2rem; border: 2px solid var(--md-outline); border-radius: var(--md-shape-full); background: var(--md-surface-container-highest); transition: background-color var(--md-dur-short) var(--md-ease-standard); }
.rgt-switch__handle { position: absolute; top: 50%; left: .375rem; width: 1rem; height: 1rem; border-radius: var(--md-shape-full); background: var(--md-outline); transform: translateY(-50%); transition: left var(--md-dur-short) var(--md-ease-standard), width var(--md-dur-short) var(--md-ease-standard), height var(--md-dur-short) var(--md-ease-standard); }
.rgt-switch__input:checked + .rgt-switch__track { border-color: var(--md-primary); background: var(--md-primary); }
.rgt-switch__input:checked + .rgt-switch__track > .rgt-switch__handle { left: 1.375rem; width: 1.5rem; height: 1.5rem; background: var(--md-on-primary); }
.rgt-switch__input:focus-visible + .rgt-switch__track, .rgt-checkbox__input:focus-visible + .rgt-checkbox__box { outline: var(--md-focus-ring) solid var(--md-primary); outline-offset: var(--md-focus-offset); }
.rgt-checkbox__box { flex: none; box-sizing: border-box; display: inline-grid; place-items: center; width: 1.125rem; height: 1.125rem; border: 2px solid var(--md-on-surface-variant); border-radius: var(--md-shape-xs); color: var(--md-on-primary); }
.rgt-checkbox__box > .rgt-icon { width: .875rem; height: .875rem; visibility: hidden; }
.rgt-checkbox__input:checked + .rgt-checkbox__box { border-color: var(--md-primary); background: var(--md-primary); }
.rgt-checkbox__input:checked + .rgt-checkbox__box > .rgt-icon { visibility: visible; }
.rgt-is-invalid .rgt-checkbox__box { border-color: var(--md-error); }
.rgt-checkbox > .rgt-field__hint, .rgt-checkbox > .rgt-field__error { margin-left: calc(1.125rem + var(--sp-3)); }

/* Сегментовані кнопки (design-code §5) */
.rgt-segmented { min-width: 0; margin: 0; padding: 0; border: 0; }
.rgt-segmented__legend { float: none; width: auto; margin: 0 0 var(--sp-2); padding: 0; font-size: var(--rgt-fs-label); line-height: inherit; color: var(--md-on-surface-variant); }
.rgt-segmented__track { display: inline-flex; max-width: 100%; }
.rgt-segmented__option { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); min-height: var(--rgt-target); min-width: 3rem; padding: 0 var(--sp-4); margin-left: -1px; border: 1px solid var(--md-outline); font-weight: 500; font-size: var(--rgt-fs-button); color: var(--md-on-surface); cursor: pointer; }
.rgt-segmented__option:first-child { margin-left: 0; border-radius: var(--sl-radius-control) 0 0 var(--sl-radius-control); }
.rgt-segmented__option:last-child { border-radius: 0 var(--sl-radius-control) var(--sl-radius-control) 0; }
.rgt-segmented__label { white-space: nowrap; }
.rgt-segmented__option > .rgt-icon { display: none; }
.rgt-segmented__option:has(> :checked) { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.rgt-segmented__option:has(> :checked) > .rgt-icon { display: block; }
.rgt-segmented__option:not(:has(> :checked)):hover { background: color-mix(in srgb, currentColor var(--md-state-hover), transparent); }
.rgt-segmented__option:has(> :focus-visible) { z-index: 1; outline: var(--md-focus-ring) solid var(--md-primary); outline-offset: var(--md-focus-offset); }
.rgt-segmented:disabled .rgt-segmented__option { opacity: .38; cursor: not-allowed; }

/* Числове поле (design-code §5, field number) */
.rgt-field--number .rgt-field__input { font-variant-numeric: tabular-nums; }

/* Дерево (design-code §5, §6.1) */
.rgt-tree, .rgt-tree__group { list-style: none; margin: 0; padding: 0; }
.rgt-tree__group { margin-left: calc(var(--sl-size-tree-indent) / 2 - var(--sl-size-tree-guide) / 2); padding-left: calc(var(--sl-size-tree-indent) / 2 - var(--sl-size-tree-guide) / 2); border-left: var(--sl-size-tree-guide) solid var(--sl-divider); }
.rgt-tree__node:has(> .rgt-tree__group [aria-current="page"]) > .rgt-tree__group { border-left-color: var(--sl-primary); }
.rgt-tree__node { margin: 0; }
.rgt-tree__row { display: flex; align-items: stretch; gap: var(--sl-space-1); min-height: var(--sl-tree-row-h); }
.rgt-tree__toggle { flex: none; align-self: center; display: inline-grid; place-items: center; width: var(--sl-size-tree-indent); height: var(--sl-size-tree-indent); padding: 0; border: 0; border-radius: var(--sl-radius-full); background: transparent; color: var(--sl-on-surface-variant); cursor: pointer; }
.rgt-tree__toggle:hover { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-tree__toggle > .rgt-icon { transition: transform var(--sl-duration-short) var(--sl-easing); }
.rgt-tree__toggle:has(+ [aria-expanded="true"]) > .rgt-icon { transform: rotate(90deg); }
.rgt-tree__spacer { flex: none; width: var(--sl-size-tree-indent); }
.rgt-tree__item { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--sl-space-3); padding: 0 var(--sl-space-3); border-radius: var(--sl-radius-md); color: var(--sl-on-surface); text-decoration: none; }
.rgt-tree__item:hover { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-tree__item:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-tree__item[aria-current="page"], .rgt-tree__item[aria-selected="true"] { background: var(--sl-selected); color: var(--sl-on-surface); font-weight: 600; box-shadow: inset var(--sl-size-selected-bar) 0 0 var(--sl-primary); }
.rgt-tree__label { min-width: 0; overflow-wrap: anywhere; }
.rgt-tree__meta { margin-left: auto; font-size: var(--sl-text-label); font-variant-numeric: tabular-nums; color: var(--sl-on-surface-variant); }
.rgt-tree__icon { flex: none; display: inline-grid; place-items: center; width: var(--sl-size-node-icon); height: var(--sl-size-node-icon); border-radius: var(--sl-radius-sm); background: var(--sl-surface-container-high); color: var(--sl-on-surface-variant); }
.rgt-tree__icon > .rgt-icon { width: var(--sl-icon); height: var(--sl-icon); }
.rgt-tree__icon--lab { background: var(--sl-primary-container); color: var(--sl-on-primary-container); }
.rgt-tree__item--archived { color: var(--sl-on-surface-variant); }
.rgt-tree__badge { flex: none; padding: 0 var(--sl-space-1); border: 1px solid var(--sl-outline-variant); border-radius: var(--sl-radius-sm); font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-tree-grid { display: block; min-width: 0; }
.rgt-tree__head { display: flex; align-items: center; gap: var(--sl-space-3); height: var(--sl-group-h); padding-left: calc(var(--sl-size-tree-indent) + var(--sl-space-1) + var(--sl-space-3) + var(--sl-size-node-icon) + var(--sl-space-3)); border-bottom: 1px solid var(--sl-divider); font-size: var(--sl-text-label); color: var(--sl-on-surface-variant); }
.rgt-tree__head-name { flex: 1; }
.rgt-tree__head > .rgt-tree__menu-slot { margin-left: var(--sl-space-1); }
.rgt-tree__head .rgt-tree__cell { font-size: var(--sl-text-label); }
.rgt-tree__cell { flex: 0 0 var(--sl-size-tree-col); overflow-wrap: anywhere; color: var(--sl-on-surface-variant); font-size: var(--sl-text-table); }
.rgt-tree__cell--num { flex-basis: var(--sl-size-tree-col-num); text-align: right; font-variant-numeric: tabular-nums; }
.rgt-tree__menu-slot { flex: none; width: var(--sl-control-h); display: inline-grid; place-items: center; }
.rgt-tree-grid .rgt-tree__row { border-bottom: 1px solid var(--sl-divider); }
.rgt-tree-grid .rgt-tree__label { flex: 0 1 auto; }
.rgt-tree__fill { flex: 1 1 auto; min-width: 0; }
@media (max-width: 719px) {
  .rgt-tree__cell, .rgt-tree__head .rgt-tree__cell { display: none; }
}

/* Меню (ui/menu.html, нативний popover; позиціює ui/js/app.js) */
.rgt-menu { margin: 0; inset: auto; min-width: var(--sl-size-menu-min); padding: var(--sl-space-2) 0; border: 0; border-radius: var(--sl-radius-md); background: var(--sl-surface-container); color: var(--sl-on-surface); box-shadow: var(--sl-shadow-2); z-index: var(--sl-z-menu); }
.rgt-menu__list { list-style: none; margin: 0; padding: 0; }
.rgt-menu__entry:has(> .rgt-menu__item--danger) { padding-top: var(--sl-space-2); border-top: 1px solid var(--sl-divider); }
.rgt-menu__item { display: flex; align-items: center; gap: var(--sl-space-3); min-height: var(--sl-control-h); padding: 0 var(--sl-space-4); color: var(--sl-on-surface); text-decoration: none; }
.rgt-menu__item:not([aria-disabled="true"]):hover { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-menu__item:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-menu__item--danger { color: var(--sl-error); }
.rgt-menu__item[aria-disabled="true"] { color: color-mix(in srgb, var(--sl-on-surface) var(--sl-disabled-content), transparent); cursor: default; flex-wrap: wrap; }
.rgt-menu__label { flex: 1; }
.rgt-menu__reason { flex-basis: 100%; font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-menu__button { flex: none; }

/* RGT-230 (ADR-30): компактна шапка ПК (< 840 px) і шухляда навігації (нативний dialog) */
/* RGT-407 (ADR-30 доп. RGT-407 Д1): «Меню» — першим у шапці, ліворуч від бренду; дзвіночок праворуч (єдиний auto-відступ) */
.rgt-topbar__compact { display: none; align-items: center; flex: none; gap: var(--sl-space-2); }
/* «Меню» на телефоні — ціль 48 (M3), не 40 панелі ПК (RGT-272 G2) */
.rgt-topbar__compact .rgt-icon-btn { width: 3rem; height: 3rem; }
.rgt-phone-bar { display: none; }
button.rgt-nav__item { border: 0; background: transparent; font: inherit; cursor: pointer; }
@media (max-width: 839px) {
  .rgt-topbar--desk { gap: var(--sl-space-2); padding-left: var(--sl-space-1); }
  .rgt-topbar--desk > .rgt-nav--top, .rgt-topbar--desk > .rgt-topbar__scan, .rgt-topbar--desk > .rgt-topbar__actions { display: none; }
  .rgt-topbar__compact { display: flex; }
  .rgt-topbar--desk > .rgt-topbar__bell { width: 3rem; height: 3rem; margin-left: auto; }
  .rgt-phone-bar { display: block; }
  .rgt-topbar--desk ~ .rgt-main { padding-bottom: calc(var(--sl-bottom-nav-h) + var(--sl-size-fab-lift) + env(safe-area-inset-bottom) + var(--sl-space-4)); }
}
/* RGT-358 (ADR-30 доп. RGT-358/360 Д1): 840–1199 px — розділи в шухляді «Меню» (як нижче 840), поле скану й кнопки панелі лишаються; від 1200 — меню в панелі (RGT-342) */
@media (min-width: 840px) and (max-width: 1199px) {
  .rgt-topbar--desk > .rgt-nav--top { display: none; }
  .rgt-topbar__compact { display: flex; }
  .rgt-topbar__compact .rgt-icon-btn { width: var(--sl-header-item-h); height: var(--sl-header-item-h); }
}
html:has(.rgt-drawer[open]) { overflow: hidden; }
.rgt-drawer { position: fixed; inset: 0 auto 0 0; box-sizing: border-box; width: min(var(--sl-size-drawer), 100vw - var(--sl-space-12)); max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0 var(--sl-radius-xl) var(--sl-radius-xl) 0; overflow: hidden; background: var(--sl-surface-container-low); color: var(--sl-on-surface); box-shadow: var(--sl-shadow-3); }
.rgt-drawer::backdrop { background: color-mix(in srgb, var(--sl-scrim) var(--sl-scrim-opacity), transparent); }
.rgt-drawer__sheet { display: flex; flex-direction: column; gap: var(--sl-space-2); box-sizing: border-box; height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: var(--sl-space-3) var(--sl-space-3) calc(var(--sl-space-3) + env(safe-area-inset-bottom)); }
.rgt-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sl-space-2); padding-left: var(--sl-space-4); }
.rgt-drawer__title { margin: 0; font: var(--sl-title-s); }
.rgt-nav--drawer .rgt-nav__list { flex-direction: column; gap: 0; }
.rgt-nav--drawer .rgt-nav__item { min-height: var(--sl-size-target-touch); padding: 0 var(--sl-space-4); }
.rgt-nav--drawer .rgt-nav__item.rgt-is-active { background: var(--sl-secondary-container); color: var(--sl-on-secondary-container); font-weight: 600; }
.rgt-drawer__footer { display: flex; flex-direction: column; margin-top: auto; padding-top: var(--sl-space-2); border-top: 1px solid var(--sl-divider); }
.rgt-drawer__logout { margin: 0; }
.rgt-drawer__item { display: flex; align-items: center; gap: var(--sl-space-3); box-sizing: border-box; width: 100%; min-height: var(--sl-size-target-touch); padding: 0 var(--sl-space-4); border: 0; border-radius: var(--sl-radius-control); background: transparent; color: var(--sl-on-surface-variant); font: inherit; font-weight: 500; text-align: left; cursor: pointer; }
.rgt-drawer__item:hover { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-drawer__item:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-drawer__item[aria-pressed="true"] { color: var(--sl-on-surface); font-weight: 600; }
.rgt-drawer__label { flex: 1; min-width: 0; }
/* RGT-407: хто увійшов — угорі шухляди, посилання на профіль */
.rgt-drawer__user { display: flex; align-items: center; gap: var(--sl-space-3); min-height: var(--sl-size-target-touch); padding: var(--sl-space-2) var(--sl-space-4); border-radius: var(--sl-radius-lg); color: var(--sl-on-surface); text-decoration: none; }
.rgt-drawer__user:hover { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-drawer__user:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-drawer__avatar { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: var(--sl-radius-full); background: var(--sl-tertiary-container); color: var(--sl-on-tertiary-container); font-size: var(--sl-text-label); line-height: 1; font-weight: 600; }
.rgt-drawer__who { display: flex; flex-direction: column; min-width: 0; }
.rgt-drawer__name { font-weight: 600; overflow-wrap: anywhere; }
.rgt-drawer__org { font: var(--sl-body-s); color: var(--sl-on-surface-variant); overflow-wrap: anywhere; }

.rgt-tree-path { padding: var(--sl-space-2) var(--sl-space-5); font-size: var(--sl-text-label); color: var(--sl-on-surface-variant); border-bottom: 1px solid var(--sl-divider); }
.rgt-tree-path__list { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.rgt-tree-path__item { min-width: 0; overflow-wrap: anywhere; }
.rgt-tree-path__item + .rgt-tree-path__item::before { content: "›"; margin: 0 var(--sl-space-1); }
.rgt-tree-path__item:last-child { color: var(--sl-on-surface); }

/* RGT-238 (ADR-33): одне дерево структури з карткою */
.rgt-brand__mark--initials { font-size: var(--sl-text-label); line-height: 1; font-weight: 700; letter-spacing: .02em; }
@media (max-width: 839px) {
  .rgt-topbar--desk .rgt-brand__name { max-width: none; }
}
.rgt-structure { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sl-space-4); align-items: start; }
.rgt-structure > .rgt-tree-path, .rgt-structure__tools { grid-column: 1 / -1; }
.rgt-structure__tools { display: flex; align-items: center; justify-content: flex-end; gap: var(--sl-space-3); }
/* RGT-252 (ADR-52): пошук у структурі — пігулка ліворуч від «Архівні», результати замість дерева */
.rgt-structure__bar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-3); }
.rgt-structure__bar > .rgt-structure__tools { flex: 1 1 auto; }
.rgt-structure__search { flex: 0 1 23.75rem; max-width: 100%; }
.rgt-structure__search .rgt-search__input { height: var(--sl-control-h-sm); }
.rgt-structure__results { min-width: 0; }
.rgt-structure-found__text { display: flex; flex: 1; flex-direction: column; min-width: 0; padding: var(--sl-space-2) 0; }
.rgt-structure-found__path { font-size: var(--sl-text-label); color: var(--sl-on-surface-variant); overflow-wrap: anywhere; }
.rgt-structure__tree { padding: var(--sl-space-2) 0; overflow: hidden; min-width: 0; }
.rgt-structure-card { min-width: 0; }
.rgt-structure-card__head { display: flex; align-items: center; gap: var(--sl-space-3); }
.rgt-structure-card__title { margin: 0; font: var(--sl-title-l); overflow-wrap: anywhere; }
.rgt-structure-card__title:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-structure-card__type { font-size: var(--sl-text-label); color: var(--sl-on-surface-variant); }
.rgt-structure-card__subtitle { margin: var(--sl-space-4) 0 var(--sl-space-2); font: var(--sl-title-s); }
.rgt-structure-card__units { display: flex; flex-wrap: wrap; gap: var(--sl-space-2); margin: 0; padding: 0; list-style: none; }
.rgt-structure-card__actions { display: flex; flex-wrap: wrap; gap: var(--sl-space-2); }
.rgt-structure-card__actions { margin-top: var(--sl-space-4); }
.rgt-structure-card__back { display: none; }
.rgt-structure-card__hint { color: var(--sl-on-surface-variant); }
.rgt-structure-card__foreign { color: var(--sl-error); border-radius: var(--sl-radius-xs); }
.rgt-structure-card__foreign:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-structure__level { display: none; }
.rgt-tree-level__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sl-space-3); }
.rgt-tree-level__title { margin: 0; font: var(--sl-title-m); overflow-wrap: anywhere; scroll-margin-top: calc(var(--sl-size-header-inset) + var(--sl-header-h) + var(--sl-space-2)); }
.rgt-tree-level__list { margin: 0; padding: 0; list-style: none; }
.rgt-tree-level__row { display: flex; align-items: center; gap: var(--sl-space-3); min-height: var(--sl-size-target-touch); padding: 0 var(--sl-space-4); color: var(--sl-on-surface); text-decoration: none; border-bottom: 1px solid var(--sl-divider); }
.rgt-tree-level__row:hover { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-tree-level__row:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-tree-level__label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rgt-tree-level__meta { font-size: var(--sl-text-label); color: var(--sl-on-surface-variant); }
.rgt-tree-level__shown { font-size: var(--sl-text-label); color: var(--sl-on-surface-variant); padding: var(--sl-space-2) var(--sl-space-4); }
.rgt-tree-path__link { color: inherit; text-decoration: none; border-radius: var(--sl-radius-xs); }
.rgt-tree-path__link:hover { text-decoration: underline; }
.rgt-tree-path__link:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-tree__item--more { color: var(--sl-primary); font-weight: 500; }
.rgt-tree__more { list-style: none; }
.rgt-structure--intro .rgt-structure__tree { grid-column: 1 / -1; }
@media (min-width: 840px) {
  .rgt-structure { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rgt-structure-card { position: sticky; top: calc(var(--sl-header-h) + var(--sl-space-4)); }
}
@media (min-width: 1200px) {
  .rgt-structure { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
}
@media (max-width: 839px) {
  .rgt-structure__tree { display: none; }
  .rgt-structure__level { display: block; }
  .rgt-structure-card { display: none; }
  .rgt-structure--card .rgt-structure__level { display: none; }
  .rgt-structure--card .rgt-structure-card { display: block; }
  .rgt-structure--card .rgt-structure-card__back { display: inline-flex; }
  .rgt-structure__tools { justify-content: flex-start; }
  .rgt-structure__search { flex: 1 1 100%; }
  .rgt-structure--search .rgt-structure-card { display: none; }
  .rgt-structure--intro .rgt-structure__tree { display: block; }
  .rgt-structure--intro .rgt-structure__level { display: none; }
}
/* онбординг / порожній стан: картки немає (після телефонних правил, щоб перемагати) */
.rgt-structure--intro .rgt-structure-card { display: none; }

/* Пошук (§3: пігулка) */
.rgt-search { display: flex; align-items: center; gap: var(--sl-space-2); min-height: var(--sl-control-h); padding: 0 var(--sl-space-1) 0 var(--sl-space-4); border-radius: var(--sl-radius-control); background: var(--sl-surface-container-high); box-shadow: inset 0 0 0 1px var(--sl-outline); color: var(--sl-on-surface); }
.rgt-search > .rgt-icon { color: var(--sl-on-surface-variant); }
.rgt-search__input { flex: 1; min-width: 0; height: var(--sl-control-h); box-sizing: border-box; padding: 0; border: 0; background: transparent; color: var(--sl-on-surface); font: inherit; font-size: var(--sl-text-body); appearance: none; }
.rgt-search__input::placeholder { color: var(--sl-on-surface-variant); opacity: 1; }
.rgt-search__input:focus-visible { outline: 0; }
.rgt-search:has(.rgt-search__input:focus-visible) { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-dialog .rgt-search { min-height: var(--sl-control-h-sm); padding: 0 var(--sl-space-3); gap: var(--sl-space-2); background: var(--sl-inset); box-shadow: none; }
.rgt-dialog .rgt-search > .rgt-icon { width: 1.125rem; height: 1.125rem; }
.rgt-dialog .rgt-search__input { height: var(--sl-control-h-sm); }
.rgt-dialog .rgt-search .rgt-btn { min-height: var(--sl-chip-h); }
.rgt-search-results { display: flex; flex-direction: column; gap: var(--sl-space-3); min-width: 0; }

/* Шапка сторінки, хлібні крихти (design-code §5) */
.rgt-page-header { display: flex; flex-direction: column; gap: var(--sp-2); margin: 0 0 var(--sp-5); }
.rgt-page-header__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-4); }
.rgt-page-header__title { flex: 1 1 20rem; margin: 0; text-wrap: balance; }
.rgt-page-header__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.rgt-page-header__actions .rgt-btn { min-height: var(--sl-control-h-sm); }
.rgt-breadcrumbs { min-width: 0; }
.rgt-breadcrumbs__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-1); font-size: var(--sl-text-label); color: var(--sl-on-surface-variant); }
.rgt-breadcrumbs__item { display: inline-flex; align-items: center; gap: var(--sl-space-1); }
.rgt-breadcrumbs__link { color: var(--sl-primary); text-decoration: none; }
.rgt-breadcrumbs__link:hover { text-decoration: underline; }
.rgt-breadcrumbs__link:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-breadcrumbs__current { color: var(--sl-on-surface-variant); font-weight: 400; }
/* телефон: крихта — ціль 48 по висоті (Є3 з пульта, RGT-272 G2) */
@media (max-width: 599px) {
  .rgt-breadcrumbs__link { display: inline-flex; align-items: center; min-height: 3rem; }
}

/* Картка: частини (design-code §5) */
.rgt-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sl-space-3); margin: 0 0 var(--sl-space-3); }
.rgt-card__heading { min-width: 0; }
.rgt-card__title { margin: 0; font: var(--sl-title-l); text-wrap: balance; }
.rgt-card__subtitle { margin: var(--sl-space-1) 0 0; color: var(--sl-on-surface-variant); }
.rgt-card__actions { margin-top: var(--sl-space-4); }

/* Форма-таблиця (design-code §5, §8.4: поля outlined) */
.rgt-form-table { display: flex; flex-direction: column; gap: var(--sl-space-3); }
.rgt-form-table__table { min-width: 100%; }
.rgt-form-table__cell { display: flex; align-items: center; gap: var(--sl-space-2); }
.rgt-form-table__input { flex: 1; width: 100%; min-width: 6rem; height: calc(var(--sl-row-h) - var(--sl-space-2)); box-sizing: border-box; padding: 0 var(--sl-space-3); border: 0; border-radius: var(--sl-radius-md); background: transparent; box-shadow: inset 0 0 0 1px var(--sl-outline); color: var(--sl-on-surface); font: inherit; }
.rgt-form-table__input:focus { box-shadow: inset 0 0 0 2px var(--sl-primary); }
.rgt-form-table__input:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-form-table__input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--sl-error); }
.rgt-form-table__suffix { flex: none; font-size: var(--sl-text-label); color: var(--sl-on-surface-variant); }
.rgt-form-table__error { margin: var(--sl-space-1) 0 0; font-size: var(--sl-text-label); color: var(--sl-error); }
.rgt-form-table__row:has([aria-invalid="true"]) > td { vertical-align: top; padding-top: var(--sl-space-1); }
.rgt-form-table__row:has([aria-invalid="true"]) > td:first-child { box-shadow: inset var(--sl-size-selected-bar) 0 0 var(--sl-error); }
.rgt-form-table__actions { width: 1%; text-align: right; white-space: nowrap; }
.rgt-form-table__remove { display: inline-grid; place-items: center; width: var(--sl-control-h-sm); height: var(--sl-control-h-sm); padding: 0; border: 0; border-radius: var(--sl-radius-full); background: transparent; color: var(--sl-on-surface-variant); cursor: pointer; }
.rgt-form-table__remove:hover { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-form-table__remove:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-form-table__toolbar { justify-content: flex-start; }

/* Скелет (design-code §5): статичний, без анімації (N16); геометрія як у таблиці */
.rgt-skeleton { display: block; }
.rgt-skeleton__table { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--sl-divider); border-radius: var(--sl-radius-lg); background: var(--sl-card); }
.rgt-skeleton__row { display: flex; align-items: center; gap: var(--sl-space-4); height: var(--sl-row-h); padding: 0 var(--sl-space-4); border-bottom: 1px solid var(--sl-divider); }
.rgt-skeleton__row:last-child { border-bottom: 0; }
.rgt-skeleton__cell { flex: 1; height: .75rem; border-radius: var(--sl-radius-full); background: var(--sl-skeleton); }
.rgt-skeleton__cell--num { flex: 0 0 4rem; margin-left: auto; }

/* Рядок-картка (пульт) */
.rgt-row-card { position: relative; display: flex; align-items: center; gap: var(--sl-space-3); min-height: var(--sl-size-pult-row); box-sizing: border-box; padding: var(--sl-space-3) var(--sl-space-4); border: 1px solid var(--sl-divider); border-radius: var(--sl-radius-md); background: var(--sl-card); color: var(--sl-on-surface); text-decoration: none; }
.rgt-row-card:hover { background: color-mix(in srgb, currentColor var(--sl-state-hover), var(--sl-card)); }
.rgt-row-card:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-row-card__body { flex: 1; min-width: 0; }
.rgt-row-card__title { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.rgt-row-card__sub { margin: 0; font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }

/* Діалоги-форми структури (мокапи Б2–Б8) */
.rgt-dialog__form { display: flex; flex-direction: column; gap: var(--sl-space-5); }
.rgt-dialog__form--tight { gap: var(--sl-space-4); }
.rgt-dialog__head { display: flex; flex-direction: column; gap: var(--sl-space-1); }
.rgt-dialog__form--confirm .rgt-dialog__head { gap: var(--sl-space-4); }
.rgt-dialog__head .rgt-dialog__title, .rgt-dialog__head .rgt-dialog__text { margin: 0; }
.rgt-dialog__form > .rgt-dialog__actions { padding-top: var(--sl-space-1); }
.rgt-dialog--narrow .rgt-dialog__form > .rgt-dialog__actions { padding-top: 0; }
.rgt-dialog .rgt-dialog__form--confirm > .rgt-dialog__actions { padding-top: var(--sl-space-2); }
.rgt-dialog__actions .rgt-btn-reason { align-items: flex-end; }
.rgt-dialog__form > .rgt-field__hint, .rgt-dialog__form > .rgt-field__error, .rgt-dialog__section > .rgt-field__hint, .rgt-dialog__section > .rgt-field__error { margin-top: calc(-1 * var(--sl-space-3)); }
.rgt-dialog .rgt-banner { padding: var(--sl-space-3) var(--sl-space-4); }
.rgt-dialog .rgt-segmented__option { box-sizing: border-box; min-height: var(--sl-control-h-sm); gap: calc(var(--sl-space-1) + 2px); }
.rgt-dialog .rgt-segmented__option:has(> :checked) { padding-left: var(--sl-space-3); }
.rgt-dialog .rgt-segmented__legend { line-height: var(--sl-lh-label); margin-bottom: calc(var(--sl-space-2) + 2px); }
.rgt-dialog .rgt-checkbox__row { min-height: var(--sl-space-6); }
.rgt-dialog .rgt-checkbox > .rgt-field__hint { margin-top: 0; }
.rgt-dialog__switches { display: flex; flex-direction: column; gap: var(--sl-space-2); }
.rgt-dialog__switches .rgt-switch__row { min-height: var(--sl-chip-h); }
.rgt-dialog__icon { flex: none; display: inline-grid; place-items: center; width: var(--sl-control-h-sm); height: var(--sl-control-h-sm); border-radius: var(--sl-radius-full); background: var(--sl-secondary-container); color: var(--sl-on-secondary-container); }
.rgt-dialog__icon--danger { background: var(--sl-error-container); color: var(--sl-error); }
.rgt-dialog__icon--warn { background: var(--sl-st-warn-bg); color: var(--sl-st-warn-ic); }
.rgt-dialog__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sl-space-5) var(--sl-space-6); }
@media (min-width: 600px) {
  .rgt-dialog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.rgt-dialog__grid > * { align-self: start; }
.rgt-dialog__wide { grid-column: 1 / -1; }
.rgt-dialog__section { grid-column: 1 / -1; display: flex; flex-direction: column; gap: var(--sl-space-5); }

/* Вибір батька: рамка як outlined-поле, підпис на верхній межі, кнопка «Змінити» */
.rgt-picker { position: relative; display: flex; align-items: center; gap: var(--sl-space-2); min-height: var(--sl-control-h); box-sizing: border-box; padding: 0 var(--sl-space-1) 0 calc(var(--sl-space-3) + 2px); border: 1px solid var(--sl-outline); border-radius: var(--sl-radius-md); color: var(--sl-on-surface); }
.rgt-picker__label { position: absolute; top: calc(var(--sl-lh-label) / -2 - 1px); left: calc(var(--sl-space-3) - 2px); padding: 0 var(--sl-space-1); background: var(--sl-card); font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-picker__value { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rgt-picker__tile { flex: none; display: inline-grid; place-items: center; width: var(--sl-size-node-icon); height: var(--sl-size-node-icon); border-radius: var(--sl-radius-sm); background: var(--sl-surface-container-high); color: var(--sl-on-surface-variant); }
.rgt-picker__tile > .rgt-icon { width: .875rem; height: .875rem; }
.rgt-picker__tile--lab { background: var(--sl-primary-container); color: var(--sl-on-primary-container); }
.rgt-picker__path { color: var(--sl-on-surface-variant); }
.rgt-picker--invalid { border: 2px solid var(--sl-error); padding-left: calc(var(--sl-space-3) + 1px); }
.rgt-picker--invalid .rgt-picker__label { left: calc(var(--sl-space-2) + 1px); color: var(--sl-error); }
.rgt-picker__change { flex: none; min-height: var(--sl-control-h-sm); padding: 0 var(--sl-space-3); border: 0; border-radius: var(--sl-radius-full); background: transparent; color: var(--sl-primary); font: inherit; font-size: var(--sl-text-button); line-height: var(--sl-lh-button); font-weight: 600; cursor: pointer; }
.rgt-picker__change:hover { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-picker__change:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }

/* RGT-227 (ADR-29): пояснення «i», «Як це влаштовано», онбординг, шапка компанії */
.rgt-info { margin: 0; }
.rgt-info__toggle { display: inline-flex; align-items: center; gap: var(--sl-space-1); min-height: var(--sl-control-h-sm); cursor: pointer; list-style: none; color: var(--sl-primary); font-size: var(--sl-text-label); line-height: var(--sl-lh-label); }
.rgt-info__toggle::-webkit-details-marker { display: none; }
.rgt-info__toggle:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-info__question { text-decoration: underline dotted; }
.rgt-info__text { margin: 0; font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }

.rgt-howto { margin: 0 0 var(--sl-space-4); padding: 0; }
.rgt-howto__summary { display: flex; align-items: center; gap: var(--sl-space-2); padding: var(--sl-space-3) var(--sl-space-5); cursor: pointer; list-style: none; }
.rgt-howto__summary::-webkit-details-marker { display: none; }
.rgt-howto__summary:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-howto__title { font: var(--sl-title-s); }
.rgt-howto__body { display: grid; gap: var(--sl-space-2); padding: 0 var(--sl-space-5) var(--sl-space-4); }
.rgt-howto__text { margin: 0; color: var(--sl-on-surface-variant); }

.rgt-onboard { display: grid; gap: var(--sl-space-5); padding: var(--sl-space-5); }
.rgt-onboard__lead { margin: 0; font: var(--sl-title-m); }
.rgt-onboard__steps { display: grid; gap: var(--sl-space-4); margin: 0; padding: 0; list-style: none; }
.rgt-onboard__step { display: flex; gap: var(--sl-space-3); align-items: flex-start; }
.rgt-onboard__num { display: inline-grid; place-items: center; flex: none; width: 2rem; height: 2rem; border-radius: var(--sl-radius-full); background: var(--sl-primary-container); color: var(--sl-on-primary-container); font: var(--sl-title-s); }
.rgt-onboard__body { display: grid; gap: var(--sl-space-1); justify-items: start; min-width: 0; }
.rgt-onboard__title { margin: 0; font: var(--sl-title-s); }
.rgt-onboard__text { margin: 0; color: var(--sl-on-surface-variant); }
.rgt-onboard__seed { display: grid; gap: var(--sl-space-1); justify-items: start; }
.rgt-onboard__hint { margin: 0; font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }

.rgt-example { margin: 0; padding: var(--sl-space-4); border: 1px solid var(--sl-divider); border-radius: var(--sl-radius-lg); background: var(--sl-surface-container-low); }
.rgt-example__caption { margin: 0 0 var(--sl-space-3); font: var(--sl-title-s); color: var(--sl-on-surface-variant); }
.rgt-example__trees { display: grid; gap: var(--sl-space-4); grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.rgt-example__col { min-width: 0; }
.rgt-example__title { margin: 0 0 var(--sl-space-2); font: var(--sl-title-s); }
.rgt-example__tree { display: grid; gap: var(--sl-space-1); margin: 0; padding: 0; list-style: none; }
.rgt-example__item { display: flex; align-items: center; gap: var(--sl-space-2); }
.rgt-example__item[data-depth="1"] { padding-left: var(--sl-space-6); }
.rgt-example__item[data-depth="2"] { padding-left: var(--sl-space-12); }
.rgt-example__item > .rgt-icon { color: var(--sl-on-surface-variant); }
.rgt-example__label { min-width: 0; overflow-wrap: anywhere; }

.rgt-btn-reason__link { color: var(--sl-primary); font-weight: 600; }
.rgt-btn-reason__link:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }

/* Набір чипів «з ким поділитись» */
.rgt-chip-set { position: relative; min-width: 0; margin: 0; align-items: center; min-height: calc(var(--sl-chip-h) + 3 * var(--sl-space-2)); padding: var(--sl-space-2) var(--sl-space-2) var(--sl-space-2) var(--sl-space-3); border: 1px solid var(--sl-outline); border-radius: var(--sl-radius-md); display: flex; flex-wrap: wrap; gap: var(--sl-space-2); }
.rgt-chip-set:focus-within { border-color: var(--sl-primary); box-shadow: inset 0 0 0 1px var(--sl-primary); }
.rgt-chip-set__legend { position: absolute; float: none; width: auto; max-width: calc(100% - 2 * var(--sl-space-3)); margin: 0; top: calc(var(--sl-lh-label) / -2 - 1px); left: calc(var(--sl-space-3) - 2px); padding: 0 var(--sl-space-1); background: var(--sl-card); font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-chip-set:focus-within .rgt-chip-set__legend { color: var(--sl-primary); }
.rgt-chip-set__add { display: flex; align-items: center; gap: var(--sl-space-2); min-width: 0; flex: 1 1 8.75rem; }
.rgt-chip-set__add .rgt-field { flex: 1 1 auto; min-width: 0; }
.rgt-chip-set__add .rgt-field__box > .rgt-field__input, .rgt-chip-set__add .rgt-field__box > .rgt-field__input:focus { height: var(--sl-chip-h); min-height: var(--sl-chip-h); padding: 0 var(--sl-space-8) 0 var(--sl-space-1); background: transparent; box-shadow: none; }
.rgt-chip-set__add .rgt-field__input:focus-visible { outline: none; }
.rgt-chip-set__add .rgt-btn { min-height: var(--sl-chip-h); }
.rgt-chip:has(> .rgt-chip__remove) { padding-right: var(--sl-space-1); }
.rgt-chip__remove { position: relative; display: inline-grid; place-items: center; flex: none; width: calc(var(--sl-chip-h) - var(--sl-space-2)); height: calc(var(--sl-chip-h) - var(--sl-space-2)); padding: 0; border: 0; border-radius: var(--sl-radius-full); background: transparent; color: inherit; cursor: pointer; }
.rgt-chip__remove:hover { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-chip__remove:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }

/* Радіосписок нових батьків: відступ рівня дерева, причина, вибраний рядок */
.rgt-radio-list { min-width: 0; margin: 0; padding: 0; border: 1px solid var(--sl-divider); border-radius: var(--sl-radius-md); max-height: 40vh; overflow: auto; }
.rgt-radio-list__item { --rgt-depth: 0; position: relative; display: flex; align-items: center; gap: calc(var(--sl-space-2) + 2px); min-height: var(--sl-tree-row-h); box-sizing: border-box; padding: var(--sl-space-1) var(--sl-space-4) var(--sl-space-1) var(--sl-space-2); padding-left: calc(var(--sl-space-2) * 2 + 2px + var(--rgt-depth) * var(--sl-size-tree-indent)); border-bottom: 1px solid var(--sl-divider); color: var(--sl-on-surface); }
.rgt-radio-list__item:last-child { border-bottom: 0; }
.rgt-radio-list__item[data-depth="1"] { --rgt-depth: 1; }
.rgt-radio-list__item[data-depth="2"] { --rgt-depth: 2; }
.rgt-radio-list__item[data-depth="3"] { --rgt-depth: 3; }
.rgt-radio-list__item[data-depth="4"] { --rgt-depth: 4; }
.rgt-radio-list__item[data-depth="5"] { --rgt-depth: 5; }
.rgt-radio-list__item[data-depth="6"] { --rgt-depth: 6; }
/* L-лінії дерева (мокап B5). Напрямні предків малюються завжди, навіть якщо предок був останнім (спрощення). */
.rgt-radio-list__item:not([data-depth="0"])::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--rgt-depth) * var(--sl-size-tree-indent)); width: var(--sl-size-tree-guide); background: var(--sl-divider); }
.rgt-radio-list__item[data-last]::before { bottom: auto; height: calc(50% + 1px); }
.rgt-radio-list__item:not([data-depth="0"])::after { content: ""; position: absolute; top: calc(50% - 1px); left: calc(var(--rgt-depth) * var(--sl-size-tree-indent) + 1px); width: calc(var(--sl-space-3) + 2px); height: var(--sl-size-tree-guide); background: var(--sl-divider); }
.rgt-radio-list__item:not([data-depth="0"]):not([data-depth="1"]) { background-image: repeating-linear-gradient(to right, transparent 0 calc(var(--sl-size-tree-indent) - var(--sl-size-tree-guide)), var(--sl-divider) 0 var(--sl-size-tree-indent)); background-position: var(--sl-size-tree-guide) 0; background-size: calc((var(--rgt-depth) - 1) * var(--sl-size-tree-indent)) 100%; background-repeat: no-repeat; }
.rgt-radio-list__item:has(input:checked) { background-color: var(--sl-selected); box-shadow: inset var(--sl-size-selected-bar) 0 0 var(--sl-primary); }
.rgt-radio-list__item:has(input:checked) .rgt-radio-list__name { font-weight: 600; }
.rgt-radio-list__item:has(input:disabled) { color: color-mix(in srgb, var(--sl-on-surface) var(--sl-disabled-content), transparent); cursor: default; }
.rgt-radio-list__input { flex: none; width: 1.125rem; height: 1.125rem; margin: 0; accent-color: var(--sl-primary); }
.rgt-radio-list__tile { flex: none; display: inline-grid; place-items: center; width: var(--sl-size-node-icon); height: var(--sl-size-node-icon); border-radius: var(--sl-radius-sm); background: var(--sl-surface-container-high); color: var(--sl-on-surface-variant); }
.rgt-radio-list__tile > .rgt-icon { width: .875rem; height: .875rem; }
.rgt-radio-list__tile--lab { background: var(--sl-primary-container); color: var(--sl-on-primary-container); }
.rgt-radio-list__item:has(input:disabled) .rgt-radio-list__tile { opacity: .5; }
.rgt-radio-list__body { display: flex; flex-direction: column; min-width: 0; }
.rgt-radio-list__name { min-width: 0; overflow-wrap: anywhere; }
.rgt-radio-list__reason { font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }

/* Підсумок «Новий шлях» */
.rgt-preview { display: flex; align-items: center; gap: var(--sl-space-2); margin: 0; padding: var(--sl-space-3) var(--sl-space-4); border-radius: var(--sl-radius-md); background: var(--sl-selected); color: var(--sl-on-surface); overflow-wrap: anywhere; }
.rgt-preview > .rgt-icon { width: 1.125rem; height: 1.125rem; color: var(--sl-primary); }
.rgt-preview strong { font-weight: 600; }
.rgt-preview__label { color: var(--sl-on-surface-variant); }

/* Картка-перелік «що всередині» (Б6б) */
.rgt-dl--boxed { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); row-gap: var(--sl-space-1); column-gap: 0; margin: 0; padding: var(--sl-space-3) var(--sl-space-4); border-radius: var(--sl-radius-md); background: var(--sl-inset); }
.rgt-dl--boxed dd { margin: 0; text-align: left; font-weight: 400; overflow-wrap: anywhere; }
.rgt-problems { margin: 0; padding: 0; list-style: none; border: 1px solid var(--sl-divider); border-radius: var(--sl-radius-md); overflow: hidden; }
.rgt-problems__item { display: flex; align-items: center; gap: var(--sl-space-3); min-height: var(--sl-row-h); padding: var(--sl-space-2) var(--sl-space-2) var(--sl-space-2) var(--sl-space-4); }
.rgt-problems__item + .rgt-problems__item { border-top: 1px solid var(--sl-divider); }
.rgt-problems__item > .rgt-icon { color: var(--sl-on-surface-variant); }
.rgt-problems__text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rgt-problems__link { display: inline-flex; align-items: center; flex: none; min-height: var(--sl-control-h-sm); padding: 0 var(--sl-space-3); border-radius: var(--sl-radius-full); color: var(--sl-primary); font-weight: 600; text-decoration: none; }
.rgt-problems__link:hover { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-problems__link:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }

/* --- Каталог: шапка картки, позначки, вкладки (RGT-073) --- */
.rgt-item-head { display: flex; flex-direction: column; gap: var(--sl-space-1); min-width: 0; }
.rgt-item-head__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-3); min-width: 0; }
.rgt-item-head__row > .rgt-page-header__title { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }
.rgt-tag { flex: none; display: inline-flex; align-items: center; box-sizing: border-box; height: 1.625rem; padding: 0 var(--sl-space-2); border: 1px solid var(--sl-outline); border-radius: var(--sl-radius-sm); color: var(--sl-primary); font-size: var(--sl-text-label); line-height: var(--sl-lh-label); font-weight: 500; white-space: nowrap; }
.rgt-tag--origin { border-color: var(--sl-outline); color: var(--sl-primary); }
.rgt-tag--update { gap: .375rem; border-color: var(--sl-primary); font-weight: 600; }
.rgt-tag__dot { flex: none; width: .5rem; height: .5rem; border-radius: var(--sl-radius-full); background: var(--sl-primary); }
.rgt-tag--archived { color: var(--sl-on-surface-variant); }
.rgt-tabs { display: flex; align-items: stretch; box-sizing: border-box; height: 3rem; padding: 0 var(--sl-space-3); gap: var(--sl-space-1); border-bottom: 1px solid var(--sl-divider); overflow-x: auto; scrollbar-width: none; }
.rgt-tabs__item { position: relative; display: flex; align-items: center; padding: 0 var(--sl-space-3); color: var(--sl-on-surface-variant); font-weight: 500; text-decoration: none; flex: none; white-space: nowrap; }
.rgt-tabs__item:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: calc(var(--sl-focus-width) * -1); }
.rgt-tabs__item.rgt-is-active { color: var(--sl-on-surface); font-weight: 600; }
.rgt-tabs__item.rgt-is-active::after { content: ""; position: absolute; left: var(--sl-space-3); right: var(--sl-space-3); bottom: 0; height: .1875rem; border-radius: var(--sl-radius-xs) var(--sl-radius-xs) 0 0; background: var(--sl-primary); }
.rgt-tabs__label { min-width: 0; }

/* --- Каталог: список позицій Г1 (RGT-073) --- */
.rgt-catalog-list { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.rgt-catalog-list__toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2); box-sizing: border-box; min-height: 4rem; margin: 0; padding: var(--sl-space-2) var(--sl-space-4); border-bottom: 1px solid var(--sl-divider); }
.rgt-catalog-list__search { flex: 0 1 23.75rem; width: 23.75rem; max-width: 100%; min-height: var(--sl-control-h-sm); padding-right: var(--sl-space-4); background: var(--sl-inset); box-shadow: none; }
.rgt-catalog-list__search .rgt-search__input { height: var(--sl-control-h-sm); }
.rgt-catalog-list__count { margin-left: auto; padding-left: var(--sl-space-2); font-size: .8125rem; line-height: 1.25rem; color: var(--sl-on-surface-variant); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rgt-filter { position: relative; display: inline-flex; align-items: center; gap: var(--sl-space-1); flex: none; box-sizing: border-box; height: var(--sl-chip-h); padding: 0 var(--sl-space-2) 0 var(--sl-space-3); border: 1px solid var(--sl-outline); border-radius: var(--sl-radius-full); color: var(--sl-on-surface-variant); font-weight: 500; white-space: nowrap; cursor: pointer; }
.rgt-filter:hover { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-filter:has(:focus-visible) { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-filter > .rgt-icon { width: 1rem; height: 1rem; }
.rgt-filter__select { min-width: 0; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; appearance: none; cursor: pointer; }
.rgt-filter__select:focus-visible, .rgt-filter__check:focus-visible { outline: 0; }
.rgt-filter__check { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.rgt-filter__label { white-space: nowrap; }
.rgt-filter--toggle { padding: 0 var(--sl-space-3); }
.rgt-filter--toggle:has(.rgt-filter__check:checked) { border-color: var(--sl-secondary-container); background: var(--sl-secondary-container); color: var(--sl-on-secondary-container); }
.rgt-catalog-results { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.rgt-catalog-results > .rgt-table-wrap { flex: 1 0 auto; border: 0; border-radius: 0; background: transparent; }
.rgt-catalog-table { width: 100%; }
.rgt-catalog-table th, .rgt-catalog-table td { padding: 0 var(--sl-space-2); }
.rgt-catalog-table th:first-child, .rgt-catalog-table td:first-child { padding-left: var(--sl-space-4); }
.rgt-catalog-table th:last-child, .rgt-catalog-table td:last-child { padding-right: var(--sl-space-4); }
.rgt-catalog-table thead th { height: 2.5rem; }
.rgt-catalog-table th:first-child, .rgt-catalog-table td:first-child { min-width: 14rem; }
.rgt-catalog-table th:nth-child(2), .rgt-catalog-table td:nth-child(2) { width: 16rem; }
.rgt-catalog-table th:nth-child(3), .rgt-catalog-table td:nth-child(3) { width: 7.875rem; }
.rgt-catalog-table th:nth-child(4), .rgt-catalog-table td:nth-child(4) { width: 9.75rem; }
.rgt-catalog-table th:nth-child(5), .rgt-catalog-table td:nth-child(5) { width: 11rem; }
.rgt-catalog-table th:nth-child(6), .rgt-catalog-table td:nth-child(6) { width: 3.5rem; }
.rgt-catalog-table__sort { display: inline-flex; align-items: center; gap: var(--sl-space-1); padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-decoration: none; cursor: pointer; }
.rgt-catalog-table__sort > .rgt-icon { width: .875rem; height: .875rem; }
.rgt-catalog-table__sort:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-catalog-table th[aria-sort] { color: var(--sl-on-surface); }
.rgt-catalog-table th[aria-sort] .rgt-catalog-table__sort { font-weight: 600; }
.rgt-catalog-table__name { display: block; min-width: 0; overflow-wrap: anywhere; color: var(--sl-on-surface); font-weight: 500; text-decoration: none; }
.rgt-catalog-table__name:hover { text-decoration: underline; }
.rgt-catalog-table__name:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-catalog-table__actions { text-align: right; }
.rgt-catalog-table__actions .rgt-menu__button { width: 2rem; height: 2rem; }
.rgt-catalog-table__actions .rgt-menu__button > .rgt-icon { width: 1.125rem; height: 1.125rem; }
.rgt-tag--origin-global, .rgt-tag--origin-own { font-weight: 500; }
.rgt-tag--origin-global { border-color: var(--sl-outline); color: var(--sl-primary); }
.rgt-tag--origin-own { border-color: var(--sl-outline-variant); color: var(--sl-on-surface-variant); }
.rgt-catalog-table .rgt-tag--update { height: auto; padding: 0; border: 0; color: var(--sl-primary); font-size: var(--sl-text-body); line-height: var(--sl-lh-body); font-weight: 500; }
.rgt-pager { display: flex; flex: none; flex-wrap: wrap; align-items: center; gap: var(--sl-space-4); box-sizing: border-box; min-height: 3.25rem; padding: 0 var(--sl-space-3) 0 var(--sl-space-4); border-top: 1px solid var(--sl-divider); color: var(--sl-on-surface-variant); font-size: .8125rem; line-height: 1.25rem; }
.rgt-pager__size { display: flex; align-items: center; gap: var(--sl-space-2); margin: 0; }
.rgt-pager__label { margin: 0; }
.rgt-pager__select { height: 2rem; margin: 0; padding: 0 var(--sl-space-2); border: 1px solid var(--sl-outline); border-radius: var(--sl-radius-md); background: var(--sl-surface-container-lowest); color: var(--sl-on-surface); font: inherit; }
.rgt-pager__spacer { flex: 1; }
.rgt-pager__range { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rgt-pager .rgt-btn { min-height: var(--sl-control-h-sm); font-weight: 600; }
.rgt-pager .rgt-btn.rgt-btn--text { padding: 0 var(--sl-space-3); }
.rgt-pager .rgt-btn > .rgt-icon { width: 1.125rem; height: 1.125rem; }

/* --- Каталог: картка позиції Г2 (RGT-073) --- */
.rgt-catalog-item { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; min-height: 0; }
.rgt-catalog-item__header { flex: none; flex-direction: row; align-items: flex-end; gap: var(--sl-space-3); margin: 0; padding: var(--sl-space-3) 0 var(--sl-space-4); }
.rgt-catalog-item__header > .rgt-item-head { flex: 1 1 auto; min-width: 0; }
.rgt-catalog-item__header .rgt-btn { min-height: var(--sl-control-h-sm); }
.rgt-catalog-item__header .rgt-btn > .rgt-icon { width: 1.125rem; height: 1.125rem; }
.rgt-catalog-item__header .rgt-btn--outlined:has(> .rgt-icon:first-child) { padding: 0 var(--sl-space-5) 0 var(--sl-space-4); }
.rgt-catalog-item__body { display: flex; flex: 1 1 auto; align-items: stretch; gap: var(--sl-space-4); min-height: 0; }
.rgt-catalog-item__card { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; margin: 0; padding: 0; border: 1px solid var(--sl-divider); border-radius: var(--sl-radius-lg); overflow: hidden; }
.rgt-item-form { display: flex; flex-direction: column; gap: var(--sl-space-4); margin: 0; padding: var(--sl-space-5) var(--sl-space-6) var(--sl-space-6); }
.rgt-item-form__fields { display: flex; flex-direction: column; gap: var(--sl-space-4); min-width: 0; margin: 0; padding: 0; border: 0; }
.rgt-item-form__title { margin: 0; font: var(--sl-title-s); }
.rgt-item-form__grid + .rgt-item-form__title { margin-top: var(--sl-space-2); }
.rgt-item-form__grid { display: grid; gap: var(--sl-space-6); }
.rgt-item-form__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rgt-item-form__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rgt-item-form__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rgt-item-form__hint { margin: 0; font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-radio-field { display: flex; flex-direction: column; align-self: start; min-width: 0; }
.rgt-radio-inline { display: flex; flex-wrap: nowrap; align-items: flex-start; gap: var(--sl-space-5); box-sizing: border-box; min-width: 0; min-height: 3rem; margin: 0; padding: 0; border: 0; }
.rgt-radio-inline__legend { float: left; width: max-content; margin: .875rem var(--sl-space-2) 0 0; font-size: .8125rem; line-height: 1.25rem; color: var(--sl-on-surface-variant); }
.rgt-radio-inline__option { display: inline-flex; align-items: center; gap: var(--sl-space-2); margin-top: .875rem; }
.rgt-radio-inline__input { width: 1.125rem; height: 1.125rem; margin: 0; accent-color: var(--sl-primary); }
.rgt-radio-field > .rgt-field__error { margin: var(--sl-space-1) 0 0; }
.rgt-item-aside { display: flex; flex: none; flex-direction: column; gap: var(--sl-space-4); box-sizing: border-box; width: 21.25rem; margin: 0; padding: var(--sl-space-5); }
.rgt-item-aside__title { margin: 0; font: var(--sl-title-m); }
.rgt-item-aside__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sl-space-2); }
.rgt-item-aside__stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: var(--sl-space-3); border-radius: var(--sl-radius-md); background: var(--sl-inset); }
.rgt-item-aside__label { font-size: .8125rem; line-height: 1.25rem; color: var(--sl-on-surface-variant); }
.rgt-item-aside__value { font-size: 1.375rem; line-height: 1.75rem; font-weight: 500; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rgt-item-aside__dl { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); row-gap: var(--sl-space-1); margin: 0; }
.rgt-item-aside__dl dt { display: flex; align-items: center; height: 2rem; color: var(--sl-on-surface-variant); }
.rgt-item-aside__dl dd { display: flex; flex-direction: column; justify-content: center; min-height: 2rem; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.rgt-item-aside__min { display: block; }
@media (max-width: 1199px) {
  .rgt-item-form__grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rgt-radio-inline { flex-wrap: wrap; align-items: center; }
  .rgt-radio-inline__legend, .rgt-radio-inline__option { margin-top: 0; }
}
@media (max-width: 719px) {
  .rgt-catalog-item__header { flex-direction: column; align-items: stretch; }
  .rgt-catalog-item__body { flex-direction: column; }
  .rgt-item-form { padding: var(--sl-space-4); }
  .rgt-item-form__grid--2, .rgt-item-form__grid--3, .rgt-item-form__grid--4 { grid-template-columns: minmax(0, 1fr); }
  .rgt-item-aside { width: auto; }
}

/* --- Каталог: шаблон пакування Г3 (RGT-073) --- */
.rgt-pkg { display: flex; flex: 1 1 auto; align-items: stretch; gap: var(--sl-space-4); min-width: 0; min-height: 0; margin: 0; }
.rgt-pkg-examples { display: flex; flex: none; flex-direction: column; gap: var(--sl-space-1); box-sizing: border-box; width: 17.5rem; min-width: 0; margin: 0; padding: var(--sl-space-4) var(--sl-space-3); }
.rgt-pkg-examples__title { margin: 0 0 var(--sl-space-2) var(--sl-space-2); font: var(--sl-title-s); color: var(--sl-on-surface); }
.rgt-pkg-examples__item { display: flex; flex-direction: column; gap: 2px; width: 100%; box-sizing: border-box; margin: 0; padding: .625rem var(--sl-space-3); border: 0; border-radius: var(--sl-radius-md); background: transparent; color: var(--sl-on-surface); font: inherit; text-align: left; cursor: pointer; }
.rgt-pkg-examples__item:hover { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-pkg-examples__item:active { background: color-mix(in srgb, currentColor var(--sl-state-pressed), transparent); }
.rgt-pkg-examples__item:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-pkg-examples__name { font-weight: 600; }
.rgt-pkg-examples__text { font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-pkg__banners { display: flex; flex-direction: column; gap: var(--sl-space-2); padding: var(--sl-space-4) var(--sl-space-5) 0; }
.rgt-pkg__summary-title { margin-right: var(--sl-space-1); font-weight: 600; }
.rgt-pkg__summary { display: inline; margin: 0; padding: 0; list-style: none; }
.rgt-pkg__summary > li { display: inline; }
.rgt-pkg__summary > li + li { margin-left: var(--sl-space-3); }
.rgt-pkg__summary-link { color: inherit; text-decoration: underline; }
.rgt-pkg__summary-link:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-pkg__scroll { flex: 1 1 auto; min-width: 0; min-height: 0; overflow: auto; }
.rgt-pkg__fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.rgt-pkg__table { box-sizing: border-box; min-width: 48rem; margin: var(--sl-space-3) var(--sl-space-5) 0; border: 1px solid var(--sl-divider); border-radius: var(--sl-radius-md); overflow: hidden; }
.rgt-pkg__row { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr) 9.375rem 10.625rem 11.875rem 2rem; gap: var(--sl-space-3); align-items: center; box-sizing: border-box; min-height: 3.5rem; padding: 0 var(--sl-space-2) 0 var(--sl-space-3); border-top: 1px solid var(--sl-divider); }
.rgt-pkg__row--head { height: 2.25rem; min-height: 0; border-top: 0; background: var(--sl-surface-container-low); color: var(--sl-on-surface-variant); font-size: var(--sl-text-label); line-height: var(--sl-lh-label); font-weight: 500; }
.rgt-pkg__row--sub-head { height: 2rem; min-height: 0; grid-template-columns: minmax(0, 1fr) 6.875rem 13.125rem 13.125rem 2rem; border-top: 0; color: var(--sl-on-surface-variant); font-size: var(--sl-text-label); line-height: var(--sl-lh-label); font-weight: 500; }
.rgt-pkg__row--sub { min-height: 3rem; grid-template-columns: minmax(0, 1fr) 6.875rem 13.125rem 13.125rem 2rem; }
.rgt-pkg__row.rgt-is-invalid { min-height: 4.5rem; align-items: start; padding-top: var(--sl-space-2); padding-bottom: var(--sl-space-2); background: color-mix(in srgb, var(--sl-error-container) 20%, transparent); box-shadow: inset 0.1875rem 0 0 var(--sl-error); }
.rgt-pkg__components { overflow: hidden; margin: 0 var(--sl-space-3) var(--sl-space-3) 3.25rem; border: 1px solid var(--sl-divider); border-radius: var(--sl-radius-md); background: var(--sl-inset); }
.rgt-pkg__no { font-weight: 600; line-height: 2.5rem; }
.rgt-pkg__cell { display: flex; flex-direction: column; gap: var(--sl-space-1); min-width: 0; }
.rgt-pkg__input, .rgt-pkg__control { box-sizing: border-box; width: 100%; height: var(--sl-control-h-sm); min-width: 0; margin: 0; padding: 0 var(--sl-space-3); border: 1px solid var(--sl-outline); border-radius: var(--sl-radius-md); background: var(--sl-card); color: var(--sl-on-surface); font: inherit; }
.rgt-pkg__input:focus-visible, .rgt-pkg__control:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-pkg__input[aria-invalid="true"], .rgt-pkg__control[aria-invalid="true"] { border: 2px solid var(--sl-error); }
.rgt-pkg__input:disabled, .rgt-pkg__control:disabled { border-color: color-mix(in srgb, var(--sl-on-surface) var(--sl-disabled-container), transparent); background: transparent; color: color-mix(in srgb, var(--sl-on-surface) var(--sl-disabled-content), transparent); }
.rgt-pkg__row--sub .rgt-pkg__input { height: 2.25rem; }
.rgt-pkg__qty { display: flex; align-items: center; gap: .375rem; min-width: 0; }
.rgt-pkg__qty > .rgt-pkg__input { flex: none; width: 3.5rem; padding: 0 .625rem; }
.rgt-pkg__row--sub .rgt-pkg__qty > .rgt-pkg__input { flex: 1 1 auto; width: auto; }
.rgt-pkg__suffix { flex: none; font-size: .8125rem; line-height: 1.25rem; color: var(--sl-on-surface-variant); }
.rgt-pkg__select { position: relative; display: block; min-width: 0; }
.rgt-pkg__control { appearance: none; padding: 0 var(--sl-space-8) 0 .625rem; background-image: none; cursor: pointer; }
.rgt-pkg__select > .rgt-icon { position: absolute; top: 50%; right: var(--sl-space-2); transform: translateY(-50%); color: var(--sl-on-surface-variant); pointer-events: none; }
.rgt-pkg__error { display: flex; align-items: center; gap: var(--sl-space-1); margin: 0; font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-error); }
.rgt-pkg__error > .rgt-icon { width: .875rem; height: .875rem; flex: none; }
.rgt-pkg__remove { flex: none; width: 2rem; height: 2rem; }
.rgt-pkg__remove > .rgt-icon { width: 1.125rem; height: 1.125rem; }
.rgt-is-invalid .rgt-pkg__remove { margin-top: var(--sl-space-1); }
.rgt-pkg__add-sub { box-sizing: border-box; padding: var(--sl-space-1) var(--sl-space-1) var(--sl-space-1) 0; border-top: 1px solid var(--sl-divider); }
.rgt-pkg__add-sub .rgt-btn { min-height: 2.25rem; }
.rgt-pkg__add { box-sizing: border-box; padding: var(--sl-space-3) var(--sl-space-5); }
.rgt-pkg__add .rgt-btn { min-height: var(--sl-control-h-sm); padding: 0 var(--sl-space-5) 0 var(--sl-space-4); }
@media (max-width: 719px) {
  .rgt-pkg { flex-direction: column; }
  .rgt-pkg-examples { width: auto; }
}

/* --- Ролі й користувачі В1–В6 (RGT-063, ADR-32 §8) --- */
.rgt-people-list { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.rgt-people-list__toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2); box-sizing: border-box; min-height: 4rem; margin: 0; padding: var(--sl-space-2) var(--sl-space-4); border-bottom: 1px solid var(--sl-divider); }
.rgt-people-list__toolbar .rgt-search { flex: 0 1 23.75rem; width: 23.75rem; max-width: 100%; }
.rgt-people-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2); min-width: 0; margin: 0; padding: 0; }
.rgt-people-filters__item { display: inline-flex; align-items: center; gap: var(--sl-space-1); flex: none; box-sizing: border-box; height: var(--sl-chip-h); padding: 0 var(--sl-space-3); border: 1px solid var(--sl-outline); border-radius: var(--sl-radius-full); color: var(--sl-on-surface-variant); font-weight: 500; text-decoration: none; white-space: nowrap; }
.rgt-people-filters__item[aria-current="page"] { border-color: transparent; background: var(--sl-secondary-container); color: var(--sl-on-secondary-container); }
.rgt-people-filters__item:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-people-filters__count { font-variant-numeric: tabular-nums; }
.rgt-people-table th:first-child, .rgt-people-table td:first-child { min-width: 14rem; }
.rgt-people-table th:last-child, .rgt-people-table td:last-child { width: 3.5rem; text-align: right; }
.rgt-people-table .rgt-menu__button { width: 2rem; height: 2rem; }
.rgt-people-name { display: flex; align-items: center; gap: var(--sl-space-3); min-width: 0; }
.rgt-people-name__text { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.rgt-people-name__sub { font: var(--sl-body-s); color: var(--sl-on-surface-variant); }
.rgt-avatar { display: inline-flex; flex: none; align-items: center; justify-content: center; box-sizing: border-box; width: 2.5rem; height: 2.5rem; border-radius: var(--sl-radius-full); background: var(--sl-primary-container); color: var(--sl-on-primary-container); font-size: var(--sl-text-body); line-height: var(--sl-lh-body); font-weight: 600; }
.rgt-avatar--l { width: 3rem; height: 3rem; font: var(--sl-title-m); }
.rgt-status { display: inline-flex; align-items: center; gap: var(--sl-space-2); white-space: nowrap; }
.rgt-status__dot { flex: none; width: .5rem; height: .5rem; border-radius: var(--sl-radius-full); background: var(--sl-outline); }
.rgt-status--active .rgt-status__dot { background: var(--sl-primary); }
.rgt-status--off .rgt-status__dot { background: var(--sl-outline); }
.rgt-role-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-1); min-width: 0; }
.rgt-perm-meter { appearance: none; display: inline-block; flex: none; box-sizing: border-box; width: 4rem; height: .25rem; margin: 0; padding: 0; border: 0; border-radius: var(--sl-radius-full); background: var(--sl-surface-container-highest); color: var(--sl-primary); vertical-align: middle; }
.rgt-perm-meter--wide { width: 100%; }
.rgt-perm-meter::-webkit-progress-bar { border-radius: var(--sl-radius-full); background: var(--sl-surface-container-highest); }
.rgt-perm-meter::-webkit-progress-value { border-radius: var(--sl-radius-full); background: var(--sl-primary); }
.rgt-perm-meter::-moz-progress-bar { border-radius: var(--sl-radius-full); background: var(--sl-primary); }
.rgt-perm-summary { display: flex; flex-direction: column; gap: var(--sl-space-2); box-sizing: border-box; min-width: 0; padding: var(--sl-space-4); border-radius: var(--sl-radius-md); background: var(--sl-surface-container-low); }
.rgt-perm-summary > p { margin: 0; }
.rgt-perm-summary__label { font: var(--sl-body-m); color: var(--sl-on-surface-variant); }
.rgt-perm-summary__count { font: var(--sl-title-l); font-variant-numeric: tabular-nums; }
.rgt-role-layout, .rgt-user-layout { display: grid; grid-template-columns: 20rem minmax(0, 1fr); gap: var(--sl-space-4); align-items: start; }
.rgt-role-aside, .rgt-user-aside { display: flex; flex-direction: column; gap: var(--sl-space-4); box-sizing: border-box; min-width: 0; padding: var(--sl-space-5); border: 1px solid var(--sl-outline-variant); border-radius: var(--sl-radius-lg); background: var(--sl-surface-container-lowest); }
.rgt-facts { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); align-items: center; column-gap: var(--sl-space-3); row-gap: var(--sl-space-1); margin: 0; }
.rgt-facts dt, .rgt-facts dd { min-height: 2rem; margin: 0; }
.rgt-facts dt { font-weight: 400; color: var(--sl-on-surface-variant); }
.rgt-facts dd { min-width: 0; overflow-wrap: anywhere; }
.rgt-perm-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: var(--sl-space-4); align-items: start; }
.rgt-perm-group { display: flex; flex-direction: column; gap: var(--sl-space-4); box-sizing: border-box; min-width: 0; margin: 0; padding: var(--sl-space-4); border: 1px solid var(--sl-outline-variant); border-radius: var(--sl-radius-lg); background: var(--sl-surface-container-lowest); }
.rgt-perm-group__head { display: flex; align-items: center; gap: var(--sl-space-2); min-width: 0; }
.rgt-perm-group__head :is(legend, h2) { margin: 0; font: var(--sl-title-s); }
.rgt-perm-group__toggle { display: inline-flex; align-items: center; justify-content: center; flex: none; box-sizing: border-box; width: 1.25rem; height: 1.25rem; margin: 0; padding: 0; border: 2px solid var(--sl-outline); border-radius: var(--sl-radius-xs); background: transparent; color: var(--sl-on-primary); cursor: pointer; }
.rgt-perm-group__toggle > .rgt-icon { width: 1rem; height: 1rem; }
.rgt-perm-group__toggle[aria-checked="true"], .rgt-perm-group__toggle[aria-checked="mixed"] { border-color: var(--sl-primary); background: var(--sl-primary); color: var(--sl-on-primary); }
/* частково вибрана група (aria-checked="mixed" — сервер або roles.js): «мінус» замість галочки, як у мокапі V2 */
.rgt-perm-group__toggle[aria-checked="mixed"] > .rgt-icon { display: none; }
.rgt-perm-group__toggle[aria-checked="mixed"]::before { content: ""; width: .5rem; height: .125rem; border-radius: var(--sl-radius-xs); background: currentColor; }
.rgt-perm-group__toggle:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-perm-group__toggle:disabled { border-color: color-mix(in srgb, var(--sl-on-surface) var(--sl-disabled-content), transparent); background: color-mix(in srgb, var(--sl-on-surface) var(--sl-disabled-container), transparent); color: color-mix(in srgb, var(--sl-on-surface) var(--sl-disabled-content), transparent); cursor: default; }
.rgt-perm-group__title { margin: 0; font: var(--sl-title-s); }
/* щільний крок рядків дозволів (мокап V2, ~34 px) лише від 840 px; на телефоні лишається touch-target з токена */
@media (min-width: 840px) {
  .rgt-perm-group { gap: 0; }
  .rgt-perm-group__head { margin-bottom: var(--sl-space-1); }
  .rgt-perm-group > .rgt-checkbox { display: flex; }
  .rgt-perm-group .rgt-checkbox__row { display: flex; min-height: 2.125rem; padding: 0 var(--sl-space-2); }
}
.rgt-perm-group__count { margin-left: auto; color: var(--sl-on-surface-variant); font-size: var(--sl-text-label); line-height: var(--sl-lh-label); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rgt-perm-hint { margin: 0; font: var(--sl-body-s); color: var(--sl-on-surface-variant); }
.rgt-user-id { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; column-gap: var(--sl-space-3); min-width: 0; }
.rgt-user-id > .rgt-avatar { grid-row: 1 / span 2; grid-column: 1; }
.rgt-user-id__name { grid-column: 2; grid-row: 1; margin: 0; font: var(--sl-title-m); overflow-wrap: anywhere; }
.rgt-user-id__login { grid-column: 2; grid-row: 2; margin: 0; font-family: var(--sl-font-mono); overflow-wrap: anywhere; }
.rgt-people-settings { display: flex; flex-direction: column; gap: var(--sl-space-5); }
.rgt-people-settings__head { display: flex; flex-direction: column; gap: var(--sl-space-1); }
.rgt-people-settings__head > * { margin: 0; }
.rgt-people-settings > form { display: flex; flex-direction: column; gap: var(--sl-space-5); }
.rgt-people-settings .rgt-field { max-width: 15rem; }
.rgt-people-settings > form > .rgt-btn { align-self: flex-start; }
.rgt-assign { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--sl-outline-variant); border-radius: var(--sl-radius-lg); background: var(--sl-surface-container-lowest); }
.rgt-assign__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2); box-sizing: border-box; min-height: 4rem; padding: var(--sl-space-3) var(--sl-space-5); border-bottom: 1px solid var(--sl-divider); }
.rgt-assign__head h2 { margin: 0; font: var(--sl-title-l); }
.rgt-assign__head > .rgt-icon { flex: none; color: var(--sl-on-surface-variant); }
.rgt-assign-table th:nth-child(1), .rgt-assign-table td:nth-child(1) { width: 15rem; }
.rgt-assign-table th:nth-child(3), .rgt-assign-table td:nth-child(3) { width: 13.75rem; }
.rgt-assign-table th:nth-child(4), .rgt-assign-table td:nth-child(4) { width: 7.5rem; text-align: right; }
.rgt-node-cell { display: flex; flex-direction: column; min-width: 0; }
.rgt-node-cell__name { min-width: 0; overflow-wrap: anywhere; }
.rgt-node-cell__path { font: var(--sl-body-s); color: var(--sl-on-surface-variant); overflow-wrap: anywhere; }
.rgt-assign-form { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--sl-space-3); box-sizing: border-box; padding: var(--sl-space-4); background: var(--sl-surface-container-low); border-radius: 0 0 var(--sl-radius-lg) var(--sl-radius-lg); }
.rgt-assign-form > :nth-child(1) { flex: none; width: 15rem; }
.rgt-assign-form > :nth-child(2) { flex: 1; min-width: 0; max-width: 26.25rem; }
.rgt-matrix-wrap { position: relative; overflow-x: auto; border: 1px solid var(--sl-divider); border-radius: var(--sl-radius-lg); background: var(--sl-card); }
.rgt-matrix-wrap:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-matrix { border-collapse: collapse; border-spacing: 0; margin: 0; font-size: var(--sl-text-table); line-height: var(--sl-lh-table); color: var(--sl-on-surface); }
.rgt-matrix :where(th, td) { padding: 0 var(--sl-space-3); border-bottom: 1px solid var(--sl-divider); vertical-align: middle; }
.rgt-matrix th[scope="col"] { height: 3.5rem; text-align: center; font-weight: 600; }
.rgt-matrix th[scope="col"] small { display: block; font: var(--sl-body-s); font-weight: 400; color: var(--sl-on-surface-variant); }
.rgt-matrix__perm { position: sticky; left: 0; z-index: var(--sl-z-raised); min-width: 16rem; padding-left: var(--sl-space-8); background: var(--sl-surface-container-lowest); font-weight: 400; text-align: left; }
.rgt-matrix__group > * { height: 2rem; background: var(--sl-surface-container-low); }
.rgt-matrix__group > th { position: sticky; left: 0; z-index: var(--sl-z-raised); font-weight: 600; text-align: left; }
.rgt-matrix__cell { min-width: 6rem; text-align: center; }
.rgt-matrix__mark { display: inline-grid; place-items: center; box-sizing: border-box; width: 1.25rem; height: 1.25rem; border: 0; border-radius: var(--sl-radius-xs); font-size: var(--sl-text-label); line-height: 1; font-weight: 600; vertical-align: middle; }
.rgt-matrix__mark > .rgt-icon { width: 1rem; height: 1rem; }
.rgt-matrix__mark--assigned { background: var(--sl-primary); color: var(--sl-on-primary); }
.rgt-matrix__mark--inherited { border: 2px solid var(--sl-primary); background: transparent; color: var(--sl-primary); }
.rgt-matrix__mark--none { background: transparent; color: var(--sl-outline); }
.rgt-matrix__branch { color: var(--sl-primary); font-weight: 600; margin-inline-end: 2px; }
.rgt-matrix-legend { list-style: none; padding: 0; margin: var(--sl-space-4) 0 0; display: flex; flex-wrap: wrap; gap: var(--sl-space-6); font: var(--sl-body-s); color: var(--sl-on-surface-variant); }
.rgt-matrix-legend > li { display: flex; align-items: center; gap: var(--sl-space-2); }
.rgt-people-note { margin: 0; padding: var(--sl-space-3) var(--sl-space-4); font: var(--sl-body-s); color: var(--sl-on-surface-variant); }
.rgt-secret { display: block; box-sizing: border-box; padding: var(--sl-space-3); border-radius: var(--sl-radius-md); background: var(--sl-inset); font: var(--sl-title-l); font-family: var(--sl-font-mono); letter-spacing: var(--sl-code-tracking); user-select: all; }
@media (max-width: 839px) {
  .rgt-role-layout, .rgt-user-layout { grid-template-columns: minmax(0, 1fr); }
  .rgt-assign-form > :nth-child(-n + 2) { flex: 1 1 100%; width: auto; max-width: none; }
  .rgt-people-list__toolbar .rgt-search { flex: 1 1 100%; }
}
@media (max-width: 599px) {
  .rgt-matrix__perm { min-width: 11rem; }
}

/* RGT-224 (ADR-30 доп.), RGT-407 (ADR-30 доп. RGT-407 Д4): «Головна» — швидкі дії, «Потребує уваги» з чипами, «Моя робота» */
.rgt-home__head { display: flex; flex-direction: column; gap: var(--sl-space-1); margin: var(--sl-space-3) 0 var(--sl-space-4); }
.rgt-home__title { margin: 0; font: var(--sl-headline-s); overflow-wrap: anywhere; }
.rgt-home__meta { margin: 0; color: var(--sl-on-surface-variant); }
.rgt-home__actions { display: flex; flex-wrap: wrap; gap: var(--sl-space-2); margin: 0 0 var(--sl-space-4); }
.rgt-home__action { display: inline-flex; align-items: center; gap: var(--sl-space-2); box-sizing: border-box; min-height: var(--sl-control-h); padding: 0 var(--sl-space-4) 0 var(--sl-space-3); border-radius: var(--sl-radius-full); background: var(--sl-secondary-container); color: var(--sl-on-secondary-container); font-weight: 500; text-decoration: none; }
.rgt-home__more-actions { display: none; }
.rgt-home__action--primary { background: var(--sl-primary); color: var(--sl-on-primary); }
.rgt-home__action:hover { background-image: linear-gradient(color-mix(in srgb, currentColor var(--sl-state-hover), transparent), color-mix(in srgb, currentColor var(--sl-state-hover), transparent)); }
.rgt-home__action:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
@media (max-width: 839px) {
  .rgt-home__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rgt-home__action { min-height: var(--sl-size-target-touch); border-radius: var(--sl-radius-lg); }
  .rgt-home__action--extra { display: none; }
  .rgt-home__more-actions { display: block; grid-column: 1 / -1; }
  .rgt-home__more-actions[open] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sl-space-2); }
  .rgt-home__more-actions > summary { grid-column: 1 / -1; }
  .rgt-home__more-actions > summary { cursor: pointer; list-style: none; }
  .rgt-home__more-actions > summary::-webkit-details-marker { display: none; }
}
.rgt-home__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sl-space-4); align-items: start; }
@media (min-width: 1200px) {
  .rgt-home__grid:has(> .rgt-home__attention):has(> .rgt-home__work) { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
}
@media (max-width: 839px) {
  .rgt-home__work { order: -1; }
}
.rgt-home__panel { box-sizing: border-box; min-width: 0; background: var(--sl-card); border: 1px solid var(--sl-divider); border-radius: var(--sl-radius-lg); overflow: hidden; }
.rgt-home__panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2); box-sizing: border-box; min-height: 3.5rem; padding: 0 var(--sl-space-3) 0 var(--sl-space-5); border-bottom: 1px solid var(--sl-divider); }
.rgt-home__panel-title { flex: 1; margin: 0; font: var(--sl-title-m); }
.rgt-home__scope { color: var(--sl-on-surface-variant); font-weight: 400; }
.rgt-home__chips { display: flex; flex-wrap: wrap; gap: var(--sl-space-2); padding: var(--sl-space-3) var(--sl-space-5) 0; }
.rgt-home__chip { gap: .375rem; padding: 0 var(--sl-space-3) 0 var(--sl-space-2); text-decoration: none; }
.rgt-home__chip--recalled { background: var(--sl-st-recalled-bg); color: var(--sl-st-recalled-fg); }
.rgt-home__chip--quarantine { background: var(--sl-st-quarantine-bg); color: var(--sl-st-quarantine-fg); }
.rgt-home__chip--expired { background: var(--sl-st-expired-bg); color: var(--sl-st-expired-fg); }
.rgt-home__chip--warn { background: var(--sl-st-warn-bg); color: var(--sl-st-warn-fg); }
.rgt-home__chip--transit { background: var(--sl-st-transit-bg); color: var(--sl-st-transit-fg); }
.rgt-home__chip[aria-current="true"] { box-shadow: inset 0 0 0 2px currentColor; }
.rgt-home__chip-count { font-weight: 700; font-variant-numeric: tabular-nums; }
.rgt-home__quiet { display: flex; align-items: center; gap: var(--sl-space-2); margin: 0; padding: var(--sl-space-3) var(--sl-space-5); font: var(--sl-body-s); color: var(--sl-on-surface-variant); }
.rgt-home__quiet > .rgt-icon { color: var(--sl-st-ok-ic); }
.rgt-home__list { list-style: none; margin: 0; padding: 0; }
.rgt-home__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main status" "main action"; align-items: center; gap: var(--sl-space-1) var(--sl-space-3); padding: var(--sl-space-3) var(--sl-space-4) var(--sl-space-3) var(--sl-space-5); border-top: 1px solid var(--sl-divider); }
@media (min-width: 840px) {
  .rgt-home__row { grid-template-columns: minmax(0, 1fr) 9.375rem auto; grid-template-areas: "main status action"; min-height: 3.5rem; padding-block: var(--sl-space-2); }
}
.rgt-home__row-main { grid-area: main; min-width: 0; display: flex; flex-direction: column; }
.rgt-home__row-name { color: var(--sl-on-surface); font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.rgt-home__row-name:hover { text-decoration: underline; }
.rgt-home__row-name:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-home__row-sub { font: var(--sl-body-s); color: var(--sl-on-surface-variant); overflow-wrap: anywhere; }
.rgt-home__row-status { grid-area: status; min-width: 0; justify-self: end; }
.rgt-home__row-action { grid-area: action; justify-self: end; }
.rgt-home__more { margin: 0; padding: var(--sl-space-3) var(--sl-space-5); border-top: 1px solid var(--sl-divider); font: var(--sl-body-s); color: var(--sl-on-surface-variant); }
.rgt-home__more > a { color: var(--sl-primary); font-weight: 500; }
.rgt-home__work-row { display: flex; align-items: center; gap: var(--sl-space-3); box-sizing: border-box; min-height: var(--sl-size-target-touch); padding: 0 var(--sl-space-4) 0 var(--sl-space-5); border-top: 1px solid var(--sl-divider); color: var(--sl-on-surface); text-decoration: none; }
.rgt-home__list > li:first-child > .rgt-home__work-row { border-top: 0; }
.rgt-home__work-row:hover { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-home__work-row:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: calc(-1 * var(--sl-focus-width)); }
.rgt-home__work-label { flex: 1; min-width: 0; }
.rgt-home__work-count { font: var(--sl-title-m); font-variant-numeric: tabular-nums; }
/* --- Переміщення (RGT-128, ADR-58 доповнення RGT-128) --- */
.rgt-transfers-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2); margin: 0 0 var(--sl-space-4); }
.rgt-transfers-filters .rgt-filter-chip { text-decoration: none; }
.rgt-transfers-filters__count { color: var(--sl-on-surface-variant); font-weight: 400; font-variant-numeric: tabular-nums; }
.rgt-transfers { margin: 0; padding: 0; list-style: none; border: 1px solid var(--sl-divider); border-radius: var(--sl-radius-lg); background: var(--sl-card); overflow: hidden; }
.rgt-transfers__item { display: flex; flex-direction: column; gap: var(--sl-space-2); padding: var(--sl-space-4) var(--sl-space-5); border-top: 1px solid var(--sl-divider); }
.rgt-transfers__item:first-child { border-top: 0; }
.rgt-transfers__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sl-space-2) var(--sl-space-3); }
.rgt-transfers__route { min-width: 0; color: var(--sl-on-surface); font-weight: 600; overflow-wrap: anywhere; text-decoration: none; }
.rgt-transfers__route:hover { text-decoration: underline; }
.rgt-transfers__body { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2) var(--sl-space-4); }
.rgt-transfers__text { display: flex; flex: 1 1 16rem; flex-direction: column; gap: var(--sl-space-1); min-width: 0; }
.rgt-transfers__items { overflow-wrap: anywhere; }
.rgt-transfers__meta, .rgt-transfers__waiting { font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-transfer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sl-space-4); align-items: start; }
.rgt-transfer__banner { margin: 0 0 var(--sl-space-4); }
.rgt-transfer__lines { grid-column: 1 / -1; }
.rgt-transfer__counters { margin: var(--sl-space-2) 0 var(--sl-space-3); font-size: 1rem; line-height: 1.5rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.rgt-transfer__note { margin: var(--sl-space-2) 0 0; color: var(--sl-on-surface-variant); }
.rgt-transfer__form { display: flex; flex-direction: column; gap: var(--sl-space-4); margin-top: var(--sl-space-3); }
.rgt-transfer__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sl-space-3); margin-top: var(--sl-space-3); }
.rgt-transfer-table { width: 100%; }
.rgt-transfer-table td { overflow-wrap: anywhere; }
.rgt-unit-receive { display: flex; flex-direction: column; gap: var(--sl-space-4); }
.rgt-transfer__inline { display: inline-flex; margin: 0; }
.rgt-transfer__line-error { margin: var(--sl-space-1) 0 0; font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-error); }
.rgt-transfer__empty { color: var(--sl-on-surface-variant); text-align: center; }
@media (max-width: 839px) {
  .rgt-transfer { grid-template-columns: minmax(0, 1fr); }
  .rgt-transfers__item { padding: var(--sl-space-3) var(--sl-space-4); }
}

/* --- Температура (RGT-318, ADR-57 доповнення RGT-318) --- */
.rgt-tmp-tabs { margin: 0 0 var(--sl-space-4); padding: 0; }
.rgt-tmp-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2); margin: 0 0 var(--sl-space-4); }
.rgt-tmp-filters .rgt-filter-chip { text-decoration: none; }
.rgt-tmp-place-filter { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2) var(--sl-space-3); margin: 0 0 var(--sl-space-4); overflow-wrap: anywhere; }
.rgt-tmp-table { width: 100%; }
.rgt-tmp-table td { overflow-wrap: anywhere; }
.rgt-tmp-more, .rgt-tmp-empty { margin: var(--sl-space-3) 0 0; color: var(--sl-on-surface-variant); }
.rgt-tmp-banner { margin: 0 0 var(--sl-space-4); }
.rgt-tmp-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sl-space-4); align-items: start; }
.rgt-tmp-card__wide { grid-column: 1 / -1; }
.rgt-tmp-note { margin: var(--sl-space-2) 0 0; color: var(--sl-on-surface-variant); overflow-wrap: anywhere; }
.rgt-tmp-form { display: flex; flex-direction: column; gap: var(--sl-space-4); margin-top: var(--sl-space-3); }
.rgt-tmp-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sl-space-3); margin-top: var(--sl-space-3); }
.rgt-tmp-period { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--sl-space-3); margin: var(--sl-space-3) 0; }
.rgt-tmp-period .rgt-field { flex: 0 1 14rem; min-width: 0; }
.rgt-tmp-log__value { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rgt-tmp-log__row--annulled .rgt-tmp-log__value { text-decoration: line-through; color: var(--sl-on-surface-variant); }
.rgt-tmp-log__annul { display: block; color: var(--sl-on-surface-variant); }
.rgt-tmp-log__summary { display: inline-flex; align-items: center; min-height: var(--sl-size-target-touch); cursor: pointer; color: var(--sl-primary); font-size: var(--sl-text-label); font-weight: 500; }
.rgt-tmp-log__summary:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-width); }
.rgt-tmp-log__details { display: block; }
.rgt-tmp-log__action { display: block; margin-top: var(--sl-space-1); }
.rgt-tmp-excursions { display: flex; flex-direction: column; margin: var(--sl-space-3) 0 0; padding: 0; list-style: none; }
.rgt-tmp-excursions__item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sl-space-2) var(--sl-space-3); padding: var(--sl-space-2) 0; border-bottom: 1px solid var(--sl-divider); }
.rgt-tmp-excursions__item:last-child { border-bottom: 0; }
.rgt-tmp-excursions__link { min-width: 0; color: var(--sl-primary); overflow-wrap: anywhere; }
.rgt-unit__flag-link { color: inherit; text-decoration: underline; }
@media (max-width: 839px) {
  .rgt-tmp-card { grid-template-columns: minmax(0, 1fr); }
}

/* --- Залишки З1 (RGT-225, ADR-31) --- */
.rgt-stock { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.rgt-stock__toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2); box-sizing: border-box; min-height: 4rem; margin: 0; padding: var(--sl-space-3) var(--sl-space-4); border-bottom: 1px solid var(--sl-divider); }
.rgt-stock__hidden { display: contents; }
.rgt-stock__search { flex: 0 1 13.75rem; width: 13.75rem; max-width: 100%; min-height: var(--sl-control-h-sm); padding-right: var(--sl-space-4); background: var(--sl-inset); box-shadow: none; }
.rgt-stock__search .rgt-search__input { height: var(--sl-control-h-sm); }
.rgt-stock__chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2); min-width: 0; }
.rgt-stock__spacer { flex: 1 1 0; }
.rgt-stock__item-chip { max-width: 100%; }
.rgt-stock__item-chip > .rgt-chip__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rgt-stock-chip { gap: .375rem; padding: 0 var(--sl-space-3) 0 var(--sl-space-2); color: var(--sl-on-surface); text-decoration: none; }
.rgt-stock-chip[aria-current="true"] { background: var(--sl-secondary-container); color: var(--sl-on-secondary-container); box-shadow: none; }
.rgt-stock-chip[aria-current="true"] > .rgt-icon { display: block; }
.rgt-stock-chip[aria-current="true"] > .rgt-stock-chip__dot { display: none; }
.rgt-stock-chip__dot { flex: none; width: .5rem; height: .5rem; border-radius: var(--sl-radius-full); background: var(--sl-st-finished-ic); }
.rgt-stock-chip__dot--ok { background: var(--sl-st-ok-ic); }
.rgt-stock-chip__dot--warn { background: var(--sl-st-warn-ic); }
.rgt-stock-chip__dot--expired { background: var(--sl-st-expired-ic); }
.rgt-stock-chip__dot--quarantine { background: var(--sl-st-quarantine-ic); }
.rgt-stock-chip__dot--recalled { background: var(--sl-st-recalled-ic); }
.rgt-stock-chip__dot--transit { background: var(--sl-st-transit-ic); }
.rgt-stock-chip__dot--finished { background: var(--sl-st-finished-ic); }
.rgt-stock-chip__count { color: var(--sl-on-surface-variant); font-weight: 400; font-variant-numeric: tabular-nums; }
.rgt-stock-chip__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rgt-stock-chip[aria-current="true"] > .rgt-stock-chip__count { color: inherit; }
.rgt-stock__results { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.rgt-stock__results > .rgt-table-wrap { flex: 1 0 auto; border: 0; border-radius: 0; background: transparent; }
.rgt-stock-table { width: 100%; }
.rgt-stock-table th, .rgt-stock-table td { padding: 0 var(--sl-space-2); }
.rgt-stock-table th:first-child, .rgt-stock-table td:first-child { padding-left: var(--sl-space-4); }
.rgt-stock-table th:last-child, .rgt-stock-table td:last-child { padding-right: var(--sl-space-4); }
.rgt-stock-table thead th { height: 2.5rem; }
.rgt-stock-table tbody + tbody > tr:first-child > * { border-top: 1px solid var(--sl-divider); }
.rgt-stock-table__item { min-width: 14rem; }
.rgt-stock-table__name { display: block; color: var(--sl-on-surface); font-weight: 500; overflow-wrap: anywhere; }
.rgt-stock-table__place { min-width: 12rem; }
.rgt-stock-table__path { display: block; overflow-wrap: anywhere; }
.rgt-stock-table__expiry, .rgt-stock-table__qty { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rgt-stock-table__label { display: none; }
.rgt-stock-table__stage-dot { flex: none; width: .5rem; height: .5rem; box-sizing: border-box; border: 2px solid var(--sl-on-surface-variant); border-radius: var(--sl-radius-full); }
@media (max-width: 839px) {
  .rgt-stock__toolbar { padding: var(--sl-space-3); }
  .rgt-stock__search { flex: 1 1 100%; width: auto; }
  .rgt-stock__chips { flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; padding: var(--sl-space-1) var(--sl-space-1); }
  .rgt-stock__spacer { display: none; }
  .rgt-stock-table { min-width: 0; }
  .rgt-stock-table, .rgt-stock-table tbody { display: block; }
  .rgt-stock-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .rgt-stock-table tr.rgt-stock-table__group { display: block; }
  .rgt-stock-table tr.rgt-stock-table__group > th { display: flex; align-items: center; height: auto; min-height: var(--sl-group-h); padding: 0 var(--sl-space-4); }
  .rgt-stock-table tr.rgt-stock-table__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "item item" "status qty" "stage expiry" "place place"; align-items: center; gap: var(--sl-space-2) var(--sl-space-3); padding: var(--sl-space-3) var(--sl-space-4); border-bottom: 1px solid var(--sl-divider); }
  .rgt-stock-table tr.rgt-stock-table__row > td { display: block; height: auto; min-width: 0; padding: 0; border: 0; }
  .rgt-stock-table__item { grid-area: item; }
  .rgt-stock-table__status { grid-area: status; }
  .rgt-stock-table__qty { grid-area: qty; justify-self: end; }
  .rgt-stock-table__stage { grid-area: stage; }
  .rgt-stock-table__expiry { grid-area: expiry; justify-self: end; }
  .rgt-stock-table__place { grid-area: place; }
  .rgt-stock-table__label { display: inline; color: var(--sl-on-surface-variant); }
  .rgt-stock-table tbody:last-child > tr:last-child { border-bottom: 0; }
}

/* --- Верифікація лотів (RGT-118, ADR-55 доповнення RGT-118) --- */
.rgt-verify-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2); margin: 0 0 var(--sl-space-4); }
.rgt-verify-filters .rgt-filter-chip { text-decoration: none; }
.rgt-quality-table { width: 100%; } /* RGT-410: спільна таблиця черг «Якості» */
.rgt-quality-table td { overflow-wrap: anywhere; }
.rgt-quality-table__expiry { white-space: nowrap; }
.rgt-verify { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--sl-space-4); align-items: start; }
.rgt-verify__history { grid-column: 1 / -1; }
.rgt-verify__note { margin-top: var(--sl-space-4); }
.rgt-verify__fact-note { font-weight: 400; color: var(--sl-on-surface-variant); }
.rgt-verify__form { display: flex; flex-direction: column; gap: var(--sl-space-4); margin-top: var(--sl-space-3); }
.rgt-verify__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sl-space-3); }
.rgt-verify__events { display: flex; flex-direction: column; margin: var(--sl-space-3) 0 0; padding: 0; list-style: none; }
.rgt-verify__event { display: flex; flex-direction: column; gap: var(--sl-space-1); padding: var(--sl-space-3) 0; border-bottom: 1px solid var(--sl-divider); }
.rgt-verify__event:last-child { border-bottom: 0; }
.rgt-verify__event-text { font-weight: 500; }
.rgt-verify__event-meta { font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-verify__event-comment { overflow-wrap: anywhere; }
.rgt-verify__empty { margin: var(--sl-space-3) 0 0; color: var(--sl-on-surface-variant); }
.rgt-verify__action { margin-left: auto; }
.rgt-verify-writeoff { display: flex; flex-direction: column; gap: var(--sl-space-4); max-width: 48rem; }
.rgt-verify-writeoff__question { margin: 0; font: var(--sl-title-m); overflow-wrap: anywhere; }
.rgt-verify-writeoff__effects { margin: var(--sl-space-3) 0 0; padding-left: var(--sl-space-5); display: flex; flex-direction: column; gap: var(--sl-space-2); }
.rgt-verify-writeoff__form { display: flex; flex-direction: column; gap: var(--sl-space-4); margin-top: var(--sl-space-4); }
.rgt-verify-writeoff__group { min-width: 0; margin: 0; padding: 0; border: 0; }
.rgt-verify-writeoff__legend { padding: 0; margin-bottom: var(--sl-space-2); font: var(--sl-title-s); }
.rgt-verify-writeoff__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sl-space-3); }
.rgt-verify-units { grid-column: 1 / -1; min-width: 0; padding: 0; overflow: hidden; }
.rgt-verify-units__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sl-space-1) var(--sl-space-3); padding: var(--sl-space-4) var(--sl-space-5); }
.rgt-verify-units__title { flex: 1; margin: 0; font: var(--sl-title-m); }
.rgt-verify-units__count { color: var(--sl-on-surface-variant); font-size: var(--sl-text-label); }
.rgt-verify-units > .rgt-table-wrap { border: 0; border-radius: 0; border-top: 1px solid var(--sl-divider); }
.rgt-verify-units__table { width: 100%; }
.rgt-verify-units__place { overflow-wrap: anywhere; }
.rgt-verify-units__qty { white-space: nowrap; }
.rgt-verify-units__marks { display: flex; flex-wrap: wrap; gap: var(--sl-space-1); }
.rgt-verify-units__note { margin: 0; padding: var(--sl-space-4) var(--sl-space-5); border-top: 1px solid var(--sl-divider); color: var(--sl-on-surface-variant); }
@media (max-width: 839px) {
  .rgt-verify { grid-template-columns: minmax(0, 1fr); }
}

/* --- Відкликання лотів (RGT-122, ADR-56 доповнення RGT-122) --- */
.rgt-recall-search { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--sl-space-3); margin: 0 0 var(--sl-space-4); }
.rgt-recall-search .rgt-field { flex: 1 1 18rem; max-width: 32rem; }
.rgt-recall-table { width: 100%; }
.rgt-recall-table td { overflow-wrap: anywhere; }
.rgt-recall-more { margin: var(--sl-space-3) 0 0; color: var(--sl-on-surface-variant); }
.rgt-recall { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--sl-space-4); align-items: start; }
.rgt-recall__action { margin-left: auto; }
.rgt-recall__wide { grid-column: 1 / -1; display: flex; flex-direction: column; gap: var(--sl-space-3); }
.rgt-recall__subtitle { margin: var(--sl-space-2) 0 0; font: var(--sl-title-s); }
.rgt-recall__doc { margin: var(--sl-space-3) 0 0; }
.rgt-recall__fact-note { font-weight: 400; color: var(--sl-on-surface-variant); }
.rgt-recall__link { color: var(--sl-primary); }
.rgt-recall__note { margin-top: var(--sl-space-4); }
.rgt-recall__more { margin: 0; color: var(--sl-on-surface-variant); }
.rgt-recall__events { display: flex; flex-direction: column; margin: var(--sl-space-3) 0 0; padding: 0; list-style: none; }
.rgt-recall__event { display: flex; flex-direction: column; gap: var(--sl-space-1); padding: var(--sl-space-3) 0; border-bottom: 1px solid var(--sl-divider); }
.rgt-recall__event:last-child { border-bottom: 0; }
.rgt-recall__event-text { font-weight: 500; }
.rgt-recall__event-meta { font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-recall__event-reason { overflow-wrap: anywhere; }
.rgt-recall__empty { margin: var(--sl-space-3) 0 0; color: var(--sl-on-surface-variant); }
.rgt-recall-confirm { display: flex; flex-direction: column; gap: var(--sl-space-4); max-width: 48rem; }
.rgt-recall-confirm__question { margin: 0; font: var(--sl-title-m); overflow-wrap: anywhere; }
.rgt-recall-confirm__effects { margin: var(--sl-space-3) 0 0; padding-left: var(--sl-space-5); display: flex; flex-direction: column; gap: var(--sl-space-2); }
.rgt-recall-confirm__form { display: flex; flex-direction: column; gap: var(--sl-space-4); margin-top: var(--sl-space-4); }
.rgt-recall-confirm__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sl-space-3); }
@media (max-width: 839px) {
  .rgt-recall { grid-template-columns: minmax(0, 1fr); }
}

/* --- Запити між лабораторіями (RGT-131, ADR-59 доповнення RGT-131) --- */
.rgt-req-tabs { margin: 0 0 var(--sl-space-4); padding: 0; }
.rgt-req-tabs__count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.25rem; height: 1.25rem; margin-left: var(--sl-space-2); padding: 0 var(--sl-space-1); box-sizing: border-box; border-radius: var(--sl-radius-full); background: var(--sl-primary); color: var(--sl-on-primary); font-size: var(--sl-text-label); line-height: 1; }
.rgt-req-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2); margin: 0 0 var(--sl-space-4); }
.rgt-req-filters .rgt-filter-chip { text-decoration: none; }
.rgt-req-filters__count { color: var(--sl-on-surface-variant); font-variant-numeric: tabular-nums; }
.rgt-req-table { width: 100%; }
.rgt-req-table td { overflow-wrap: anywhere; }
.rgt-req-card, .rgt-req-new { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sl-space-4); align-items: start; }
.rgt-req-card__wide, .rgt-req-new__wide { grid-column: 1 / -1; }
.rgt-req-card__banner { margin: 0 0 var(--sl-space-4); }
.rgt-req-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-3); margin-top: var(--sl-space-3); }
.rgt-req-card__cancel { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2) var(--sl-space-3); }
.rgt-req-card__hint { font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-req-card__form { display: flex; flex-direction: column; gap: var(--sl-space-4); margin-top: var(--sl-space-3); }
.rgt-req-card__buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sl-space-3); }
.rgt-req-units { display: flex; flex-direction: column; gap: var(--sl-space-3); min-width: 0; margin: 0; padding: 0; border: 0; }
.rgt-req-units__legend { float: none; width: auto; margin: 0; padding: 0; font-weight: 500; font-size: inherit; }
.rgt-req-units__group { display: flex; flex-direction: column; gap: var(--sl-space-1); min-width: 0; }
.rgt-req-units__head { margin: 0; color: var(--sl-on-surface-variant); overflow-wrap: anywhere; }
.rgt-req-units__empty, .rgt-req-new__empty { margin: 0; color: var(--sl-on-surface-variant); }
.rgt-req-units .rgt-checkbox__label { overflow-wrap: anywhere; }
.rgt-req-new__row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--sl-space-3); margin-top: var(--sl-space-3); }
.rgt-req-new__row > .rgt-field { flex: 1 1 14rem; min-width: 0; }
.rgt-req-new__hint { margin: var(--sl-space-2) 0 var(--sl-space-3); color: var(--sl-on-surface-variant); }
.rgt-req-new__picked { margin: var(--sl-space-3) 0 0; font-weight: 500; overflow-wrap: anywhere; }
.rgt-req-new__change { margin-left: var(--sl-space-2); font-weight: 400; }
.rgt-req-new__matches { display: flex; flex-direction: column; margin: var(--sl-space-3) 0 0; padding: 0; list-style: none; }
.rgt-req-new__match { display: block; padding: var(--sl-space-2) 0; overflow-wrap: anywhere; }
.rgt-req-new__qty { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: var(--sl-space-3); }
@media (max-width: 839px) {
  .rgt-req-card, .rgt-req-new { grid-template-columns: minmax(0, 1fr); }
}

/* --- Профіль З5 (RGT-241, ADR-34) --- */
.rgt-profile { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sl-space-4); align-items: start; }
@media (min-width: 840px) {
  .rgt-profile { grid-template-columns: minmax(0, 25rem) minmax(0, 1fr); }
}
.rgt-profile__me { display: flex; flex-direction: column; gap: var(--sl-space-5); padding: var(--sl-space-6); }
.rgt-profile__who { display: flex; align-items: center; gap: var(--sl-space-4); min-width: 0; }
.rgt-profile__avatar { flex: none; width: 4rem; height: 4rem; border-radius: var(--sl-radius-full); display: inline-flex; align-items: center; justify-content: center; background: var(--sl-tertiary-container); color: var(--sl-on-tertiary-container); font-size: 1.375rem; font-weight: 600; }
.rgt-profile__name { margin: 0; font-size: 1.375rem; line-height: 1.75rem; font-weight: 500; overflow-wrap: anywhere; }
.rgt-profile__sub { margin: 0; color: var(--sl-on-surface-variant); overflow-wrap: anywhere; }
.rgt-profile__facts { margin: 0; display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); row-gap: var(--sl-space-1); }
.rgt-profile__facts dt { align-self: start; color: var(--sl-on-surface-variant); min-height: 2rem; display: flex; align-items: center; }
.rgt-profile__facts dd { margin: 0; min-height: 2rem; display: flex; align-items: center; min-width: 0; }
@media (max-width: 599px) {
  .rgt-profile__facts { grid-template-columns: minmax(0, 1fr); }
  .rgt-profile__facts dd { padding-bottom: var(--sl-space-2); }
}
.rgt-profile__chips { flex-wrap: wrap; gap: var(--sl-space-2); padding: var(--sl-space-1) 0; }
.rgt-profile__chips .rgt-chip { max-width: 100%; min-width: 0; }
.rgt-profile__chips .rgt-chip__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rgt-profile__scope { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--sl-space-1); }
.rgt-profile__muted { color: var(--sl-on-surface-variant); }
.rgt-profile__rights { margin: calc(-1 * var(--sl-space-3)) 0 0 calc(-1 * var(--sl-space-3)); }
.rgt-profile__actions { display: flex; flex-wrap: wrap; gap: var(--sl-space-2); }
.rgt-profile__logout { display: contents; }
.rgt-profile__logout .rgt-btn { color: var(--sl-error); }
.rgt-profile__side { display: flex; flex-direction: column; gap: var(--sl-space-4); min-width: 0; }
.rgt-profile__section { display: flex; flex-direction: column; gap: var(--sl-space-4); }
.rgt-profile__section-title { margin: 0; font-size: 1rem; line-height: 1.5rem; font-weight: 600; }
@media (min-width: 600px) {
  #profile-look { padding: var(--sl-space-5) var(--sl-space-6); gap: var(--sl-space-1); }
  #profile-look .rgt-profile__section-title { margin: 0 0 var(--sl-space-2); }
  #profile-pin, #profile-password { padding: var(--sl-space-5) var(--sl-space-6); gap: var(--sl-space-4); }
}
.rgt-profile__row { display: flex; align-items: center; gap: var(--sl-space-4); min-height: 4rem; flex-wrap: wrap; }
.rgt-profile__row + .rgt-profile__row { border-top: 1px solid var(--sl-divider); }
.rgt-profile__row-text { flex: 1 1 12rem; min-width: 0; display: flex; flex-direction: column; }
@media (max-width: 599px) {
  .rgt-profile__row { flex-direction: column; align-items: stretch; }
  .rgt-profile__row-text { flex: 0 0 auto; }
  .rgt-profile__row .rgt-segmented, .rgt-profile__row .rgt-segmented__track { display: flex; width: 100%; }
  .rgt-profile__row .rgt-segmented__option { flex: 1 1 0; min-width: 0; padding: 0 var(--sl-space-2); }
  .rgt-profile__row .rgt-segmented__label { white-space: normal; text-align: center; }
}
.rgt-profile__hint { margin: 0; font-size: var(--sl-text-label, 0.75rem); color: var(--sl-on-surface-variant); }
.rgt-profile__pin-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sl-space-4) var(--sl-space-6); }
@media (min-width: 600px) {
  .rgt-profile__pin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.rgt-profile__submit { display: flex; justify-content: flex-end; }
.rgt-profile__session { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-3); padding: var(--sl-space-4) var(--sl-space-6); border-radius: var(--sl-radius-lg); background: var(--sl-surface-container); }
.rgt-profile__session-title { flex: 1 1 16rem; margin: 0; font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; }
.rgt-profile__session-note { color: var(--sl-on-surface-variant); font-weight: 400; }
.rgt-drawer__item:any-link { text-decoration: none; }

/* --- Імпорт каталогу Г6 (RGT-244, ADR-35) --- */
.rgt-steps { display: flex; align-items: center; gap: var(--sl-space-3); margin: 0; padding: 0; list-style: none; }
.rgt-steps__item { display: flex; align-items: center; gap: var(--sl-space-2); color: var(--sl-on-surface-variant); }
.rgt-steps__item[aria-current="step"] { color: var(--sl-on-surface); font-weight: 600; }
.rgt-steps__mark { flex: none; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 1.75rem; height: 1.75rem; border: 2px solid var(--sl-outline); border-radius: var(--sl-radius-full); font-size: 0.8125rem; font-weight: 600; }
.rgt-steps__item[aria-current="step"] > .rgt-steps__mark { background: var(--sl-primary); border-color: var(--sl-primary); color: var(--sl-on-primary); }
.rgt-steps__item--done > .rgt-steps__mark { background: var(--sl-primary); border-color: var(--sl-primary); color: var(--sl-on-primary); }
.rgt-steps__line { flex: 1 1 auto; min-width: var(--sl-space-4); height: 2px; background: var(--sl-outline-variant); }
.rgt-steps__item--done + .rgt-steps__line { background: var(--sl-primary); }
@media (max-width: 599px) {
  .rgt-steps { gap: var(--sl-space-2); }
  .rgt-steps__item { gap: var(--sl-space-1); }
  .rgt-steps__line { min-width: var(--sl-space-2); }
}
.rgt-steps--compact { flex: 0 1 26rem; }
@media (max-width: 839px) {
  .rgt-steps--compact { flex-basis: 100%; }
}
.rgt-import { max-width: 55rem; margin-inline: auto; width: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: var(--sl-space-6); padding: var(--sl-space-6); }
@media (max-width: 599px) {
  .rgt-import { padding: var(--sl-space-4); gap: var(--sl-space-4); }
}
.rgt-import__intro { display: flex; flex-direction: column; gap: var(--sl-space-1); }
.rgt-import__title { margin: 0; font-size: 1.375rem; line-height: 1.75rem; font-weight: 500; }
.rgt-import__text { margin: 0; color: var(--sl-on-surface-variant); }
.rgt-import__form { display: flex; flex-direction: column; gap: var(--sl-space-6); }
.rgt-import__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2); }
.rgt-import__spacer { flex: 1 1 auto; }
.rgt-import__template { margin-left: calc(-1 * var(--sl-space-3)); }
.rgt-import__hint { margin: 0; align-self: flex-end; display: flex; align-items: center; gap: var(--sl-space-1); font-size: 0.75rem; line-height: 1rem; color: var(--sl-on-surface-variant); }
.rgt-import__hint[hidden] { display: none; }
.rgt-dropzone { position: relative; min-height: 15rem; box-sizing: border-box; padding: var(--sl-space-6); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sl-space-3); text-align: center; border: 2px dashed var(--sl-outline); border-radius: var(--sl-radius-lg); background: var(--sl-surface); }
@media (max-width: 599px) {
  .rgt-dropzone { min-height: 12rem; }
}
.rgt-dropzone:focus-within { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-dropzone--over { border-color: var(--sl-primary); background: var(--sl-surface-container-low); }
.rgt-dropzone--invalid { border-color: var(--sl-error); }
.rgt-dropzone__icon { display: inline-flex; align-items: center; justify-content: center; width: 4rem; height: 4rem; border-radius: var(--sl-radius-full); background: var(--sl-surface-container-high); color: var(--sl-on-surface-variant); }
.rgt-dropzone__text { font-size: 1rem; font-weight: 500; }
.rgt-dropzone__button { min-height: var(--sl-control-h-sm); padding: 0 var(--sl-space-5); border-radius: var(--sl-radius-full); background: var(--sl-secondary-container); color: var(--sl-on-secondary-container); font-weight: 600; display: inline-flex; align-items: center; }
.rgt-dropzone__name { font-weight: 500; overflow-wrap: anywhere; }
.rgt-dropzone__name:empty { display: none; }
.rgt-dropzone__input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.rgt-import-history { max-width: 55rem; margin-inline: auto; width: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: var(--sl-space-4); margin-top: var(--sl-space-6); }
.rgt-import-history__title { margin: 0; font-size: 1rem; line-height: 1.5rem; font-weight: 600; }
.rgt-import-history__empty { margin: 0; color: var(--sl-on-surface-variant); }
.rgt-import-history__table { min-width: 40rem; }
.rgt-import-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 2fr); gap: var(--sl-space-3); margin-bottom: var(--sl-space-4); }
@media (max-width: 839px) {
  .rgt-import-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rgt-import-file { grid-column: 1 / -1; }
}
.rgt-import-tile { padding: var(--sl-space-4); border-radius: var(--sl-radius-lg); background: var(--sl-surface-container); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rgt-import-tile--ok { background: var(--sl-st-ok-bg); color: var(--sl-st-ok-fg); }
.rgt-import-tile--bad { background: var(--sl-error-container); color: var(--sl-on-error-container); }
.rgt-import-tile__label { font-size: 0.8125rem; }
.rgt-import-tile__value { font-size: 1.75rem; line-height: 2.25rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.rgt-import-file { padding: var(--sl-space-4); border-radius: var(--sl-radius-lg); background: var(--sl-card); border: 1px solid var(--sl-divider); display: flex; align-items: center; gap: var(--sl-space-3); min-width: 0; }
.rgt-import-file__badge { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 2.5rem; height: 2.5rem; border-radius: var(--sl-radius-md); background: var(--sl-st-ok-bg); color: var(--sl-st-ok-fg); font-size: 0.6875rem; font-weight: 700; }
.rgt-import-file__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.rgt-import-file__name { font-weight: 500; overflow-wrap: anywhere; }
.rgt-import-file__meta { font-size: 0.75rem; line-height: 1rem; color: var(--sl-on-surface-variant); }
.rgt-import-check { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sl-space-4); }
@media (min-width: 1200px) {
  .rgt-import-check { grid-template-columns: minmax(0, 1fr) 25rem; align-items: start; }
}
.rgt-import-rows { display: flex; flex-direction: column; min-width: 0; }
.rgt-import-rows__empty { margin: 0; padding: var(--sl-space-6); text-align: center; color: var(--sl-on-surface-variant); }
.rgt-import-table { min-width: 36rem; width: 100%; }
.rgt-import-table__num { font-variant-numeric: tabular-nums; color: var(--sl-on-surface-variant); }
.rgt-import-table__name { font-weight: 500; }
.rgt-import-table__row--error { background: color-mix(in srgb, var(--sl-error-container) 14%, transparent); box-shadow: inset 0.1875rem 0 0 var(--sl-error); }
.rgt-import-table__cell--error { color: var(--sl-error); font-weight: 600; }
.rgt-import-errors { background: var(--sl-card); border: 1px solid var(--sl-divider); border-radius: var(--sl-radius-lg); display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.rgt-import-errors__head { padding: var(--sl-space-4) var(--sl-space-5) var(--sl-space-3); display: flex; align-items: center; gap: var(--sl-space-2); border-bottom: 1px solid var(--sl-divider); }
.rgt-import-errors__head > .rgt-icon { color: var(--sl-error); }
.rgt-import-errors__title { margin: 0; font-size: 1rem; line-height: 1.5rem; font-weight: 600; }
.rgt-import-errors__list { margin: 0; padding: 0; list-style: none; max-height: 60vh; overflow-y: auto; }
.rgt-import-errors__item { padding: var(--sl-space-3) var(--sl-space-5); display: flex; flex-direction: column; gap: var(--sl-space-1); border-bottom: 1px solid var(--sl-divider); }
.rgt-import-errors__link { font-weight: 600; color: var(--sl-on-surface); text-decoration: none; }
.rgt-import-errors__link:hover { text-decoration: underline; }
.rgt-import-errors__link:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-import-errors__text { margin: 0; display: flex; align-items: flex-start; gap: var(--sl-space-2); color: var(--sl-on-error-container); }
.rgt-import-errors__text::before { content: ""; flex: none; width: 0.375rem; height: 0.375rem; margin-top: 0.4375rem; border-radius: var(--sl-radius-full); background: var(--sl-error); }
.rgt-import-errors__hint { margin: 0; padding-left: var(--sl-space-3); font-size: 0.75rem; line-height: 1rem; color: var(--sl-on-surface-variant); }
.rgt-import-errors__more { margin: 0; padding: var(--sl-space-3) var(--sl-space-5); color: var(--sl-on-surface-variant); }
.rgt-import-errors__none { margin: 0; padding: var(--sl-space-3) var(--sl-space-5); color: var(--sl-on-surface-variant); display: flex; align-items: center; gap: var(--sl-space-2); }
.rgt-import-errors__foot { margin-top: auto; padding: var(--sl-space-4) var(--sl-space-5); display: flex; flex-direction: column; gap: var(--sl-space-2); border-top: 1px solid var(--sl-divider); }
.rgt-import-errors__actions { display: flex; flex-wrap: nowrap; justify-content: flex-end; align-items: flex-start; gap: var(--sl-space-2); }
.rgt-import-errors__actions .rgt-btn-reason { align-items: flex-end; }
.rgt-import-errors__note { margin: 0; align-self: flex-end; font-size: 0.75rem; line-height: 1rem; color: var(--sl-on-surface-variant); }
/* --- Постачальники Д1–Д3 (RGT-242, ADR-36) --- */
.rgt-field--textarea .rgt-field__box > .rgt-field__input { height: auto; min-height: 7.5rem; padding-top: var(--sl-space-6); padding-bottom: var(--sl-space-2); line-height: var(--sl-lh-body); resize: vertical; }
.rgt-field--outlined.rgt-field--textarea .rgt-field__box.form-floating > .rgt-field__input { padding-top: var(--sl-space-3); padding-bottom: var(--sl-space-3); }
.rgt-supplier-table { width: 100%; }
.rgt-supplier-table th, .rgt-supplier-table td { padding: 0 var(--sl-space-2); }
.rgt-supplier-table th:first-child, .rgt-supplier-table td:first-child { padding-left: var(--sl-space-4); }
.rgt-supplier-table th:last-child, .rgt-supplier-table td:last-child { padding-right: var(--sl-space-4); }
.rgt-supplier-table thead th { height: 2.5rem; }
.rgt-supplier-table td { height: 3.5rem; }
.rgt-supplier-table th:first-child, .rgt-supplier-table td:first-child { min-width: 14rem; }
.rgt-supplier-table th:nth-child(2), .rgt-supplier-table td:nth-child(2) { width: 10rem; }
.rgt-supplier-table th:nth-child(4), .rgt-supplier-table td:nth-child(4) { width: 6rem; }
.rgt-supplier-table th:nth-child(5), .rgt-supplier-table td:nth-child(5) { width: 3.5rem; }
.rgt-supplier-table__num { text-align: right; font-variant-numeric: tabular-nums; }
.rgt-supplier-table__name-row { display: flex; align-items: center; gap: var(--sl-space-2); min-width: 0; }
.rgt-supplier-table__name--archived { color: var(--sl-on-surface-variant); }
.rgt-supplier-table__sub, .rgt-supplier-table__extra { display: block; font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-supplier-table__extra { overflow-wrap: anywhere; }
.rgt-supplier-table__contact { display: block; min-width: 0; overflow-wrap: anywhere; }
.rgt-suppliers__switch { margin-left: auto; }
.rgt-supplier { display: flex; flex-direction: column; min-width: 0; }
.rgt-supplier__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sl-space-4); align-items: start; }
.rgt-supplier-form { display: flex; flex-direction: column; gap: var(--sl-space-6); margin: 0; padding: var(--sl-space-6); }
.rgt-supplier-form__title { margin: 0; font: var(--sl-title-s); }
.rgt-supplier-form__form { display: flex; flex-direction: column; gap: var(--sl-space-4); margin: 0; }
.rgt-supplier-form__fields { display: flex; flex-direction: column; gap: var(--sl-space-5); min-width: 0; margin: 0; padding: 0; border: 0; }
.rgt-supplier-codes { margin: 0; padding: 0; overflow: hidden; min-width: 0; }
.rgt-supplier-codes__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sl-space-1) var(--sl-space-3); padding: var(--sl-space-5) var(--sl-space-6); }
.rgt-supplier-codes__title { margin: 0; font: var(--sl-title-s); }
.rgt-supplier-codes__summary { color: var(--sl-on-surface-variant); font-size: var(--sl-text-label); }
.rgt-supplier-codes > .rgt-table-wrap { border: 0; border-radius: 0; border-top: 1px solid var(--sl-divider); }
.rgt-supplier-codes__table { width: 100%; }
.rgt-supplier-codes__table th, .rgt-supplier-codes__table td { padding: 0 var(--sl-space-2); }
.rgt-supplier-codes__table th:first-child, .rgt-supplier-codes__table td:first-child { padding-left: var(--sl-space-4); }
.rgt-supplier-codes__table th:last-child, .rgt-supplier-codes__table td:last-child { padding-right: var(--sl-space-4); }
.rgt-supplier-codes__table td { height: 3.5rem; }
.rgt-supplier-codes__table th:first-child, .rgt-supplier-codes__table td:first-child { width: 12.5rem; }
.rgt-supplier-codes__table th:nth-child(2), .rgt-supplier-codes__table td:nth-child(2) { width: 1.5rem; }
.rgt-supplier-codes__table th:nth-child(4), .rgt-supplier-codes__table td:nth-child(4) { width: 3rem; }
.rgt-supplier-codes__arrow { color: var(--sl-on-surface-variant); display: inline-flex; }
.rgt-supplier-codes__item { color: var(--sl-on-surface); font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.rgt-supplier-codes__item:hover { text-decoration: underline; }
.rgt-supplier-codes__item:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-supplier-codes__remove { display: inline; margin: 0; }
.rgt-supplier-codes__note { margin: 0; padding: var(--sl-space-4) var(--sl-space-6) var(--sl-space-6); color: var(--sl-on-surface-variant); }
.rgt-supplier-codes__empty { border-top: 1px solid var(--sl-divider); }
.rgt-supplier-codes__add { display: grid; grid-template-columns: 12.5rem minmax(0, 1fr) auto; gap: var(--sl-space-4); align-items: start; margin: 0; padding: var(--sl-space-4) var(--sl-space-6); border-top: 1px solid var(--sl-divider); }
.rgt-supplier-codes__search { min-width: 0; }
.rgt-supplier-codes__matches { grid-column: 1 / -1; margin: 0; }
.rgt-supplier-codes__hint { grid-column: 1 / -1; margin: 0; font-size: var(--sl-text-label); color: var(--sl-on-surface-variant); }
.rgt-supplier-codes__error { grid-column: 1 / -1; }
@media (min-width: 1024px) {
  .rgt-supplier__body { grid-template-columns: 30rem minmax(0, 1fr); }
}
@media (max-width: 599px) {
  .rgt-supplier-codes__add { grid-template-columns: minmax(0, 1fr); }
  .rgt-supplier-codes__head, .rgt-supplier-codes__add { padding-inline: var(--sl-space-4); }
  .rgt-suppliers__switch { margin-left: 0; width: 100%; }
}
/* --- Картка позиції: коди й мінімуми Г4–Г5 (RGT-243, ADR-37) --- */
.rgt-supplier-codes__table--item th:first-child, .rgt-supplier-codes__table--item td:first-child { width: auto; }
.rgt-supplier-codes__table--item th:nth-child(2), .rgt-supplier-codes__table--item td:nth-child(2) { width: 12.5rem; }
.rgt-supplier-codes__table--item th:nth-child(3), .rgt-supplier-codes__table--item td:nth-child(3) { width: 3rem; }
.rgt-supplier-codes__add--item { grid-template-columns: minmax(0, 1fr) 12.5rem auto; }
.rgt-item-mins__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sl-space-1) var(--sl-space-3); padding: var(--sl-space-5) var(--sl-space-6); }
.rgt-item-mins__title { margin: 0; font: var(--sl-title-s); }
.rgt-item-mins__summary { color: var(--sl-on-surface-variant); font-size: var(--sl-text-label); }
.rgt-item-mins > .rgt-table-wrap { border: 0; border-radius: 0; border-top: 1px solid var(--sl-divider); }
.rgt-item-mins__table { width: 100%; }
.rgt-item-mins__table th, .rgt-item-mins__table td { padding: 0 var(--sl-space-2); }
.rgt-item-mins__table th:first-child, .rgt-item-mins__table td:first-child { padding-left: var(--sl-space-4); }
.rgt-item-mins__table th:last-child, .rgt-item-mins__table td:last-child { padding-right: var(--sl-space-4); }
.rgt-item-mins__table td { height: 3.5rem; }
.rgt-item-mins__table th:nth-child(2), .rgt-item-mins__table td:nth-child(2) { width: 7rem; text-align: right; font-variant-numeric: tabular-nums; }
.rgt-item-mins__table th:nth-child(3), .rgt-item-mins__table td:nth-child(3) { width: 6rem; }
.rgt-item-mins__table th:nth-child(4), .rgt-item-mins__table td:nth-child(4) { width: 5.5rem; }
.rgt-item-mins__node { display: flex; flex-direction: column; min-width: 0; }
.rgt-item-mins__name { font-weight: 500; overflow-wrap: anywhere; }
.rgt-item-mins__name--hidden { color: var(--sl-on-surface-variant); font-weight: 400; }
.rgt-item-mins__path { color: var(--sl-on-surface-variant); font-size: var(--sl-text-label); line-height: var(--sl-lh-label); overflow-wrap: anywhere; }
.rgt-item-mins__actions { display: flex; align-items: center; gap: var(--sl-space-1); }
.rgt-item-mins__remove { display: inline; margin: 0; }
.rgt-item-mins__note { margin: 0; padding: var(--sl-space-4) var(--sl-space-6) var(--sl-space-6); color: var(--sl-on-surface-variant); }
.rgt-item-mins__empty { border-top: 1px solid var(--sl-divider); }
.rgt-item-mins__form { display: grid; grid-template-columns: minmax(0, 1fr) 12.5rem auto; gap: var(--sl-space-4); align-items: start; margin: 0; padding: var(--sl-space-4) var(--sl-space-6); border-top: 1px solid var(--sl-divider); }
.rgt-item-mins__hint { grid-column: 1 / -1; margin: 0; font-size: var(--sl-text-label); color: var(--sl-on-surface-variant); }
@media (max-width: 599px) {
  .rgt-supplier-codes__add--item, .rgt-item-mins__form { grid-template-columns: minmax(0, 1fr); }
  .rgt-item-mins__head, .rgt-item-mins__form { padding-inline: var(--sl-space-4); }
}
/* --- Приймання S1 (RGT-086, ADR-38) --- */
.rgt-scan__error { display: flex; align-items: center; gap: var(--sl-space-1); margin: var(--sl-space-1) 0 0; color: var(--sl-error); font-size: var(--sl-text-label); }
.rgt-scan__error > .rgt-icon { flex: none; width: 1rem; height: 1rem; }
.rgt-receipts { display: flex; flex-direction: column; gap: var(--sl-space-4); }
.rgt-receipts__toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2); box-sizing: border-box; min-height: 4rem; margin: 0; padding: var(--sl-space-3) var(--sl-space-4); border-bottom: 1px solid var(--sl-divider); }
.rgt-receipts__filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2); min-width: 0; }
.rgt-receipts__filter { text-decoration: none; color: var(--sl-on-surface); }
.rgt-receipts__filter[aria-current="true"] { background: var(--sl-secondary-container); color: var(--sl-on-secondary-container); box-shadow: none; }
.rgt-receipts__filter[aria-current="true"] > .rgt-icon { display: block; }
.rgt-receipts__search { flex: 0 1 13.75rem; width: 13.75rem; max-width: 100%; min-height: var(--sl-control-h-sm); padding-right: var(--sl-space-4); background: var(--sl-inset); box-shadow: none; }
.rgt-receipts__search .rgt-search__input { height: var(--sl-control-h-sm); }
.rgt-receipts__table { width: 100%; }
.rgt-receipts__number { font-weight: 500; font-variant-numeric: tabular-nums; text-decoration: none; }
.rgt-receipts__sub { display: block; font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-receipts__pager { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--sl-space-2); box-sizing: border-box; min-height: 3.25rem; padding: 0 var(--sl-space-3) 0 var(--sl-space-4); border-top: 1px solid var(--sl-divider); color: var(--sl-on-surface-variant); font-size: .8125rem; line-height: 1.25rem; }
.rgt-receipt { display: flex; flex-direction: column; gap: var(--sl-space-4); }
.rgt-receipt__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-3); }
.rgt-receipt__print { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sl-space-2); margin-inline-start: auto; }
.rgt-receipt__card { padding: var(--sl-space-5) var(--sl-space-6); }
.rgt-receipt__note { margin: 0; color: var(--sl-on-surface-variant); }
.rgt-receipt__region { display: flex; flex-direction: column; gap: var(--sl-space-4); }
.rgt-receipt__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sl-space-2); }
.rgt-receipt-header { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sl-space-4); }
.rgt-receipt-header__currency { grid-column: 1 / -1; color: var(--sl-on-surface-variant); }
.rgt-receipt-header__actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: var(--sl-space-2); }
.rgt-receipt-summary { padding: var(--sl-space-5); }
.rgt-receipt-summary__head { display: flex; justify-content: space-between; align-items: baseline; }
.rgt-receipt-summary__title { margin: 0; font: var(--sl-title-s); }
.rgt-receipt-summary__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--sl-space-3) var(--sl-space-6); margin: 0; }
.rgt-receipt-summary__item { min-width: 0; }
.rgt-receipt-summary__term { font-size: var(--sl-text-label); color: var(--sl-on-surface-variant); }
.rgt-receipt-summary__value { margin: 0; overflow-wrap: anywhere; }
.rgt-receipt-lines { padding: 0; overflow: hidden; }
.rgt-receipt-lines__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sl-space-1) var(--sl-space-3); padding: var(--sl-space-5) var(--sl-space-6); }
.rgt-receipt-lines__title { margin: 0; font: var(--sl-title-s); }
.rgt-receipt-lines > .rgt-table-wrap { border: 0; border-radius: 0; border-top: 1px solid var(--sl-divider); }
.rgt-receipt-lines__table { width: 100%; }
.rgt-receipt-lines__table th, .rgt-receipt-lines__table td { padding: 0 var(--sl-space-2); }
.rgt-receipt-lines__table th:first-child, .rgt-receipt-lines__table td:first-child { padding-left: var(--sl-space-4); }
.rgt-receipt-lines__table th:last-child, .rgt-receipt-lines__table td:last-child { padding-right: var(--sl-space-4); }
.rgt-receipt-lines__table td { height: 3.5rem; }
.rgt-receipt-lines__item { font-weight: 500; overflow-wrap: anywhere; }
.rgt-receipt-lines__sub { display: block; font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-receipt-lines__reason { display: block; font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-st-warn-fg); }
.rgt-receipt-lines__diff { font-weight: 500; font-variant-numeric: tabular-nums; }
.rgt-receipt-lines__row--problem { background: var(--sl-st-expired-bg); }
.rgt-receipt-lines__actions { display: flex; align-items: center; gap: var(--sl-space-1); }
.rgt-receipt-lines__remove { display: inline; margin: 0; }
.rgt-receipt-lines__empty { margin: 0; padding: var(--sl-space-4) var(--sl-space-6) var(--sl-space-6); color: var(--sl-on-surface-variant); border-top: 1px solid var(--sl-divider); }
.rgt-receipt-lines__totals { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sl-space-4); padding: var(--sl-space-3) var(--sl-space-6); border-top: 1px solid var(--sl-divider); font-weight: 500; font-variant-numeric: tabular-nums; }
.rgt-receipt-entry { display: flex; flex-direction: column; gap: var(--sl-space-3); padding: var(--sl-space-5); }
.rgt-receipt-entry__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sl-space-3); }
.rgt-receipt-entry__title { margin: 0; font: var(--sl-title-s); }
.rgt-receipt-entry__status { margin: 0; font-size: var(--sl-text-label); color: var(--sl-on-surface-variant); }
.rgt-receipt-entry__scan { max-width: 40rem; }
.rgt-receipt-entry__notice { margin: 0; }
.rgt-receipt-entry__matches { display: flex; flex-direction: column; gap: var(--sl-space-1); margin: 0; }
.rgt-receipt-entry__match { display: flex; flex-direction: column; align-items: flex-start; width: 100%; box-sizing: border-box; padding: var(--sl-space-2) var(--sl-space-3); border: 1px solid var(--sl-outline-variant); border-radius: var(--sl-radius-md); background: var(--sl-surface-container-lowest); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.rgt-receipt-entry__match:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-receipt-entry__match-name { font-weight: 500; }
.rgt-receipt-entry__match-sub { font-size: var(--sl-text-label); color: var(--sl-on-surface-variant); }
.rgt-receipt-entry__item { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sl-space-2); }
.rgt-receipt-entry__name { font-weight: 500; }
.rgt-receipt-entry__sub { font-size: var(--sl-text-label); color: var(--sl-on-surface-variant); }
.rgt-receipt-entry__form { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: var(--sl-space-4); align-items: start; margin: 0; }
.rgt-receipt-entry__reason[hidden] { display: none; }
.rgt-receipt-entry__actions { grid-column: 1 / -1; display: flex; gap: var(--sl-space-2); }
.rgt-receipt-entry__note { margin: 0; color: var(--sl-on-surface-variant); }
.rgt-receipt-check { display: flex; flex-direction: column; gap: var(--sl-space-3); }
.rgt-receipt-check__problems { margin: 0; padding-left: var(--sl-space-5); }
.rgt-receipt-check__problem { overflow-wrap: anywhere; }
.rgt-receipt-check__post { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sl-space-4); }
.rgt-receipt-check__note { margin: 0; color: var(--sl-on-surface-variant); }
.rgt-receipt-cancel { display: flex; flex-direction: column; gap: var(--sl-space-4); max-width: 40rem; }
.rgt-receipt-cancel__text { margin: 0; }
.rgt-receipt-cancel__actions { display: flex; flex-wrap: wrap; gap: var(--sl-space-2); }
@media (max-width: 839px) {
  .rgt-receipt-header, .rgt-receipt-check__post { grid-template-columns: minmax(0, 1fr); }
  .rgt-receipts__filters { flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .rgt-receipt-summary__list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 599px) {
  .rgt-receipt-entry__form { grid-template-columns: minmax(0, 1fr); }
  .rgt-receipt__card, .rgt-receipt-entry, .rgt-receipt-lines__head, .rgt-receipt-lines__totals { padding-inline: var(--sl-space-4); }
}
/* --- Типи вузлів Б7 (RGT-223, ADR-39) --- */
.rgt-types { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sl-space-4); align-items: start; }
.rgt-types-list { padding: 0; overflow: hidden; }
.rgt-types-list__head { display: flex; align-items: center; gap: var(--sl-space-3); min-height: 4rem; padding: 0 var(--sl-space-5); }
.rgt-types-list__title { margin: 0; font: var(--sl-title-m); }
.rgt-types-list__count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.25rem; height: 1.25rem; box-sizing: border-box; padding: 0 var(--sl-space-2); border-radius: var(--sl-radius-full); background: var(--sl-surface-container-high); color: var(--sl-on-surface-variant); font-size: var(--sl-text-label); font-weight: 500; }
.rgt-types-list .rgt-table-wrap { border: 0; border-top: 1px solid var(--sl-divider); border-radius: 0; }
.rgt-types-table { width: 100%; min-width: 0; }
.rgt-types-table th, .rgt-types-table td { padding: 0 var(--sl-space-2); white-space: nowrap; }
.rgt-types-table th:first-child, .rgt-types-table td:first-child { width: 100%; padding-left: var(--sl-space-5); }
.rgt-types-table th:last-child, .rgt-types-table td:last-child { text-align: right; }
.rgt-types-table__name { display: inline-flex; align-items: center; gap: var(--sl-space-3); font-weight: 500; }
.rgt-types-table__link { color: inherit; text-decoration: none; }
.rgt-types-table__link:hover { text-decoration: underline; }
.rgt-types-table__link:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-types-table__tree { color: var(--sl-on-surface-variant); }
.rgt-types-table .rgt-types-table__flag { text-align: center; }
.rgt-types-table__yes { display: inline-flex; vertical-align: middle; color: var(--sl-primary); }
.rgt-types-table__no { color: var(--sl-outline); }
.rgt-type-swatch { flex: none; width: 1.5rem; height: 1.5rem; box-sizing: border-box; border-radius: var(--sl-radius-sm); background: var(--sl-surface-container-high); }
.rgt-type-swatch--plain { background: var(--sl-surface-container-high); }
.rgt-type-swatch--lab { background: var(--sl-primary-container); }
.rgt-type-swatch--analyzer { background: var(--sl-secondary-container); }
.rgt-type-swatch--workplace { background: var(--sl-surface-container); border: 1px solid var(--sl-outline-variant); }
.rgt-type-swatch--place { background: var(--sl-tertiary-container); }
.rgt-types-rules { display: flex; flex-direction: column; gap: var(--sl-space-3); padding-top: 0; }
.rgt-types-rules__head { display: flex; align-items: center; gap: var(--sl-space-3); min-height: 4rem; }
.rgt-types-rules__title { flex: 1; margin: 0; font: var(--sl-title-m); }
.rgt-types-rules__form { display: flex; flex-direction: column; gap: var(--sl-space-3); }
.rgt-types-rules__group { display: flex; flex-direction: column; gap: var(--sl-space-2); }
.rgt-types-rules__subtitle { margin: 0; font: var(--sl-title-s); }
.rgt-types-rules__note { margin: 0; color: var(--sl-on-surface-variant); }
.rgt-types-rules__legend { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-4); font-size: var(--sl-text-label); color: var(--sl-on-surface-variant); }
.rgt-types-rules__legend-item { display: inline-flex; align-items: center; gap: var(--sl-space-2); }
.rgt-types-rules__key { display: inline-block; width: 0.875rem; height: 0.875rem; box-sizing: border-box; border-radius: var(--sl-radius-xs); }
.rgt-types-rules__key--on { background: var(--sl-primary); }
.rgt-types-rules__key--off { border: 2px solid var(--sl-outline-variant); }
/* підказка прокрутки матриці (8+ типів): тінь біля краю, за яким є стовпці; local-фон ховає її в кінці (RGT-272 G2) */
.rgt-types-rules .rgt-table-wrap { background: linear-gradient(to right, var(--sl-card) 30%, transparent) left center / var(--sl-space-12) 100% no-repeat local, linear-gradient(to left, var(--sl-card) 30%, transparent) right center / var(--sl-space-12) 100% no-repeat local, linear-gradient(to right, color-mix(in srgb, var(--sl-on-surface) var(--sl-state-drag), transparent), transparent) left center / var(--sl-space-4) 100% no-repeat scroll, linear-gradient(to left, color-mix(in srgb, var(--sl-on-surface) var(--sl-state-drag), transparent), transparent) right center / var(--sl-space-4) 100% no-repeat scroll, var(--sl-card); }
.rgt-rule-matrix { width: 100%; border-collapse: collapse; }
.rgt-rule-matrix thead tr { background: var(--sl-group-row); }
.rgt-rule-matrix tbody tr { border-top: 1px solid var(--sl-divider); }
.rgt-rule-matrix__corner { width: 8rem; height: 3rem; padding: 0 var(--sl-space-3); text-align: left; font-size: var(--sl-text-label); font-weight: 500; color: var(--sl-on-surface-variant); }
.rgt-rule-matrix__parent { min-width: 4.5rem; padding: 0 var(--sl-space-1); text-align: center; font-size: var(--sl-text-label); font-weight: 500; color: var(--sl-on-surface-variant); }
.rgt-rule-matrix__child { height: 2.5rem; padding: 0 var(--sl-space-3); text-align: left; font-weight: 500; }
.rgt-rule-matrix__cell { text-align: center; }
.rgt-rule-matrix__mark { display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; box-sizing: border-box; border-radius: var(--sl-radius-xs); vertical-align: middle; }
.rgt-rule-matrix__mark--on { background: var(--sl-primary); color: var(--sl-on-primary); }
.rgt-rule-matrix__mark--off { border: 2px solid var(--sl-outline-variant); }
.rgt-rule-matrix__toggle { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; padding: 0; border: 0; border-radius: var(--sl-radius-sm); background: transparent; color: inherit; cursor: pointer; }
.rgt-rule-matrix__toggle:hover { background: var(--sl-surface-container); }
.rgt-rule-matrix__toggle:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-type-form { max-width: 40rem; padding: var(--sl-space-6); }
.rgt-type-form__form { display: flex; flex-direction: column; gap: var(--sl-space-5); }
.rgt-type-form__tree { margin: 0; color: var(--sl-on-surface-variant); }
.rgt-type-form__flags { display: flex; flex-direction: column; gap: var(--sl-space-3); min-width: 0; margin: 0; padding: 0; border: 0; }
.rgt-type-form__legend { float: none; width: auto; margin: 0 0 var(--sl-space-2); padding: 0; font: var(--sl-title-s); }
.rgt-type-form__note { margin: 0; color: var(--sl-on-surface-variant); }
.rgt-type-form__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sl-space-3); }
@media (min-width: 1200px) {
  .rgt-types { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
}
@media (max-width: 599px) {
  .rgt-type-form { padding: var(--sl-space-4); }
  .rgt-types-list__head { padding-inline: var(--sl-space-4); }
  .rgt-types-rules { padding-inline: var(--sl-space-4); }
}
/* --- Початкові залишки S7 (RGT-088, ADR-40) --- */
.rgt-ob-extra { grid-column: 1 / -1; border-top: 1px solid var(--sl-outline-variant); padding-top: var(--sl-space-2); }
.rgt-ob-extra__summary { display: flex; align-items: center; gap: var(--sl-space-2); padding: var(--sl-space-2) 0; cursor: pointer; list-style: none; color: var(--sl-primary); font: var(--sl-label-l); }
.rgt-ob-extra__summary::-webkit-details-marker { display: none; }
.rgt-ob-extra__summary:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-ob-extra__fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: var(--sl-space-4); align-items: start; padding-top: var(--sl-space-3); }
@media (max-width: 599px) {
  .rgt-ob-extra__fields { grid-template-columns: minmax(0, 1fr); }
}
.rgt-ob-repeat { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2) var(--sl-space-3); margin-top: var(--sl-space-3); }
.rgt-ob-repeat__hint { font-size: var(--sl-text-label); color: var(--sl-on-surface-variant); }
.rgt-ob-lines__flags { display: block; font-size: var(--sl-text-label); color: var(--sl-on-surface-variant); }

/* Пульт: картка одиниці й дії (RGT-097, ADR-41) */
.rgt-unit { display: flex; flex-direction: column; gap: var(--sl-space-3); padding: var(--sl-space-5); border-radius: var(--sl-radius-xl); }
.rgt-unit__name { margin: 0; font: var(--sl-headline-s); }
.rgt-unit__sub { display: block; margin-top: var(--sl-space-1); font: var(--sl-body-s); color: var(--sl-on-surface-variant); }
.rgt-unit__sub a { display: inline-flex; align-items: center; min-height: var(--sl-size-target-touch); color: inherit; text-decoration: underline; } /* RGT-414: номер лота — посилання, ціль пульта ≥ 56 px */
.rgt-unit__chips { display: flex; flex-wrap: wrap; gap: var(--sl-space-2); }
.rgt-unit__expiry, .rgt-unit__last { margin: 0; font: var(--sl-body-m); }
.rgt-unit__basis { color: var(--sl-on-surface-variant); }
.rgt-unit__facts { margin: 0; }
/* мітки одиниці (RGT-125, BR-24): інформація, не блокування */
.rgt-unit__flags { display: flex; flex-direction: column; gap: var(--sl-space-1); margin: 0; padding: 0; list-style: none; font: var(--sl-body-s); color: var(--sl-st-warn-fg); }
.rgt-unit__flag { overflow-wrap: anywhere; }
.rgt-unit-actions { display: flex; flex-direction: column; gap: var(--sl-space-3); }
.rgt-unit-actions__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sl-space-3); align-items: start; }
.rgt-unit-actions__row > :only-child { grid-column: 1 / -1; }
.rgt-unit-actions__form { margin: 0; display: flex; flex-direction: column; }
.rgt-unit-actions__note, .rgt-unit-actions__hint { margin: 0; font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-unit-tabs .rgt-tabs--page { height: auto; margin: 0; }
.rgt-unit-tabs .rgt-tabs__item { flex: 1 1 0; justify-content: center; min-height: var(--sl-size-target-touch); }  /* RGT-412: «куди взяти» — цілі пульта */
.rgt-unit-sheet__list { display: flex; flex-direction: column; gap: var(--sl-space-2); margin: 0 0 var(--sl-space-4); }
.rgt-unit-sheet__text { margin: 0 0 var(--sl-space-4); color: var(--sl-on-surface-variant); }
.rgt-unit-summary { display: flex; align-items: center; justify-content: space-between; gap: var(--sl-space-3); padding: var(--sl-space-4); border: 1px solid var(--sl-divider); border-radius: var(--sl-radius-lg); background: var(--sl-card); }
.rgt-unit-summary__name { display: block; font: var(--sl-title-s); }
.rgt-unit-summary__sub { display: block; font: var(--sl-body-s); color: var(--sl-on-surface-variant); }
.rgt-unit-form { display: flex; flex-direction: column; gap: var(--sl-space-4); margin: 0; }
.rgt-unit-form__legend { padding: 0; margin-bottom: var(--sl-space-2); font: var(--sl-title-s); }
.rgt-unit-form__hint { margin: 0; font: var(--sl-body-s); color: var(--sl-on-surface-variant); }
.rgt-unit-form__actions { display: flex; flex-direction: column; gap: var(--sl-space-3); }
.rgt-unit-places { max-height: none; }
.rgt-unit-places .rgt-radio-list__item { min-height: var(--sl-size-target-touch); }
/* Пульт: списання (RGT-102, ADR-42) */
.rgt-unit-reasons { min-width: 0; margin: 0; padding: 0; border: 0; }
.rgt-unit-reasons__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sl-space-3); }
/* 360: «повернено постачальнику» без розриву слова — підпис 112 px (було 100): проміжок 8, правий відступ 4 (RGT-272 G2) */
.rgt-unit-reasons__item { display: flex; align-items: center; gap: var(--sl-space-2); min-height: var(--sl-size-target-touch); box-sizing: border-box; padding: var(--sl-space-2) var(--sl-space-1) var(--sl-space-2) var(--sl-space-2); border: 1px solid var(--sl-divider); border-radius: var(--sl-radius-md); background: var(--sl-card); color: var(--sl-on-surface); cursor: pointer; }
.rgt-unit-reasons__item:has(input:checked) { border-color: var(--sl-primary); box-shadow: inset 0 0 0 1px var(--sl-primary); background: var(--sl-selected); }
.rgt-unit-reasons__item:focus-within { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-unit-reasons__item:last-child:nth-child(odd) { grid-column: 1 / -1; }
.rgt-unit-reasons__input { flex: none; width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--sl-primary); }
.rgt-unit-reasons__label { min-width: 0; overflow-wrap: anywhere; hyphens: auto; font-size: .9375rem; letter-spacing: -.01em; }
.rgt-unit-confirm { display: flex; flex-direction: column; gap: var(--sl-space-4); padding: var(--sl-space-5); border: 1px solid var(--sl-divider); border-radius: var(--sl-radius-xl); background: var(--sl-card); box-shadow: var(--sl-shadow-card); }
.rgt-unit-confirm__icon { display: inline-grid; place-items: center; width: 3rem; height: 3rem; border-radius: var(--sl-radius-full); background: var(--sl-error-container); color: var(--sl-error); }
.rgt-unit-confirm__title { margin: 0; font: var(--sl-headline-s); }
.rgt-unit-confirm__text { margin: 0; color: var(--sl-on-surface-variant); }
.rgt-unit-confirm__form { margin: 0; }
.rgt-unit-confirm__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sl-space-3); }
/* Є3 «Історія одиниці» (RGT-107, ADR-43 §5, мокап Ye3-UnitHistory) */
.rgt-history { display: flex; flex-direction: column; gap: var(--sl-space-4); min-width: 0; }
.rgt-history__grid { display: grid; gap: var(--sl-space-4); }
@media (min-width: 64rem) { .rgt-history__grid { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } }
.rgt-history__summary { display: flex; flex-direction: column; gap: var(--sl-space-3); min-width: 0; }
.rgt-history__timeline { display: flex; flex-direction: column; gap: var(--sl-space-3); min-width: 0; }
.rgt-history__name { margin: 0; font: var(--sl-headline-s); }
.rgt-history__sub, .rgt-history__count, .rgt-history__line, .rgt-history__rel { margin: 0; font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-history__chips { display: flex; flex-wrap: wrap; gap: var(--sl-space-2); }
.rgt-history__facts { margin: 0; }
.rgt-history__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sl-space-3); }
.rgt-history__title { margin: 0; font: var(--sl-title-s); }
.rgt-history__list { list-style: none; margin: 0; padding: 0; }
.rgt-history__item { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sl-space-3); padding: 0 0 var(--sl-space-4); }
.rgt-history__item::before { content: ""; position: absolute; left: 0.8125rem; top: 1.75rem; bottom: 0; width: 2px; background: var(--sl-outline-variant); }
.rgt-history__item:last-child::before { display: none; }
.rgt-history__item--reversed .rgt-history__label { color: var(--sl-on-surface-variant); text-decoration: line-through; }
.rgt-history__icon { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 1.75rem; height: 1.75rem; border-radius: var(--sl-radius-full); background: var(--sl-surface-container-high); color: var(--sl-on-surface-variant); }
.rgt-history__body { display: flex; flex-direction: column; gap: var(--sl-space-1); min-width: 0; }
.rgt-history__row { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sl-space-2); }
.rgt-history__label { font-weight: 600; }
.rgt-history__number { font-size: var(--sl-text-label); font-variant-numeric: tabular-nums; }
.rgt-history__moment { margin-left: auto; font-size: var(--sl-text-label); font-variant-numeric: tabular-nums; color: var(--sl-on-surface-variant); }
.rgt-history__mark { display: inline-flex; align-items: center; padding: 0 var(--sl-space-2); border: 1px solid var(--sl-outline-variant); border-radius: var(--sl-radius-sm); font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-history__link { color: var(--sl-primary); font-weight: 500; text-decoration: none; }
/* WCAG 1.4.1: посилання не лише кольором — підкреслення на hover і фокусі (RGT-272 G2) */
.rgt-history__link:hover, .rgt-history__link:focus-visible { text-decoration: underline; }
.rgt-history__link:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-history__more { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sl-space-2); }
/* Є1 «Операції й документи» журналу (RGT-107, ADR-43 §6, мокап Ye1-Journal) */
.rgt-journal { display: flex; flex-direction: column; gap: var(--sl-space-4); min-width: 0; }
.rgt-journal__card { min-width: 0; padding: 0; }
.rgt-journal__toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-3); padding: var(--sl-space-3) var(--sl-space-4); border-bottom: 1px solid var(--sl-divider); }
.rgt-journal__filters { display: flex; flex-wrap: wrap; gap: var(--sl-space-2); min-width: 0; }
.rgt-journal__search { flex: 0 1 21rem; min-width: 0; }
.rgt-journal__chip[aria-current="true"] { background: var(--sl-secondary-container); color: var(--sl-on-secondary-container); box-shadow: none; }
.rgt-journal__chip > .rgt-icon { display: inline-block; width: 1.125rem; height: 1.125rem; }
.rgt-journal__menu, .rgt-journal__date-menu { max-height: 20rem; overflow-y: auto; }
.rgt-journal__date-form { display: grid; gap: var(--sl-space-3); padding: var(--sl-space-3) var(--sl-space-4); }
.rgt-journal__error { display: flex; align-items: center; gap: var(--sl-space-2); margin: 0; padding: var(--sl-space-3) var(--sl-space-4); color: var(--sl-error); }
.rgt-journal__table { width: 100%; min-width: 48rem; }
.rgt-journal__card > .rgt-table-wrap { border: 0; border-radius: 0; background: transparent; }
.rgt-journal__type { display: flex; align-items: center; gap: var(--sl-space-2); white-space: nowrap; }
.rgt-journal__icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 1.75rem; height: 1.75rem; border-radius: var(--sl-radius-full); background: var(--sl-surface-container-high); color: var(--sl-on-surface-variant); }
.rgt-journal__number { font-variant-numeric: tabular-nums; font-weight: 500; text-decoration: none; color: var(--sl-primary); }
.rgt-journal__date, .rgt-journal__recorded { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rgt-journal__recorded { color: var(--sl-on-surface-variant); }
.rgt-journal__node { min-width: 0; max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rgt-journal__sub { display: block; font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-journal__mark { display: inline-flex; align-items: center; padding: 0 var(--sl-space-2); border: 1px solid var(--sl-outline-variant); border-radius: var(--sl-radius-sm); font-size: var(--sl-text-label); line-height: var(--sl-lh-label); }
.rgt-journal__pager { border-top: 1px solid var(--sl-divider); }
/* Є2 «Картка документа» (RGT-107, ADR-43 §7, мокап Ye2-Operation) */
.rgt-journal-doc { display: flex; flex-direction: column; gap: var(--sl-space-4); min-width: 0; }
.rgt-journal-doc__head { margin: 0; min-width: 0; }
.rgt-journal-doc__name { display: flex; flex: 0 1 auto; flex-wrap: wrap; align-items: center; gap: var(--sl-space-3); min-width: 0; }
.rgt-journal-doc__name > .rgt-page-header__title { flex: 0 1 auto; }
.rgt-journal-doc__status { display: inline-flex; align-items: center; }
.rgt-journal-doc__actions { display: flex; flex: 0 0 auto; align-items: flex-start; margin-left: auto; gap: var(--sl-space-2); }
@media (max-width: 40rem) { .rgt-journal-doc__actions { flex: 1 1 100%; flex-wrap: wrap; margin-left: 0; } }
.rgt-journal-doc__grid { display: grid; gap: var(--sl-space-4); min-width: 0; }
@media (min-width: 64rem) { .rgt-journal-doc__grid { grid-template-columns: minmax(0, 1fr) 20rem; } }
.rgt-journal-doc__main, .rgt-journal-doc__aside { display: flex; flex-direction: column; gap: var(--sl-space-4); min-width: 0; }
.rgt-journal-doc__main .rgt-table-wrap { border: 0; border-radius: 0; background: transparent; }
.rgt-journal-doc__frame { border: 1px solid var(--sl-divider); border-radius: var(--sl-radius-md); overflow: hidden; }
.rgt-journal-doc__table { width: 100%; }
.rgt-journal-doc__sum { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--sl-space-2) var(--sl-space-4); padding: var(--sl-space-3) var(--sl-space-4); background: var(--sl-surface-container-low); color: var(--sl-on-surface-variant); }
.rgt-journal-doc__sum > strong { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--sl-on-surface); }
.rgt-journal-doc__title { margin: 0; font: var(--sl-title-s); }
.rgt-journal-doc__facts { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sl-space-2) var(--sl-space-4); }
@media (min-width: 64rem) { .rgt-journal-doc__facts { grid-template-columns: 9.375rem minmax(0, 1fr) 9.375rem minmax(0, 1fr); align-items: center; } }
.rgt-journal-doc__facts > div { display: contents; }
.rgt-journal-doc__facts dd { margin: 0; text-align: left; }
.rgt-journal-doc__ops, .rgt-journal-doc__related { display: flex; flex-direction: column; gap: var(--sl-space-2); list-style: none; margin: 0; padding: 0; }
.rgt-journal-doc__ops > li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-1) var(--sl-space-2); padding: var(--sl-space-3) 0; border-bottom: 1px solid var(--sl-divider); }
.rgt-journal-doc__rel { display: flex; align-items: center; gap: var(--sl-space-3); padding: var(--sl-space-3); border-radius: var(--sl-radius-md); background: var(--sl-surface-container-low); color: var(--sl-on-surface); text-decoration: none; }
.rgt-journal-doc__rel-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 2rem; height: 2rem; border-radius: var(--sl-radius-full); background: var(--sl-card); color: var(--sl-on-surface-variant); }
.rgt-journal-doc__rel-body { display: flex; flex: 1 1 auto; flex-direction: column; gap: var(--sl-space-1); min-width: 0; }
.rgt-journal-doc__rel-body .rgt-journal__mark { align-self: flex-start; }
.rgt-journal-doc__label { font-weight: 500; }
.rgt-journal-doc__meta { font-size: var(--sl-text-label); font-variant-numeric: tabular-nums; color: var(--sl-on-surface-variant); }
.rgt-journal-doc__sub { display: block; font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-journal-doc__note { display: flex; align-items: flex-start; gap: var(--sl-space-2); margin: auto 0 0; padding: var(--sl-space-3); border-radius: var(--sl-radius-md); background: var(--sl-surface-container); font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-journal-doc__note > .rgt-icon { margin-top: var(--sl-space-1); }
.rgt-journal-reverse { display: flex; flex-direction: column; gap: var(--sl-space-4); min-width: 0; }
.rgt-journal-reverse__card { display: grid; gap: var(--sl-space-4); max-width: 40rem; min-width: 0; }
.rgt-journal-reverse__question { margin: 0; font: var(--sl-title-l); }
.rgt-journal-reverse__facts { margin: 0; display: grid; gap: var(--sl-space-2) var(--sl-space-4); }
.rgt-journal-reverse__effects { display: grid; gap: var(--sl-space-1); color: var(--sl-on-surface-variant); }
.rgt-journal-reverse__effects > p { margin: 0; }
.rgt-journal-reverse__chain { display: grid; gap: var(--sl-space-2); padding: var(--sl-space-3); border-radius: var(--sl-radius-md); background: var(--sl-surface-container); }
.rgt-journal-reverse__chain-title { display: flex; align-items: center; gap: var(--sl-space-2); margin: 0; font-weight: 500; }
.rgt-journal-reverse__steps { display: grid; gap: var(--sl-space-2); list-style: none; margin: 0; padding: 0; }
.rgt-journal-reverse__step { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--sl-space-3); padding: var(--sl-space-2) var(--sl-space-3); border-radius: var(--sl-radius-md); background: var(--sl-card); }
.rgt-journal-reverse__no { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: var(--sl-radius-full); background: var(--sl-secondary-container); color: var(--sl-on-secondary-container); font-size: var(--sl-text-label); font-weight: 600; }
.rgt-journal-reverse__sub { display: block; font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-journal-reverse__form { display: grid; gap: var(--sl-space-4); }
.rgt-journal-reverse__actions { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: flex-end; gap: var(--sl-space-3); }
.rgt-journal-reverse__actions .rgt-btn-reason { align-items: flex-end; }
@media (max-width: 599px) {
  .rgt-journal-reverse__actions { flex-direction: column; align-items: stretch; }
  .rgt-journal-reverse__actions .rgt-btn-reason { align-items: stretch; }
}
/* Етикетки Ж1–Ж2 (RGT-108, ADR-45 §9, мокап 09-Zh-etyketky/Zh12-Print.html) */
.rgt-labels { display: flex; flex-direction: column; gap: var(--sl-space-4); min-width: 0; }
.rgt-labels__banner { min-width: 0; }
.rgt-labels__created { display: flex; flex-direction: column; gap: var(--sl-space-3); min-width: 0; }
.rgt-labels__grid { display: grid; gap: var(--sl-space-4); align-items: start; min-width: 0; }
@media (min-width: 1200px) { .rgt-labels__grid { grid-template-columns: minmax(0, 1fr) 23.75rem; } }
.rgt-labels__list { display: flex; flex-direction: column; min-width: 0; padding: 0; overflow: hidden; }
.rgt-labels__list > .rgt-table-wrap { border: 0; border-radius: 0; background: transparent; }
.rgt-labels__toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2); box-sizing: border-box; min-height: 4rem; padding: var(--sl-space-3) var(--sl-space-4); border-bottom: 1px solid var(--sl-divider); }
.rgt-labels__search { flex: 0 1 18.75rem; min-width: 0; min-height: var(--sl-control-h-sm); background: var(--sl-inset); box-shadow: none; }
.rgt-labels__search .rgt-search__input { height: var(--sl-control-h-sm); }
.rgt-labels__chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2); min-width: 0; }
.rgt-labels__chip { text-decoration: none; }
.rgt-labels__chip[aria-current="true"] { padding-left: var(--sl-space-2); background: var(--sl-secondary-container); color: var(--sl-on-secondary-container); box-shadow: none; }
.rgt-labels__chip[aria-current="true"] > .rgt-icon { display: block; }
.rgt-labels__chip > .rgt-icon:last-child { display: inline-block; width: 1.125rem; height: 1.125rem; }
.rgt-labels__doc-chip { max-width: 100%; }
.rgt-labels__doc-chip > .rgt-chip__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rgt-labels__menu { max-height: 20rem; overflow-y: auto; }
.rgt-labels__spacer { flex: 1 1 0; }
.rgt-labels__selected { display: inline-flex; align-items: center; min-height: 1.75rem; padding: 0 var(--sl-space-3); border-radius: var(--sl-radius-full); background: var(--sl-selected); color: var(--sl-on-secondary-container); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rgt-labels__table { width: 100%; min-width: 40rem; }
.rgt-labels__table tbody tr:has(.rgt-labels__box:checked) { background: var(--sl-selected); }
.rgt-labels__check { width: 2rem; }
.rgt-labels__box { width: 1.125rem; height: 1.125rem; margin: 0; accent-color: var(--sl-primary); }
.rgt-labels__item { font-weight: 500; }
.rgt-labels__num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rgt-labels__place { color: var(--sl-on-surface-variant); }
.rgt-labels__aside { display: flex; flex-direction: column; gap: var(--sl-space-4); min-width: 0; }
.rgt-labels__print, .rgt-labels__form { display: flex; flex-direction: column; gap: var(--sl-space-4); min-width: 0; }
.rgt-labels__form { margin: 0; }
.rgt-labels__title { margin: 0; font: var(--sl-title-s); }
.rgt-labels__scope { display: grid; gap: var(--sl-space-2); min-width: 0; margin: 0; padding: 0; border: 0; }
.rgt-labels__legend { float: none; width: auto; margin-bottom: var(--sl-space-1); padding: 0; font: var(--sl-title-s); color: var(--sl-on-surface-variant); }
.rgt-labels__option { display: flex; align-items: center; gap: var(--sl-space-3); min-height: var(--sl-control-h-sm); cursor: pointer; }
.rgt-labels__option:has(:disabled) { color: color-mix(in srgb, var(--sl-on-surface) var(--sl-disabled-content), transparent); cursor: default; }
.rgt-labels__radio { flex: none; width: 1.125rem; height: 1.125rem; margin: 0; accent-color: var(--sl-primary); }
.rgt-labels__option-label { flex: 1 1 auto; }
.rgt-labels__option-count { font-weight: 600; font-variant-numeric: tabular-nums; }
.rgt-labels__reason { margin: 0 0 0 calc(1.125rem + var(--sl-space-3)); font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-labels__facts { margin: 0; display: grid; grid-template-columns: 8.75rem minmax(0, 1fr); row-gap: var(--sl-space-1); }
.rgt-labels__facts > div { display: contents; }
.rgt-labels__facts dt { display: flex; align-items: center; min-height: 2rem; color: var(--sl-on-surface-variant); }
.rgt-labels__facts dd { display: flex; align-items: center; margin: 0; }
.rgt-labels__facts [data-labels-count] { font-weight: 600; font-variant-numeric: tabular-nums; }
.rgt-labels__note { margin: calc(var(--sl-space-2) * -1) 0 0; text-align: center; font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-labels-templates { min-width: 0; margin: 0; padding: 0; border: 0; }
.rgt-labels-templates__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sl-space-2); }
.rgt-labels-template { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--sl-space-2); padding: var(--sl-space-3); border-radius: var(--sl-radius-md); box-shadow: inset 0 0 0 1px var(--sl-outline); color: var(--sl-on-surface); cursor: pointer; }
.rgt-labels-template:has(:checked) { background: var(--sl-secondary-container); box-shadow: inset 0 0 0 2px var(--sl-primary); color: var(--sl-on-secondary-container); }
.rgt-labels-template:has(:focus-visible) { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-labels-template__input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.rgt-labels-template__preview { display: flex; align-items: center; justify-content: center; gap: var(--sl-space-1); box-sizing: border-box; height: 3.125rem; border: 1px solid var(--sl-outline); border-radius: var(--sl-radius-xs); background: var(--sl-surface-container-lowest); }
.rgt-labels-template__preview--wide { width: 5rem; }
.rgt-labels-template__preview--square { width: 3.125rem; flex-direction: column; }
.rgt-labels-template__qr { width: 1.375rem; height: 1.375rem; box-sizing: border-box; border: .3125rem double var(--sl-on-surface); }
.rgt-labels-template__preview--square .rgt-labels-template__qr { width: 1.625rem; height: 1.625rem; }
.rgt-labels-template__line { width: 1.875rem; height: .25rem; background: var(--sl-on-surface-variant); }
.rgt-labels-template__preview--square .rgt-labels-template__line { width: 1.875rem; }
.rgt-labels-template__name { font-weight: 500; }
.rgt-labels-template:has(:checked) .rgt-labels-template__name { font-weight: 600; }
.rgt-labels-batch { display: flex; flex-direction: column; gap: var(--sl-space-3); min-width: 0; }
.rgt-labels-batch__head { display: flex; align-items: center; gap: var(--sl-space-2); }
.rgt-labels-batch__title { flex: 1 1 auto; margin: 0; font: var(--sl-title-s); }
.rgt-labels-batch__since, .rgt-labels-batch__note { font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-labels-batch__progress { display: flex; align-items: baseline; gap: var(--sl-space-2); margin: 0; }
.rgt-labels-batch__done { font: var(--sl-title-l); font-variant-numeric: tabular-nums; }
.rgt-labels-batch__of { color: var(--sl-on-surface-variant); }
.rgt-labels-batch__bar { appearance: none; display: block; box-sizing: border-box; width: 100%; height: .5rem; margin: 0; padding: 0; border: 0; border-radius: var(--sl-radius-full); background: var(--sl-surface-container-highest); color: var(--sl-primary); }
.rgt-labels-batch__bar::-webkit-progress-bar { border-radius: var(--sl-radius-full); background: var(--sl-surface-container-highest); }
.rgt-labels-batch__bar::-webkit-progress-value { border-radius: var(--sl-radius-full); background: var(--sl-primary); }
.rgt-labels-batch__bar::-moz-progress-bar { border-radius: var(--sl-radius-full); background: var(--sl-primary); }
.rgt-labels-batch__status { margin: 0; font-weight: 500; }
.rgt-labels-batch__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-3); }

/* Пропозиція друку Е6 (RGT-109, ADR-46 §7, мокап 07-E-pryimannia/E6-Labels.html): картка на прийманні й на пульті */
.rgt-labels-offer { display: flex; flex-direction: column; gap: var(--sl-space-4); max-width: 35rem; }
.rgt-labels-offer__head { display: flex; flex-direction: column; gap: var(--sl-space-1); }
.rgt-labels-offer__title { margin: 0; font: var(--sl-title-l); }
.rgt-labels-offer__sub { margin: 0; color: var(--sl-on-surface-variant); }
.rgt-labels-offer__form { display: flex; flex-direction: column; gap: var(--sl-space-4); }
.rgt-labels-offer__scope, .rgt-labels-offer__children { display: grid; gap: var(--sl-space-1); min-width: 0; margin: 0; padding: 0; border: 0; }
.rgt-labels-offer__legend { float: none; width: auto; margin-bottom: var(--sl-space-2); padding: 0; font: var(--sl-title-s); }
.rgt-labels-offer__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: var(--sl-space-1) var(--sl-space-3); margin: 0; padding: 0; list-style: none; }
.rgt-labels-offer__child { min-width: 0; }
.rgt-labels-offer__option { display: flex; align-items: center; gap: var(--sl-space-3); min-height: var(--sl-control-h); cursor: pointer; }
.rgt-labels-offer__option:has(:disabled) { color: color-mix(in srgb, var(--sl-on-surface) var(--sl-disabled-content), transparent); cursor: default; }
.rgt-labels-offer__radio, .rgt-labels-offer__box { flex: none; width: 1.125rem; height: 1.125rem; margin: 0; accent-color: var(--sl-primary); }
.rgt-labels-offer__option-text { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.rgt-labels-offer__option-label { overflow-wrap: anywhere; }
.rgt-labels-offer__hint { font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-labels-offer__count { font-variant-numeric: tabular-nums; color: var(--sl-on-surface-variant); }
.rgt-labels-offer__note { margin: 0; padding: var(--sl-space-4); border-radius: var(--sl-radius-md); background: var(--sl-surface-container-low); font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-labels-offer__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sl-space-2); }
.rgt-labels-offer__history-title { margin: 0; font: var(--sl-title-s); }
.rgt-labels-offer__history { margin: 0; padding-left: var(--sl-space-5); font-size: var(--sl-text-label); }
.rgt-labels-offer__fallback { margin: 0; color: var(--sl-on-surface-variant); }
.rgt-receipt-lines__check { width: 2rem; }
/* прапорець рядка 18 px (мокап), ціль дотику — label 48×48 на всю ширину клітинки (RGT-272 G2) */
.rgt-receipt-lines__pick { display: flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; margin-inline: calc(var(--sl-space-4) * -1) calc(var(--sl-space-2) * -1); cursor: pointer; }
.rgt-receipt-lines__box { width: 1.125rem; height: 1.125rem; margin: 0; accent-color: var(--sl-primary); }
.rgt-receipt-lines__table tbody tr:has(.rgt-receipt-lines__box:checked) { background: var(--sl-selected); }
/* --- Глобальний каталог і оновлення Г7–Г8 (RGT-245, ADR-49) --- */
.rgt-nav--sub .rgt-nav__label { white-space: nowrap; }
.rgt-nav__badge { display: inline-flex; align-items: center; height: 1.25rem; margin-left: var(--sl-space-2); padding: 0 .4375rem; border-radius: var(--sl-radius-full); background: var(--sl-surface-container-high); color: var(--sl-on-surface-variant); font-size: var(--sl-text-label); line-height: var(--sl-lh-label); font-weight: 500; font-variant-numeric: tabular-nums; }
.rgt-snackbar__action { flex: none; display: inline-flex; align-items: center; min-height: var(--sl-control-h-sm); padding: 0 var(--sl-space-3); border-radius: var(--sl-radius-full); color: var(--sl-inverse-primary); font-weight: 600; text-decoration: none; }
.rgt-snackbar__action:hover { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-snackbar__action:focus-visible { outline: var(--sl-focus-width) solid currentColor; outline-offset: var(--sl-focus-offset); }
.rgt-tag--link { gap: .375rem; text-decoration: none; }
.rgt-tag--link:hover { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-tag--link:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-update-link { position: relative; display: inline-flex; align-items: center; gap: .375rem; color: var(--sl-primary); font-weight: 500; text-decoration: none; white-space: nowrap; }
.rgt-update-link:hover { text-decoration: underline; }
.rgt-update-link:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-page-header__note { margin: 0; color: var(--sl-on-surface-variant); font-size: .8125rem; line-height: 1.25rem; }
.rgt-global__banner, .rgt-updates__banner { margin: 0 0 var(--sl-space-4); }
.rgt-global-table { width: 100%; }
.rgt-global-table th, .rgt-global-table td { padding: 0 var(--sl-space-2); }
.rgt-global-table th:first-child, .rgt-global-table td:first-child { padding-left: var(--sl-space-4); min-width: 14rem; }
.rgt-global-table th:last-child, .rgt-global-table td:last-child { padding-right: var(--sl-space-4); }
.rgt-global-table thead th { height: 2.5rem; }
.rgt-global-table td { height: 3.5rem; }
.rgt-global-table__name { font-weight: 500; overflow-wrap: anywhere; }
.rgt-global-table__muted { color: var(--sl-on-surface-variant); }
.rgt-global-table th.rgt-global-table__action, .rgt-global-table td.rgt-global-table__action { text-align: right; white-space: nowrap; }
.rgt-global-table__form { display: inline-flex; margin: 0; }
.rgt-global-table__form .rgt-btn { min-height: var(--sl-control-h-sm); }
.rgt-global-table__have { position: relative; display: inline-flex; align-items: center; gap: var(--sl-space-1); box-sizing: border-box; height: 1.5rem; padding: 0 var(--sl-space-2); border: 1px solid var(--sl-outline-variant); border-radius: var(--sl-radius-sm); color: var(--sl-on-surface-variant); font-size: var(--sl-text-label); font-weight: 500; text-decoration: none; }
.rgt-global-table__have:hover { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-global-table__have:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-updates { display: grid; grid-template-columns: 21.25rem minmax(0, 1fr); gap: var(--sl-space-4); align-items: start; }
.rgt-updates__list { display: flex; flex-direction: column; gap: var(--sl-space-1); padding: var(--sl-space-3); }
.rgt-updates__item { display: flex; flex-direction: column; gap: 2px; padding: var(--sl-space-3); border-radius: var(--sl-radius-md); color: var(--sl-on-surface); text-decoration: none; }
.rgt-updates__item:hover { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-updates__item:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-updates__item.rgt-is-active { background: var(--sl-selected); box-shadow: inset var(--sl-size-selected-bar) 0 0 var(--sl-primary); }
.rgt-updates__name { font-weight: 600; overflow-wrap: anywhere; }
.rgt-updates__meta { font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-updates__pager { gap: var(--sl-space-2); padding: 0 0 0 var(--sl-space-3); }
.rgt-updates__detail { min-width: 0; padding: 0; overflow: hidden; }
.rgt-updates__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-3); min-height: 4.5rem; box-sizing: border-box; padding: var(--sl-space-3) var(--sl-space-4) var(--sl-space-3) var(--sl-space-6); border-bottom: 1px solid var(--sl-divider); }
.rgt-updates__heading { flex: 1 1 16rem; display: flex; flex-direction: column; min-width: 0; }
.rgt-updates__title { margin: 0; font: var(--sl-title-l); overflow-wrap: anywhere; }
.rgt-updates__subtitle { font-size: .8125rem; line-height: 1.25rem; color: var(--sl-on-surface-variant); }
.rgt-updates__wrap { border: 0; border-radius: 0; background: transparent; }
.rgt-diff-table { width: 100%; }
.rgt-diff-table th, .rgt-diff-table td { padding: var(--sl-space-2) var(--sl-space-2); text-align: left; vertical-align: middle; }
.rgt-diff-table th:first-child, .rgt-diff-table td:first-child { padding-left: var(--sl-space-6); width: 16.25rem; }
.rgt-diff-table th:last-child, .rgt-diff-table td:last-child { padding-right: var(--sl-space-6); }
.rgt-diff-table thead th { height: 2.5rem; }
.rgt-diff-table tbody th, .rgt-diff-table tbody td { height: 3.5rem; }
.rgt-diff-table__field { font-weight: 500; }
.rgt-diff-table__arrow { width: 2rem; color: var(--sl-on-surface-variant); }
.rgt-diff-table__was { color: var(--sl-st-expired-fg); font-variant-numeric: tabular-nums; }
.rgt-diff-table__will { color: var(--sl-st-ok-fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.rgt-diff-table__will ins { text-decoration: none; }
.rgt-updates__empty { padding: var(--sl-space-6); }
@media (max-width: 839px) {
  .rgt-updates { grid-template-columns: minmax(0, 1fr); }
  .rgt-diff-table { min-width: 0; }
  .rgt-diff-table th:first-child, .rgt-diff-table td:first-child { width: auto; padding-left: var(--sl-space-4); }
  .rgt-diff-table th:last-child, .rgt-diff-table td:last-child { padding-right: var(--sl-space-4); }
  .rgt-updates__head { padding-left: var(--sl-space-4); }
}
/* Журнал змін З2 (RGT-246, ADR-50 §6): таблиця записів аудиту; тулбар, чипи, пейджер — класи Є1 (rgt-journal__*) */
.rgt-audit__table { width: 100%; min-width: 64rem; }
.rgt-table.rgt-audit__table td { padding-top: var(--sl-space-2); padding-bottom: var(--sl-space-2); }
.rgt-audit__sort { display: inline-flex; align-items: center; gap: var(--sl-space-1); font-weight: 600; }
.rgt-audit__when { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rgt-audit__source { color: var(--sl-on-surface-variant); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rgt-audit__object { display: block; max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
a.rgt-audit__object { color: var(--sl-primary); text-decoration: none; }
a.rgt-audit__object:hover { text-decoration: underline; }
a.rgt-audit__object:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-audit__list { display: grid; gap: var(--sl-space-1); margin: 0; padding: 0; list-style: none; }
.rgt-audit__list > li { max-width: 21.25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rgt-audit__change { display: flex; align-items: center; gap: var(--sl-space-2); }
.rgt-audit__change > .rgt-icon { flex: none; color: var(--sl-on-surface-variant); }
.rgt-audit__was, .rgt-audit__will { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rgt-audit__was { max-width: 50%; color: var(--sl-on-surface-variant); }
.rgt-audit__will { font-weight: 500; text-decoration: none; }
.rgt-audit__none { color: var(--sl-on-surface-variant); }
/* пілюля пошуку З2 — 260 за мокапом (Є1 лишається 21rem: довший плейсхолдер, aac0e16) — RGT-272 G2 */
#audit-search { flex-basis: 16.25rem; }
/* Документи операцій (RGT-247, ADR-51 §6): вибір лабораторії, картка «Режим документів» — рядок операції = форма; мокапа немає, стиль В6 */
.rgt-doc-settings-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sl-space-4); align-items: start; }
.rgt-doc-settings__lab { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-3); }
.rgt-doc-settings__lab > .rgt-field { flex: 0 1 20rem; min-width: 0; }
.rgt-doc-settings { display: flex; flex-direction: column; gap: var(--sl-space-4); }
.rgt-doc-settings__head { display: flex; flex-direction: column; gap: var(--sl-space-1); }
.rgt-doc-settings__head > * { margin: 0; }
.rgt-doc-settings__title { font: var(--sl-title-m); }
.rgt-doc-settings__legend { padding-left: var(--sl-space-5); color: var(--sl-on-surface-variant); font: var(--sl-body-s); }
.rgt-doc-settings__list { margin: 0; padding: 0; list-style: none; }
.rgt-doc-settings__row { padding: var(--sl-space-4) 0; border-top: 1px solid var(--sl-divider); }
.rgt-doc-settings__form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 18rem) auto; align-items: start; gap: var(--sl-space-3) var(--sl-space-4); }
.rgt-doc-settings__name { display: flex; flex-direction: column; gap: var(--sl-space-1); min-width: 0; }
.rgt-doc-settings__row-title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2); margin: 0; font: var(--sl-title-s); }
.rgt-tag.rgt-doc-settings__default { border-color: var(--sl-outline-variant); color: var(--sl-on-surface-variant); font-weight: 400; }
.rgt-doc-settings__hint { margin: 0; color: var(--sl-on-surface-variant); font: var(--sl-body-s); }
.rgt-doc-settings__form > .rgt-btn { align-self: center; }
.rgt-doc-settings__shifts { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sl-space-3); }
.rgt-doc-settings__times { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--sl-space-3); }
.rgt-doc-settings__times > .rgt-field { flex: 0 0 10rem; }
@media (max-width: 599px) {
  .rgt-doc-settings__form { grid-template-columns: minmax(0, 1fr); }
  .rgt-doc-settings__form > .rgt-btn { justify-self: start; }
}

/* --- Центр сповіщень З3 (RGT-135, ADR-62 §2) --- */
.rgt-ntf__filters { display: flex; flex-wrap: wrap; gap: var(--sl-space-2); margin: 0 0 var(--sl-space-4); }
.rgt-ntf__filters .rgt-filter-chip { text-decoration: none; }
.rgt-ntf__count { font-variant-numeric: tabular-nums; font-weight: 600; }
.rgt-ntf { display: flex; flex-direction: column; gap: var(--sl-space-4); }
.rgt-ntf__group-title { margin: 0 0 var(--sl-space-2); font: var(--sl-title-s); color: var(--sl-on-surface-variant); }
.rgt-ntf__items { margin: 0; padding: 0; list-style: none; }
.rgt-ntf__item { display: flex; align-items: flex-start; gap: var(--sl-space-3); padding: var(--sl-space-3) 0; border-bottom: 1px solid var(--sl-divider); }
.rgt-ntf__item:last-child { border-bottom: 0; }
.rgt-ntf__icon { display: inline-grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; border-radius: var(--sl-radius-full); background: var(--sl-surface-container-high); color: var(--sl-on-surface-variant); }
.rgt-ntf__item--unread .rgt-ntf__icon { background: var(--sl-primary-container); color: var(--sl-on-primary-container); }
.rgt-ntf__body { flex: 1; min-width: 0; }
.rgt-ntf__title { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.rgt-ntf__item--unread .rgt-ntf__title { font-weight: 700; }
.rgt-ntf__text { margin: var(--sl-space-1) 0 0; color: var(--sl-on-surface-variant); overflow-wrap: anywhere; }
.rgt-ntf__time { display: block; margin-top: var(--sl-space-1); font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); font-variant-numeric: tabular-nums; }
.rgt-ntf__form { flex: none; margin: 0; }
.rgt-ntf__open { margin: 0; }
.rgt-ntf__title-btn { all: unset; cursor: pointer; font: inherit; overflow-wrap: anywhere; text-align: start; }
.rgt-ntf__title-btn:hover { text-decoration: underline; }
.rgt-ntf__title-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.rgt-ntf__more { display: flex; justify-content: center; margin-top: var(--sl-space-4); }
@media (max-width: 599px) {
  .rgt-ntf__item { flex-wrap: wrap; }
  .rgt-ntf__form { width: 100%; padding-left: calc(2.5rem + var(--sl-space-3)); box-sizing: border-box; }
}
/* --- Звіти (RGT-146, ADR-65 доп. RGT-146 Д9; мокапу звітів немає — стиль Є1/Є2 і Cm-Data) --- */
.rgt-reports { display: flex; flex-direction: column; gap: var(--sl-space-4); min-width: 0; }
.rgt-reports__lead { margin: 0; color: var(--sl-on-surface-variant); }
.rgt-reports__index { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: var(--sl-space-4); margin: 0; padding: 0; list-style: none; }
.rgt-reports__entry { display: flex; flex-direction: column; gap: var(--sl-space-2); }
.rgt-reports__entry-link { display: flex; align-items: center; gap: var(--sl-space-3); color: var(--sl-primary); font: var(--sl-title-m); text-decoration: none; }
.rgt-reports__entry-link:hover, .rgt-reports__entry-link:focus-visible { text-decoration: underline; }
.rgt-reports__entry-title { min-width: 0; }
.rgt-reports__entry-text { margin: 0; color: var(--sl-on-surface-variant); }
.rgt-reports__form { display: flex; flex-direction: column; gap: var(--sl-space-3); }
.rgt-reports__trees { display: flex; flex-wrap: wrap; gap: var(--sl-space-2); }
.rgt-reports__tree, .rgt-reports__item-chip { text-decoration: none; }
.rgt-reports__tree[aria-current="true"], .rgt-reports__item-chip { background: var(--sl-secondary-container); color: var(--sl-on-secondary-container); box-shadow: none; }
.rgt-reports__fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: var(--sl-space-3) var(--sl-space-4); align-items: start; }
.rgt-reports__item { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sl-space-2); grid-column: 1 / -1; }
.rgt-reports__item > .rgt-field { align-self: stretch; max-width: 32rem; }
.rgt-reports__choices { display: flex; flex-wrap: wrap; gap: var(--sl-space-2) var(--sl-space-4); margin: 0; padding: 0; list-style: none; }
.rgt-reports__choice { color: var(--sl-primary); }
.rgt-reports__actions { display: flex; flex-wrap: wrap; gap: var(--sl-space-2); grid-column: 1 / -1; }
.rgt-reports__result { min-width: 0; padding: 0; }
.rgt-reports__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2) var(--sl-space-4); padding: var(--sl-space-3) var(--sl-space-4); border-bottom: 1px solid var(--sl-divider); }
.rgt-reports__params { display: flex; flex-wrap: wrap; gap: var(--sl-space-1) var(--sl-space-4); margin: 0; }
.rgt-reports__param { display: flex; gap: var(--sl-space-1); }
.rgt-reports__param > dt, .rgt-reports__total > dt { font-weight: 400; color: var(--sl-on-surface-variant); }
.rgt-reports__param > dd, .rgt-reports__total > dd { margin: 0; }
.rgt-reports__generated { margin: 0; font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-reports__export { display: flex; flex-wrap: wrap; gap: var(--sl-space-2); margin-inline-start: auto; }
.rgt-reports__result > .rgt-table-wrap { border: 0; border-radius: 0; background: transparent; }
.rgt-reports__result > .rgt-banner { margin: var(--sl-space-3) var(--sl-space-4) 0; }
.rgt-reports__table { width: 100%; }
.rgt-reports__table .rgt-table__num { white-space: nowrap; }
.rgt-reports__subtotal > * { background: var(--sl-surface-container-low); font-weight: 600; }
.rgt-reports__subtotal > th { text-align: left; }
.rgt-reports__details { margin-inline-start: var(--sl-space-2); font-weight: 400; color: var(--sl-primary); }
.rgt-reports__link { color: var(--sl-primary); }
.rgt-reports__totals { padding: var(--sl-space-3) var(--sl-space-4); border-top: 1px solid var(--sl-divider); background: var(--sl-surface-container-low); }
.rgt-reports__totals-title { margin: 0 0 var(--sl-space-2); font: var(--sl-title-s); }
.rgt-reports__total-list { display: flex; flex-wrap: wrap; gap: var(--sl-space-2) var(--sl-space-6); margin: 0; }
.rgt-reports__total { display: flex; gap: var(--sl-space-2); }
.rgt-reports__total > dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.rgt-reports__notes { margin: 0; padding: var(--sl-space-3) var(--sl-space-4) var(--sl-space-3) var(--sl-space-8); font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
/* Пара сторно в історії (RGT-349, ADR-65 доп. Д11): сторнований рядок приглушено, рядок сторно — з відступом і смугою, посилання між ними, ціль переходу підсвічено */
.rgt-reports__row--reversed > td { color: var(--sl-on-surface-variant); }
.rgt-reports__row--reversal > td:first-child { padding-inline-start: var(--sl-space-6); box-shadow: inset 2px 0 0 var(--sl-outline); }
.rgt-reports__pair { display: block; color: var(--sl-primary); font-size: var(--sl-text-label); line-height: var(--sl-lh-label); }
.rgt-reports__table tr:target > * { background: var(--sl-secondary-container); color: var(--sl-on-secondary-container); }
/* Широкий звіт (понад 6 колонок, як PDF-експорт) друкується на альбомній A4 дрібнішим шрифтом, заголовки колонок переносяться (RGT-352, ADR-65 доп. Д12) */
@page rgt-wide { size: A4 landscape; margin: 10mm; }
@media print {
  .rgt-topbar, .rgt-nav--sub, .rgt-drawer, .rgt-breadcrumbs, .rgt-reports__form, .rgt-reports__export, .rgt-reports__lead { display: none; }
  .rgt-reports__wrap { overflow: visible; }
  .rgt-reports__table { min-width: 0; }
  .rgt-reports__table thead th { position: static; }
  .rgt-reports__table thead th, .rgt-reports__table thead .rgt-table__num { white-space: normal; }
  .rgt-print-landscape { page: rgt-wide; }
  .rgt-print-landscape .rgt-reports__result { width: fit-content; min-width: 100%; }
  .rgt-print-landscape .rgt-reports__table th, .rgt-print-landscape .rgt-reports__table td { padding: 0 var(--sl-space-1); font-size: var(--sl-text-label); }
}

/* RGT-407: екран скану телефона (web/scan.html) */
.rgt-scan-screen { display: flex; flex-direction: column; gap: var(--sl-space-2); }
.rgt-scan-screen__title { margin: 0; font: var(--sl-title-l); }
.rgt-scan-screen__hint { margin: 0; color: var(--sl-on-surface-variant); }

/* RGT-407: друк вибраних одиниць зі «Залишків» (замість кнопки «Друк етикеток») */
.rgt-stock-table__check { width: 2.5rem; }
.rgt-stock-table__box { position: relative; z-index: 1; width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--sl-primary); }
.rgt-stock__print { display: none; position: sticky; bottom: 0; z-index: 2; align-items: center; justify-content: flex-end; gap: var(--sl-space-3); margin: 0; padding: var(--sl-space-3) var(--sl-space-4); background: var(--sl-card); border-top: 1px solid var(--sl-divider); }
.rgt-stock:has(.rgt-stock-table__box:checked) .rgt-stock__print { display: flex; }
.rgt-stock__print-count { color: var(--sl-on-surface-variant); }
@media (max-width: 839px) {
  .rgt-stock-table tr.rgt-stock-table__row { position: relative; padding-right: var(--sl-space-12); }
  .rgt-stock-table tr.rgt-stock-table__row > td.rgt-stock-table__check { position: absolute; top: var(--sl-space-3); right: var(--sl-space-3); display: flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; margin: calc(-1 * var(--sl-space-2)); }
  .rgt-stock__print { bottom: calc(var(--sl-bottom-nav-h) + env(safe-area-inset-bottom)); }
}

/* RGT-407: вкладки сторінки розділу (ui/tabs) — «Структура», «Глобальний каталог» */
.rgt-tabs--page { margin: 0 0 var(--sl-space-4); padding: 0; gap: var(--sl-space-2); }
.rgt-tabs--page .rgt-tabs__item { gap: var(--sl-space-2); }
.rgt-tabs--page .rgt-nav__badge { margin-left: 0; }
.rgt-home__row-link { white-space: nowrap; }
.rgt-home__chip-label { white-space: nowrap; }
/* RGT-407: нижня панель на кожному телефонному екрані — цілі пульта 56 px; прокрутка до поля/кнопки не ховає їх під панеллю */
.rgt-nav--bar .rgt-nav__item { min-height: var(--sl-size-target-touch); }
html:has(.rgt-pult) { scroll-padding-bottom: calc(var(--sl-bottom-nav-h) + var(--sl-size-fab-lift) + env(safe-area-inset-bottom)); }
@media (max-width: 839px) {
  html:has(.rgt-phone-bar) { scroll-padding-bottom: calc(var(--sl-bottom-nav-h) + var(--sl-size-fab-lift) + env(safe-area-inset-bottom)); }
}
.rgt-nav--bar .rgt-nav__item--fab.rgt-is-active .rgt-nav__icon { background: var(--sl-primary); color: var(--sl-on-primary); }
/* RGT-408: контекст вузла «Залишків» — дерево-навігатор зліва (ПК), контекст праворуч; телефон — крихти, список рівня, картки */
.rgt-stock-layout { display: grid; gap: var(--sl-space-4); align-items: start; }
.rgt-stock-layout__tree { position: sticky; top: calc(var(--sl-header-h) + var(--sl-space-4)); max-height: calc(100vh - var(--sl-header-h) - 2 * var(--sl-space-4)); min-width: 0; padding: var(--sl-space-2) 0; overflow: auto; }
.rgt-stock__path { padding: var(--sl-space-3) var(--sl-space-4) 0; }
.rgt-stock__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sl-space-1) var(--sl-space-3); padding: var(--sl-space-1) var(--sl-space-4) var(--sl-space-3); border-bottom: 1px solid var(--sl-divider); }
.rgt-stock__title { margin: 0; font: var(--sl-title-l); overflow-wrap: anywhere; }
.rgt-stock__title:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-stock__meta { margin: 0; font-size: var(--sl-text-label); color: var(--sl-on-surface-variant); }
.rgt-stock__level { display: none; padding: 0; border: 0; border-bottom: 1px solid var(--sl-divider); border-radius: 0; box-shadow: none; background: transparent; }
.rgt-stock__level .rgt-tree-level__head { padding: var(--sl-space-2) var(--sl-space-4) 0; }
.rgt-stock__level .rgt-tree-level__title { font: var(--sl-title-s); color: var(--sl-on-surface-variant); }
.rgt-stock__views { display: flex; gap: var(--sl-space-1); }
.rgt-stock__view { gap: var(--sl-space-1); padding: 0 var(--sl-space-3); color: var(--sl-on-surface); text-decoration: none; }
.rgt-stock__view > .rgt-icon { display: none; width: 1rem; height: 1rem; }
.rgt-stock__view[aria-current="page"] { background: var(--sl-secondary-container); color: var(--sl-on-secondary-container); box-shadow: none; }
.rgt-stock__view[aria-current="page"] > .rgt-icon { display: block; }
.rgt-stock__note { display: flex; align-items: center; gap: var(--sl-space-2); margin: 0; padding: var(--sl-space-2) var(--sl-space-4); font-size: var(--sl-text-label); color: var(--sl-on-surface-variant); }
.rgt-stock-chip { height: 2rem; }
.rgt-stock-layout__tree .rgt-tree__label { overflow-wrap: break-word; }
.rgt-tree__count { flex: none; min-width: 1.25rem; box-sizing: border-box; padding: 0 .375rem; border-radius: var(--sl-radius-full); font-size: var(--sl-text-label); line-height: 1.25rem; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.rgt-tree__meta + .rgt-tree__count, .rgt-tree__label + .rgt-tree__count { margin-left: auto; }
.rgt-tree__count--recalled { background: var(--sl-st-recalled-bg); color: var(--sl-st-recalled-fg); }
.rgt-tree__count--quarantine { background: var(--sl-st-quarantine-bg); color: var(--sl-st-quarantine-fg); }
.rgt-tree__count--expired { background: var(--sl-st-expired-bg); color: var(--sl-st-expired-fg); }
.rgt-tree__count--warn { background: var(--sl-st-warn-bg); color: var(--sl-st-warn-fg); }
.rgt-tree-level__label + .rgt-tree__count { margin-left: auto; }
.rgt-stock-items { margin: 0; padding: 0; list-style: none; }
.rgt-stock-item { border-bottom: 1px solid var(--sl-divider); }
.rgt-stock-item__summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 6.5rem 7rem; align-items: center; gap: var(--sl-space-3); min-height: var(--sl-size-target-touch); padding: var(--sl-space-2) var(--sl-space-4); cursor: pointer; list-style: none; }
.rgt-stock-item__summary::-webkit-details-marker { display: none; }
.rgt-stock-item__summary:hover { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-stock-item__summary:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: calc(-1 * var(--sl-focus-width)); }
.rgt-stock-item__summary > .rgt-icon { color: var(--sl-on-surface-variant); transition: transform var(--sl-motion-short, .15s); }
.rgt-stock-item[open] > .rgt-stock-item__summary > .rgt-icon { transform: rotate(90deg); }
.rgt-stock-item__name { display: flex; flex-direction: column; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.rgt-stock-item__sub { font-size: var(--sl-text-label); font-weight: 400; color: var(--sl-on-surface-variant); }
.rgt-stock-item__expiry, .rgt-stock-item__qty { white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
.rgt-stock-item__lots { padding: 0 var(--sl-space-4) var(--sl-space-3) calc(var(--sl-space-4) + 1.75rem); }
.rgt-stock-item__all { display: inline-block; margin-top: var(--sl-space-2); color: var(--sl-primary); font-size: var(--sl-text-label); font-weight: 500; }
.rgt-stock-lots { margin: 0; padding: 0; list-style: none; }
.rgt-stock-lots__lot { padding: var(--sl-space-2) 0; border-top: 1px dashed var(--sl-divider); }
.rgt-stock-lots__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-1) var(--sl-space-3); margin: 0 0 var(--sl-space-2); }
.rgt-stock-lots__number { font-weight: 500; }
.rgt-stock-lots__meta { font-size: var(--sl-text-label); color: var(--sl-on-surface-variant); }
.rgt-stock-lots__units { display: flex; flex-wrap: wrap; gap: var(--sl-space-2); margin: 0; padding: 0; list-style: none; }
.rgt-stock-lots__unit { color: var(--sl-on-surface); text-decoration: none; }
@media (min-width: 840px) {
  .rgt-stock-layout { grid-template-columns: minmax(17rem, 1fr) minmax(0, 2.5fr); }
}
@media (max-width: 839px) {
  .rgt-stock-layout__tree { display: none; }
  .rgt-stock__level { display: block; }
  .rgt-stock__views { flex: 1 1 100%; }
  .rgt-stock-item__summary { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "icon name name" "icon status qty" "icon expiry expiry"; gap: var(--sl-space-1) var(--sl-space-3); padding: var(--sl-space-3) var(--sl-space-4); }
  .rgt-stock-item__summary > .rgt-icon { grid-area: icon; align-self: start; margin-top: .125rem; }
  .rgt-stock-item__name { grid-area: name; }
  .rgt-stock-item__status { grid-area: status; }
  .rgt-stock-item__qty { grid-area: qty; }
  .rgt-stock-item__expiry { grid-area: expiry; text-align: left; }
  .rgt-stock-item__lots { padding-left: var(--sl-space-4); }
}
/* RGT-408: ui/node_picker — поле вибору вузла й діалог з деревом */
.rgt-node-picker-field { min-width: 0; }
a.rgt-picker__change { display: inline-flex; align-items: center; text-decoration: none; }
a.rgt-picker__change:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-node-picker__results { max-height: min(55vh, 28rem); overflow: auto; }
.rgt-node-picker .rgt-tree__item[aria-disabled="true"] { color: var(--sl-on-surface-variant); cursor: default; }
.rgt-node-picker .rgt-tree__item[aria-disabled="true"] .rgt-tree__meta { font-style: italic; }
@media (max-width: 839px) {
  .rgt-node-picker { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: var(--sl-space-4); border-radius: 0; }
  .rgt-node-picker > .rgt-dialog__form { height: 100%; }
  .rgt-node-picker__results { flex: 1 1 auto; max-height: none; }
  .rgt-node-picker .rgt-tree__item { min-height: var(--sl-size-target-touch); }
  .rgt-node-picker .rgt-dialog__actions .rgt-btn { flex: 1; }
}
.rgt-tree-level { min-width: 0; }
.rgt-node-picker__search { flex: none; }
.rgt-stock-lot .rgt-stock-table__name { font-weight: 500; }

/* --- RGT-409: приймання S1 одним екраном (ADR-38 доп. RGT-409) --- */
/* «Нове приймання» на 1280: заголовок у колонковій шапці сторінки не розтягується на flex-basis 20rem */
.rgt-page-header > .rgt-page-header__title { flex: none; }
/* шапка чернетки — один рядок «постачальник · накладна · отримувач · місце · валюта · Змінити шапку» */
.rgt-receipt-summary { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2) var(--sl-space-4); padding: var(--sl-space-3) var(--sl-space-3) var(--sl-space-3) var(--sl-space-5); }
.rgt-receipt-summary .rgt-receipt-summary__list { display: block; flex: 1 1 20rem; min-width: 0; margin: 0; line-height: 1.75; }
.rgt-receipt-summary .rgt-receipt-summary__item + .rgt-receipt-summary__item::before { content: "·"; padding: 0 var(--sl-space-2); color: var(--sl-on-surface-variant); }
.rgt-receipt-summary .rgt-receipt-summary__item, .rgt-receipt-summary .rgt-receipt-summary__value { display: inline; }
.rgt-receipt-summary .rgt-receipt-summary__term { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.rgt-receipt-summary .rgt-receipt-summary__item:first-child .rgt-receipt-summary__value { font-weight: 500; }
/* ui/combobox: спливний список під полем (поле — у формі [data-combobox-form]) */
.rgt-scan[data-combobox-form] { position: relative; }
.rgt-combobox__popup { position: absolute; top: calc(100% + var(--sl-space-1)); left: 0; right: 0; z-index: var(--sl-z-menu); max-height: min(24rem, 60vh); overflow-y: auto; padding: var(--sl-space-1) 0; border: 1px solid var(--sl-outline-variant); border-radius: var(--sl-radius-md); background: var(--sl-surface-container-lowest); box-shadow: var(--sl-shadow-2); }
.rgt-combobox__popup[hidden] { display: none; }
.rgt-combobox__list { margin: 0; padding: 0; list-style: none; }
.rgt-combobox__option { display: flex; flex-direction: column; justify-content: center; min-height: var(--sl-control-h); padding: var(--sl-space-1) var(--sl-space-4); cursor: pointer; }
.rgt-combobox__option:hover { background: var(--sl-surface-container); }
.rgt-combobox__option[aria-selected="true"] { background: var(--sl-selected); box-shadow: inset 2px 0 0 var(--sl-primary); }
.rgt-combobox__label { font-weight: 500; overflow-wrap: anywhere; }
.rgt-combobox__sub, .rgt-combobox__meta { font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-combobox__meta { color: var(--sl-st-ok-fg); }
.rgt-combobox__option--action { border-top: 1px solid var(--sl-divider); color: var(--sl-primary); }
.rgt-combobox__option--action .rgt-combobox__label { font-weight: 500; }
.rgt-combobox__note { margin: 0; padding: var(--sl-space-2) var(--sl-space-4); font-size: var(--sl-text-label); color: var(--sl-on-surface-variant); }
/* ui/date_input: кнопка календаря в полі, нативний вибір під нею (невидимий), розшифровка під полем */
.rgt-date-input .rgt-field__input { padding-right: calc(var(--sl-control-h) + var(--sl-space-1)); }
.rgt-date-input__pick { position: absolute; top: 50%; right: var(--sl-space-1); transform: translateY(-50%); width: 2.5rem; height: 2.5rem; }
.rgt-date-input__pick[hidden] { display: none; }
.rgt-date-input__native { position: absolute; right: 0; bottom: 0; width: 2.5rem; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.rgt-date-input__decoded { margin: var(--sl-space-1) 0 0; padding: 0 var(--sl-space-4); font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); }
.rgt-date-input__decoded:empty { display: none; }
.rgt-date-input:has(.rgt-date-input__decoded:not(:empty)) .rgt-field__hint { display: none; }
.rgt-date-input__decoded--warn { color: var(--sl-st-warn-fg); font-weight: 500; }
/* картка «Проведення» внизу чернетки */
.rgt-receipt-posting { display: flex; flex-direction: column; gap: var(--sl-space-3); padding: var(--sl-space-5); }
.rgt-receipt-posting__title { margin: 0; font: var(--sl-title-s); }
.rgt-receipt-posting__status { display: flex; align-items: center; gap: var(--sl-space-2); margin: 0; font-weight: 500; }
.rgt-receipt-posting__status--ok .rgt-icon { color: var(--sl-st-ok-ic); }
.rgt-receipt-posting__status--bad .rgt-icon { color: var(--sl-error); }
.rgt-receipt-posting__form { display: flex; flex-direction: column; gap: var(--sl-space-3); margin: 0; }
.rgt-receipt-posting__when { margin: 0; }
.rgt-receipt-posting__summary { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2); min-height: var(--sl-control-h); cursor: pointer; }
.rgt-receipt-posting__change { color: var(--sl-primary); font-weight: 500; }
.rgt-receipt-posting__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sl-space-4); padding-top: var(--sl-space-2); }
.rgt-receipt-posting__actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--sl-space-2); }
/* липка смужка друку етикеток після проведення */
.rgt-print-strip { position: sticky; bottom: var(--sl-space-3); z-index: var(--sl-z-raised); margin-top: var(--sl-space-2); padding: var(--sl-space-3) var(--sl-space-4); border: 1px solid var(--sl-outline-variant); border-radius: var(--sl-radius-lg); background: var(--sl-card); box-shadow: var(--sl-shadow-3); }
.rgt-print-strip__form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2) var(--sl-space-4); margin: 0; }
.rgt-print-strip__count { margin: 0; }
.rgt-print-strip__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2); margin-inline-start: auto; }
.rgt-print-strip__reason { flex-basis: 100%; margin: 0; font-size: var(--sl-text-label); color: var(--sl-on-surface-variant); }
@media (max-width: 839px) {
  .rgt-print-strip { bottom: calc(var(--sl-bottom-nav-h) + env(safe-area-inset-bottom) + var(--sl-space-2)); }
  .rgt-receipt-posting__fields { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 599px) {
  .rgt-receipt-summary { padding-inline: var(--sl-space-4); }
  .rgt-receipt-posting { padding-inline: var(--sl-space-4); }
  .rgt-receipt-posting__actions .rgt-btn--filled, .rgt-receipt-posting__actions .rgt-btn-reason { flex: 1 1 100%; }
  .rgt-receipt-posting__actions .rgt-btn--filled { min-height: var(--sl-size-target-touch); }
  .rgt-combobox__option { min-height: var(--sl-size-target-touch); }
  .rgt-print-strip__actions { flex: 1 1 100%; }
  .rgt-print-strip__actions .rgt-btn--filled { flex: 1 1 100%; min-height: var(--sl-size-target-touch); }
  .rgt-print-strip__actions .rgt-btn--outlined { flex: 1; }
}
/* --- ui/object_header і картка лота (RGT-410, ADR-55 доповнення RGT-410) --- */
.rgt-object-header { display: flex; flex-direction: column; gap: var(--sl-space-2); margin: 0 0 var(--sl-space-4); }
.rgt-object-header__kind { margin: 0; font: var(--sl-label-l); color: var(--sl-on-surface-variant); }
.rgt-object-header__title { margin: 0; font: var(--sl-headline-s); text-wrap: balance; }
.rgt-object-header__link { color: inherit; text-decoration: none; }
.rgt-object-header__link:hover, .rgt-object-header__link:focus-visible { text-decoration: underline; }
.rgt-object-header__sub { margin: 0; font: var(--sl-body-s); color: var(--sl-on-surface-variant); }
.rgt-object-header__chips { display: flex; flex-wrap: wrap; gap: var(--sl-space-2); }
.rgt-object-header__facts { display: flex; flex-wrap: wrap; gap: var(--sl-space-2) var(--sl-space-6); margin: 0; }
.rgt-object-header__facts > div { flex-direction: column; justify-content: flex-start; gap: 0; padding: 0; border-bottom: 0; }
.rgt-object-header__facts dd { text-align: left; }
.rgt-object-header__note { font-weight: 400; color: var(--sl-on-surface-variant); }
.rgt-lot { display: flex; flex-direction: column; gap: var(--sl-space-3); }
.rgt-lot__panel { display: flex; flex-direction: column; gap: var(--sl-space-3); }
.rgt-lot__panel .rgt-table { width: 100%; }
.rgt-lot__panel .rgt-code { white-space: nowrap; }
.rgt-lot__title { margin: 0; font: var(--sl-title-m); }
.rgt-lot__note { margin: 0; color: var(--sl-on-surface-variant); }
.rgt-lot__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sl-space-4); }
.rgt-lot__verify { display: flex; flex-direction: column; gap: var(--sl-space-2); padding-bottom: var(--sl-space-4); border-bottom: 1px solid var(--sl-divider); }
.rgt-lot__verify-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2) var(--sl-space-3); margin: 0; font-weight: 500; }
.rgt-lot__recall { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sl-space-2); }
.rgt-lot__recall-actions { justify-content: flex-start; }
@media (max-width: 599px) {
  .rgt-object-header__facts { gap: var(--sl-space-2) var(--sl-space-4); }
  .rgt-lot__verify .rgt-verify__actions .rgt-btn { flex: 1 1 100%; min-height: var(--sl-size-target-touch); }
}
/* --- «Адміністрування»: перелік підрозділів, «Організація» (RGT-411); «Апарати», база знань (RGT-405, ADR-66) --- */
.rgt-admin-index { padding: 0; overflow: hidden; }
.rgt-admin-index__list { list-style: none; margin: 0; padding: 0; }
.rgt-admin-index__row { display: flex; align-items: center; gap: var(--sl-space-4); min-height: var(--sl-size-target-touch); padding: var(--sl-space-3) var(--sl-space-4) var(--sl-space-3) var(--sl-space-5); border-top: 1px solid var(--sl-divider); color: var(--sl-on-surface); text-decoration: none; }
.rgt-admin-index__list > li:first-child > .rgt-admin-index__row { border-top: 0; }
.rgt-admin-index__row:hover { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-admin-index__row:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: calc(-1 * var(--sl-focus-width)); }
.rgt-admin-index__icon { display: inline-flex; color: var(--sl-primary); }
.rgt-admin-index__body { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.rgt-admin-index__label { font: var(--sl-title-s); }
.rgt-admin-index__text { font: var(--sl-body-s); color: var(--sl-on-surface-variant); }
.rgt-org { display: flex; flex-direction: column; gap: var(--sl-space-4); max-width: 48rem; }
.rgt-org__card { display: flex; flex-direction: column; gap: var(--sl-space-4); }
.rgt-org__head { display: flex; flex-direction: column; gap: var(--sl-space-1); }
.rgt-org__head > * { margin: 0; }
.rgt-org__head h2 { font: var(--sl-title-m); }
.rgt-org__head p { color: var(--sl-on-surface-variant); }
.rgt-org__card form { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--sl-space-3) var(--sl-space-4); }
.rgt-org__card form > .rgt-field { flex: 1 1 18rem; max-width: 28rem; }
.rgt-org__card form > .rgt-banner { flex: 1 1 100%; }
.rgt-combobox-field { position: relative; }
.rgt-equipment-list { display: flex; flex-direction: column; gap: var(--sl-space-4); }
.rgt-equipment-table { width: 100%; }
.rgt-equipment-table__sub, .rgt-equipment-table__due { display: block; font: var(--sl-body-s); color: var(--sl-on-surface-variant); }
.rgt-equipment-table__due { color: var(--sl-st-warn-fg); }
.rgt-equipment-table__due--over { color: var(--sl-st-expired-fg); }
.rgt-equipment-table__muted { color: var(--sl-on-surface-variant); }
.rgt-equipment-form { max-width: 64rem; }
.rgt-equipment-form .rgt-item-form { display: flex; flex-direction: column; gap: var(--sl-space-4); }
.rgt-equipment-form__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sl-space-3); }
.rgt-equipment-card__actions { display: flex; flex-wrap: wrap; gap: var(--sl-space-3); margin: 0 0 var(--sl-space-4); }
.rgt-equipment-card { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--sl-space-4); align-items: start; }
.rgt-equipment-card__main, .rgt-equipment-card__side { display: flex; flex-direction: column; gap: var(--sl-space-4); min-width: 0; }
.rgt-equipment-card__section { display: flex; flex-direction: column; gap: var(--sl-space-3); }
.rgt-equipment-card__title { margin: 0; font: var(--sl-title-m); }
.rgt-equipment-card__subtitle { margin: var(--sl-space-2) 0 0; font: var(--sl-title-s); }
.rgt-equipment-card__note { margin: 0 0 var(--sl-space-3); color: var(--sl-on-surface-variant); }
.rgt-equipment-card__section .rgt-equipment-card__note { margin: 0; }
.rgt-equipment-card__notes { margin: 0; white-space: pre-line; }
.rgt-equipment-card__place { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sl-space-3); }
.rgt-equipment-card__place > .rgt-node-picker-field { flex: 1 1 18rem; }
.rgt-kb-docs { list-style: none; margin: 0; padding: 0; }
.rgt-kb-docs__row { display: flex; align-items: center; gap: var(--sl-space-3); padding: var(--sl-space-2) 0; border-top: 1px solid var(--sl-divider); color: var(--sl-on-surface-variant); }
.rgt-kb-docs__row:first-child { border-top: 0; }
.rgt-kb-docs__body { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.rgt-kb-docs__link, .rgt-kb-docs__name { font-weight: 500; color: var(--sl-on-surface); overflow-wrap: anywhere; }
.rgt-kb-docs__link { color: var(--sl-primary); }
.rgt-kb-docs__meta { font: var(--sl-body-s); color: var(--sl-on-surface-variant); }
.rgt-kb-upload { display: flex; flex-direction: column; gap: var(--sl-space-3); margin-top: var(--sl-space-2); padding-top: var(--sl-space-4); border-top: 1px solid var(--sl-divider); }
.rgt-kb-upload__title { margin: 0; font: var(--sl-title-s); }
.rgt-kb-upload__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--sl-space-3); }
.rgt-kb-upload__drop { min-height: 0; padding: var(--sl-space-3) var(--sl-space-4); flex-flow: row wrap; justify-content: flex-start; text-align: left; }
.rgt-kb-upload__drop .rgt-dropzone__icon { width: 2.5rem; height: 2.5rem; }
.rgt-kb-upload__actions { display: flex; justify-content: flex-end; }
.rgt-kb-makers { margin: 0 0 var(--sl-space-4); }
.rgt-kb { display: grid; grid-template-columns: minmax(14rem, 1fr) minmax(0, 3fr); gap: var(--sl-space-4); align-items: start; }
.rgt-kb__models, .rgt-kb__products { display: flex; flex-direction: column; gap: var(--sl-space-2); min-width: 0; }
.rgt-kb__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sl-space-3); }
.rgt-kb__title { margin: 0; font: var(--sl-title-m); }
.rgt-kb__family { border-top: 1px solid var(--sl-divider); padding-top: var(--sl-space-2); }
.rgt-kb__family-name { cursor: pointer; font: var(--sl-title-s); padding: var(--sl-space-1) 0; }
.rgt-kb__count { font: var(--sl-label-m); color: var(--sl-on-surface-variant); }
.rgt-kb__list { list-style: none; margin: 0; padding: 0 0 0 var(--sl-space-3); }
.rgt-kb__model { display: block; padding: var(--sl-space-2) var(--sl-space-3); border-radius: var(--sl-radius-md); color: var(--sl-on-surface); text-decoration: none; }
.rgt-kb__model:hover { background: var(--sl-surface-container); }
.rgt-kb__model.rgt-is-active { background: var(--sl-selected); font-weight: 600; }
.rgt-kb__note { margin: 0; color: var(--sl-on-surface-variant); }
.rgt-kb__sub { display: block; font: var(--sl-body-s); color: var(--sl-on-surface-variant); }
.rgt-kb__products .rgt-table { width: 100%; }
.rgt-ref-hint:empty { display: none; }
.rgt-ref-hint__card { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sl-space-1); margin-top: var(--sl-space-3); padding: var(--sl-space-3) var(--sl-space-4); border: 1px solid var(--sl-outline-variant); border-radius: var(--sl-radius-md); background: var(--sl-surface-container-low); }
.rgt-ref-hint__card > p { margin: 0; }
.rgt-ref-hint__kind { font: var(--sl-label-m); color: var(--sl-on-surface-variant); }
.rgt-ref-hint__name { font-weight: 600; }
.rgt-ref-hint__meta { font: var(--sl-body-s); color: var(--sl-on-surface-variant); }
.rgt-unit-docs { display: flex; flex-direction: column; gap: var(--sl-space-2); }
.rgt-unit-docs__title { margin: 0; font: var(--sl-title-s); }
.rgt-unit-docs__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rgt-unit-docs__link { display: flex; align-items: center; gap: var(--sl-space-3); min-height: var(--sl-size-target-touch); padding: 0 var(--sl-space-2); border-top: 1px solid var(--sl-divider); color: var(--sl-primary); font-weight: 500; text-decoration: none; }
.rgt-unit-docs__list > li:first-child > .rgt-unit-docs__link { border-top: 0; }
@media (max-width: 839px) {
  .rgt-equipment-card, .rgt-kb { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 599px) {
  .rgt-equipment-card__actions .rgt-btn, .rgt-equipment-card__place .rgt-btn, .rgt-org__card form .rgt-btn { flex: 1 1 100%; min-height: var(--sl-size-target-touch); }
  .rgt-org__card form > .rgt-field { max-width: none; }
  .rgt-kb-docs__row { flex-wrap: wrap; }
  .rgt-kb-docs__body { flex-basis: calc(100% - 3rem); }
  .rgt-kb-docs__row > .rgt-chip { margin-left: calc(1.5rem + var(--sl-space-3)); }
}

/* ui/filter_bar (RGT-411, design-code §5): ярус 1 — пошук, вузол, період; ярус 2 — головні чипи; ярус 3 — «Фільтри (N)»:
   на ПК бічна панель праворуч, на телефоні — діалог на весь екран; застосовані — чипи з «×». Телефон: лише пошук і «Фільтри». */
.rgt-filter-bar { display: grid; gap: var(--sl-space-2); padding: var(--sl-space-3) var(--sl-space-4); border-bottom: 1px solid var(--sl-divider); }
.rgt-filter-bar__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-3); min-width: 0; }
.rgt-filter-bar__search { flex: 0 1 21rem; min-width: 0; }
.rgt-filter-bar__node { flex: 0 1 18rem; min-width: 0; }
.rgt-filter-bar__node .rgt-picker { min-height: var(--sl-control-h-sm); }
.rgt-filter-bar__period, .rgt-filter-bar__chips { display: flex; flex-wrap: wrap; gap: var(--sl-space-2); min-width: 0; }
.rgt-filter-bar__chip { text-decoration: none; }
.rgt-filter-bar__chip[aria-current="true"] { padding-left: var(--sl-space-2); background: var(--sl-secondary-container); color: var(--sl-on-secondary-container); box-shadow: none; }
.rgt-filter-bar__chip[aria-current="true"] > .rgt-icon, .rgt-filter-bar__chip[popovertarget] > .rgt-icon { display: block; }
.rgt-filter-bar__more { margin-left: auto; }
.rgt-filter-bar__date-menu { padding: 0; }
.rgt-filter-bar__date-form { display: grid; gap: var(--sl-space-3); padding: var(--sl-space-3) var(--sl-space-4); min-width: 16rem; }
.rgt-filter-bar__error { display: flex; align-items: center; gap: var(--sl-space-2); margin: 0; color: var(--sl-error); }
.rgt-filter-bar__applied { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2); }
.rgt-filter-dialog__body { display: grid; gap: var(--sl-space-4); overflow-y: auto; }
.rgt-filter-dialog__group { display: grid; gap: var(--sl-space-2); margin: 0; padding: 0; border: 0; min-width: 0; }
.rgt-filter-dialog__legend { margin-bottom: var(--sl-space-1); font-size: var(--sl-text-label); font-weight: 500; color: var(--sl-on-surface-variant); }
.rgt-filter-dialog__option { display: flex; align-items: center; gap: var(--sl-space-3); min-height: var(--sl-control-h-sm); cursor: pointer; }
.rgt-filter-dialog__option > input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--sl-primary); }
.rgt-filter-dialog__dates { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sl-space-3); }
.rgt-filter-dialog__form { display: grid; grid-template-rows: auto 1fr auto; gap: var(--sl-space-4); max-height: 100%; }
[data-filter-results]:focus { outline: none; }
@media (min-width: 840px) {
  .rgt-filter-dialog { margin: 0 0 0 auto; height: 100dvh; max-height: none; width: 26rem; max-width: 100vw; border-radius: var(--sl-radius-xl) 0 0 var(--sl-radius-xl); }
}
@media (max-width: 839px) {
  .rgt-filter-bar__period, .rgt-filter-bar__chips, .rgt-filter-bar__node { display: none; }
  .rgt-filter-bar__search { flex: 1 1 12rem; }
  .rgt-filter-dialog, .rgt-filter-dialog.rgt-dialog--form { margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; border-radius: 0; }
  .rgt-filter-dialog__dates { grid-template-columns: 1fr; }
}

/* Д1 (RGT-411): групи «позиція → лот» у друку етикеток, зведення, передрук з картки партії */
.rgt-labels__group-row > th, .rgt-labels__lot-row > th { text-align: left; font-weight: 500; }
.rgt-labels__group-row { background: var(--sl-surface-container); }
.rgt-labels__lot-head { padding-left: var(--sl-space-6); color: var(--sl-on-surface-variant); }
.rgt-labels__group-link { color: inherit; text-decoration: none; }
.rgt-labels__group-link:hover { text-decoration: underline; }
.rgt-labels__group-count { margin-left: var(--sl-space-2); font-size: var(--sl-text-label); font-weight: 400; color: var(--sl-on-surface-variant); font-variant-numeric: tabular-nums; }
.rgt-labels__summary { margin: 0; font-size: var(--sl-text-label); color: var(--sl-on-surface-variant); }
.rgt-labels__summary:empty { display: none; }
.rgt-labels-batch__groups { display: grid; gap: var(--sl-space-2); margin-top: var(--sl-space-3); padding-top: var(--sl-space-3); border-top: 1px solid var(--sl-divider); }
.rgt-labels-batch__subtitle { margin: 0; font: var(--sl-title-s); }
.rgt-labels-batch__list { display: grid; gap: var(--sl-space-1); margin: 0; padding: 0; list-style: none; }
.rgt-labels-batch__group { display: flex; align-items: center; justify-content: space-between; gap: var(--sl-space-2); }
.rgt-labels-batch__group-label { min-width: 0; overflow-wrap: anywhere; }

/* «Скан або пошук» — сторінка результатів (RGT-411) */
.rgt-search-page { display: grid; gap: var(--sl-space-4); }
.rgt-search-page__section { padding: var(--sl-space-3) 0; }
.rgt-search-page__title { margin: 0; padding: 0 var(--sl-space-4) var(--sl-space-2); font: var(--sl-title-m); }
.rgt-search-page__list { margin: 0; padding: 0; list-style: none; }
.rgt-search-page__row { display: grid; grid-template-columns: minmax(8rem, auto) 1fr auto; align-items: baseline; gap: var(--sl-space-3); min-height: var(--sl-control-h-sm); padding: var(--sl-space-2) var(--sl-space-4); color: inherit; text-decoration: none; }
.rgt-search-page__row:hover, .rgt-search-page__row:focus-visible { background: color-mix(in srgb, currentColor var(--sl-state-hover), transparent); }
.rgt-search-page__label { font-weight: 500; color: var(--sl-primary); }
.rgt-search-page__sub, .rgt-search-page__meta { color: var(--sl-on-surface-variant); min-width: 0; }
.rgt-search-page__more { margin: var(--sl-space-2) var(--sl-space-4) 0; font-size: var(--sl-text-label); color: var(--sl-on-surface-variant); }
@media (max-width: 839px) { .rgt-search-page__row { grid-template-columns: 1fr; gap: var(--sl-space-1); } }

/* К6 (RGT-411): групи полів постачальника */
.rgt-supplier-form__group { display: grid; gap: var(--sl-space-3); margin: 0; padding: 0; border: 0; min-width: 0; }
.rgt-supplier-form__legend { margin-bottom: var(--sl-space-2); font: var(--sl-title-s); }
.rgt-labels__body { display: flex; flex-direction: column; gap: var(--sl-space-4); min-width: 0; }
.rgt-labels__body:focus { outline: none; }
.rgt-filter-bar__applied-chip { max-width: 100%; }
.rgt-labels__list > .rgt-labels__toolbar { min-height: 0; padding-block: var(--sl-space-2); }
.rgt-labels-batch__reprint { margin: var(--sl-space-2) 0 0; }
.rgt-labels__group { border-top: 1px solid var(--sl-divider); }
.rgt-filter-bar__more { flex: none; min-height: var(--sl-chip-h); padding-block: 0; }
.rgt-filter-dialog__option { min-height: 2.25rem; }
@media (max-width: 839px) { .rgt-filter-bar__row--chips { justify-content: flex-end; } .rgt-filter-dialog__option { min-height: var(--sl-control-h-sm); } }

/* Піктограми типів апаратів (RGT-413): ui/equipment_icon, спрайт static/ui/equipment.svg */
.rgt-eq-icon { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: var(--sl-radius-md); background: var(--sl-primary-container); color: var(--sl-on-primary-container); }
.rgt-eq-icon > svg { width: 1.75rem; height: 1.75rem; }
.rgt-eq-icon--l { width: 4.5rem; height: 4.5rem; border-radius: var(--sl-radius-lg); }
.rgt-eq-icon--l > svg { width: 3.25rem; height: 3.25rem; }
.rgt-equipment-table__name { display: flex; align-items: center; gap: var(--sl-space-3); }
.rgt-equipment-card__head { display: flex; align-items: flex-start; gap: var(--sl-space-4); }
.rgt-equipment-card__head > :last-child { flex: 1; min-width: 0; }
.rgt-kb__family-name .rgt-eq-icon { width: 2rem; height: 2rem; margin-right: var(--sl-space-2); vertical-align: middle; }
.rgt-kb__family-name .rgt-eq-icon > svg { width: 1.5rem; height: 1.5rem; }

/* --- RGT-421 (ADR-70): бренд Kosandis у застосунку — локап знака, екран входу, порожні стани, екран успіху пульта --- */
/* Локап: знак (готовий SVG, геометрія незмінна: ui/brand_mark.html) + слово «kosandis» малими, Geologica 600, трекінг −.03em;
   поруч — організація (.rgt-brand: ініціали й назва). Кольори смуг — токени --sl-logo-h / --sl-logo-v (у темній темі — вапняк і морське скло). */
.rgt-logo { display: inline-flex; align-items: center; flex: none; gap: calc(var(--sl-space-2) + 1px); min-height: var(--sl-header-item-h); padding: 0 var(--sl-space-1); border-radius: var(--sl-radius-sm); color: var(--sl-on-surface); text-decoration: none; }
.rgt-logo:focus-visible { outline: var(--sl-focus-width) solid var(--sl-focus-ring); outline-offset: var(--sl-focus-offset); }
.rgt-logo__mark { display: block; flex: none; width: var(--sl-size-logo-mark); height: var(--sl-size-logo-mark); }
.rgt-logo__h { fill: var(--sl-logo-h); }
.rgt-logo__v { fill: var(--sl-logo-v); }
.rgt-logo__word { font-family: var(--sl-font-display); font-weight: 600; font-size: 1.125rem; line-height: 1; letter-spacing: -.03em; }
.rgt-logo__sep { flex: none; width: 1px; height: var(--sl-space-6); margin: 0 var(--sl-space-1); background: var(--sl-outline-variant); }
.rgt-topbar--desk .rgt-brand__mark, .rgt-topbar--pult .rgt-brand__mark { width: var(--sl-size-logo-mark); height: var(--sl-size-logo-mark); }
.rgt-topbar--pult .rgt-logo__word, .rgt-topbar--pult .rgt-logo__sep { display: none; }
.rgt-topbar--pult .rgt-logo { justify-content: center; gap: var(--sl-space-2); min-width: var(--sl-size-target-touch); min-height: var(--sl-size-target-touch); margin-left: calc(-1 * var(--sl-space-2)); }
.rgt-topbar--pult .rgt-brand__name { font-weight: 600; }
.rgt-drawer__logo { padding: var(--sl-space-2) var(--sl-space-3) 0; }
/* До 1439 px у панелі ПК слово «kosandis» не вміщується поруч із назвою організації — лишається знак; повний локап — від 1440, у шухляді й на вході */
.rgt-topbar--desk .rgt-logo__word, .rgt-topbar--desk .rgt-logo__sep { display: none; }
@media (min-width: 1440px) {
  .rgt-topbar--desk .rgt-logo__word, .rgt-topbar--desk .rgt-logo__sep { display: inline; }
}
/* 840–1439 px: організацію представляє назва, плитка ініціалів ховається (знак Kosandis уже є) */
@media (min-width: 840px) and (max-width: 1199px) {
  .rgt-topbar--desk .rgt-brand__mark { display: none; }
}
@media (min-width: 1200px) {
  .rgt-topbar--desk .rgt-brand__mark { display: none; }
  .rgt-topbar--desk .rgt-brand__name { min-width: 5rem; }
}
@media (min-width: 1440px) {
  .rgt-topbar--desk .rgt-brand__mark { display: inline-grid; }
}
@media (max-width: 839px) {
  .rgt-topbar--desk .rgt-logo { padding-left: 0; }
}

/* Знак, що «сплітається» (лише заставка: вхід і екран успіху пульта; 05-visual-identity «Лого-анімація»).
   Смуги з'являються по черзі: спершу горизонталі, за ними вертикалі; разом ≤ 1,2 с. Лише transform і opacity. */
.rgt-mark-anim rect { opacity: 0; transform-box: fill-box; transform-origin: center; animation: rgt-weave-in calc(var(--sl-duration-brand) * .36) var(--sl-easing-brand) both; }
.rgt-mark-anim .rgt-logo__h rect:nth-child(1) { animation-delay: 0ms; }
.rgt-mark-anim .rgt-logo__h rect:nth-child(2) { animation-delay: calc(var(--sl-duration-brand) * .05); }
.rgt-mark-anim .rgt-logo__h rect:nth-child(3) { animation-delay: calc(var(--sl-duration-brand) * .1); }
.rgt-mark-anim .rgt-logo__h rect:nth-child(4) { animation-delay: calc(var(--sl-duration-brand) * .15); }
.rgt-mark-anim .rgt-logo__h rect:nth-child(5) { animation-delay: calc(var(--sl-duration-brand) * .2); }
.rgt-mark-anim .rgt-logo__h rect:nth-child(6) { animation-delay: calc(var(--sl-duration-brand) * .25); }
.rgt-mark-anim .rgt-logo__h rect:nth-child(7) { animation-delay: calc(var(--sl-duration-brand) * .3); }
.rgt-mark-anim .rgt-logo__v rect:nth-child(1) { animation-delay: calc(var(--sl-duration-brand) * .3); }
.rgt-mark-anim .rgt-logo__v rect:nth-child(2) { animation-delay: calc(var(--sl-duration-brand) * .35); }
.rgt-mark-anim .rgt-logo__v rect:nth-child(3) { animation-delay: calc(var(--sl-duration-brand) * .4); }
.rgt-mark-anim .rgt-logo__v rect:nth-child(4) { animation-delay: calc(var(--sl-duration-brand) * .45); }
.rgt-mark-anim .rgt-logo__v rect:nth-child(5) { animation-delay: calc(var(--sl-duration-brand) * .5); }
.rgt-mark-anim .rgt-logo__v rect:nth-child(6) { animation-delay: calc(var(--sl-duration-brand) * .55); }
.rgt-mark-anim .rgt-logo__v rect:nth-child(7) { animation-delay: calc(var(--sl-duration-brand) * .6); }
.rgt-mark-anim .rgt-logo__v rect:nth-child(8) { animation-delay: calc(var(--sl-duration-brand) * .64); }
@keyframes rgt-weave-in { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

/* Вхід: стрічки «склад / ЛІС / аналізатори» малюються до плитки зі знаком (як фінальний блок сайту); плитка з тінню */
.rgt-auth__brand { display: flex; flex-direction: column; align-items: center; gap: var(--sl-space-1); text-align: center; }
.rgt-auth__weave { display: block; width: min(var(--sl-size-weave), 100%); height: auto; aspect-ratio: 320 / 120; }
.rgt-auth__weave path { fill: none; stroke-width: 10; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: rgt-rib-draw calc(var(--sl-duration-brand) * .7) var(--sl-easing-brand) both; }
.rgt-auth__weave .rgt-rib--v path { animation-delay: calc(var(--sl-duration-brand) * .2); }
.rgt-auth__weave .rgt-auth__tile { fill: var(--sl-auth-tile); filter: drop-shadow(0 .625rem 1.25rem color-mix(in srgb, var(--sl-primary) 18%, transparent)); transform-box: fill-box; transform-origin: center; animation: rgt-tile-in calc(var(--sl-duration-brand) * .5) var(--sl-easing-brand) both calc(var(--sl-duration-brand) * .3); }
.rgt-auth__weave .rgt-mark-anim rect { animation-delay: calc(var(--sl-duration-brand) * .5); }
.rgt-auth__weave .rgt-mark-anim .rgt-logo__h rect:nth-child(2) { animation-delay: calc(var(--sl-duration-brand) * .54); }
.rgt-auth__weave .rgt-mark-anim .rgt-logo__h rect:nth-child(3) { animation-delay: calc(var(--sl-duration-brand) * .58); }
.rgt-auth__weave .rgt-mark-anim .rgt-logo__h rect:nth-child(4) { animation-delay: calc(var(--sl-duration-brand) * .62); }
.rgt-auth__weave .rgt-mark-anim .rgt-logo__h rect:nth-child(5) { animation-delay: calc(var(--sl-duration-brand) * .66); }
.rgt-auth__weave .rgt-mark-anim .rgt-logo__h rect:nth-child(6) { animation-delay: calc(var(--sl-duration-brand) * .7); }
.rgt-auth__weave .rgt-mark-anim .rgt-logo__h rect:nth-child(7) { animation-delay: calc(var(--sl-duration-brand) * .74); }
.rgt-auth__weave .rgt-mark-anim .rgt-logo__v rect:nth-child(1) { animation-delay: calc(var(--sl-duration-brand) * .72); }
.rgt-auth__weave .rgt-mark-anim .rgt-logo__v rect:nth-child(2) { animation-delay: calc(var(--sl-duration-brand) * .76); }
.rgt-auth__weave .rgt-mark-anim .rgt-logo__v rect:nth-child(3) { animation-delay: calc(var(--sl-duration-brand) * .8); }
.rgt-auth__weave .rgt-mark-anim .rgt-logo__v rect:nth-child(4) { animation-delay: calc(var(--sl-duration-brand) * .84); }
.rgt-auth__weave .rgt-mark-anim .rgt-logo__v rect:nth-child(5) { animation-delay: calc(var(--sl-duration-brand) * .88); }
.rgt-auth__weave .rgt-mark-anim .rgt-logo__v rect:nth-child(6) { animation-delay: calc(var(--sl-duration-brand) * .92); }
.rgt-auth__weave .rgt-mark-anim .rgt-logo__v rect:nth-child(7) { animation-delay: calc(var(--sl-duration-brand) * .96); }
.rgt-auth__weave .rgt-mark-anim .rgt-logo__v rect:nth-child(8) { animation-delay: var(--sl-duration-brand); }
.rgt-rib--sky { stroke: var(--sl-rib-sky); }
.rgt-rib--sand { stroke: var(--sl-rib-sand); }
.rgt-rib--glass { stroke: var(--sl-rib-glass); }
.rgt-auth__word { margin: 0; font-family: var(--sl-font-display); font-weight: 600; font-size: 1.75rem; line-height: 1; letter-spacing: -.03em; color: var(--sl-on-surface); }
.rgt-auth__tagline { margin: 0; color: var(--sl-on-surface-variant); }
.rgt-auth__foot { margin: 0; font-size: var(--sl-text-label); line-height: var(--sl-lh-label); color: var(--sl-on-surface-variant); text-align: center; }
@keyframes rgt-rib-draw { to { stroke-dashoffset: 0; } }
@keyframes rgt-tile-in { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }

/* Порожній стан: невелика пастельна ілюстрація в стилі сайту (упаковка з QR-етикеткою або телефон-пульт), іконка — бейджем поверх */
.rgt-empty__art { position: relative; display: inline-grid; place-items: center; width: var(--sl-size-empty-art); margin-bottom: var(--sl-space-2); }
.rgt-empty__art > .rgt-icon { position: absolute; right: 0; bottom: 0; box-sizing: content-box; width: var(--sl-icon); height: var(--sl-icon); padding: var(--sl-space-2); border-radius: var(--sl-radius-full); background: var(--sl-card); color: var(--sl-primary); box-shadow: var(--sl-shadow-card); }
.rgt-ill { display: block; width: 100%; height: auto; overflow: visible; }
.rgt-ill__shadow { fill: var(--sl-ill-shadow); opacity: .18; }
.rgt-ill__front { fill: var(--sl-ill-front-top); }
.rgt-ill__front-b { fill: var(--sl-ill-front-bot); }
.rgt-ill__side { fill: var(--sl-ill-side); }
.rgt-ill__top { fill: var(--sl-ill-top); }
.rgt-ill__stroke { fill: none; stroke: var(--sl-ill-stroke); stroke-width: 1.5; stroke-linejoin: round; }
.rgt-ill__print { fill: var(--sl-ill-print); }
.rgt-ill__label { fill: var(--sl-card); }
.rgt-ill__ink { fill: var(--sl-on-surface); }
.rgt-ill__kos { fill: var(--sl-brand-kos); }
.rgt-ill__sea { fill: var(--sl-brand-seaglass); }
.rgt-ill__aegean { fill: var(--sl-primary); }
.rgt-ill__screen { fill: var(--sl-ill-screen); }
.rgt-ill__ok { fill: var(--sl-st-ok-bg); }
.rgt-ill__ok-ic { fill: var(--sl-st-ok-ic); }
.rgt-ill__beam { fill: var(--sl-brand-seaglass); opacity: .35; }
.rgt-ill__tint { fill: var(--sl-tint-sky); }
.rgt-ill__tint-b { fill: var(--sl-tint-sand); }

/* Екран успіху пульта: після дії (списано, відкрито, прийнято…) над карткою — знак, що сплітається, і підсумок операції */
.rgt-done { display: flex; align-items: center; gap: var(--sl-space-4); padding: var(--sl-space-4) var(--sl-space-5); border: 1px solid var(--sl-divider); border-radius: var(--sl-radius-lg); background: linear-gradient(135deg, var(--sl-tint-cream), var(--sl-tint-blue)); color: var(--sl-on-surface); box-shadow: var(--sl-shadow-card); }
.rgt-done__mark { display: block; flex: none; width: var(--sl-size-logo-mark-auth); height: var(--sl-size-logo-mark-auth); padding: var(--sl-space-2); box-sizing: border-box; border-radius: var(--sl-radius-md); background: var(--sl-card); box-shadow: var(--sl-shadow-card); }
.rgt-done__body { min-width: 0; }
.rgt-done__title { margin: 0; font: var(--sl-title-l); letter-spacing: var(--sl-display-tracking); overflow-wrap: anywhere; }
.rgt-done__text { margin: var(--sl-space-1) 0 0; color: var(--sl-on-surface-variant); }

@media (prefers-reduced-motion: reduce) {
  .rgt-mark-anim rect, .rgt-auth__weave path, .rgt-auth__weave .rgt-auth__tile, .rgt-btn { animation: none; transition: none; opacity: 1; transform: none; stroke-dashoffset: 0; }
  .rgt-btn--filled:hover { transform: none; }
}
.rgt-ill--package, .rgt-ill--phone { max-width: 100%; }
.rgt-rib--h, .rgt-rib--v { fill: none; }
.rgt-auth__weave .rgt-logo__mark { width: auto; height: auto; }
.rgt-drawer__logo .rgt-logo__word { display: inline; }
