:root {
    --bx-bg: #f1f1f1;
    --bx-bg-soft: #f7f7f7;
    --bx-panel: #ffffff;
    --bx-panel-muted: #f7f7f7;
    --bx-line: #d7d7d7;
    --bx-line-strong: #b7b7b7;
    --bx-text: #666666;
    --bx-text-strong: #464646;
    --bx-text-muted: #666666;
    --bx-blue: #049c06;
    --bx-blue-strong: #028004;
    --bx-blue-soft: #e8f5e8;
    --bx-green: #028004;
    --bx-green-soft: #e8f5e8;
    --bx-amber: #ffb400;
    --bx-amber-soft: #fff7df;
    --bx-red: #ff5752;
    --bx-red-soft: #fff0ef;
    --bx-shadow: 0 10px 28px rgba(70, 70, 70, 0.10);
    --bx-radius-lg: 18px;
    --bx-radius-md: 14px;
    --bx-radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bx-bg);
}

body.bitrix-app {
    margin: 0;
    min-height: 100vh;
    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--bx-text);
    line-height: 1.5;
    overflow-x: hidden;
    background-color: var(--bx-bg);
}

body.bitrix-app * {
    font-family: inherit;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--bx-blue-strong);
}

.page-shell {
    width: 100%;
    max-width: 1560px;
    min-height: 100vh;
    margin: 0 auto;
    padding: clamp(16px, 2.4vw, 24px) clamp(14px, 2.8vw, 36px) 24px;
}

.page-shell.narrow-shell {
    width: min(760px, calc(100vw - 24px));
    min-height: auto;
    margin: 0 auto;
}

.page-shell.compact-shell {
    padding-top: 22px;
    padding-bottom: 18px;
}

.workspace-shell {
    position: relative;
    overflow: hidden;
    margin-bottom: 18px;
    border: none;
    border-radius: 0 0 24px 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.46) 0%, rgba(241, 241, 241, 0.54) 100%);
    backdrop-filter: blur(6px);
    box-shadow: var(--bx-shadow);
}

.workspace-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("/assets/Netzwerk.svg") center center / cover no-repeat;
    opacity: 0.97;
    pointer-events: none;
    z-index: 0;
}

.workspace-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(2, 128, 4, 0.10) 0%, rgba(255, 255, 255, 0.10) 42%, rgba(255, 255, 255, 0.22) 100%);
    pointer-events: none;
    z-index: 1;
}

.compact-shell .workspace-shell {
    margin-bottom: 14px;
}

.workspace-inner {
    position: relative;
    z-index: 2;
    padding: clamp(18px, 2.4vw, 24px) clamp(16px, 2.6vw, 26px) clamp(18px, 2.2vw, 22px);
}

.compact-shell .workspace-inner {
    padding: 20px 22px 18px;
}

.workspace-topline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--bx-blue-strong);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.workspace-topline::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--bx-blue), var(--bx-blue-strong));
    box-shadow: 0 0 0 5px rgba(2, 128, 4, 0.12);
}

.workspace-head {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    align-items: flex-start;
}

.workspace-head.centered-head {
    justify-content: center;
    text-align: center;
}

.workspace-head.centered-head > div {
    width: 100%;
}

.workspace-corner-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    justify-content: center;
    max-width: 100%;
}

.workspace-title {
    margin: 0 0 6px;
    color: var(--bx-text-strong);
    font-size: clamp(24px, 2.6vw, 30px);
    font-weight: 600;
    line-height: 1.12;
}

.workspace-title.brand-title {
    color: #ffffff;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
}

.workspace-brand {
    display: flex;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 18px;
    padding: 12px 20px;
    border-radius: 24px;
    background: rgba(70, 70, 70, 0.32);
    box-shadow: 0 12px 28px rgba(70, 70, 70, 0.18);
    backdrop-filter: blur(6px);
}

.workspace-logo {
    display: block;
    width: min(430px, 58vw);
    max-width: 100%;
    max-height: 92px;
    object-fit: contain;
    filter: drop-shadow(0 10px 24px rgba(10, 18, 26, 0.18));
}

.workspace-subtitle {
    margin: 0;
    max-width: 68ch;
    color: var(--bx-text);
    line-height: 1.55;
}

.hero-actions,
.toolbar,
.meta-row,
.message-stack,
.inline-tools,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-actions,
.workspace-corner-actions,
.language-switch-actions,
.inline-actions,
.inline-tools,
.bitrix-tabs {
    row-gap: 10px;
}

.hero-actions {
    justify-content: flex-end;
}

.hero-actions.centered-actions {
    justify-content: center;
    margin-top: 16px;
}

.workspace-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 12px 16px;
    margin-top: 16px;
}

.workspace-action-row > * {
    min-width: 0;
}

.workspace-action-row .bitrix-tabs {
    grid-column: 2;
    margin-top: 0;
}

.workspace-action-row .hero-actions,
.workspace-action-row .workspace-corner-actions {
    grid-column: 3;
    margin-top: 0;
    width: 100%;
}

.workspace-action-row .hero-actions.centered-actions {
    margin-top: 0;
}

.workspace-action-row .bitrix-tabs,
.workspace-action-row .hero-actions {
    justify-content: center;
}

.workspace-action-row .workspace-corner-actions {
    justify-content: flex-end;
}

.workspace-action-row .bitrix-tabs,
.workspace-action-row .workspace-corner-actions,
.workspace-action-row .language-switch,
.workspace-action-row .language-switch-actions {
    min-width: 0;
}

.compact-shell .workspace-head,
.narrow-shell .workspace-head {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
}

.compact-shell .workspace-head > div,
.narrow-shell .workspace-head > div {
    width: 100%;
}

.compact-shell .workspace-title,
.narrow-shell .workspace-title,
.compact-shell .workspace-subtitle,
.narrow-shell .workspace-subtitle {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.compact-shell .bitrix-tabs,
.narrow-shell .bitrix-tabs,
.compact-shell .hero-actions,
.narrow-shell .hero-actions {
    justify-content: center;
}

.bitrix-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.bitrix-tabs.centered-tabs {
    justify-content: center;
}

.bitrix-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: #000000;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    overflow-wrap: anywhere;
    background: rgba(255, 255, 255, 0.7);
}

.bitrix-tab.active {
    border-color: rgba(2, 128, 4, 0.24);
    color: var(--bx-blue-strong);
    background: var(--bx-blue-soft);
}

.bitrix-tab:hover {
    border-color: rgba(2, 128, 4, 0.18);
}

.language-switch,
.language-switch-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.language-switch {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.language-switch-form {
    margin: 0;
}

.language-switch-button {
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    color: #000000;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.language-switch-button:hover {
    border-color: rgba(2, 128, 4, 0.18);
}

.language-switch-button.active {
    border-color: rgba(2, 128, 4, 0.24);
    background: var(--bx-blue-soft);
    color: var(--bx-blue-strong);
}

.panel {
    margin-bottom: 16px;
    border: 1px solid var(--bx-line);
    border-radius: var(--bx-radius-lg);
    background: var(--bx-panel);
    box-shadow: var(--bx-shadow);
}

.stacked-gap > .panel:last-child,
.page-shell > .panel:last-child {
    margin-bottom: 0;
}

.panel-body {
    padding: 20px 20px 18px;
}

.panel-body.tight {
    padding: 14px 18px;
}

.panel-caption {
    margin: 0 0 4px;
    color: var(--bx-text-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.panel-title {
    margin: 0 0 6px;
    color: var(--bx-text-strong);
    font-size: 20px;
    font-weight: 600;
}

.panel-lead {
    margin: 0;
    color: var(--bx-text);
    line-height: 1.5;
}

.grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

.metrics-grid {
    display: grid;
    gap: 12px;
    align-items: start;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

.metric-card {
    display: flex;
    flex-direction: column;
    align-self: start;
    justify-content: flex-start;
    gap: 2px;
    min-height: 0;
    padding: 14px 16px 13px;
    border: 1px solid var(--bx-line);
    border-radius: var(--bx-radius-md);
    background: linear-gradient(180deg, #ffffff 0%, var(--bx-panel-muted) 100%);
}

.status-card {
    border-color: rgba(2, 128, 4, 0.22);
    background: linear-gradient(180deg, #ffffff 0%, #f2f9f2 100%);
}

.status-card.error {
    border-color: #ffd0ce;
    background: linear-gradient(180deg, #ffffff 0%, #fff5f4 100%);
}

.status-card .metric-value {
    font-size: 20px;
}

.status-copy {
    line-height: 1.6;
}

.metric-label {
    margin-bottom: 4px;
    color: var(--bx-text-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    overflow-wrap: anywhere;
}

.metric-value {
    color: var(--bx-text-strong);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.metric-value.compact-value {
    font-size: 18px;
    line-height: 1.35;
}

.metric-note {
    margin-top: 2px;
    color: var(--bx-text);
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

label.field-label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: var(--bx-text);
    font-size: 14px;
    font-weight: 600;
}

.toolbar-search {
    display: grid;
    gap: 8px;
    align-content: start;
    min-width: 0;
    width: 100%;
    margin: 0;
}

.toolbar-search-title {
    color: var(--bx-text-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.toolbar-search .input {
    min-width: 0;
}

.field-help {
    color: var(--bx-text-muted);
    font-size: 12px;
    font-weight: 400;
}

.input,
select.input,
textarea.input {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--bx-line-strong);
    border-radius: var(--bx-radius-sm);
    background: #ffffff;
    color: var(--bx-text-strong);
    font: inherit;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.input:hover,
select.input:hover,
textarea.input:hover {
    border-color: #8f8f8f;
}

.input:focus,
select.input:focus,
textarea.input:focus {
    outline: none;
    border-color: var(--bx-blue);
    box-shadow: 0 0 0 3px rgba(2, 128, 4, 0.16);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 39px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    overflow-wrap: anywhere;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(180deg, var(--bx-blue) 0%, var(--bx-blue-strong) 100%);
    box-shadow: 0 8px 18px rgba(2, 128, 4, 0.24);
}

.btn-secondary {
    color: var(--bx-text);
    background: #ffffff;
    border-color: var(--bx-line-strong);
}

.btn-link {
    color: var(--bx-blue-strong);
    background: transparent;
    border-color: transparent;
    padding-left: 0;
    padding-right: 0;
    min-height: auto;
}

.btn-icon {
    min-width: 39px;
    padding: 0;
    font-size: 18px;
    line-height: 1;
}

.message-stack {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 14px;
}

.message-stack:empty {
    display: none;
    margin-bottom: 0;
}

.message {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 13px 14px;
    border-radius: var(--bx-radius-md);
    border: 1px solid transparent;
}

.message[hidden] {
    display: none;
}

.message::before {
    content: "";
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    margin-top: 5px;
    border-radius: 999px;
}

.message.info {
    color: #216122;
    border-color: #c4dfc4;
    background: var(--bx-green-soft);
}

.message.info::before {
    background: var(--bx-green);
}

.message.error {
    color: #b5342d;
    border-color: #ffd0ce;
    background: var(--bx-red-soft);
}

.message.error::before {
    background: var(--bx-red);
}

body.bitrix-app.is-busy {
    overflow: hidden;
}

.progress-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(70, 70, 70, 0.24);
    backdrop-filter: blur(5px);
}

.progress-overlay[hidden] {
    display: none;
}

.progress-card {
    width: min(460px, calc(100vw - 32px));
    padding: 22px 22px 18px;
    border: 1px solid rgba(2, 128, 4, 0.18);
    border-radius: var(--bx-radius-lg);
    background: linear-gradient(180deg, #ffffff 0%, #f5faf5 100%);
    box-shadow: 0 24px 48px rgba(70, 70, 70, 0.18);
}

.progress-title {
    margin: 0 0 8px;
    color: var(--bx-text-strong);
    font-size: 20px;
    font-weight: 700;
}

.progress-copy {
    margin: 0 0 14px;
    color: var(--bx-text);
    line-height: 1.5;
}

.progress-bar {
    position: relative;
    overflow: hidden;
    height: 12px;
    border-radius: 999px;
    background: #e3ece3;
    box-shadow: inset 0 1px 2px rgba(70, 70, 70, 0.08);
}

.progress-bar-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 42%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(4, 156, 6, 0.2) 0%, var(--bx-blue) 38%, var(--bx-blue-strong) 100%);
    animation: progress-slide 1.35s ease-in-out infinite;
    box-shadow: 0 0 14px rgba(2, 128, 4, 0.28);
}

@keyframes progress-slide {
    0% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(250%);
    }
}

.toggle-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--bx-line-strong);
    border-radius: 999px;
    background: var(--bx-panel-muted);
    color: var(--bx-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.filter-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) repeat(2, minmax(150px, 1fr));
    gap: 12px;
    align-items: end;
}

.filter-toolbar > * {
    min-width: 0;
}

.toolbar-result {
    display: inline-flex;
    align-items: center;
    justify-self: end;
    min-height: 42px;
    padding: 0 2px;
    text-align: right;
}

.table-wrap {
    overflow: auto;
    border: 1px solid var(--bx-line);
    border-radius: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable both-edges;
}

table {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
    background: #ffffff;
}

th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid #ebeff2;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: linear-gradient(180deg, #fafafa 0%, #f1f1f1 100%);
    color: var(--bx-text);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

tbody tr:hover {
    background: #fafafa;
}

.num {
    text-align: right;
    white-space: nowrap;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid #d8d8d8;
    background: #f4f4f4;
    color: var(--bx-text);
    font-size: 12px;
    font-weight: 600;
}

.ok-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid #bed9bf;
    background: var(--bx-green-soft);
    color: var(--bx-blue-strong);
    font-size: 12px;
    font-weight: 700;
}

.small {
    color: var(--bx-text-muted);
    font-size: 13px;
    line-height: 1.45;
}

.empty {
    padding: 30px 18px;
    text-align: center;
    color: var(--bx-text-muted);
}

.inline-form {
    margin: 0;
}

.pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.page-indicator {
    display: inline-flex;
    align-items: center;
    min-height: 39px;
    padding: 0 14px;
    border: 1px solid var(--bx-line);
    border-radius: 999px;
    background: var(--bx-panel-muted);
    color: var(--bx-text-strong);
    font-size: 13px;
    font-weight: 600;
}

.stacked-gap {
    display: grid;
    gap: 16px;
}

.spaced-top {
    margin-top: 14px;
}

.spaced-bottom {
    margin-bottom: 14px;
}

.compact-stack {
    gap: 12px;
}

.compact-stack > .panel {
    margin-bottom: 0;
}

.compact-stack .panel-body {
    padding: 18px;
}

.compact-stack .section-head.compact {
    margin-bottom: 8px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.section-head.compact {
    margin-bottom: 10px;
}

.section-head h2,
.section-head h3 {
    margin: 0;
    color: var(--bx-text-strong);
}

.section-head p {
    margin: 4px 0 0;
    color: var(--bx-text-muted);
}

@media (max-width: 1080px) {
    .workspace-corner-actions,
    .language-switch {
        justify-content: center;
    }
}

@media (max-width: 1120px) {
    .workspace-action-row {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 10px;
    }

    .workspace-action-row .bitrix-tabs,
    .workspace-action-row .workspace-corner-actions {
        grid-column: auto;
        width: min(100%, 720px);
        justify-content: center;
    }

    .workspace-action-row .workspace-corner-actions,
    .workspace-action-row .language-switch {
        justify-content: center;
    }
}

@media (max-width: 960px) {
    .filter-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .filter-toolbar .toolbar-search,
    .filter-toolbar .toolbar-result {
        grid-column: 1 / -1;
    }

    .toolbar-result {
        justify-self: start;
        min-height: 0;
        padding: 0;
        text-align: left;
    }
}

@media (max-width: 1380px) {
    table {
        min-width: 1120px;
    }

    th,
    td {
        padding: 11px 8px;
    }

    th {
        font-size: 11px;
        letter-spacing: 0.02em;
    }
}

@media (max-width: 820px) {
    .workspace-inner,
    .panel-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .workspace-head,
    .section-head {
        flex-direction: column;
    }

    .workspace-head.centered-head {
        align-items: center;
    }

    .hero-actions {
        justify-content: flex-start;
    }

    .hero-actions.centered-actions {
        justify-content: center;
    }

    .workspace-action-row {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .workspace-corner-actions {
        justify-content: center;
        width: 100%;
    }

    .language-switch {
        align-items: center;
        justify-content: center;
    }

    .page-shell {
        padding: 14px 12px 16px;
    }

    .page-shell.narrow-shell {
        width: min(760px, calc(100vw - 12px));
    }

    .page-shell.compact-shell {
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .workspace-logo {
        width: min(320px, 72vw);
        max-height: 72px;
    }

    .workspace-brand {
        padding: 10px 14px;
        border-radius: 18px;
    }

    .toolbar-search {
        width: 100%;
    }
}

@media (max-width: 1280px) {
    .table-wrap.mobile-cards {
        overflow: visible;
        border: none;
        border-radius: 0;
        background: transparent;
    }

    .table-wrap.mobile-cards table,
    .table-wrap.mobile-cards thead,
    .table-wrap.mobile-cards tbody,
    .table-wrap.mobile-cards tr,
    .table-wrap.mobile-cards td {
        display: block;
        width: 100%;
    }

    .table-wrap.mobile-cards table {
        min-width: 0;
        background: transparent;
    }

    .table-wrap.mobile-cards thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .table-wrap.mobile-cards tbody {
        display: grid;
        gap: 14px;
    }

    .table-wrap.mobile-cards tbody tr {
        display: grid;
        gap: 10px 12px;
        position: relative;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: hidden;
        isolation: isolate;
        padding: 18px 16px 16px;
        border: 1px solid #dfe7e1;
        border-radius: 20px;
        background: linear-gradient(180deg, #ffffff 0%, #fbfcfc 100%);
        box-shadow: 0 12px 26px rgba(70, 70, 70, 0.08);
    }

    .table-wrap.mobile-cards tbody tr:hover {
        background: #ffffff;
    }

    .table-wrap.mobile-cards tbody tr::before {
        content: "";
        position: absolute;
        inset: 0 0 auto 0;
        height: 3px;
        background: linear-gradient(90deg, var(--bx-blue) 0%, rgba(4, 156, 6, 0.32) 55%, rgba(4, 156, 6, 0) 100%);
        pointer-events: none;
    }

    .table-wrap.mobile-cards td {
        display: grid;
        gap: 6px;
        padding: 12px 14px;
        border-bottom: none;
        align-items: start;
        border: 1px solid #e4ebe6;
        border-radius: 16px;
        background: linear-gradient(180deg, #ffffff 0%, #f8fbf9 100%);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
        min-width: 0;
    }

    .table-wrap.mobile-cards td > * {
        min-width: 0;
    }

    .table-wrap.mobile-cards .deal-card-check {
        order: 0;
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        justify-content: center;
        align-self: start;
        justify-self: start;
        width: 30px;
        min-height: 30px;
        padding: 0;
        margin: 0;
        border: 1px solid #dfe8df;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 4px 12px rgba(70, 70, 70, 0.08);
    }

    .table-wrap.mobile-cards .deal-card-check input[type="checkbox"] {
        width: 22px;
        height: 22px;
    }

    .table-wrap.mobile-cards td::before {
        content: attr(data-label);
        color: var(--bx-text-muted);
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .table-wrap.mobile-cards .deal-card-title {
        order: 1;
        grid-column: 1 / -1;
        gap: 6px;
        padding: 12px 14px;
        border-color: #d9e4dc;
        background: linear-gradient(180deg, #ffffff 0%, #f5f8f6 100%);
        color: var(--bx-text-strong);
        font-size: clamp(18px, 4.5vw, 21px);
        font-weight: 700;
        line-height: 1.3;
    }

    .table-wrap.mobile-cards .deal-card-check::before {
        content: none;
    }

    .table-wrap.mobile-cards .deal-card-id,
    .table-wrap.mobile-cards .deal-card-currency {
        order: 3;
        gap: 6px;
    }

    .table-wrap.mobile-cards .deal-card-currency {
        order: 4;
    }

    .table-wrap.mobile-cards .deal-card-id,
    .table-wrap.mobile-cards .deal-card-currency,
    .table-wrap.mobile-cards .deal-card-debtor,
    .table-wrap.mobile-cards .deal-card-iban,
    .table-wrap.mobile-cards .deal-card-mandate {
        color: var(--bx-text-strong);
        line-height: 1.45;
    }

    .table-wrap.mobile-cards .deal-card-id,
    .table-wrap.mobile-cards .deal-card-currency {
        min-height: 0;
    }

    .table-wrap.mobile-cards .deal-card-amount {
        order: 2;
        grid-column: 1 / -1;
        gap: 6px;
        padding: 12px 14px;
        border: 1px solid rgba(2, 128, 4, 0.16);
        border-radius: 16px;
        background: linear-gradient(180deg, rgba(232, 245, 232, 0.96) 0%, rgba(255, 255, 255, 0.99) 100%);
    }

    .table-wrap.mobile-cards .deal-card-amount::before {
        color: var(--bx-blue-strong);
    }

    .table-wrap.mobile-cards .deal-card-amount,
    .table-wrap.mobile-cards .deal-card-amount .num {
        text-align: left;
    }

    .table-wrap.mobile-cards .deal-card-amount {
        color: var(--bx-text-strong);
        font-size: clamp(17px, 4.8vw, 22px);
        font-weight: 700;
        line-height: 1.25;
        overflow-wrap: anywhere;
        word-break: break-word;
        font-variant-numeric: tabular-nums;
    }

    .table-wrap.mobile-cards .deal-card-id {
        grid-column: 1 / 2;
    }

    .table-wrap.mobile-cards .deal-card-currency {
        grid-column: 2 / 3;
    }

    .table-wrap.mobile-cards .deal-card-debtor {
        order: 5;
        grid-column: 1 / -1;
    }

    .table-wrap.mobile-cards .deal-card-iban {
        order: 6;
        grid-column: 1 / -1;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .table-wrap.mobile-cards .deal-card-mandate {
        order: 7;
        grid-column: 1 / -1;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .table-wrap.mobile-cards .deal-card-status {
        order: 8;
        grid-column: 1 / -1;
        gap: 8px;
    }

    .table-wrap.mobile-cards .deal-card-status .pill,
    .table-wrap.mobile-cards .deal-card-status .ok-pill {
        width: fit-content;
        max-width: 100%;
    }

    .table-wrap.mobile-cards .num {
        text-align: left;
        white-space: normal;
    }
}

@media (max-width: 640px) {
    .workspace-inner,
    .panel-body,
    .compact-stack .panel-body {
        padding: 15px 14px;
    }

    .workspace-title {
        font-size: clamp(22px, 7vw, 28px);
    }

    .panel-title,
    .progress-title {
        font-size: 18px;
    }

    .metric-value,
    .status-card .metric-value {
        font-size: 19px;
    }

    .bitrix-tabs {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .bitrix-tab,
    .workspace-corner-actions > .btn {
        width: 100%;
    }

    .language-switch {
        width: 100%;
    }

    .language-switch-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .language-switch-form,
    .language-switch-button {
        width: 100%;
    }

    .toolbar-search {
        gap: 6px;
    }

    .table-wrap.mobile-cards tbody tr {
        gap: 9px;
        grid-template-columns: 1fr;
        padding: 16px 14px 14px;
    }

    .table-wrap.mobile-cards .deal-card-title,
    .table-wrap.mobile-cards .deal-card-amount,
    .table-wrap.mobile-cards .deal-card-debtor,
    .table-wrap.mobile-cards .deal-card-iban,
    .table-wrap.mobile-cards .deal-card-mandate,
    .table-wrap.mobile-cards .deal-card-status {
        grid-column: 1 / -1;
    }

    .table-wrap.mobile-cards .deal-card-id,
    .table-wrap.mobile-cards .deal-card-currency {
        grid-column: 1 / -1;
        gap: 6px;
    }

    .filter-toolbar,
    .inline-actions,
    .pager {
        width: 100%;
    }

    .filter-toolbar {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .inline-actions > .btn,
    .filter-toolbar > label,
    .filter-toolbar > .toggle-chip,
    .toolbar-result {
        width: 100%;
    }

    .toggle-chip {
        justify-content: flex-start;
    }

    .toolbar-result {
        justify-self: stretch;
        text-align: left;
    }

    .pager {
        flex-wrap: wrap;
    }

    .page-indicator {
        width: 100%;
        justify-content: center;
    }

    .progress-card {
        padding: 18px 16px 16px;
    }

    .table-wrap.mobile-cards td {
        gap: 6px;
        padding: 11px 12px;
    }
}
