:root {
    --bg: #f6f7f9;
    --panel: #ffffff;
    --text: #1f2933;
    --muted: #667085;
    --line: #d9dee7;
    --brand: #155eef;
    --brand-dark: #0f47b8;
    --brand-soft: #eef4ff;
    --brand-line: #bfdbfe;
    --control-bg: #ffffff;
    --control-hover-bg: var(--brand-soft);
    --control-hover-border: var(--brand-line);
    --row-hover-bg: #f8fafc;
    --row-hover-border: #bfdbfe;
    --input-bg: #ffffff;
    --subtle-bg: #f8fafc;
    --chat-bg: #f8fafc;
    --chat-bubble-bg: #ffffff;
    --chat-own-bg: #eef4ff;
    --chat-own-border: #bfd0ff;
    --chat-reply-bg: #eef2f7;
    --chat-reply-hover-bg: #e6edf5;
    --chat-pin-bg: #fffbeb;
    --chat-pin-border: #fde68a;
    --chat-pin-hover-bg: #fef3c7;
    --chat-pin-text: #92400e;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    --button-text: #ffffff;
    --disabled-bg: #e2e8f0;
    --disabled-text: #64748b;
    --success-bg: #e7f7ed;
    --success-text: #166534;
    --muted-bg: #edf0f4;
    color-scheme: light;
}

[data-theme="graphite"] {
    --bg: #101418;
    --panel: #171d23;
    --text: #eef2f6;
    --muted: #a6b0bd;
    --line: #303a45;
    --brand: #7dd3fc;
    --brand-dark: #38bdf8;
    --brand-soft: #112a38;
    --brand-line: #23667e;
    --control-bg: #1d252d;
    --control-hover-bg: #24313b;
    --control-hover-border: #486172;
    --row-hover-bg: #1d252d;
    --row-hover-border: #486172;
    --input-bg: #121820;
    --subtle-bg: #131a21;
    --chat-bg: #10171f;
    --chat-bubble-bg: #171f28;
    --chat-own-bg: #12283a;
    --chat-own-border: #2c6c91;
    --chat-reply-bg: #1e2934;
    --chat-reply-hover-bg: #253544;
    --chat-pin-bg: #2a2112;
    --chat-pin-border: #7a5720;
    --chat-pin-hover-bg: #3a2b14;
    --chat-pin-text: #f6c06d;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
    --button-text: #071018;
    --disabled-bg: #27313a;
    --disabled-text: #85909c;
    --success-bg: #10381f;
    --success-text: #8ee5a8;
    --muted-bg: #222a33;
    color-scheme: dark;
}

[data-theme="fresh"] {
    --bg: #f0fbf7;
    --panel: #ffffff;
    --text: #17312a;
    --muted: #5d746e;
    --line: #cde7df;
    --brand: #0f9f7a;
    --brand-dark: #087b5e;
    --brand-soft: #e4f8f0;
    --brand-line: #a7e8d0;
    --subtle-bg: #f4fbf8;
}

[data-theme="lime"] {
    --bg: #fbfee7;
    --panel: #ffffff;
    --text: #253214;
    --muted: #667447;
    --line: #dfe9a8;
    --brand: #5f8f00;
    --brand-dark: #486f00;
    --brand-soft: #f1ffd1;
    --brand-line: #cde878;
    --subtle-bg: #fbfdec;
}

[data-theme="ice"] {
    --bg: #f1f8ff;
    --panel: #ffffff;
    --text: #18293a;
    --muted: #5c7084;
    --line: #cfe1f3;
    --brand: #0877c9;
    --brand-dark: #075e9f;
    --brand-soft: #e7f4ff;
    --brand-line: #abd8ff;
    --subtle-bg: #f5faff;
}

[data-theme="neon"] {
    --bg: #080d10;
    --panel: #10181c;
    --text: #effff9;
    --muted: #9fb9b0;
    --line: #244044;
    --brand: #9cff2e;
    --brand-dark: #6dcc00;
    --brand-soft: #172a14;
    --brand-line: #4b7d23;
    --control-bg: #121d21;
    --control-hover-bg: #172821;
    --control-hover-border: #5d8c33;
    --row-hover-bg: #121d21;
    --row-hover-border: #5d8c33;
    --input-bg: #0b1215;
    --subtle-bg: #0c1518;
    --chat-bg: #081115;
    --chat-bubble-bg: #101b20;
    --chat-own-bg: #142717;
    --chat-own-border: #4f8a27;
    --chat-reply-bg: #172428;
    --chat-reply-hover-bg: #1e3238;
    --chat-pin-bg: #22290f;
    --chat-pin-border: #66751f;
    --chat-pin-hover-bg: #303b14;
    --chat-pin-text: #d9ff70;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.48);
    --button-text: #061006;
    --disabled-bg: #213034;
    --disabled-text: #85988f;
    --success-bg: #153817;
    --success-text: #b5ff7a;
    --muted-bg: #172428;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.45;
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-height: 56px;
    padding: 0 24px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.help-link + .topbar-nav {
    margin-left: 0;
}

.topbar-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--control-bg);
    color: var(--brand);
    font-weight: 600;
}

.topbar-nav a:hover {
    border-color: var(--control-hover-border);
    background: var(--control-hover-bg);
    color: var(--brand);
    text-decoration: none;
}

.topbar-status {
    display: flex;
    flex: 0 1 min(520px, 40vw);
    justify-content: flex-start;
    min-width: 0;
    pointer-events: none;
}

.topbar-status__message {
    max-width: min(100%, 520px);
    overflow: hidden;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--subtle-bg);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    animation: message-enter 180ms ease both;
    transition:
        opacity 200ms ease,
        transform 200ms ease;
}

.topbar-status__message:not(:first-child) {
    display: none;
}

.topbar-status__message--success {
    border-color: #b7e4c7;
    background: var(--success-bg);
    color: var(--success-text);
}

.topbar-status__message--error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b42318;
}

.topbar-status__message--warning {
    border-color: #fedf89;
    background: #fffaeb;
    color: #93370d;
}

.topbar-status__message--info {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
}

.brand:hover {
    text-decoration: none;
}

.brand__icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.app-version-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 26px;
    padding: 4px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--subtle-bg);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.app-version-badge:hover {
    border-color: var(--control-hover-border);
    background: var(--control-hover-bg);
    color: var(--brand);
    text-decoration: none;
}

.help-link {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--control-bg);
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}

.help-link:hover {
    border-color: var(--control-hover-border);
    background: var(--control-hover-bg);
    color: var(--brand);
    text-decoration: none;
}

.theme-menu,
.user-menu {
    position: relative;
}

.theme-menu {
    margin-left: auto;
}

.theme-menu summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--control-bg);
    color: var(--muted);
    cursor: pointer;
    list-style: none;
}

.theme-menu summary:hover {
    border-color: var(--control-hover-border);
    background: var(--control-hover-bg);
    color: var(--brand);
}

.theme-menu summary::-webkit-details-marker {
    display: none;
}

.theme-menu svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.theme-menu__panel {
    position: absolute;
    right: 10px;
    top: calc(100% + 8px);
    z-index: 30;
    display: grid;
    min-width: 160px;
    padding: 6px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.theme-menu__item {
    justify-content: flex-start;
    min-height: 34px;
    padding: 8px 10px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--text);
    font-weight: 600;
}

.theme-menu__item:hover,
.theme-menu__item[aria-current="true"] {
    background: var(--control-hover-bg);
    color: var(--brand);
}

.notification-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--control-bg);
    color: var(--muted);
}

.notification-bell:hover {
    border-color: var(--control-hover-border);
    background: var(--control-hover-bg);
    color: var(--brand);
    text-decoration: none;
}

.notification-bell svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.notification-bell__badge {
    position: absolute;
    top: -5px;
    right: -6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border: 2px solid var(--panel);
    border-radius: 999px;
    background: #d97706;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.notification-bell__badge--normal {
    background: #f59e0b;
}

.notification-bell__badge--important {
    background: #e11d48;
}

.user-menu summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 140px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--control-bg);
    cursor: pointer;
    text-align: center;
    list-style: none;
}

.avatar {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--muted-bg);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar--small {
    width: 26px;
    height: 26px;
    border-radius: 8px;
}

.avatar--large {
    width: 84px;
    height: 84px;
    border-radius: 18px;
}

.user-menu summary::-webkit-details-marker {
    display: none;
}

.user-menu__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 30;
    display: grid;
    min-width: 190px;
    padding: 6px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.user-menu__panel a {
    padding: 9px 10px;
    border-radius: 5px;
    color: var(--text);
}

.user-menu__panel a:hover {
    background: var(--control-hover-bg);
    text-decoration: none;
}

.page {
    max-width: 1600px;
    margin: 0 auto;
    padding: 28px 24px 180px;
}

.page--auth {
    display: grid;
    min-height: 100vh;
    padding-bottom: 28px;
    place-items: center;
}

.auth-card,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.auth-card {
    width: min(420px, 100%);
    padding: 28px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.auth-brand__icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.auth-brand__name {
    color: var(--text);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
}

.auth-brand__caption {
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
}

.panel {
    padding: 20px;
}

.content-panel {
    margin-top: 18px;
}

.profile-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.profile-summary__name {
    font-size: 18px;
    font-weight: 700;
}

.profile-summary__meta {
    margin-top: 3px;
    color: var(--muted);
}

.profile-info-table td:first-child {
    width: 34%;
}

.profile-info-table td:nth-child(2) {
    overflow: visible;
}

.profile-inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.profile-inline-form__value {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}

.profile-inline-form__input {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    width: 100%;
    min-height: 34px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text);
    font: inherit;
}

.profile-inline-form__errors {
    grid-column: 1 / -1;
    grid-row: 2;
    color: #dc2626;
    font-size: 12px;
}

.profile-inline-form__actions {
    grid-column: 2;
    grid-row: 1;
    display: inline-flex;
    align-items: center;
    justify-self: end;
    white-space: nowrap;
    gap: 4px;
}

.profile-inline-form__button {
    min-height: 30px;
    width: 30px;
    padding: 0;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
}

.profile-inline-form__button:hover {
    border-color: var(--line);
    background: var(--control-hover-bg);
    color: var(--brand);
}

.profile-inline-form__button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.detail-description-link {
    display: block;
    width: 100%;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

.detail-description-link:hover {
    background: transparent;
    color: var(--brand);
    text-decoration: underline;
}

.panel--narrow {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.danger-zone {
    margin-top: 18px;
    border-color: #fecaca;
    background: #fff7f7;
}

.danger-zone h2 {
    color: #991b1b;
}

.changelog {
    display: grid;
    gap: 18px;
}

.changelog-entry {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.changelog-entry:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.changelog-entry h2 {
    margin-bottom: 8px;
}

.changelog-entry ul {
    margin: 0;
    padding-left: 20px;
}

.changelog-entry li + li {
    margin-top: 5px;
}

.help-layout {
    position: relative;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 0;
    align-items: start;
    padding: 0;
    background: var(--panel);
}

.help-layout::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 220px;
    border-right: 1px solid var(--line);
    border-radius: 8px 0 0 8px;
    background: var(--subtle-bg);
    pointer-events: none;
}

.help-nav {
    position: sticky;
    top: 84px;
    z-index: 1;
    display: grid;
    gap: 6px;
    align-content: start;
    align-self: start;
    padding: 22px 18px;
}

.help-nav a {
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--muted);
    font-weight: 700;
}

.help-nav a:hover {
    background: var(--control-hover-bg);
    color: var(--brand);
    text-decoration: none;
}

.help-nav a.is-active,
.help-nav a[aria-current="location"] {
    background: var(--brand-soft);
    box-shadow: inset 3px 0 0 var(--brand);
    color: var(--brand);
}

.help-content {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 30px;
    padding: 22px 28px 28px;
}

.help-section {
    scroll-margin-top: 88px;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--line);
}

.help-section:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.help-section h2 {
    margin-bottom: 10px;
}

.help-section h3 {
    margin: 20px 0 8px;
    font-size: 18px;
}

.help-section p {
    max-width: 820px;
    margin: 0 0 12px;
    color: var(--muted);
}

.help-section ol,
.help-section ul {
    max-width: 840px;
    margin: 0 0 12px;
    padding-left: 22px;
}

.help-section li + li {
    margin-top: 6px;
}

.help-section .help-columns-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 28px;
    max-width: 860px;
}

.help-columns-list li + li {
    margin-top: 0;
}

.help-lead {
    font-size: 16px;
    line-height: 1.6;
}

.help-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0 16px;
}

.help-card {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--subtle-bg);
}

.help-card h3 {
    margin-top: 0;
    font-size: 16px;
}

.help-card p,
.help-card ul,
.help-card ol {
    margin-bottom: 0;
}

.help-steps {
    counter-reset: help-step;
    list-style: none;
    padding-left: 0;
}

.help-steps li {
    position: relative;
    min-height: 26px;
    padding-left: 34px;
}

.help-steps li::before {
    content: counter(help-step);
    counter-increment: help-step;
    position: absolute;
    top: -2px;
    left: 0;
    display: inline-grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--panel);
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
}

.help-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.help-flow .badge {
    position: relative;
    min-height: 36px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 700;
}

.help-note {
    max-width: 860px;
    margin: 14px 0;
    padding: 12px 14px;
    border: 1px solid var(--brand-line);
    border-radius: 8px;
    background: var(--brand-soft);
    color: var(--text);
}

.help-term-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-width: 860px;
    margin: 12px 0 14px;
}

.help-term-list div {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--subtle-bg);
}

.help-term-list dt {
    margin-bottom: 4px;
    color: var(--text);
    font-weight: 800;
}

.help-term-list dd {
    margin: 0;
    color: var(--muted);
}

.modal {
    width: min(460px, calc(100vw - 32px));
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 18px 48px rgb(15 23 42 / 24%);
}

.modal--wide {
    width: min(680px, calc(100vw - 32px));
}

.modal::backdrop {
    background: rgb(15 23 42 / 35%);
}

.modal__body {
    padding: 18px;
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.modal__header--stacked {
    display: grid;
    justify-content: stretch;
    gap: 4px;
}

.modal__header h2 {
    margin: 0;
}

.modal__header p {
    margin: 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.modal__text {
    margin: 12px 0 18px;
    color: var(--text);
    overflow-wrap: anywhere;
}

.narrow-layout {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.content-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.content-header > div:first-child {
    min-width: 0;
}

.content-header--inner {
    margin-top: 22px;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.tabs__item {
    padding: 10px 14px;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    color: var(--muted);
    font-weight: 600;
}

.tabs__item:hover {
    background: var(--control-hover-bg);
    text-decoration: none;
}

.tabs__item--active {
    background: var(--panel);
    border-color: var(--line);
    color: var(--text);
}

.tabs--compact {
    margin: 10px 0 0;
    border-bottom: 0;
}

.tabs--compact .tabs__item {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.log-filter-tabs {
    margin: 0 0 16px;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.catalog-layout:last-child {
    margin-bottom: 120px;
}

.filter-panel {
    position: sticky;
    top: 74px;
}

.filter-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.security-filters {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 220px auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 18px;
}

.security-alert {
    margin: 0 0 16px;
    padding: 10px 12px;
    border: 1px solid #facc15;
    border-radius: 6px;
    background: #fef9c3;
    color: #854d0e;
}

.security-alert--danger {
    border-color: #fda4af;
    background: #fff1f2;
    color: #be123c;
}

.filter-date-range {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.multi-filter {
    position: relative;
}

.multi-filter__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text);
    cursor: pointer;
    list-style: none;
}

.multi-filter__summary::-webkit-details-marker {
    display: none;
}

.multi-filter__summary::after {
    width: 8px;
    height: 8px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    content: "";
    opacity: 0.7;
    transform: translateY(-2px) rotate(45deg);
}

.multi-filter[open] .multi-filter__summary {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}

.multi-filter[open] .multi-filter__summary::after {
    transform: translateY(2px) rotate(225deg);
}

.multi-filter__panel {
    position: absolute;
    z-index: 40;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    display: grid;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.multi-filter__option {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 6px 7px;
    border-radius: 5px;
    color: var(--text);
    cursor: pointer;
}

.multi-filter__option:hover,
.multi-filter__option.is-selected {
    background: var(--row-hover-bg);
}

.multi-filter__option input {
    margin: 0;
}

.multi-filter__option span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.catalog-results {
    min-width: 0;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 4px;
    font-size: 26px;
}

h2 {
    margin-bottom: 14px;
    font-size: 18px;
}

p {
    color: var(--muted);
}

.heading-with-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
}

.project-heading-title,
.heading-number {
    min-width: 0;
    max-width: min(620px, 52vw);
    overflow-wrap: anywhere;
    white-space: normal;
}

.heading-with-badge > :not(.project-heading-title, .heading-number) {
    flex: 0 0 auto;
}

.heading-with-badge > .heading-number {
    flex: 1 1 auto;
}

.heading-date,
.heading-composer {
    color: var(--muted);
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}

.heading-number {
    color: var(--text);
}

.heading-meta-button {
    min-height: 28px;
    padding: 3px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--control-bg);
    color: var(--text);
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.heading-meta-button:hover {
    border-color: var(--control-hover-border);
    background: var(--control-hover-bg);
    color: var(--brand);
    text-decoration: none;
}

.heading-onec {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.heading-onec .heading-composer {
    position: relative;
    z-index: 2;
}

.request-onec-copy-button,
.invoice-details-copy-button {
    cursor: pointer;
}

.request-onec-copy-button.is-copied,
.invoice-details-copy-button.is-copied {
    border-color: color-mix(in srgb, var(--success-text) 50%, var(--line));
    color: var(--success-text);
}

.heading-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--control-bg);
    color: var(--muted);
}

.heading-icon-button:hover {
    border-color: var(--control-hover-border);
    background: var(--control-hover-bg);
    color: var(--brand);
    text-decoration: none;
}

.heading-icon-button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.project-total-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 3px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--subtle-bg);
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.project-info-text,
.project-info-text p {
    margin-top: 0;
    color: var(--text);
    line-height: 1.35;
}

.project-info-text p:last-child {
    margin-bottom: 0;
}

.chat-unread-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: #e85d75;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.grid {
    display: grid;
    gap: 18px;
}

.grid > .content-panel {
    margin-top: 0;
}

.grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form {
    display: grid;
    gap: 14px;
}

.form p,
.form label,
.field {
    display: grid;
    gap: 6px;
    margin: 0;
}

.form input,
.form select,
.form textarea {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text);
    font: inherit;
    line-height: 1.35;
}

.form textarea {
    resize: vertical;
}

.password-field {
    position: relative;
    display: block;
}

.password-field input {
    padding-right: 46px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    min-height: 30px;
    width: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle.is-active {
    background: var(--control-hover-bg);
    color: var(--text);
}

.form input[type="checkbox"] {
    width: auto;
    min-height: auto;
}

.prefixed-input {
    display: flex;
    align-items: stretch;
    justify-self: start;
    width: 186px;
}

.prefixed-input__prefix {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    min-height: 38px;
    border: 1px solid var(--line);
    border-right: 0;
    border-radius: 6px 0 0 6px;
    background: var(--subtle-bg);
    color: var(--muted);
    font-weight: 700;
}

.form .prefixed-input input {
    flex: 0 0 150px;
    width: 150px;
    min-width: 0;
    border-radius: 0 6px 6px 0;
}

.project-index-control {
    display: grid;
    grid-template-columns: minmax(84px, max-content) max-content minmax(92px, 1fr);
    justify-self: start;
    width: min(100%, 380px);
}

.form .project-index-control select {
    width: auto;
    min-width: 84px;
    max-width: 140px;
    border-right: 0;
    border-radius: 6px 0 0 6px;
    background-color: var(--subtle-bg);
    font-weight: 700;
}

.project-index-control__prefix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-right: 0;
    background: var(--subtle-bg);
    color: var(--muted);
    font-weight: 700;
}

.form .project-index-control input {
    min-width: 0;
    border-radius: 0 6px 6px 0;
}

.form p:has(input[type="checkbox"]) {
    grid-template-columns: max-content max-content;
    align-items: center;
    column-gap: 10px;
    justify-content: start;
}

.form p:has(input[type="checkbox"]) label {
    grid-column: 1;
}

.form p:has(input[type="checkbox"]) input[type="checkbox"] {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
}

.form p:has(input[type="checkbox"]) .helptext,
.form p:has(input[type="checkbox"]) .errorlist {
    grid-column: 1 / -1;
}

.form .helptext,
.form ul {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.field--checkbox {
    display: inline-grid;
    grid-template-columns: max-content max-content;
    align-items: center;
    justify-content: start;
    column-gap: 10px;
}

.field--checkbox input[type="checkbox"] {
    margin: 0;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 8px;
}

.avatar-choice {
    position: relative;
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 8px;
    background: var(--subtle-bg);
    cursor: pointer;
}

.avatar-choice input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.avatar-choice img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-choice:has(input:checked) {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px #bfdbfe;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.table + .form-actions {
    margin-top: 14px;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid var(--brand);
    border-radius: 6px;
    background: var(--brand);
    color: var(--button-text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

button:hover,
.button:hover {
    background: var(--brand-dark);
    text-decoration: none;
}

button:disabled,
.button[aria-disabled="true"] {
    border-color: var(--line);
    background: var(--disabled-bg);
    color: var(--disabled-text);
    cursor: not-allowed;
}

button:disabled:hover,
.button[aria-disabled="true"]:hover {
    background: var(--disabled-bg);
    color: var(--disabled-text);
}

.button--secondary {
    background: var(--control-bg);
    color: var(--brand);
}

.button--secondary:hover {
    background: var(--control-hover-bg);
    color: var(--brand-dark);
}

.button--danger {
    border-color: #dc2626;
    background: #dc2626;
}

.button--danger:hover {
    background: #b91c1c;
}

.button--danger-soft {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b42318;
}

.button--danger-soft:hover {
    border-color: #fca5a5;
    background: #fee2e2;
    color: #991b1b;
}

.button--small {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 13px;
}

.button--icon {
    width: 100%;
    padding: 8px;
}

.button--icon svg,
.filter-actions .button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.form-hint {
    margin: -4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.page-subtitle {
    margin: 0;
    color: var(--muted);
}

.request-justification {
    margin-bottom: 14px;
    color: var(--text);
}

.request-justification p:last-child {
    margin-bottom: 0;
}

.request-justification-form {
    margin-top: 14px;
}

.notifications-list {
    display: grid;
    gap: 8px;
}

.notification-date-separator {
    justify-self: center;
    margin: 4px 0;
    padding: 3px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--subtle-bg);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.notification-row {
    display: grid;
    grid-template-columns: 6px minmax(0, 1fr) max-content;
    align-items: center;
    gap: 12px;
    min-height: 70px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
}

.notification-row:hover {
    border-color: var(--row-hover-border);
    background: var(--row-hover-bg);
    text-decoration: none;
}

.notification-row--inactive {
    background: var(--subtle-bg);
    color: var(--muted);
}

.notification-row--deleted,
.notification-row--deleted:hover {
    border-color: var(--line);
    background: var(--subtle-bg);
    cursor: default;
}

.notification-row__marker {
    width: 6px;
    height: 100%;
    min-height: 44px;
    border-radius: 999px;
    background: var(--brand);
}

.notification-row__marker--normal {
    background: #f59e0b;
}

.notification-row__marker--important {
    background: #e11d48;
}

.notification-row--inactive .notification-row__marker {
    background: #cbd5e1;
}

.notification-row__body {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.notification-row__title {
    overflow: hidden;
    color: var(--text);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-row--inactive .notification-row__title {
    color: var(--muted);
}

.notification-row__text,
.notification-row__meta {
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-row__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0 6px;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

.notification-row__meta > span + span::before {
    content: "·";
    margin-right: 6px;
}

.excel-template-editor {
    max-width: 1180px;
    margin-right: auto;
    margin-left: auto;
}

.export-form {
    max-width: 100%;
}

.excel-template-form {
    gap: 18px;
}

.excel-template-view,
.excel-template-fields {
    display: grid;
    gap: 18px;
}

.excel-template-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.excel-template-toolbar h2 {
    margin: 0;
}

.excel-template-section {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--subtle-bg);
}

.excel-template-section__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.excel-template-section__header h2 {
    margin: 0;
}

.excel-template-font-row {
    display: grid;
    grid-template-columns: minmax(220px, 360px) minmax(120px, 160px);
    gap: 16px;
    justify-content: center;
}

.excel-template-grid {
    display: grid;
    gap: 14px;
}

.excel-template-block {
    display: grid;
    gap: 6px;
    margin: 0;
}

.excel-template-block--full {
    width: min(100%, 980px);
    justify-self: center;
}

.excel-template-input {
    width: 100%;
    line-height: 1.35;
}

.form .excel-template-input {
    font-family: var(--excel-template-font-family, "Times New Roman", serif);
    font-size: var(--excel-template-font-size, 12pt);
}

.excel-template-input--center {
    text-align: center;
}

.excel-template-input--right {
    text-align: right;
}

.excel-template-input--bold {
    font-weight: 700;
}

.form .excel-template-input.excel-template-input--bold {
    font-weight: 700;
}

.excel-template-preview {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
    color: var(--text);
    font-family: var(--excel-template-font-family, "Times New Roman", serif);
    font-size: var(--excel-template-font-size, 12pt);
    line-height: 1.35;
    white-space: normal;
}

.excel-template-preview--center {
    text-align: center;
}

.excel-template-preview--right {
    text-align: right;
}

.excel-template-preview--bold {
    font-weight: 700;
}

.excel-template-readonly-field {
    display: grid;
    gap: 6px;
}

.excel-template-readonly-field > span {
    color: var(--text);
}

.excel-template-readonly-field > strong {
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
    color: var(--text);
    font-weight: 500;
    line-height: 1.35;
}

.excel-template-placeholder-box {
    width: min(100%, 980px);
    justify-self: center;
    padding: 14px 16px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: var(--subtle-bg);
    color: var(--muted);
    text-align: center;
}

.excel-template-signature-preview {
    display: grid;
    grid-template-columns: 4fr 30fr 14fr 14fr 12fr minmax(120px, 10fr) 30fr;
    grid-template-rows: auto auto;
    column-gap: 8px;
    width: min(100%, 980px);
    justify-self: center;
    align-items: start;
    color: var(--text);
    font-family: var(--excel-template-font-family, "Times New Roman", serif);
    font-size: var(--excel-template-font-size, 12pt);
}

.excel-template-signature-preview__cell {
    min-height: 28px;
    padding: 4px 5px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
}

.excel-template-signature-preview__position {
    grid-column: 2;
    text-align: left;
}

.excel-template-signature-preview__name {
    grid-column: 4 / 6;
    text-align: center;
}

.excel-template-signature-preview__signature {
    grid-column: 6;
    grid-row: 1;
    display: grid;
    align-content: center;
    min-height: 38px;
    padding: 4px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
}

.excel-template-signature-preview__date {
    grid-column: 7;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.excel-template-signature-preview__line {
    display: block;
    height: 12px;
    border-bottom: 1px solid var(--text);
}

.excel-template-signature-preview__caption {
    grid-column: 6;
    grid-row: 1;
    align-self: start;
    margin-top: 42px;
    text-align: center;
    line-height: 1.1;
    font-size: max(calc(var(--excel-template-font-size, 12pt) - 3pt), 8pt);
}

.excel-template-approval-preview {
    display: grid;
    grid-template-columns: 4fr 30fr 14fr 14fr 12fr minmax(120px, 10fr) 30fr;
    grid-template-rows: auto 12px auto auto 14px auto;
    column-gap: 8px;
    row-gap: 6px;
    width: min(100%, 980px);
    justify-self: center;
    color: var(--text);
    font-family: var(--excel-template-font-family, "Times New Roman", serif);
    font-size: var(--excel-template-font-size, 12pt);
}

.excel-template-approval-preview__cell,
.excel-template-approval-preview__note-text {
    min-height: 32px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
    line-height: 1.35;
}

.excel-template-approval-preview__title {
    grid-column: 2;
    grid-row: 1;
}

.excel-template-approval-preview__name {
    grid-column: 2 / 4;
    grid-row: 3;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.excel-template-approval-preview__date {
    grid-column: 4 / 7;
    grid-row: 3;
    text-align: center;
}

.excel-template-approval-preview__position {
    grid-column: 2 / 4;
    grid-row: 4;
}

.excel-template-approval-preview__caption {
    grid-column: 4 / 7;
    grid-row: 4;
    align-self: start;
    padding-top: 2px;
    text-align: center;
    font-size: max(calc(var(--excel-template-font-size, 12pt) - 3pt), 8pt);
}

.excel-template-approval-preview__note-label {
    grid-column: 2;
    grid-row: 6;
    align-self: start;
    padding-top: 6px;
    text-align: right;
    font-weight: 700;
    font-size: max(calc(var(--excel-template-font-size, 12pt) - 3pt), 8pt);
}

.excel-template-approval-preview__note-text {
    grid-column: 3 / 8;
    grid-row: 6;
    align-self: start;
    min-height: 76px;
    font-size: max(calc(var(--excel-template-font-size, 12pt) - 3pt), 8pt);
}

.excel-template-approval-preview .field {
    display: grid;
    gap: 6px;
    margin: 0;
}

.export-form__grid {
    margin: 0;
}

.excel-template-actions {
    justify-content: center;
}

.export-placeholders {
    width: 100%;
    justify-self: center;
}

.export-placeholders__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
}

.export-placeholders__item {
    display: grid;
    grid-template-columns: minmax(170px, max-content) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.export-placeholders__item > span {
    min-width: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.3;
}

.export-placeholders__button {
    justify-self: start;
    padding: 4px 7px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--subtle-bg);
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.4;
    cursor: pointer;
}

.export-placeholders__button:hover {
    border-color: var(--control-hover-border);
    background: var(--control-hover-bg);
    color: var(--brand);
}

.export-placeholders__button.is-copied {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

@media (max-width: 860px) {
    .export-placeholders__list {
        grid-template-columns: 1fr;
    }

    .export-placeholders__item {
        grid-template-columns: minmax(150px, max-content) minmax(0, 1fr);
    }
}

.action-menu {
    position: relative;
}

.action-menu summary {
    list-style: none;
    cursor: pointer;
}

.action-menu summary::-webkit-details-marker {
    display: none;
}

.action-menu__panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 20;
    display: grid;
    min-width: 172px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 12px 30px rgb(15 23 42 / 14%);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.25;
}

.action-menu--status {
    display: inline-flex;
}

.action-menu--status .action-menu__panel {
    right: auto;
    left: 0;
    min-width: 190px;
}

.action-menu__panel a,
.action-menu__panel button {
    display: block;
    width: 100%;
    min-height: 0;
    padding: 8px 10px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 400;
    line-height: 1.25;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.action-menu__form {
    margin: 0;
}

.action-menu__panel a:hover,
.action-menu__panel button:hover {
    background: var(--soft);
    color: var(--text);
}

.action-menu__panel button:disabled,
.action-menu__panel button:disabled:hover {
    background: transparent;
    color: var(--muted);
    cursor: not-allowed;
}

.action-menu__panel .action-menu__warning {
    color: #b45309;
}

.action-menu__panel .action-menu__danger {
    color: #dc2626;
}

.action-menu__panel .action-menu__danger:hover {
    background: #fee2e2;
    color: #b91c1c;
}

.action-menu__panel .action-menu__warning:disabled,
.action-menu__panel .action-menu__danger:disabled,
.action-menu__panel .action-menu__warning:disabled:hover,
.action-menu__panel .action-menu__danger:disabled:hover {
    background: transparent;
    color: var(--muted);
}

.table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.table th,
.table td {
    padding: 11px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.table--log th:nth-child(1),
.table--log td:nth-child(1) {
    width: 48px;
    color: var(--muted);
    text-align: center;
}

.table--log th:nth-child(2),
.table--log td:nth-child(2) {
    width: 150px;
}

.table--log th:nth-child(3),
.table--log td:nth-child(3) {
    width: 180px;
}

.table--users__number {
    width: 48px;
}

.table--users__name {
    width: 18%;
}

.table--users__login {
    width: 12%;
}

.table--users__department {
    width: 20%;
}

.table--users__position {
    width: 18%;
}

.table--users__role {
    width: 13%;
}

.table--users__status {
    width: 11%;
}

.table--users__activity {
    width: 13%;
}

.table--users__actions {
    width: 110px;
}

.table--users th:nth-child(1),
.table--users td:nth-child(1) {
    color: var(--muted);
    text-align: center;
}

.table--login-blocks th:nth-child(3),
.table--login-blocks td:nth-child(3) {
    width: 84px;
    text-align: center;
}

.table--login-blocks th:nth-child(5),
.table--login-blocks td:nth-child(5) {
    width: 120px;
}

.table--login-blocks th:nth-child(7),
.table--login-blocks td:nth-child(7) {
    width: 160px;
}

.table--login-attempts th:nth-child(1),
.table--login-attempts td:nth-child(1) {
    width: 160px;
}

.table--login-attempts th:nth-child(4),
.table--login-attempts td:nth-child(4) {
    width: 140px;
}

.table--login-attempts th:nth-child(5),
.table--login-attempts td:nth-child(5) {
    width: 150px;
}

.table th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.table td {
    overflow: hidden;
    text-overflow: ellipsis;
}

.person-name {
    min-width: 0;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}

.table td.person-name,
.data-list__row > .person-name,
.log-list__row > .person-name {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

.data-list {
    display: grid;
    min-width: 0;
    overflow-x: auto;
}

.data-list__header,
.data-list__row {
    display: grid;
    align-items: center;
    column-gap: 16px;
    min-width: 100%;
}

.data-list__header {
    padding: 0 10px 10px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.data-list__row {
    min-height: 58px;
    padding: 11px 10px;
    border-bottom: 1px solid var(--line);
    color: var(--text);
}

.data-list__row:hover {
    background: var(--row-hover-bg);
    text-decoration: none;
}

.data-list__row:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: -2px;
}

.data-list__row > span,
.data-list__header > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sort-header {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    max-width: 100%;
    color: inherit;
    text-decoration: none;
}

.sort-header:hover {
    color: var(--brand);
    text-decoration: none;
}

.sort-header--active {
    color: var(--brand);
}

.sort-header__arrow {
    flex: 0 0 auto;
    font-size: 12px;
    line-height: 1;
}

.data-list--projects .data-list__header,
.data-list--projects .data-list__row {
    grid-template-columns: 136px minmax(180px, 1fr) 124px 130px 118px 142px;
}

.data-list--projects .data-list__row > span:first-child,
.data-list--projects .data-list__row > span:nth-child(2) {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}

.data-list--request-list {
    --request-list-columns: minmax(190px, 1.12fr) minmax(108px, 0.58fr) minmax(112px, 0.78fr) 96px 128px 112px minmax(120px, 0.68fr) 90px;
}

.data-list--request-list .data-list__header,
.data-list--request-list .data-list__row {
    grid-template-columns: var(--request-list-columns);
}

.data-list--request-list .data-list__row > span:first-child,
.data-list--request-list .data-list__header > span:first-child {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}

.request-list-number-cell,
.request-list-onec-cell,
.invoice-number-copy-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.request-list-number-value,
.request-list-onec-value,
.invoice-number-copy-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.request-list-number-copy,
.request-list-onec-copy {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    min-height: 24px;
}

.request-list-number-copy svg,
.request-list-onec-copy svg {
    width: 14px;
    height: 14px;
}

.data-list--invoices .data-list__header,
.data-list--invoices .data-list__row {
    grid-template-columns: 42px minmax(100px, 0.65fr) minmax(180px, 1.2fr) minmax(140px, 1fr) minmax(110px, 0.75fr) 112px 124px 128px;
    min-width: 1080px;
}

.data-list--invoices .data-list__row > span:nth-child(3),
.data-list--invoices .data-list__row > span:nth-child(4) {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}

.data-list--invoices:has(.action-menu[open]) {
    overflow: visible;
}

.data-list--invoices .data-list__row:has(.action-menu[open]) {
    position: relative;
    z-index: 30;
}

.data-list--invoices .data-list__row > span:nth-child(8) {
    overflow: visible;
}

.invoice-list__index {
    color: var(--muted);
    font-weight: 700;
    text-align: center;
}

.invoice-list__request-values {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
}

.data-list--request-list .data-list__total-row {
    display: grid;
    grid-template-columns: var(--request-list-columns);
    column-gap: 16px;
    align-items: center;
    min-height: 48px;
    padding: 11px 10px;
    border-bottom: 1px solid var(--line);
    font-weight: 700;
}

.data-list--request-list .data-list__total-row > span:first-child {
    grid-column: 1 / 6;
    text-align: left;
}

.data-list--request-list .data-list__total-row > span:last-child {
    grid-column: 6;
}

.data-list--project-requests .data-list__header,
.data-list--project-requests .data-list__row {
    grid-template-columns: 104px 140px 112px 52px 142px;
}

.data-list--project-requests .data-list__header > span:nth-child(4) {
    text-align: left;
}

.data-list--project-requests .data-list__row > span:nth-child(4) {
    text-align: center;
}

.request-groups {
    display: grid;
    gap: 14px;
}

.request-group {
    display: grid;
    gap: 14px;
}

.request-group__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.request-group__header h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

.request-group__header p {
    margin: 0;
}

.request-group__header p + p {
    margin-top: 4px;
}

.request-merge-groups {
    display: grid;
    gap: 14px;
    max-height: min(560px, calc(100vh - 250px));
    overflow: auto;
    padding-right: 4px;
}

.request-merge-group {
    display: grid;
    gap: 8px;
}

.request-merge-group__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.request-merge-group__header h3 {
    margin: 0;
    font-size: 15px;
}

.request-merge-group__header span {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.request-merge-list {
    display: grid;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.request-merge-row {
    display: grid;
    grid-template-columns: max-content minmax(180px, 1fr) 128px minmax(120px, 0.65fr) max-content;
    align-items: center;
    gap: 12px;
    min-width: 620px;
    min-height: 54px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    color: var(--text);
}

.request-merge-row:last-child {
    border-bottom: 0;
}

.request-merge-row:not(.request-merge-row--disabled):hover {
    background: var(--row-hover-bg);
}

.request-merge-row--disabled,
.request-merge-row--outside-active {
    background: var(--subtle-bg);
    color: var(--muted);
    opacity: 0.62;
}

.request-merge-row--outside-active:not(.request-merge-row--disabled) {
    opacity: 0.78;
}

.request-merge-row input[type="checkbox"] {
    margin: 0;
}

.request-merge-row__main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.request-merge-row__main > span:first-child {
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    white-space: normal;
}

.data-list--versions .data-list__header,
.data-list--versions .data-list__row {
    grid-template-columns: 80px 132px 150px 180px 104px 142px;
}

.data-list__empty {
    padding: 14px 10px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
}

.log-list {
    display: grid;
    width: 100%;
    overflow-x: auto;
}

.log-list__header,
.log-list__row {
    display: grid;
    grid-template-columns: 36px 118px 128px minmax(160px, 1fr);
    align-items: center;
    column-gap: 12px;
    min-width: 0;
}

.log-list__header {
    padding: 0 10px 10px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.log-list__row {
    min-height: 40px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
}

.log-list__header > span,
.log-list__row > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.log-list__header > span:first-child,
.log-list__row > span:first-child {
    color: var(--muted);
    text-align: center;
}

.log-list__action {
    display: grid;
    align-items: start;
    gap: 4px;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

.log-list__action > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.log-list__action > a {
    color: var(--brand);
    font-size: 13px;
    font-weight: 700;
    width: fit-content;
}

.revision-diff {
    max-width: 980px;
}

.revision-diff.is-expanded {
    max-width: none;
}

.revision-diff__title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--brand);
    font-size: 13px;
    font-weight: 700;
}

.revision-diff-page {
    display: grid;
    gap: 18px;
}

.revision-diff-page__meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.revision-diff-page__meta div {
    display: grid;
    gap: 3px;
}

.revision-diff-page__meta span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.revision-diff__content {
    display: grid;
    gap: 12px;
    margin-top: 10px;
}

.revision-diff__section {
    display: grid;
    gap: 6px;
}

.revision-diff__section h3,
.revision-diff__item h4 {
    margin: 0;
    font-size: 13px;
}

.revision-diff__item {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--muted-bg);
}

.revision-diff__field {
    display: grid;
    gap: 4px;
}

.revision-diff__field > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.revision-diff__line {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    overflow-wrap: anywhere;
}

.revision-diff__line > span:first-child {
    font-weight: 800;
    text-align: center;
}

.revision-diff__line strong,
.revision-diff__line small {
    display: block;
}

.revision-diff__line small {
    margin-top: 2px;
    color: var(--muted);
}

.revision-diff__line--added {
    background: color-mix(in srgb, var(--success-bg) 78%, transparent);
    color: var(--success-text);
}

.revision-diff__line--removed {
    background: #fff1f2;
    color: #b91c1c;
}

[data-theme="graphite"] .revision-diff__line--removed {
    background: #2a1518;
    color: #fca5a5;
}

.pagination-panel {
    display: flex;
    flex-direction: column;
}

.pagination-panel > .pagination {
    margin-top: auto;
    padding-top: 16px;
}

.table--compact td {
    padding: 9px 4px;
}

.request-items-editor,
.request-items-view {
    display: grid;
    gap: 12px;
}

.request-items-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.request-items-panel__header h2 {
    margin: 0;
}

.request-items-panel__title {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.request-items-panel__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.request-edit-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.request-items-lock-notice {
    margin: -6px 0 14px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--muted-bg);
    color: var(--muted);
    font-size: 13px;
}

.request-items-lock-notice[data-tone="success"] {
    border-color: var(--brand-line);
    background: var(--success-bg);
    color: var(--success-text);
}

.request-items-lock-notice[data-tone="error"] {
    border-color: #fecaca;
    background: #fff1f2;
    color: #b91c1c;
}

[data-theme="graphite"] .request-items-lock-notice[data-tone="error"] {
    border-color: #7f1d1d;
    background: #2a1518;
    color: #fca5a5;
}

.request-scan-upload-form {
    margin: 0;
}

.request-items-view__header > span:last-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.request-items-bulk-status .status-badge-button.badge,
.request-items-view__header > span:last-child > .badge {
    width: fit-content;
    text-transform: none;
}

.request-scan-button {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.request-items-editor__table,
.request-items-view {
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
}

.request-items-editor__header,
.request-items-editor__row,
.request-items-editor__total,
.request-items-view__header,
.request-items-view__row,
.request-items-view__total {
    display: grid;
    grid-template-columns: 52px 64px minmax(220px, 1.28fr) minmax(120px, 0.62fr) minmax(96px, 0.45fr) minmax(106px, 0.5fr) minmax(126px, 0.62fr) minmax(76px, 76px) minmax(104px, 0.45fr) minmax(132px, 0.62fr) 42px;
    min-width: 1320px;
    align-items: start;
    column-gap: 8px;
    border-bottom: 1px solid var(--line);
}

.request-items-view__header,
.request-items-view__row,
.request-items-view__total {
    grid-template-columns: 44px 64px minmax(190px, 1.12fr) minmax(88px, 0.45fr) minmax(90px, 0.4fr) minmax(104px, 0.45fr) minmax(112px, 0.55fr) minmax(64px, 64px) minmax(92px, 0.4fr) minmax(160px, 0.85fr) minmax(150px, 150px);
    min-width: 1280px;
    column-gap: 0;
}

.request-items-editor--manufacturing .request-items-editor__header,
.request-items-editor--manufacturing .request-items-editor__row {
    grid-template-columns: 52px 64px minmax(360px, 1fr) minmax(160px, 220px) 42px;
    min-width: 760px;
}

.request-items-view--manufacturing .request-items-view__header,
.request-items-view--manufacturing .request-items-view__row {
    grid-template-columns: 44px 64px minmax(360px, 1fr) minmax(150px, 220px) minmax(150px, 150px);
    min-width: 780px;
}

.request-items-view--manufacturing .request-items-view__row {
    align-items: center;
    padding: 8px 0;
}

.request-items-editor__header,
.request-items-view__header {
    padding: 0 0 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.request-items-editor__row,
.request-items-view__row {
    padding: 12px 0;
}

.request-items-editor__header > span,
.request-items-editor__row > *,
.request-items-view__header > span,
.request-items-view__row > span {
    min-width: 0;
}

.request-items-view__header > span,
.request-items-view__row > span,
.request-items-view__row > .request-item-state {
    box-sizing: border-box;
    padding-inline: 8px;
}

.request-items-editor__number,
.request-items-view__row > span:first-child {
    padding-top: 9px;
    color: var(--muted);
    text-align: center;
}

.request-items-editor__number {
    display: grid;
    grid-template-columns: 22px 1fr;
    align-items: center;
    gap: 4px;
    padding-top: 3px;
}

.request-item-image-cell,
.request-item-file-cell,
.request-item-file-editor,
.request-item-image-editor {
    display: grid;
    justify-items: center;
}

.request-item-thumbnail {
    position: relative;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel);
    color: var(--muted);
    overflow: hidden;
    text-decoration: none;
}

.request-item-thumbnail__image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: var(--panel);
}

.request-item-thumbnail.is-empty {
    background: var(--subtle-bg);
}

.request-item-thumbnail__empty {
    width: 28px;
    height: 28px;
    background: currentColor;
    mask: url("../img/image-off.svg") center / contain no-repeat;
    -webkit-mask: url("../img/image-off.svg") center / contain no-repeat;
}

.request-item-image-picker {
    position: relative;
    display: inline-grid;
    cursor: pointer;
}

.request-item-image-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.request-item-image-picker:hover .request-item-thumbnail {
    border-color: var(--control-hover-border);
    background: var(--control-hover-bg);
    color: var(--brand);
}

.request-item-file-button {
    position: relative;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel);
    color: var(--brand);
    overflow: hidden;
    text-decoration: none;
}

.request-item-file-button.is-empty {
    background: var(--subtle-bg);
    color: var(--muted);
}

.request-item-file-button__icon {
    width: 30px;
    height: 30px;
    background: currentColor;
    mask: url("../img/file.svg") center / contain no-repeat;
    -webkit-mask: url("../img/file.svg") center / contain no-repeat;
}

.request-item-file-button.is-empty .request-item-file-button__icon {
    mask-image: url("../img/file-off.svg");
    -webkit-mask-image: url("../img/file-off.svg");
}

.request-item-file-picker {
    position: relative;
    display: inline-grid;
    cursor: pointer;
}

.request-item-file-picker:hover .request-item-file-button,
.request-item-file-button:hover {
    border-color: var(--control-hover-border);
    background: var(--control-hover-bg);
    color: var(--brand);
    text-decoration: none;
}

.request-item-image-menu {
    display: inline-grid;
}

.request-item-file-menu {
    display: inline-grid;
}

.action-menu--image .action-menu__panel,
.action-menu--file .action-menu__panel {
    right: auto;
    left: 0;
    min-width: 140px;
}

.request-items-editor__drag {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 30px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: grab;
    font: inherit;
    line-height: 1;
}

.request-items-editor__drag:hover {
    border-color: var(--line);
    background: var(--muted-bg);
    color: var(--text);
}

.request-items-editor__drag:disabled {
    cursor: default;
    opacity: 0.35;
}

.request-items-editor__drag:disabled:hover {
    border-color: transparent;
    background: transparent;
    color: var(--muted);
}

.request-items-editor__drag:active {
    cursor: grabbing;
}

.request-items-editor__row.is-dragging {
    opacity: 0.65;
}

.request-items-view__header > span:last-child {
    text-align: center;
}

.request-items-view__row > span {
    white-space: pre-wrap;
}

.request-items-view__row > span:nth-child(9) {
    overflow-wrap: anywhere;
}

.request-items-view__row > span:nth-child(10) {
    overflow-wrap: anywhere;
}

.request-items-view__row > span:nth-child(10) a {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.request-items-editor__line-total {
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--muted-bg);
    color: var(--muted);
    text-align: right;
    white-space: nowrap;
}

.request-items-editor__total,
.request-items-view__total {
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-weight: 700;
}

.request-items-view__total {
    column-gap: 0;
}

.request-items-editor__total {
    column-gap: 8px;
}

.request-items-view__total > span:first-child {
    grid-column: 1 / 6;
    padding-inline: 8px;
    text-align: left;
}

.request-items-view__total > span:last-child {
    grid-column: 6 / 7;
    padding-inline: 8px;
    text-align: left;
    white-space: nowrap;
}

.request-items-editor__total > span:first-child {
    grid-column: 1 / 6;
    padding-inline: 8px;
    text-align: left;
}

.request-items-editor__total > span:last-child {
    grid-column: 6 / 7;
    padding-inline: 8px;
    text-align: right;
    white-space: nowrap;
}

.request-items-view:has(.action-menu[open]) {
    overflow: visible;
}

.request-items-editor__table:has(.action-menu[open]) {
    overflow: visible;
}

.request-items-view__row > .request-item-state {
    display: grid;
    justify-items: center;
    gap: 6px;
    white-space: normal;
}

.request-item-state .action-menu__panel {
    white-space: normal;
}

.request-item-state .status-badge-button.badge,
.request-item-state > .badge {
    width: auto;
    justify-content: center;
    white-space: nowrap;
}

.request-item-state__invoices {
    white-space: nowrap;
}

.request-item-invoices-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.request-item-invoices-list a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
    color: var(--text);
}

.request-item-invoices-list a:hover {
    border-color: var(--row-hover-border);
    background: var(--row-hover-bg);
    text-decoration: none;
}

.request-item-invoices-list + .form-actions,
.data-list__empty + .form-actions {
    margin-top: 16px;
}

.action-menu__button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 34px;
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
}

.action-menu__button:hover {
    background: var(--muted-bg);
}

.action-menu__button.is-disabled {
    pointer-events: none;
    opacity: 0.8;
}

.request-items-editor textarea,
.request-items-editor input,
.request-items-editor select {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text);
    font: inherit;
    line-height: 1.35;
}

.request-items-editor__quantity {
    display: grid;
    grid-template-columns: minmax(0, 82px) 54px;
    gap: 6px;
}

.request-items-editor__quantity .errorlist {
    grid-column: 1 / -1;
}

.request-items-editor textarea {
    overflow: hidden;
    resize: none;
}

.request-items-editor__actions {
    display: grid;
    justify-items: center;
    gap: 6px;
}

.request-items-editor__delete,
.request-items-editor__link-update {
    margin-top: 1px;
    justify-self: center;
    min-height: 34px;
    width: 34px;
    padding: 0;
}

.request-items-editor__link-update svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.request-items-edit-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: min(100%, 1250px);
    margin-top: 16px;
}

.request-items-edit-toolbar__group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.request-items-edit-toolbar__group--submit {
    margin-left: auto;
}

.request-items-editor__add {
    width: 48px;
    font-size: 20px;
    line-height: 1;
}

[data-request-items-save].is-loading:disabled {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
    opacity: 0.86;
}

[data-request-items-save].is-loading::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 7px;
    border: 2px solid rgb(255 255 255 / 45%);
    border-top-color: #fff;
    border-radius: 50%;
    vertical-align: -2px;
    animation: request-chat-spin 0.8s linear infinite;
}

.request-item-import-dialog {
    width: min(1420px, calc(100vw - 16px));
}

.request-item-file-import-dialog {
    width: min(760px, calc(100vw - 16px));
}

.request-item-link-update-dialog {
    width: min(1080px, calc(100vw - 16px));
}

.request-item-import-dialog__body {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    gap: 12px;
    height: min(94vh, 900px);
    overflow: hidden;
    padding: 18px 20px;
}

.request-item-link-update-dialog__body {
    display: grid;
    grid-template-rows: auto auto auto minmax(8px, 1fr) auto auto;
    gap: 12px;
    height: min(92vh, 460px);
    overflow: auto;
    padding: 18px 20px 10px;
}

.request-item-import-dialog__header {
    margin-bottom: 2px;
}

.request-item-import-dialog__field {
    gap: 7px;
}

.request-item-import-dialog__content {
    display: grid;
    grid-template-columns: minmax(500px, 0.95fr) minmax(520px, 1.05fr);
    min-height: 0;
    gap: 16px;
}

.request-item-import-dialog__input-column,
.request-item-import-dialog__result-column {
    display: grid;
    min-height: 0;
    gap: 10px;
}

.request-item-import-dialog__input-column {
    grid-template-rows: minmax(180px, 1fr) auto auto;
}

.request-item-import-dialog__result-column {
    grid-template-rows: auto minmax(0, 1fr);
}

.request-item-import-dialog__links-field {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
}

.request-item-import-dialog__field textarea {
    width: 100%;
    min-height: 0;
    height: auto;
    box-sizing: border-box;
    overflow: auto;
    resize: none;
}

.request-item-import-dialog__quantity {
    display: grid;
    grid-template-columns: minmax(0, 112px) 82px;
    gap: 8px;
    align-items: center;
}

.request-item-import-dialog__quantity input,
.request-item-import-dialog__quantity select {
    min-height: 38px;
}

.request-item-import-dialog__hint {
    margin: -4px 0 0;
    color: var(--muted);
    line-height: 1.35;
    min-height: 0;
}

.request-item-import-dialog__hint p {
    margin: 0;
}

.request-item-import-dialog__hint p + p {
    margin-top: 6px;
}

.request-item-import-dialog__hint ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
    row-gap: 2px;
    margin: 4px 0 0;
    padding-left: 18px;
    list-style-position: outside;
}

.request-item-import-dialog__hint li span {
    color: var(--muted);
}

.request-item-import-dialog__hint a {
    color: var(--link);
    font-weight: 700;
    text-decoration: none;
}

.request-item-import-dialog__hint a:hover {
    text-decoration: underline;
}

.request-item-import-dialog__body > .form-error {
    margin: 2px 0 0;
}

.request-item-file-import-dialog__content {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
    gap: 12px;
}

.request-item-file-import-dialog__result {
    min-height: 0;
}

.request-item-file-import-dialog__result.is-dragover .request-item-import-placeholder,
.request-item-file-import-dialog__result.is-dragover .request-item-import-preview {
    border-color: var(--brand);
    background: var(--brand-soft);
    box-shadow: inset 0 0 0 1px var(--brand-line);
}

.request-item-file-import-dialog__controls {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) 220px;
    gap: 8px 12px;
    align-items: end;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--subtle-bg);
}

.request-item-file-import-dialog__file-field,
.request-item-file-import-dialog__quantity-field {
    margin: 0;
}

.request-item-file-import-dialog__file-field input[type="file"] {
    width: 100%;
    height: 38px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
    color: var(--text);
}

.request-item-file-import-dialog__hint {
    grid-column: 1 / -1;
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.35;
}

.request-item-import-dialog__actions {
    display: flex;
    gap: 10px;
    align-items: end;
    margin-top: 2px;
}

.request-item-link-update-dialog .request-item-import-dialog__actions {
    align-self: end;
}

.request-item-import-dialog__source-actions {
    display: grid;
    gap: 5px;
    margin-left: auto;
    margin-right: 16px;
    padding: 7px 9px 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--subtle-bg);
}

.request-item-import-dialog__source-actions > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.request-item-import-dialog__source-actions > div {
    display: flex;
    gap: 8px;
    align-items: center;
}

.request-item-import-dialog__actions:has(.request-item-import-dialog__source-actions) > button {
    margin-bottom: 9px;
}

.request-item-import-progress {
    display: grid;
    gap: 7px;
}

.request-item-import-progress__label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
}

.request-item-import-progress__label strong {
    color: var(--text);
}

.request-item-import-progress progress {
    width: 100%;
    height: 12px;
}

.request-item-import-preview {
    display: grid;
    grid-row: 2;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--subtle-bg);
}

.request-item-import-preview__summary {
    font-weight: 700;
}

.request-item-import-preview__list {
    display: grid;
    min-height: 0;
    overflow: auto;
    align-content: start;
    gap: 8px;
}

.request-item-import-preview__row {
    display: grid;
    grid-template-columns: 32px 56px minmax(0, 1fr) 34px;
    gap: 10px;
    align-items: start;
    padding: 7px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
}

.request-item-import-preview__row--error {
    border-color: #fecaca;
    background: #fff7f7;
}

.request-item-import-preview__number {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.request-item-import-preview__thumbnail {
    align-self: start;
}

.request-item-import-preview__content {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.request-item-import-preview__content strong {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.request-item-import-preview__content span {
    color: var(--muted);
    font-size: 12px;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.request-item-import-preview__remove {
    justify-self: center;
    width: 34px;
    min-height: 34px;
    margin-top: 1px;
    padding: 0;
    line-height: 1;
}

.request-item-link-update-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-height: 0;
}

.request-item-link-update-preview__column {
    display: grid;
    grid-template-rows: auto auto;
    align-content: start;
    gap: 8px;
    min-height: 0;
}

.request-item-link-update-preview__column h3 {
    margin: 0;
    font-size: 15px;
}

.request-item-link-update-preview__card {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    height: 124px;
    min-height: 0;
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--subtle-bg);
}

.request-item-link-update-preview__content {
    display: grid;
    min-width: 0;
    gap: 5px;
}

.request-item-link-update-preview__content strong,
.request-item-link-update-preview__content span {
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.request-item-link-update-preview__content span {
    color: var(--muted);
    font-size: 12px;
}

.request-item-import-placeholder {
    display: grid;
    grid-row: 2;
    min-height: 0;
    place-items: center;
    padding: 18px;
    border: 1px dashed var(--line);
    border-radius: 6px;
    color: var(--muted);
    text-align: center;
}

.request-item-link-update-dialog .request-item-import-placeholder {
    grid-row: auto;
}

@media (max-width: 920px) {
    .request-item-import-dialog__body {
        height: min(92vh, 820px);
    }

    .request-item-import-dialog__content {
        grid-template-columns: 1fr;
        overflow: hidden;
    }

    .request-item-import-dialog__hint ul {
        grid-template-columns: 1fr;
    }

    .request-item-import-dialog__input-column,
    .request-item-import-dialog__result-column {
        min-height: 0;
    }

    .request-item-link-update-preview {
        grid-template-columns: 1fr;
    }

    .request-item-file-import-dialog__content {
        grid-template-rows: minmax(0, 1fr) auto;
    }

    .request-item-file-import-dialog__controls {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
}

.form-error {
    color: #b42318;
}

.form-error a {
    font-weight: 700;
}

.request-invoices-view {
    display: grid;
    overflow-x: auto;
}

.request-invoices-view:has(.action-menu[open]) {
    overflow: visible;
}

.request-invoices-view__header,
.request-invoices-view__row,
.request-invoices-view__total {
    display: grid;
    grid-template-columns: 44px minmax(180px, 1.2fr) minmax(120px, 0.75fr) 132px 142px 132px 86px;
    min-width: 1000px;
    align-items: center;
    column-gap: 10px;
    border-bottom: 1px solid var(--line);
}

.request-invoices-view__header {
    padding: 0 0 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.request-invoices-view__row {
    min-height: 56px;
    padding: 10px 0;
}

.request-invoices-view__total {
    padding: 12px 0;
    font-weight: 700;
}

.request-invoices-view__total > span:first-child {
    grid-column: 1 / 5;
    padding-inline: 10px;
}

.request-invoices-view__total > span:last-child {
    grid-column: 5 / 6;
    justify-self: center;
    white-space: nowrap;
}

.request-invoices-view__header > span,
.request-invoices-view__row > span,
.request-invoices-view__total > span {
    min-width: 0;
}

.request-invoices-view__row > span:first-child {
    color: var(--muted);
    text-align: center;
}

.request-invoices-view__header > span:nth-child(n + 4) {
    text-align: center;
}

.request-invoices-view__row > span:nth-child(n + 4) {
    display: grid;
    justify-items: center;
}

.request-invoices-view__row a {
    overflow-wrap: anywhere;
    font-weight: 700;
}

.request-invoices-view__empty {
    min-width: 980px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
}

.request-invoices-delete-form {
    margin: 0;
}

.request-invoices__delete {
    justify-self: center;
    min-height: 34px;
    width: 34px;
    padding: 0;
    font-size: 18px;
    line-height: 1;
}

.request-invoices__add {
    min-height: 38px;
    width: 48px;
    padding-inline: 0;
    font-size: 20px;
    line-height: 1;
}

.request-invoice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.request-invoice-row-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.request-invoice-edit-button {
    min-height: 34px;
    width: 34px;
}

.request-invoice-editor-dialog .modal__body {
    display: grid;
    gap: 14px;
    max-height: min(820px, calc(100vh - 48px));
    overflow: auto;
}

.request-invoice-editor-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.request-invoice-recognition {
    display: grid;
    gap: 8px;
}

.request-invoice-recognition__file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.request-invoice-recognition__file-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.request-invoice-recognition__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.request-invoice-recognition__status {
    color: var(--muted);
    font-size: 13px;
}

.request-invoice-recognition__status[data-tone="success"] {
    color: var(--success-text);
}

.request-invoice-recognition__status[data-tone="warning"] {
    color: #93370d;
}

.request-invoice-recognition__status[data-tone="error"] {
    color: #b42318;
}

.request-invoice-matches {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #f5c26b;
    border-radius: 6px;
    background: #fffbeb;
}

.request-invoice-editor-dialog .form-hint--warning {
    color: #93370d;
}

.request-invoice-matches__header,
.request-invoice-match > div {
    display: grid;
    gap: 3px;
}

.request-invoice-matches__header span,
.request-invoice-match span {
    color: var(--muted);
    font-size: 13px;
}

.request-invoice-matches__list {
    display: grid;
    gap: 8px;
}

.request-invoice-match {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
}

.request-invoice-match--selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.request-invoice-matches .button--selected {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.request-invoice-editor-items {
    display: grid;
    gap: 10px;
}

.request-invoice-editor-items__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.request-invoice-editor-items__list {
    display: grid;
    gap: 8px;
    max-height: min(300px, 38vh);
    overflow: auto;
    padding-right: 4px;
}

.request-invoice-editor-items__tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.request-invoice-editor-items__item {
    display: grid;
    grid-template-columns: max-content 34px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
    color: var(--text);
}

.request-invoice-editor-items__number {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
    .request-invoice-editor-fields {
        grid-template-columns: 1fr;
    }

    .request-invoice-editor-items__header {
        align-items: stretch;
        flex-direction: column;
    }
}

.request-invoice-comments-dialog .modal__body {
    display: grid;
    gap: 14px;
    max-height: min(720px, calc(100vh - 64px));
}

.request-invoice-comments__list {
    display: grid;
    align-content: start;
    gap: 8px;
    height: min(320px, 42vh);
    overflow: auto;
    padding-right: 4px;
}

.request-invoice-comment {
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
}

.request-invoice-comment__meta {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
}

.request-invoice-comment__meta > span {
    display: inline-flex;
    min-width: 0;
    gap: 8px;
    align-items: baseline;
}

.request-invoice-comment__delete-form {
    margin: 0;
}

.request-invoice-comment-menu__summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: var(--muted);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.request-invoice-comment-menu__summary:hover {
    background: var(--control-hover-bg);
    color: var(--brand);
}

.request-invoice-comment__text {
    margin-top: 6px;
    color: var(--text);
    overflow-wrap: anywhere;
}

.request-invoice-comment__edit-form {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.request-invoice-comment__edit-form textarea {
    width: 100%;
    min-height: 56px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text);
    font: inherit;
    line-height: 1.35;
    resize: vertical;
}

.request-invoice-comment__edit-actions {
    justify-content: flex-end;
}

.request-invoice-comments__empty {
    color: var(--muted);
}

.request-invoice-comments__form {
    display: grid;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.request-invoice-comments__form textarea {
    width: 100%;
    min-height: 38px;
    max-height: 130px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text);
    font: inherit;
    line-height: 1.35;
    resize: none;
}

.request-invoice-comments__actions {
    margin-top: 4px;
}

.request-detail-shell {
    --request-main-min: 860px;
    --request-chat-width: clamp(360px, 26vw, 480px);
    --request-layout-gap: 12px;
    --request-reserved-chat: calc(var(--request-chat-width) + var(--request-layout-gap));
    --request-page-max: 1600px;
    --request-page-padding: 24px;
    --request-page-left: calc((100vw - min(100vw, var(--request-page-max))) / 2 + var(--request-page-padding));
    --request-open-width: min(
        100%,
        calc(100vw - var(--request-page-left) - var(--request-reserved-chat))
    );

    position: relative;
    width: 100%;
    transition: width 0.22s ease, margin-left 0.22s ease;
}

.request-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--request-layout-gap);
    align-items: start;
    transition: grid-template-columns 0.22s ease;
}

.request-detail-shell.is-restoring,
.request-detail-shell.is-restoring .request-detail-layout {
    transition: none;
}

.request-detail-main {
    display: grid;
    position: relative;
    min-width: 0;
    gap: 18px;
}

.request-detail-main > .content-panel {
    min-width: 0;
    margin-top: 0;
}

.request-chat-sidebar {
    display: none;
    min-width: 0;
}

.request-chat-drawer {
    display: none;
}

.request-chat-tab {
    position: absolute;
    top: 24px;
    left: -38px;
    z-index: 8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 58px;
    min-height: 58px;
    padding: 0;
    border: 1px solid var(--line);
    border-right: 0;
    border-radius: 999px 0 0 999px;
    background: var(--panel);
    color: var(--brand);
    box-shadow: -6px 8px 20px rgb(15 23 42 / 10%);
    pointer-events: auto;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.request-chat-tab:hover {
    border-color: var(--control-hover-border);
    background: var(--control-hover-bg);
    color: var(--brand-dark);
}

.request-chat-tab--disabled,
.request-chat-tab--disabled:hover {
    position: fixed;
    top: 92px;
    right: 0;
    left: auto;
    background: var(--subtle-bg);
    color: var(--muted);
    cursor: not-allowed;
    box-shadow: none;
}

.request-chat-tab svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.request-chat-tab__badge,
.request-chat-tab .chat-unread-badge {
    position: absolute;
    top: -8px;
    right: -6px;
    min-width: 24px;
    height: 20px;
    padding: 0 5px;
    border: 2px solid var(--panel);
    font-size: 11px;
}

.request-chat {
    display: grid;
    position: relative;
    gap: 14px;
}

.request-chat.is-dragover::after {
    content: "Перетащите файлы сюда";
    position: absolute;
    inset: 8px;
    z-index: 6;
    display: grid;
    place-items: center;
    border: 2px dashed var(--brand);
    border-radius: 8px;
    background: var(--brand-soft);
    box-shadow: inset 0 0 0 1px var(--brand-line), var(--shadow);
    color: var(--brand-dark);
    font-weight: 700;
    pointer-events: none;
}

.request-chat__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.request-chat__header h2 {
    margin: 0;
}

.request-chat__header p {
    margin: 4px 0 0;
    font-size: 13px;
}

.request-chat-pins {
    display: grid;
    gap: 6px;
}

.request-chat-pins__bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px max-content;
    align-items: stretch;
    gap: 4px;
    padding: 6px;
    border: 1px solid var(--chat-pin-border);
    border-radius: 8px;
    background: var(--chat-pin-bg);
}

.request-chat-pins__nav,
.request-chat-pins__list-toggle {
    min-height: 0;
    padding: 0 8px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--chat-pin-text);
    font-weight: 700;
}

.request-chat-pins__nav-group {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
}

.request-chat-pins__nav {
    min-height: 15px;
    padding: 0;
    font-size: 11px;
    line-height: 1;
}

.request-chat-pins__list-toggle {
    min-height: 32px;
}

.request-chat-pins__nav:hover,
.request-chat-pins__list-toggle:hover {
    background: var(--chat-pin-hover-bg);
    color: var(--chat-pin-text);
}

.request-chat-pins__current {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 0;
    padding: 5px 8px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--text);
    font-weight: 400;
    text-align: left;
    justify-content: stretch;
}

.request-chat-pins__current:hover {
    background: var(--chat-pin-hover-bg);
    color: var(--text);
}

.request-chat-pins__counter {
    color: var(--chat-pin-text);
    font-size: 12px;
    font-weight: 700;
}

.request-chat-pins__body {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.request-chat-pins__author,
.request-chat-pin__author {
    min-width: 0;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 700;
    overflow-wrap: anywhere;
    white-space: normal;
}

.request-chat-pins__text,
.request-chat-pin__text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.request-chat-pins__list {
    display: grid;
    gap: 2px;
    max-height: 240px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--chat-pin-border);
    border-radius: 8px;
    background: var(--chat-pin-bg);
}

.request-chat-pins__list[hidden] {
    display: none;
}

.request-chat-pin {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 3px 4px;
    border-radius: 5px;
}

.request-chat-pin:hover {
    background: var(--chat-pin-hover-bg);
}

.request-chat-pin__jump {
    display: grid;
    min-height: 0;
    padding: 2px 4px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-weight: 400;
    line-height: 1.25;
    text-align: left;
    justify-content: stretch;
    justify-items: start;
}

.request-chat-pin__jump:hover {
    background: transparent;
    color: var(--text);
}

.request-chat-pin__unpin {
    align-self: center;
}

.request-chat[data-can-moderate="false"] .request-chat-pin-form {
    display: none;
}

.request-chat__messages {
    display: grid;
    align-content: start;
    gap: 10px;
    height: min(560px, 70vh);
    overflow-y: auto;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--chat-bg);
}

.request-chat__empty {
    align-self: center;
    justify-self: center;
    margin: 40px 0;
}

.request-chat-message {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
    width: min(320px, 74%);
    transition: background 0.2s ease;
}

.request-chat-message--own {
    justify-self: end;
    grid-template-columns: minmax(0, 1fr) 30px;
}

.request-chat-message--own .request-chat-message__avatar {
    grid-column: 2;
}

.request-chat-message--own .request-chat-message__bubble {
    grid-column: 1;
    grid-row: 1;
    background: var(--chat-own-bg);
    border-color: var(--chat-own-border);
}

.request-chat-message__bubble {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 10px 10px 10px 4px;
    background: var(--chat-bubble-bg);
}

.request-chat-message--own .request-chat-message__bubble {
    border-radius: 10px 10px 4px 10px;
}

.request-chat-message.is-pinned .request-chat-message__bubble {
    border-color: #facc15;
}

.request-chat-message.is-highlighted .request-chat-message__bubble {
    box-shadow: 0 0 0 3px var(--brand-line);
}

.request-chat-message__header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.request-chat-message__author {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
    font-weight: 700;
}

.request-chat-message__time {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
}

.request-chat-message__meta {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
}

.request-chat-message__edited {
    color: var(--muted);
    font-size: 12px;
}

.request-chat-message-menu {
    display: inline-flex;
}

.request-chat-message-menu__summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: var(--muted);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.request-chat-message-menu__summary:hover {
    background: var(--control-hover-bg);
    color: var(--brand);
}

.request-chat-message-menu .action-menu__panel {
    top: calc(100% + 4px);
    min-width: 150px;
}

.request-chat-message-menu--above .action-menu__panel {
    top: auto;
    bottom: calc(100% + 4px);
}

.request-chat-pin-form {
    margin: 0;
}

.request-chat-message__receipt {
    display: none;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
}

.request-chat-message--own .request-chat-message__receipt {
    display: inline-flex;
}

.request-chat-message__receipt[data-status="read"] {
    color: var(--muted);
}

.request-chat-message__receipt:hover {
    background: transparent;
    color: var(--brand);
}

.request-chat-readers {
    position: absolute;
    right: 10px;
    top: 32px;
    z-index: 5;
    width: min(260px, calc(100vw - 48px));
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 14px 34px rgb(15 23 42 / 18%);
}

.request-chat-message__bubble {
    position: relative;
}

.request-chat-readers__title {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.request-chat-readers__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 10px;
    padding: 5px 0;
}

.request-chat-readers__row span {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
}

.request-chat-readers__row time,
.request-chat-readers__empty {
    color: var(--muted);
    font-size: 12px;
}

.request-chat-message__text {
    overflow-wrap: anywhere;
    white-space: normal;
}

.request-chat-message__deleted {
    color: var(--muted);
    font-style: italic;
}

.request-chat-reply-ref,
.request-chat-form__reply {
    display: grid;
    align-items: start;
    gap: 1px;
    width: 100%;
    min-height: 0;
    margin: 2px 0 8px;
    padding: 5px 8px 6px 10px;
    border: 0;
    border-left: 3px solid var(--brand);
    border-radius: 5px;
    background: var(--chat-reply-bg);
    color: var(--text);
    font-weight: 400;
    line-height: 1.25;
    justify-content: stretch;
    text-align: left;
    justify-items: start;
}

.request-chat-reply-ref:hover {
    background: var(--chat-reply-hover-bg);
    color: var(--text);
}

.request-chat-reply-ref span:first-child,
.request-chat-form__reply strong {
    color: var(--brand-dark);
    font-weight: 700;
    font-size: 12px;
    overflow-wrap: anywhere;
    white-space: normal;
}

.request-chat-reply-ref span:last-child,
.request-chat-form__reply span {
    display: block;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
    font-size: 13px;
}

.request-chat-attachments {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.request-chat-attachment {
    display: inline-grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    max-width: 320px;
    padding: 7px 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel);
    color: var(--text);
}

.request-chat-attachment:hover {
    background: var(--row-hover-bg);
    text-decoration: none;
}

.request-chat-attachment__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: var(--muted-bg);
    color: var(--muted);
    font-weight: 700;
}

.request-chat-attachment--image {
    grid-template-columns: 84px minmax(0, 1fr);
}

.request-chat-attachment--image img {
    width: 84px;
    height: 64px;
    border-radius: 6px;
    object-fit: cover;
}

.request-chat-attachment span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.request-chat-message__actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    min-height: 22px;
}

.request-chat-pin-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.action-menu__panel .request-chat-pin-form {
    display: block;
}

.request-chat-message__action {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 6px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.request-chat-message__action:hover {
    background: var(--control-hover-bg);
    color: var(--brand);
}

.request-chat-form {
    display: grid;
    gap: 8px;
}

.request-chat-form__reply {
    position: relative;
    grid-template-columns: minmax(0, 1fr) max-content;
    margin: 0;
}

.request-chat-form__reply-close {
    min-height: 28px;
    width: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 20px;
}

.request-chat-form__reply-close:hover {
    background: var(--control-hover-bg);
    color: var(--text);
}

.request-chat-form__files {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.request-chat-form__file {
    display: inline-flex;
    align-items: center;
    max-width: 240px;
    min-width: 0;
    overflow: hidden;
    border-radius: 999px;
    background: var(--muted-bg);
    color: var(--muted);
}

.request-chat-form__file-name {
    max-width: 220px;
    overflow: hidden;
    padding: 4px 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.request-chat-form__file button {
    display: inline-grid;
    place-items: center;
    min-height: 24px;
    width: 24px;
    padding: 0;
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    font-size: 16px;
    line-height: 1;
}

.request-chat-form__file button:hover {
    background: var(--control-hover-bg);
    color: var(--text);
}

.request-chat-form__upload {
    position: relative;
    align-self: center;
    width: 58px;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--brand-soft);
}

.request-chat-form__upload span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--brand);
    transition: width 0.12s linear;
}

.request-chat-form__row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) max-content;
    align-items: end;
    gap: 8px;
}

.request-chat-form__input-wrap {
    position: relative;
    min-width: 0;
}

.request-chat-form__input-wrap textarea {
    width: 100%;
}

.request-chat-mentions {
    position: absolute;
    right: 0;
    bottom: calc(100% + 6px);
    left: 0;
    z-index: 30;
    max-height: 240px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.request-chat-mentions__item {
    display: grid;
    width: 100%;
    min-height: 42px;
    justify-items: start;
    padding: 7px 9px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    text-align: left;
}

.request-chat-mentions__item:hover,
.request-chat-mentions__item.is-active {
    background: var(--control-hover-bg);
    color: var(--text);
}

.request-chat-mentions__item small,
.request-chat-mentions__empty {
    color: var(--muted);
    font-size: 12px;
}

.request-chat-mentions__empty {
    padding: 8px 9px;
}

.request-chat-file-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
    color: var(--brand);
    cursor: pointer;
    font-size: 22px;
    font-weight: 700;
}

.request-chat-file-button:hover {
    background: var(--control-hover-bg);
}

.request-chat-form.is-sending .request-chat-file-button,
.request-chat-form.is-sending textarea {
    opacity: 0.72;
}

.request-chat-form.is-editing .request-chat-file-button {
    opacity: 0.45;
    pointer-events: none;
}

.request-chat-form.is-sending button[type="submit"]::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 6px;
    border: 2px solid rgb(255 255 255 / 45%);
    border-top-color: #fff;
    border-radius: 50%;
    vertical-align: -2px;
    animation: request-chat-spin 0.8s linear infinite;
}

@keyframes request-chat-spin {
    to {
        transform: rotate(360deg);
    }
}

.request-chat-file-button input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.request-chat-form textarea {
    width: 100%;
    min-height: 38px;
    max-height: 130px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text);
    font: inherit;
    line-height: 1.35;
    resize: none;
}

@media (min-width: 1280px) {
    .request-detail-shell.has-chat .request-chat-drawer {
        display: block;
        position: fixed;
        top: 74px;
        right: 0;
        z-index: 7;
        width: var(--request-chat-width);
        transform: translateX(100%);
        transition: transform 0.22s ease;
        pointer-events: none;
    }

    .request-detail-shell.has-chat .request-chat-tab {
        position: fixed;
        top: 98px;
        right: 0;
        left: auto;
    }

    .request-detail-shell.has-chat .request-chat-drawer.is-restoring {
        transition: none;
    }

    .request-detail-shell.has-chat .request-chat-sidebar {
        display: block;
    }

    .request-detail-shell.has-chat.is-chat-open,
    html.request-chat-open .request-detail-shell.has-chat {
        width: var(--request-open-width);
        margin-left: 0;
    }

    .request-detail-shell.has-chat .request-chat-drawer.is-open,
    html.request-chat-open .request-detail-shell.has-chat .request-chat-drawer {
        transform: translateX(0);
        pointer-events: auto;
    }

    .request-detail-shell.has-chat.is-chat-open .request-chat,
    html.request-chat-open .request-detail-shell.has-chat .request-chat {
        grid-template-rows: auto auto minmax(0, 1fr) auto;
        height: min(760px, calc(100vh - 92px));
        min-height: 520px;
        overflow: hidden;
    }

    .request-detail-shell.has-chat.is-chat-open .request-chat__messages,
    html.request-chat-open .request-detail-shell.has-chat .request-chat__messages {
        height: auto;
        min-height: 0;
    }

}

@media (max-width: 1279px) {
    .request-detail-shell.has-chat .request-chat-drawer {
        display: block;
        position: relative;
        transform: none;
    }

    .request-detail-shell.has-chat .request-chat-drawer:not(.is-open) .request-chat-sidebar {
        display: none;
    }

    html.request-chat-open .request-detail-shell.has-chat .request-chat-drawer:not(.is-open) .request-chat-sidebar,
    .request-detail-shell.has-chat.is-chat-open .request-chat-sidebar {
        display: block;
    }

    .request-chat-tab {
        position: fixed;
        top: 82px;
        right: 0;
        left: auto;
        border-right: 0;
        border-radius: 999px 0 0 999px;
        box-shadow: -6px 8px 20px rgb(15 23 42 / 10%);
    }
}

.management-sections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.administration-section + .administration-section {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.administration-section h2 {
    margin: 0 0 14px;
}

.administration-actions {
    gap: 12px;
}

.administration-actions .button {
    justify-content: flex-start;
    min-height: 48px;
    text-align: left;
}

.management-sections .panel {
    min-width: 0;
}

.management-create-form {
    margin-bottom: 16px;
}

.management-sections .management-create-form {
    grid-template-columns: minmax(220px, 1fr) minmax(140px, 180px) max-content;
    align-items: end;
}

.management-sections .management-create-form .field {
    min-width: 0;
}

.management-table tr {
    transition: background 0.15s ease, opacity 0.15s ease;
}

.management-table tr.is-dragging {
    opacity: 0.55;
}

.management-table tr.is-drop-target {
    background: var(--control-hover-bg);
}

.drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
    color: var(--muted);
    cursor: grab;
    font-weight: 700;
}

.drag-handle:hover {
    background: var(--control-hover-bg);
    color: var(--text);
    text-decoration: none;
}

.drag-handle:active {
    cursor: grabbing;
}

.order-number {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    text-align: left;
}

.management-table {
    table-layout: fixed;
}

.management-table th:nth-child(1),
.management-table td:nth-child(1) {
    width: 38px;
}

.management-table th:nth-child(2),
.management-table td:nth-child(2) {
    width: 42px;
}

.management-table th:nth-child(4),
.management-table td:nth-child(4) {
    width: 170px;
}

.management-table th:nth-child(5),
.management-table td:nth-child(5) {
    width: 90px;
}

.management-table input[type="text"] {
    width: 100%;
    min-height: 34px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.management-delete-form {
    margin: 0;
}

.badge {
    --badge-border: #bfd0ff;
    --badge-bg: #eef4ff;
    --badge-text: var(--brand-dark);
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid var(--badge-border);
    background: var(--badge-bg);
    color: var(--badge-text);
    font-size: 12px;
    font-weight: 600;
}

.status-badge-button.badge {
    justify-content: flex-start;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    line-height: 1;
    transition: filter 120ms ease, box-shadow 120ms ease;
}

.status-badge-button.badge:hover {
    border-color: var(--badge-border);
    background: var(--badge-bg);
    color: var(--badge-text);
    filter: brightness(1.04);
    box-shadow: 0 0 0 2px rgb(37 99 235 / 8%);
    text-decoration: none;
}

.stack {
    display: grid;
    gap: 8px;
}

.stack form,
.stack button {
    width: 100%;
}

.badge--success {
    --badge-bg: var(--success-bg);
    --badge-text: var(--success-text);
}

.badge--muted {
    --badge-bg: var(--muted-bg);
    --badge-text: var(--muted);
}

.badge--gray {
    --badge-border: #d0d5dd;
    --badge-bg: #f2f4f7;
    --badge-text: #475467;
}

.badge--orange {
    --badge-border: #ffb74d;
    --badge-bg: #fff3e0;
    --badge-text: #9a4d00;
}

.badge--red {
    --badge-border: #fda4af;
    --badge-bg: #fff1f2;
    --badge-text: #be123c;
}

.badge--yellow {
    --badge-border: #d8ceb4;
    --badge-bg: #f5f2e8;
    --badge-text: #6f6348;
}

.badge--check {
    --badge-border: #facc15;
    --badge-bg: #fef9c3;
    --badge-text: #854d0e;
}

.badge--blue {
    --badge-border: #93c5fd;
    --badge-bg: #eff6ff;
    --badge-text: #1d4ed8;
}

.badge--soft-blue {
    --badge-border: #60a5fa;
    --badge-bg: #dbeafe;
    --badge-text: #1e40af;
}

.badge--sky {
    --badge-border: #38bdf8;
    --badge-bg: #e0f2fe;
    --badge-text: #075985;
}

.badge--cyan {
    --badge-border: #22d3ee;
    --badge-bg: #cffafe;
    --badge-text: #155e75;
}

.badge--teal {
    --badge-border: #2dd4bf;
    --badge-bg: #ccfbf1;
    --badge-text: #0f766e;
}

.badge--emerald {
    --badge-border: #34d399;
    --badge-bg: #d1fae5;
    --badge-text: #047857;
}

.badge--green {
    --badge-border: #4ade80;
    --badge-bg: #dcfce7;
    --badge-text: #166534;
}

[data-theme="graphite"] .badge,
[data-theme="neon"] .badge {
    --badge-border: #37526a;
    --badge-bg: #172433;
    --badge-text: #bfdbfe;
}

[data-theme="graphite"] .badge--success,
[data-theme="neon"] .badge--success {
    --badge-border: #2f8f50;
    --badge-bg: #102e1d;
    --badge-text: #8ee5a8;
}

[data-theme="graphite"] .badge--muted,
[data-theme="neon"] .badge--muted,
[data-theme="graphite"] .badge--gray,
[data-theme="neon"] .badge--gray {
    --badge-border: #45525f;
    --badge-bg: #222a33;
    --badge-text: #b8c2cf;
}

[data-theme="graphite"] .badge--orange,
[data-theme="neon"] .badge--orange,
[data-theme="graphite"] .badge--yellow,
[data-theme="neon"] .badge--yellow,
[data-theme="graphite"] .badge--check,
[data-theme="neon"] .badge--check {
    --badge-border: #9a6a24;
    --badge-bg: #2d2416;
    --badge-text: #f6c06d;
}

[data-theme="graphite"] .badge--red,
[data-theme="neon"] .badge--red {
    --badge-border: #a53c52;
    --badge-bg: #351822;
    --badge-text: #f6a1b2;
}

[data-theme="graphite"] .badge--blue,
[data-theme="neon"] .badge--blue,
[data-theme="graphite"] .badge--soft-blue,
[data-theme="neon"] .badge--soft-blue,
[data-theme="graphite"] .badge--sky,
[data-theme="neon"] .badge--sky,
[data-theme="graphite"] .badge--cyan,
[data-theme="neon"] .badge--cyan {
    --badge-border: #35779c;
    --badge-bg: #122a38;
    --badge-text: #93d9ff;
}

[data-theme="graphite"] .badge--teal,
[data-theme="neon"] .badge--teal,
[data-theme="graphite"] .badge--emerald,
[data-theme="neon"] .badge--emerald,
[data-theme="graphite"] .badge--green,
[data-theme="neon"] .badge--green {
    --badge-border: #248a6d;
    --badge-bg: #102d27;
    --badge-text: #8ce9ce;
}

.muted-inline {
    margin-left: 8px;
    color: var(--muted);
    white-space: nowrap;
}

.status-cell {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.status-cell--reversed {
    grid-template-columns: max-content max-content;
}

.status-meta-group {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.status-meta {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.2;
}

.plain-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 18px;
}

.rich-content {
    color: var(--text);
}

.rich-content p:last-child {
    margin-bottom: 0;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.pagination__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
    color: var(--text);
    font-weight: 600;
}

.pagination__item:hover {
    background: var(--control-hover-bg);
    text-decoration: none;
}

.pagination__item--active {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.pagination__item--ellipsis {
    border-color: transparent;
    background: transparent;
    color: var(--muted);
    cursor: default;
}

.messages {
    position: fixed;
    top: 72px;
    left: 24px;
    z-index: 80;
    display: grid;
    gap: 8px;
    width: min(380px, calc(100vw - 48px));
    pointer-events: none;
}

.message {
    pointer-events: auto;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
    box-shadow: 0 14px 34px rgb(15 23 42 / 14%);
    animation: message-enter 180ms ease both;
    transition:
        opacity 200ms ease,
        transform 200ms ease;
}

.message--leaving,
.topbar-status__message--leaving {
    opacity: 0;
    transform: translateX(-8px);
}

.message--success {
    border-color: #b7e4c7;
    background: var(--success-bg);
    color: var(--success-text);
}

.message--error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b42318;
}

.message--warning {
    border-color: #fedf89;
    background: #fffaeb;
    color: #93370d;
}

.message--info {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

@keyframes message-enter {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.errorlist {
    padding-left: 18px;
    color: #b42318;
}

@media (max-width: 760px) {
    .topbar {
        flex-wrap: wrap;
        align-content: center;
        padding: 0 14px;
        gap: 10px;
    }

    .messages {
        top: 68px;
        left: 12px;
        width: calc(100vw - 24px);
    }

    .topbar-status {
        flex-basis: 100%;
        order: 10;
        max-width: none;
        min-width: 100%;
    }

    .topbar-nav {
        margin-left: 0;
        gap: 2px;
    }

    .topbar-nav a {
        padding: 6px 7px;
        font-size: 12px;
    }

    .app-version-badge {
        margin-left: 0;
        padding-right: 7px;
        padding-left: 7px;
    }

    .app-version-badge__prefix {
        display: none;
    }

    .help-link {
        margin: 0 6px;
    }

    .page {
        padding: 18px 14px;
    }

    .content-header,
    .grid--two,
    .grid--three,
    .grid--four,
    .catalog-layout {
        display: grid;
        grid-template-columns: 1fr;
    }

    .management-sections .management-create-form {
        grid-template-columns: 1fr;
    }

    .management-sections {
        grid-template-columns: 1fr;
    }

    .filter-panel {
        position: static;
    }

    .help-layout {
        grid-template-columns: 1fr;
        background: var(--panel);
    }

    .help-layout::before {
        display: none;
    }

    .help-nav {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-height: 0;
        padding: 14px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        background: var(--subtle-bg);
    }

    .help-content {
        padding: 18px 14px;
    }

    .help-card-grid,
    .help-term-list,
    .help-section .help-columns-list {
        grid-template-columns: 1fr;
    }

    .help-flow .badge {
        width: 100%;
    }

    .table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .avatar-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .notification-row {
        grid-template-columns: 6px minmax(0, 1fr);
        align-items: start;
    }

    .notification-row > .badge {
        grid-column: 2;
        justify-self: start;
    }

    .notification-row__marker {
        grid-row: 1 / span 3;
    }
}
