/*
 * KOZ.WH — стили поверх Tabler 1.4 (визуально как KOZ.ADMIN.WEB).
 * Разделы: база · вход · меню · шапка страницы · формы и фильтры · редактор строк документа · главная · печать.
 * Ширина: всё должно работать от 360 px без горизонтальной прокрутки страницы (таблицы — внутри .table-responsive).
 */

/* ---------- База ---------- */

:root {
    /* мост Bootstrap → Tabler: tom-select (тема bootstrap5) берёт цвета из --bs-* */
    --bs-body-bg: var(--tblr-bg-surface, #fff);
    --bs-border-color-translucent: var(--tblr-border-color, rgba(0, 0, 0, .175));
    --bs-border-color: var(--tblr-border-color, #dee2e6);
    --bs-border-radius: var(--tblr-border-radius, 6px);
    --wh-touch: 2.75rem; /* минимальная высота элементов управления на сенсорных экранах */
}

body {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 26px;
}

:root:not([data-bs-theme="dark"]) body.wh-app {
    background-color: #ededed;
}

.page-header .container-xl,
.page-body .container-xl,
.footer .container-xl {
    max-width: 1392px;
}

.min-w-0 { min-width: 0; }
.wh-flip { transform: scaleX(-1); }
.icon-inline { width: 1rem; height: 1rem; vertical-align: -.15em; }

.table-scroll-y {
    max-height: calc(100vh - 260px);
    overflow: auto;
}

.table-scroll-y thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--tblr-bg-surface, #fff);
}

/* числа в таблицах — по правому краю, моноширинные цифры */
.wh-num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.wh-doctype {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.wh-doctype .icon {
    width: 1.1rem;
    height: 1.1rem;
}

.wh-avatar {
    background: var(--tblr-primary-lt, #e9f0f9);
    color: var(--tblr-primary, #066fd1);
    font-weight: 600;
}

.wh-demo-badge {
    font-weight: 600;
    letter-spacing: .01em;
}

/* jquery-validation-unobtrusive → вид Tabler */
.input-validation-error {
    border-color: var(--tblr-danger, #d63939) !important;
}

.field-validation-error {
    display: block;
    margin-top: .25rem;
    color: var(--tblr-danger, #d63939);
    font-size: .875rem;
}

.validation-summary-valid { display: none; }
.validation-summary-errors ul { margin: 0; padding-left: 1.1rem; }
.alert .validation-summary-errors ul { padding-left: 1rem; }
div[class*="validation-summary"].alert:has(.validation-summary-valid),
.alert.validation-summary-valid { display: none; }

/* сенсорные экраны — крупнее элементы управления */
@media (pointer: coarse) {
    .form-control,
    .form-select,
    .btn:not(.btn-sm):not(.btn-close),
    .ts-wrapper .ts-control {
        min-height: var(--wh-touch);
    }

    .dropdown-item {
        padding-top: .6rem;
        padding-bottom: .6rem;
    }

    /* мелкие кнопки действий в строках списков и карточек — не меньше 44 px */
    .btn-sm,
    .btn-icon {
        min-height: var(--wh-touch);
        min-width: var(--wh-touch);
    }

    /* кнопка меню и номера страниц — единственная навигация на телефоне */
    .navbar-toggler,
    .page-link {
        min-width: var(--wh-touch);
        min-height: var(--wh-touch);
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .navbar-vertical .navbar-nav .nav-link,
    .navbar-vertical .navbar-nav .dropdown-item {
        min-height: var(--wh-touch);
    }
}

/* подсказка под полем — мельче основного текста */
.form-hint { font-size: .875em; }

/* ---------- Вход (как KOZ.ADMIN.WEB) ---------- */

:root {
    --auth-bg: linear-gradient(180deg, #f4f7fb 0%, #edf2f7 100%);
    --auth-card-bg: rgba(255, 255, 255, .94);
    --auth-shadow: 0 24px 60px rgba(15, 23, 42, .16);
    --auth-text: #182433;
    --auth-muted: #5f6b7a;
    --auth-primary: #0BBED1;
    --auth-primary-dark: #0899a8;
}

.auth-shell {
    min-height: 100vh;
    background: var(--auth-bg);
    position: relative;
    overflow: hidden;
    font-family: "Inter", system-ui, sans-serif;
}

.auth-shell::before,
.auth-shell::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(6px);
    opacity: .9;
    pointer-events: none;
}

.auth-shell::before {
    width: 28rem;
    height: 28rem;
    top: -10rem;
    right: -8rem;
    background: radial-gradient(circle, rgba(32, 107, 196, .18) 0%, rgba(32, 107, 196, 0) 70%);
}

.auth-shell::after {
    width: 24rem;
    height: 24rem;
    bottom: -8rem;
    left: -6rem;
    background: radial-gradient(circle, rgba(12, 166, 120, .12) 0%, rgba(12, 166, 120, 0) 70%);
}

.auth-shell-inner {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 28rem;
    margin: 0 auto;
    min-height: calc(100vh - 3rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-stage { display: block; width: 100%; }

.auth-card {
    width: 100%;
    background: var(--auth-card-bg);
    border: 1px solid rgba(24, 36, 51, .08);
    border-radius: 1.5rem;
    box-shadow: var(--auth-shadow);
    overflow: hidden;
    backdrop-filter: blur(18px);
    color: var(--auth-text);
}

.auth-card-body {
    padding: 1.6rem 1.4rem 1.35rem;
    display: flex;
    flex-direction: column;
}

.auth-kicker {
    display: inline-block;
    margin-bottom: .75rem;
    padding: .3rem .65rem;
    border-radius: 999px;
    background: rgba(32, 107, 196, .08);
    color: var(--auth-primary-dark);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.auth-title {
    margin: 0 0 .45rem;
    color: var(--auth-text);
    font-family: "Manrope", "Inter", system-ui, sans-serif;
    font-size: clamp(1.6rem, 4vw, 2rem);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -.03em;
    text-wrap: balance;
}

.auth-description {
    margin: 0 0 1.1rem;
    color: var(--auth-muted);
    font-size: .93rem;
    line-height: 1.55;
}

.auth-form-grid { display: grid; gap: .85rem; width: 100%; min-width: 0; }
.auth-field { display: grid; gap: .38rem; width: 100%; min-width: 0; }

.auth-label {
    color: var(--auth-text);
    font-size: .88rem;
    font-weight: 600;
}

.auth-input {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: .82rem .9rem;
    border: 1px solid rgba(24, 36, 51, .14);
    border-radius: .85rem;
    background: rgba(255, 255, 255, .92);
    color: var(--auth-text);
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.4;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
    appearance: none;
}

.auth-input:focus {
    outline: none;
    border-color: rgba(32, 107, 196, .55);
    box-shadow: 0 0 0 4px rgba(32, 107, 196, .12);
    background: #fff;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-top: .85rem;
    color: var(--auth-muted);
    font-size: .9rem;
}

.auth-check input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--auth-primary);
}

.auth-button {
    width: 100%;
    padding: .82rem 1rem;
    border: 0;
    border-radius: .85rem;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-dark) 100%);
    color: #fff;
    font-size: .96rem;
    font-family: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(32, 107, 196, .24);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.auth-button:hover {
    color: #fff;
    filter: brightness(1.02);
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(32, 107, 196, .28);
}

.auth-button:active { transform: translateY(0); }
.auth-actions { margin-top: 1.15rem; }

.auth-footer {
    margin-top: 1.15rem;
    color: var(--auth-muted);
    font-size: .85rem;
    line-height: 1.5;
}

.auth-errors {
    margin-bottom: 1rem;
    padding: .75rem .85rem;
    border-radius: .9rem;
    font-size: .9rem;
    background: rgba(214, 57, 57, .08);
    border: 1px solid rgba(214, 57, 57, .18);
    color: #a52834;
}

.auth-errors ul { margin: 0; padding-left: 1rem; }

.auth-demo summary {
    cursor: pointer;
    color: var(--auth-muted);
    font-size: .85rem;
}

.auth-demo-list {
    display: grid;
    gap: .35rem;
    margin-top: .5rem;
}

.auth-demo-user {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .25rem .75rem;
    padding: .45rem .7rem;
    border: 1px solid rgba(24, 36, 51, .1);
    border-radius: .6rem;
    background: rgba(255, 255, 255, .7);
    font-size: .82rem;
    line-height: 1.3;
    text-align: left;
    color: var(--auth-text);
    cursor: pointer;
}

.auth-demo-user:hover { border-color: var(--auth-primary); }

.auth-logo-lockup {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: .5rem;
}

.auth-logo-lockup img {
    user-select: none;
    -webkit-user-drag: none;
    opacity: 0;
    filter: blur(2px);
    transform: translateY(3px) scale(.98);
    animation: authLogoReveal .5s cubic-bezier(.16, .84, .28, 1) .1s forwards;
}

@keyframes authLogoReveal {
    to { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .auth-logo-lockup img { opacity: 1; filter: none; transform: none; animation: none; }
}

@media (max-width: 575.98px) {
    .auth-wrap { min-height: auto; }
    .auth-shell-inner { padding-top: 1rem; padding-bottom: 1rem; }
    .auth-card-body { padding: 1.2rem 1rem 1rem; }
}

/* ---------- Меню ---------- */

.navbar-vertical .dropdown-item {
    white-space: normal;
    line-height: 1.3;
}

/* бейджи счётчиков в боковом меню — в строке справа (у Tabler они абсолютные и выходят за край панели) */
.navbar.navbar-vertical .navbar-nav .dropdown-item .badge,
.navbar.navbar-vertical .navbar-nav .nav-link .badge {
    position: static;
    transform: none;
    flex-shrink: 0;
    margin-left: auto;
    min-width: 1.35rem;
}

.navbar.navbar-vertical .navbar-nav .nav-link.dropdown-toggle .badge { margin-right: .35rem; }

.navbar-vertical .wh-nav-header {
    padding-top: .65rem;
    padding-bottom: .25rem;
    font-size: .7rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    opacity: .6;
}

.wh-nav-item-icon {
    display: inline-flex;
    margin-right: .5rem;
    opacity: .75;
}

.wh-brand a { text-decoration: none; }

@media (max-width: 991.98px) {
    /* мобильная шапка: логотип слева, бейдж и меню пользователя справа */
    .navbar-vertical .wh-brand { margin-right: auto; padding-left: .5rem; }
    .navbar-vertical .wh-demo-badge { font-size: .65rem; }
}

/* ---------- Шапка страницы ---------- */

.page-header .breadcrumb { font-size: .85rem; flex-wrap: wrap; }

.wh-page-actions { justify-content: flex-start; }

@media (max-width: 575.98px) {
    .page-header .page-title { font-size: 1.25rem; line-height: 1.3; }

    /* кнопки действий страницы — во всю ширину, основное действие первым */
    .wh-page-actions > .btn,
    .wh-page-actions > form,
    .wh-page-actions > .dropdown { flex: 1 1 100%; }
    .wh-page-actions > form > .btn,
    .wh-page-actions > .dropdown > .btn { width: 100%; }
}

.wh-flash { margin-bottom: 1rem; }

/* ---------- Формы, фильтры, карточки ---------- */

/* Панель фильтров: на телефоне сворачивается за кнопку «Фильтры» (см. ui-guide) */
.wh-filters .form-label { margin-bottom: .25rem; font-size: .8rem; color: var(--tblr-secondary); }

@media (min-width: 768px) {
    .wh-filters-toggle { display: none !important; }
}

.card-footer.wh-form-footer {
    display: flex;
    flex-direction: column-reverse;
    gap: .5rem;
}

@media (min-width: 576px) {
    .card-footer.wh-form-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* Липкая панель действий формы на телефоне */
@media (max-width: 767.98px) {
    .wh-sticky-actions {
        position: sticky;
        bottom: 0;
        z-index: 1020;
        background: var(--tblr-bg-surface, #fff);
        box-shadow: 0 -6px 16px rgba(24, 36, 51, .08);
    }
}

/*
 * Список-таблица, которая на телефоне становится карточками: строка — сетка 2 колонки,
 * подпись ячейки из data-label. Первая ячейка, .wh-cell-wide и .wh-cell-actions — во всю ширину.
 * <table class="table card-table table-vcenter wh-table-stack"> ... <td data-label="Склад">…</td>
 */
@media (max-width: 767.98px) {
    .wh-table-stack,
    .wh-table-stack tbody { display: block; }
    .wh-table-stack thead { display: none; }

    .wh-table-stack tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .35rem .75rem;
        padding: .75rem 1rem;
        border-bottom: 1px solid var(--tblr-border-color);
    }

    .wh-table-stack td {
        display: block;
        min-width: 0;
        padding: 0 !important;
        border: 0 !important;
        text-align: left !important;
    }

    .wh-table-stack td[data-label]::before {
        content: attr(data-label);
        display: block;
        font-size: .7rem;
        line-height: 1rem;
        letter-spacing: .04em;
        text-transform: uppercase;
        color: var(--tblr-secondary);
    }

    .wh-table-stack td:first-child,
    .wh-table-stack td.wh-cell-wide,
    .wh-table-stack td.wh-cell-actions { grid-column: 1 / -1; }

    .wh-table-stack td.wh-cell-actions:empty,
    .wh-table-stack td:empty,
    .wh-table-stack td.wh-m-hide { display: none; }
}

/* «ключ — значение» в карточках документов */
.wh-props {
    display: grid;
    grid-template-columns: minmax(7rem, max-content) minmax(0, 1fr);
    gap: .35rem 1rem;
    margin: 0;
}

.wh-props dt { font-weight: 400; color: var(--tblr-secondary); }
.wh-props dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 575.98px) {
    .wh-props { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .wh-props dd { margin-bottom: .5rem; }
}

/* tom-select: в стиле Tabler — той же высоты, что и обычные поля; выбранное значение в одну строку (длинное — с многоточием) */
.ts-wrapper:not(.form-select):not(.form-control) .ts-control { min-height: calc(1.4285714em + 1.125rem + 2px); }
.ts-wrapper.single .ts-control { flex-wrap: nowrap; }
.ts-wrapper.single .ts-control > .item { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-wrapper.is-invalid .ts-control { border-color: var(--tblr-danger, #d63939); }

@media (pointer: fine) {
    .ts-wrapper.form-select .ts-control { min-height: 2.5rem; align-items: center; }
}
.ts-dropdown { z-index: 1060; font-size: inherit; }

/* tom-select (тема bootstrap5) задаёт цвет текста жёстко (#343a40) — берём цвета Tabler, иначе в тёмной теме
   выбранное значение, ввод и варианты почти не видны */
.ts-control,
.ts-control input,
.ts-dropdown,
.ts-wrapper.multi .ts-control > div { color: var(--tblr-body-color); }
.ts-control input::placeholder { color: var(--tblr-secondary); opacity: 1; }
.ts-dropdown { background: var(--tblr-bg-surface); border-color: var(--tblr-border-color); }
.ts-dropdown .active { background-color: var(--tblr-active-bg, rgba(var(--tblr-primary-rgb), .08)); color: var(--tblr-body-color); }
.ts-wrapper.multi .ts-control > div { background: var(--tblr-bg-surface-secondary); border-color: var(--tblr-border-color); }
.ts-wrapper .dropdown-header-close { color: var(--tblr-body-color); }
[data-bs-theme="dark"] .ts-wrapper:not(.form-control):not(.form-select).single .ts-control {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23dce1e7' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
}
.ts-dropdown .option { line-height: 1.35; }
.ts-dropdown .wh-opt-meta { font-size: .8rem; color: var(--tblr-secondary); }
.ts-dropdown .no-results { padding: .5rem .75rem; color: var(--tblr-secondary); }

/* ---------- Редактор строк документа (_DocumentLines) ---------- */

.wh-lines { min-width: 0; }

.wh-lines-toolbar {
    display: flex;
    gap: .5rem;
    align-items: stretch;
    margin-bottom: .5rem;
}

.wh-lines-picker { flex: 1 1 auto; min-width: 0; }

.wh-lines-frequent-btn { flex: 0 0 auto; gap: .35rem; }

.wh-lines-frequent {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    padding: .5rem 0 .75rem;
}

.wh-lines-frequent .wh-chip {
    max-width: 100%;
    white-space: normal;
    text-align: left;
    line-height: 1.25;
}

.wh-lines-head {
    display: none;
    color: var(--tblr-secondary);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .5rem 0;
    border-bottom: 1px solid var(--tblr-border-color);
}

.wh-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "main remove"
        "controls controls";
    gap: .5rem .75rem;
    padding: .75rem 0;
    border-bottom: 1px solid var(--tblr-border-color);
}

.wh-line.wh-line-flash { animation: whLineFlash 1.2s ease; }

@keyframes whLineFlash {
    from { background: var(--tblr-yellow-lt, #fef6e0); }
    to { background: transparent; }
}

.wh-line-no {
    display: none;
    grid-area: no;
    color: var(--tblr-secondary);
    font-variant-numeric: tabular-nums;
}

.wh-line-main { grid-area: main; min-width: 0; }

.wh-line-name {
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.wh-line-meta,
.wh-line-note {
    font-size: .8rem;
    line-height: 1.35;
    color: var(--tblr-secondary);
    overflow-wrap: anywhere;
}

.wh-line-note { color: var(--tblr-body-color); }

.wh-line-remove { grid-area: remove; align-self: start; }

.wh-line-controls {
    grid-area: controls;
    display: flex;
    gap: .5rem;
    align-items: flex-start;
    min-width: 0;
}

.wh-line-unit { flex: 1 1 5rem; min-width: 0; max-width: 9rem; }

.wh-line-qty { flex: 0 1 auto; min-width: 0; margin-left: auto; }

.wh-stepper {
    display: flex;
    align-items: stretch;
}

.wh-stepper .btn {
    flex: 0 0 var(--wh-touch);
    width: var(--wh-touch);
    min-height: var(--wh-touch);
    padding: 0;
}

.wh-stepper .btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.wh-stepper .btn:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; }

.wh-stepper .form-control {
    width: 5.5rem;
    min-width: 0;
    min-height: var(--wh-touch);
    margin: 0 -1px;
    border-radius: 0;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    position: relative;
    z-index: 1;
}

.wh-line-unit .form-select { min-height: var(--wh-touch); }

.wh-line-hint {
    min-height: 0;
    margin-top: .2rem;
    font-size: .78rem;
    line-height: 1.3;
    color: var(--tblr-secondary);
    text-align: right;
}

.wh-line-hint.is-warning { color: var(--tblr-warning, #f59f00); }
.wh-line-hint.is-error { color: var(--tblr-danger, #d63939); }

.wh-lines-empty {
    padding: 1.25rem .5rem;
    text-align: center;
    color: var(--tblr-secondary);
    border-bottom: 1px dashed var(--tblr-border-color);
}

.wh-lines-summary {
    padding-top: .5rem;
    font-size: .85rem;
    color: var(--tblr-secondary);
}

@media (max-width: 359.98px) {
    .wh-stepper .form-control { width: 4.25rem; }
}

@media (min-width: 768px) {
    .wh-lines-head {
        display: grid;
        grid-template-columns: 2rem minmax(0, 1fr) 7.5rem 12.5rem 2.75rem;
        gap: .75rem;
    }

    .wh-lines-head > div:nth-child(3),
    .wh-lines-head > div:nth-child(4) { text-align: center; }

    .wh-line {
        grid-template-columns: 2rem minmax(0, 1fr) 20.75rem 2.75rem;
        grid-template-areas: "no main controls remove";
        align-items: center;
    }

    .wh-line-no { display: block; }
    .wh-line-controls { align-items: center; }
    .wh-line-unit { flex: 0 0 7.5rem; max-width: none; }
    .wh-line-qty { margin-left: 0; }
    .wh-stepper .btn,
    .wh-stepper .form-control,
    .wh-line-unit .form-select { min-height: 2.5rem; }
    .wh-stepper .btn { flex-basis: 2.5rem; width: 2.5rem; }
}

/* добавленная строка прокручивается в видимую часть — над липким подвалом формы */
.wh-line { scroll-margin-top: 1rem; scroll-margin-bottom: 9rem; }

/* «Частые» на телефоне — лента из трёх рядов с прокруткой вбок: строки документа остаются рядом */
@media (max-width: 767.98px) {
    .wh-lines-frequent:not(.d-none) {
        display: grid;
        grid-auto-flow: column;
        grid-template-rows: repeat(3, auto);
        grid-auto-columns: minmax(9rem, 72%);
        align-items: stretch;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x proximity;
        padding-bottom: .5rem;
        -webkit-overflow-scrolling: touch;
    }

    .wh-lines-frequent .wh-chip {
        scroll-snap-align: start;
        justify-content: flex-start;
        min-height: var(--wh-touch);
    }

    .wh-lines-frequent > div { grid-row: 1 / -1; }
}

/* ---------- Главная ---------- */

.wh-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: .75rem;
}

/* на планшете и десктопе плитки шире, чтобы «Инвентаризация» и «Перемещение» не делились переносом */
@media (min-width: 576px) {
    .wh-quick-grid { grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); }
    .wh-quick > span:last-child { hyphens: manual; overflow-wrap: normal; }
}

.wh-quick {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem;
    border: 1px solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius-lg, 8px);
    color: inherit;
    text-decoration: none;
    min-height: var(--wh-touch);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.wh-quick:hover {
    color: inherit;
    text-decoration: none;
    border-color: var(--tblr-primary);
    box-shadow: var(--tblr-shadow-card, 0 2px 4px rgba(0, 0, 0, .04));
}

.wh-quick .avatar { flex-shrink: 0; }
.wh-quick > span:last-child { min-width: 0; line-height: 1.25; overflow-wrap: anywhere; hyphens: auto; }

@media (max-width: 575.98px) {
    .wh-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
    .wh-quick { flex-direction: column; justify-content: center; text-align: center; gap: .4rem; padding: .75rem .5rem; font-size: .9rem; }
}

/* строка-ссылка таблицы (tr[data-wh-href]) — открывается кликом по строке */
tr[data-wh-href] { cursor: pointer; }

/* кнопка, нажатая для отправки формы: ждём ответа сервера */
.btn.wh-submitting { pointer-events: none; opacity: .75; }

/* ---------- Печать ---------- */

@media print {
    body.wh-app { background: #fff !important; color: #000 !important; font-size: 11pt; line-height: 1.35; }
    .navbar-vertical ~ .page-wrapper { margin-left: 0 !important; }
    .page-header, .footer, .btn, .wh-filters { display: none !important; }
    /* печать всегда в светлой палитре (wh.js на время печати включает светлую тему; это — запасной вариант) */
    .card, .card-body, .card-header, .card-footer { background: #fff !important; color: #000 !important; }
    .card { box-shadow: none !important; border: 0 !important; }
}

/* ---- Логотип KOZ (Pages/Shared/_Logo.cshtml, _AuthLogo.cshtml; файлы — wwwroot/img/brand) ---- */
.wh-logo { display: inline-flex; align-items: center; gap: .65rem; line-height: 1; }
.wh-logo-mark { display: block; height: 30px; width: auto; }
.wh-logo-caption {
    font-family: "Manrope", "Inter", system-ui, sans-serif;
    font-weight: 600; font-size: .95rem; letter-spacing: .01em;
    padding-left: .65rem; border-left: 1px solid rgba(255, 255, 255, .28);
}
.wh-logo-sidebar { color: #fff; }
@media (max-width: 991.98px) {
    .wh-logo-sidebar .wh-logo-mark { height: 26px; }
}
.wh-auth-logo { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto; }
.wh-auth-logo-dark { display: none; }
[data-bs-theme="dark"] .wh-auth-logo-light { display: none; }
[data-bs-theme="dark"] .wh-auth-logo-dark { display: block; }
