:root {
    --sidebar-width: 270px;
    --bg: #f5f7fb;
    --dark: #172033;
    --muted: #6c757d;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: #1f2937; }
a { text-decoration: none; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-width); background: var(--dark); color: #fff; position: fixed; inset: 0 auto 0 0; overflow-y: auto; padding: 18px 14px; z-index: 1000; }
.brand { font-size: 20px; font-weight: 700; margin-bottom: 18px; padding: 8px 10px; }
.brand a { color: #fff; }
.nav-link { display: block; color: rgba(255,255,255,.78); border-radius: 10px; padding: 10px 12px; margin-bottom: 4px; }
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,.12); }
.main { margin-left: var(--sidebar-width); width: calc(100% - var(--sidebar-width)); }
.topbar { height: 64px; background: #fff; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 900; }
.page-title { font-size: 20px; font-weight: 700; }
.userbox { display: flex; align-items: center; gap: 10px; color: var(--muted); min-width: 0; }
.userbox a { color: #334155; }
.userbox-profile,
.userbox-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.userbox-profile {
    gap: 8px;
    max-width: 280px;
    padding: 5px 7px 5px 6px;
}
.userbox-action {
    width: 40px;
    padding: 0;
}
.userbox-profile:hover,
.userbox-action:hover {
    color: #0f172a;
    background: #fff;
    border-color: #c7d2fe;
    box-shadow: 0 12px 26px rgba(37, 99, 235, .12);
    transform: translateY(-1px);
}
.userbox-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #eef2ff;
    color: #2563eb;
    font-size: 15px;
    line-height: 1;
}
.userbox-svg-icon {
    width: 16px;
    height: 16px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.userbox-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}
.userbox-badge {
    min-width: 26px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 0 8px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}
.userbox-badge.has-items {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .25);
}
.userbox-logout:hover {
    border-color: #fecaca;
}
.userbox-logout:hover .userbox-icon {
    background: #fee2e2;
    color: #dc2626;
}
.content { padding: 24px; }
.stat-card { background: #fff; border: 0; border-radius: 16px; box-shadow: 0 8px 22px rgba(15, 23, 42, .06); }
.stat-card .value { font-size: 30px; font-weight: 800; }
.card { border: 0; border-radius: 16px; box-shadow: 0 8px 22px rgba(15, 23, 42, .05); }
.table { background: #fff; }
.table-responsive { border-radius: 14px; overflow: auto; box-shadow: 0 8px 22px rgba(15, 23, 42, .04); }
.btn-group form { display: inline-block; }
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(135deg, #172033, #2e5aac); }
.login-card { max-width: 430px; width: 100%; background: #fff; padding: 28px; border-radius: 18px; box-shadow: 0 16px 50px rgba(0,0,0,.25); }
.installer-shell { max-width: 980px; margin: 34px auto; padding: 0 16px; }
@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); transition: .2s ease; }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .main { margin-left: 0; width: 100%; }
    .content { padding: 16px; }
    .topbar { padding: 0 14px; gap: 12px; }
    .page-title { font-size: 17px; }
    .userbox-profile { max-width: 190px; }
}
@media (max-width: 575px) {
    .userbox { gap: 6px; }
    .userbox-profile { max-width: 132px; }
    .userbox-action { width: 36px; min-height: 36px; }
    .userbox-icon { width: 26px; height: 26px; font-size: 14px; }
    .userbox-badge { min-width: 22px; height: 22px; padding: 0 6px; }
}
.nav-section { margin: 18px 10px 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.45); }


/* v1.0.9: вкладки внутри контента не должны наследовать белый цвет бокового меню */
.content .nav-tabs .nav-link,
.settings-tabs .nav-link {
    color: #495057 !important;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-bottom-color: #dee2e6;
    border-radius: 10px 10px 0 0;
    padding: 12px 18px;
    font-weight: 500;
    margin-right: 8px;
    margin-bottom: -1px;
}

.content .nav-tabs .nav-link:hover,
.settings-tabs .nav-link:hover {
    color: #212529 !important;
    background: #e9ecef;
    border-color: #ced4da;
}

.content .nav-tabs .nav-link.active,
.settings-tabs .nav-link.active {
    color: #212529 !important;
    background: #ffffff;
    border-color: #dee2e6 #dee2e6 #ffffff;
    font-weight: 600;
}

.content .nav-tabs .nav-link:focus,
.settings-tabs .nav-link:focus {
    box-shadow: none;
    outline: none;
}

@media (max-width: 575px) {
    .content .nav-tabs,
    .settings-tabs {
        gap: 8px;
        border-bottom: 0;
    }
    .content .nav-tabs .nav-item,
    .settings-tabs .nav-item {
        width: 100%;
    }
    .content .nav-tabs .nav-link,
    .settings-tabs .nav-link {
        width: 100%;
        border-radius: 10px;
        margin-right: 0;
        margin-bottom: 0;
    }
}


/* v1.0.10: адаптивные таблицы и защита страницы от горизонтального выезда */
.main,
.content,
.card,
.card-body,
.row,
[class^="col-"],
[class*=" col-"] {
    min-width: 0;
}

.main,
.content {
    max-width: 100%;
    overflow-x: hidden;
}

.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.table-responsive > .table {
    margin-bottom: 0;
}

.table th,
.table td {
    overflow-wrap: anywhere;
    word-break: normal;
}

.table td code,
.table th code,
.settings-info-table code {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.settings-info-table {
    table-layout: fixed;
    width: 100%;
}

.settings-info-table th {
    width: 42%;
    min-width: 130px;
    white-space: normal;
}

.settings-info-table td {
    width: 58%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 575px) {
    .content {
        padding-left: 12px;
        padding-right: 12px;
    }
    .table th,
    .table td {
        font-size: 13px;
    }
    .settings-info-table th,
    .settings-info-table td {
        display: block;
        width: 100%;
    }
    .settings-info-table tr {
        display: block;
        padding: 8px 0;
        border-bottom: 1px solid #e5e7eb;
    }
    .settings-info-table tr:last-child {
        border-bottom: 0;
    }
}

/* v1.0.11: компактные таблицы справочников и CRUD-разделов */
.app-table-wrap {
    border-radius: 14px;
    background: #fff;
}

.app-table {
    margin-bottom: 0;
    min-width: 920px;
    width: 100%;
}

.app-table th,
.app-table td {
    padding: 12px 14px;
    vertical-align: middle;
}

.app-table .col-id,
.app-table .col-num,
.app-table .col-type,
.app-table .col-status,
.app-table .col-actions,
.app-table .col-inn,
.app-table .col-phone,
.app-table .col-rating,
.app-table .col-money {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.app-table .col-id { width: 1%; min-width: 54px; }
.app-table .col-num { width: 1%; min-width: 72px; }
.app-table .col-type { width: 1%; min-width: 118px; }
.app-table .col-status { width: 1%; min-width: 112px; }
.app-table .col-inn { width: 1%; min-width: 120px; }
.app-table .col-phone { width: 1%; min-width: 142px; }
.app-table .col-rating { width: 1%; min-width: 90px; }
.app-table .col-money { width: 1%; min-width: 120px; text-align: right; }
.app-table .col-actions { width: 1%; min-width: 178px; }

.crud-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.crud-actions form {
    display: inline-flex;
    margin: 0;
}

.crud-actions .btn {
    white-space: nowrap;
}

.app-table .badge {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .01em;
}

@media (max-width: 767px) {
    .app-table {
        min-width: 760px;
    }
    .app-table th,
    .app-table td {
        padding: 10px 12px;
    }
    .crud-actions .btn {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* v1.0.13: сгруппированная и сворачиваемая навигация */
.nav-group {
    margin: 8px 0 10px;
}

.nav-group-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,.72);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 10px 8px;
    border-radius: 10px;
    text-align: left;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: none;
    cursor: pointer;
}

.nav-group-toggle:hover,
.nav-group.is-open > .nav-group-toggle {
    color: #fff;
    background: rgba(255,255,255,.08);
}

.nav-group-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-group-chevron {
    flex: 0 0 auto;
    transition: transform .18s ease;
    opacity: .85;
}

.nav-group:not(.is-open) .nav-group-chevron {
    transform: rotate(-90deg);
}

.nav-group-items {
    display: none;
    padding-left: 8px;
    margin-top: 4px;
}

.nav-group.is-open .nav-group-items {
    display: block;
}

.nav-group-items .nav-link {
    font-size: 14px;
    padding-left: 16px;
}

.navigation-config-list {
    display: grid;
    gap: 14px;
}

.nav-config-static,
.nav-config-group {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px;
    background: #fff;
}

.nav-config-items {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e5e7eb;
}

.nav-config-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
}

.nav-config-item-title {
    display: block;
    font-weight: 600;
}

.nav-config-item-hint {
    display: block;
    color: #6c757d;
    font-size: 12px;
    margin-top: 2px;
}

.settings-summary-list {
    display: grid;
    gap: 10px;
}

.settings-summary-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid #edf1f7;
    border-radius: 12px;
    background: #f8fafc;
}

.settings-summary-list span {
    color: #64748b;
    font-size: 13px;
}

.settings-summary-list b {
    color: #0f172a;
    text-align: right;
}

@media (max-width: 575px) {
    .nav-config-item {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}

/* v1.1.0: карточки сущностей, быстрые действия и общий поиск */
.top-search {
    min-width: 300px;
    max-width: 430px;
    flex: 1 1 320px;
    margin: 0 18px;
}
.top-search .form-control {
    border-radius: 999px;
    background: #f8fafc;
}
.entity-header {
    background: linear-gradient(135deg, #ffffff, #f8fbff);
}
.entity-actions .btn {
    white-space: nowrap;
}
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.quick-action-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    color: #1f2937;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.quick-action-card:hover {
    transform: translateY(-1px);
    border-color: #b6c7ff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
    color: #172033;
}
.quick-action-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #eef4ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex: 0 0 auto;
}
.quick-action-title {
    font-weight: 700;
    margin-bottom: 2px;
}
.quick-action-text {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.25;
}
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.detail-item {
    padding: 12px 14px;
    border: 1px solid #edf0f5;
    border-radius: 12px;
    background: #fbfcfe;
    min-width: 0;
}
.detail-label {
    color: #6b7280;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 4px;
}
.detail-value {
    font-weight: 600;
    overflow-wrap: anywhere;
}
.detail-value .badge {
    font-size: 13px;
}

/* v1.9.115_stable: 3-step user creation wizard */
.user-create-card.is-step-hidden { display: none; }
.user-create-progress span.is-complete { color: #15803d; }
.user-create-progress span.is-complete b {
    border-color: #86efac;
    background: #dcfce7;
    color: #166534;
}
.user-create-summary { background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%); }
.user-create-review {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.user-create-review > div {
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid #e1e8f2;
    border-radius: 13px;
    background: #fbfdff;
}
.user-create-review span,
.user-create-review strong { display: block; min-width: 0; }
.user-create-review span {
    margin-bottom: 4px;
    color: #8a96a6;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.user-create-review strong {
    color: #26364a;
    font-size: 14px;
    font-weight: 800;
    overflow-wrap: anywhere;
}
.user-create-final-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    padding: 13px 14px;
    border: 1px solid #cfe0ff;
    border-radius: 13px;
    background: #f3f7ff;
    color: #31598f;
}
.user-create-final-note > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: #e1ebff;
}
.user-create-final-note svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.user-create-final-note p {
    margin: 0;
    color: #42658f;
    font-size: 12px;
    line-height: 1.5;
}
@media (max-width: 767px) {
    .user-create-review { grid-template-columns: 1fr; }
}

@media (max-width: 1199px) {
    .quick-actions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .quick-actions-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .entity-actions { width: 100%; }
    .entity-actions .btn { flex: 1 1 auto; }
}


/* v1.3.0: эксплуатация, канбан заявок, фото до/после и QR-карточки */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(280px, 1fr));
    gap: 16px;
    align-items: start;
    overflow-x: auto;
    padding-bottom: 10px;
}
.kanban-column {
    background: #eef2f7;
    border-radius: 18px;
    padding: 12px;
    min-height: 240px;
    min-width: 280px;
}
.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 4px 4px 8px;
}
.kanban-title { font-weight: 800; color: #172033; }
.kanban-cards { display: grid; gap: 12px; }
.kanban-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}
.kanban-card.is-overdue { border-color: #f1aeb5; box-shadow: 0 8px 22px rgba(220,53,69,.10); }
.kanban-number { font-weight: 700; }
.kanban-card-title { font-weight: 800; margin: 8px 0; line-height: 1.25; }
.kanban-meta { color: #6b7280; font-size: 13px; margin-top: 4px; overflow-wrap: anywhere; }
.kanban-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.kanban-move { display: flex; gap: 6px; margin-top: 10px; }
.kanban-empty { color: #6b7280; background: rgba(255,255,255,.55); border: 1px dashed #cbd5e1; border-radius: 14px; padding: 16px; text-align: center; }
.request-files-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.request-file-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px;
    min-width: 0;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}
.request-file-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
    background: #f3f4f6;
}
.request-file-icon {
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
}
.qr-card { max-width: 420px; margin: 0 auto; }
.qr-image { max-width: 260px; width: 100%; height: auto; }
@media (max-width: 1399px) { .kanban-board { grid-template-columns: repeat(3, minmax(280px, 1fr)); } }
@media (max-width: 991px) { .kanban-board { grid-template-columns: repeat(2, minmax(280px, 1fr)); } .request-files-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) { .kanban-board { grid-template-columns: 1fr; } .request-files-grid { grid-template-columns: 1fr; } .kanban-move { flex-direction: column; } }
@media print {
    .sidebar, .topbar, .entity-actions, .d-print-none { display: none !important; }
    .main { margin-left: 0 !important; width: 100% !important; }
    .content { padding: 0 !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* v1.3.1: скрытие/показ бокового меню sidebar */
.topbar-left {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.sidebar-toggle-btn {
    flex: 0 0 auto;
    width: 36px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.sidebar-toggle-icon {
    line-height: 1;
    font-size: 18px;
}

@media (min-width: 992px) {
    body.sidebar-collapsed .sidebar {
        transform: translateX(-100%);
        transition: transform .22s ease;
    }

    .sidebar {
        transition: transform .22s ease;
    }

    body.sidebar-collapsed .main {
        margin-left: 0;
        width: 100%;
    }

    body.sidebar-collapsed .sidebar-toggle-btn {
        background: #172033;
        color: #fff;
        border-color: #172033;
    }
}

@media (max-width: 991px) {
    .sidebar-toggle-btn {
        display: inline-flex;
    }

    body.sidebar-open::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, .45);
        z-index: 999;
    }

    body.sidebar-open .sidebar {
        z-index: 1001;
    }
}

/* v1.4.0: документы, предпросмотр, шаблоны */
.doc-preview-frame {
    display: block;
    width: 100%;
    min-height: 72vh;
    border: 0;
    background: #fff;
}
.generated-doc-card iframe,
.card .doc-preview-frame {
    border-radius: 0.5rem;
}
@media (max-width: 768px) {
    .doc-preview-frame { min-height: 60vh; }
}


/* v1.6.2: информативная минималистичная главная панель */
.dashboard-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding: 28px;
    border-radius: 26px;
    background:
        radial-gradient(circle at 88% 8%, rgba(59, 130, 246, .20), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #f8fbff 48%, #eef6ff 100%);
    border: 1px solid rgba(226, 232, 240, .9);
    box-shadow: 0 18px 44px rgba(15, 23, 42, .08);
}
.dashboard-hero::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -120px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(16, 185, 129, .12);
}
.dashboard-hero-content,
.dashboard-hero-actions {
    position: relative;
    z-index: 1;
}
.dashboard-eyebrow {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 8px;
}
.dashboard-hero h1 {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.08;
    font-weight: 850;
    color: #0f172a;
}
.dashboard-hero p {
    max-width: 720px;
    margin: 0;
    color: #64748b;
    font-size: 16px;
}
.dashboard-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    min-width: 280px;
}
.dashboard-kpi,
.dashboard-card,
.dashboard-action {
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(226, 232, 240, .92);
    border-radius: 22px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}
.dashboard-kpi {
    min-height: 166px;
    padding: 20px;
    transition: transform .18s ease, box-shadow .18s ease;
}
.dashboard-kpi:hover,
.dashboard-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .09);
}
.dashboard-kpi-head {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.dashboard-kpi-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #eef2ff;
    font-size: 18px;
}
.dashboard-kpi-value {
    margin-top: 16px;
    color: #0f172a;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 850;
    line-height: 1.05;
    overflow-wrap: anywhere;
}
.dashboard-kpi-hint {
    margin-top: 8px;
    color: #64748b;
    font-size: 13px;
}
.dashboard-kpi-success .dashboard-kpi-icon { background: #ecfdf5; }
.dashboard-kpi-warning .dashboard-kpi-icon { background: #fffbeb; }
.dashboard-kpi-danger .dashboard-kpi-icon { background: #fef2f2; }
.dashboard-kpi-primary .dashboard-kpi-icon { background: #eef2ff; }
.dashboard-progress {
    height: 7px;
    margin-top: 14px;
    border-radius: 99px;
    overflow: hidden;
    background: #e5e7eb;
}
.dashboard-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #22c55e);
}
.dashboard-progress-soft span {
    background: linear-gradient(90deg, #94a3b8, #2563eb);
}
.dashboard-card {
    padding: 22px;
}
.dashboard-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}
.dashboard-card-head h5 {
    margin: 0;
    font-weight: 800;
    color: #0f172a;
}
.dashboard-card-head span {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 13px;
}
.dashboard-finance-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.dashboard-finance-grid > div {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #f8fafc;
    min-width: 0;
}
.dashboard-finance-grid span,
.dashboard-slim-metrics span {
    display: block;
    color: #64748b;
    font-size: 13px;
}
.dashboard-finance-grid strong {
    display: block;
    margin-top: 8px;
    color: #0f172a;
    font-size: 20px;
    font-weight: 850;
    overflow-wrap: anywhere;
}
.dashboard-slim-metrics {
    display: grid;
    gap: 14px;
}
.dashboard-alert-list,
.dashboard-list {
    display: grid;
    gap: 10px;
}
.dashboard-attention-item,
.dashboard-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    color: inherit;
    min-width: 0;
}
.dashboard-attention-item:hover,
.dashboard-list-item:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}
.dashboard-attention-title,
.dashboard-list-item strong {
    display: block;
    color: #0f172a;
    font-weight: 750;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dashboard-attention-subtitle,
.dashboard-list-item span {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dashboard-list-item em {
    flex: 0 0 auto;
    color: #334155;
    font-style: normal;
    font-weight: 800;
    font-size: 13px;
}
.dashboard-action {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 132px;
    padding: 20px;
    color: #0f172a;
    transition: transform .18s ease, box-shadow .18s ease;
}
.dashboard-action span {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #eef2ff;
    font-size: 20px;
    margin-bottom: 8px;
}
.dashboard-action b {
    font-size: 17px;
}
.dashboard-action small {
    color: #64748b;
}
.dashboard-empty {
    padding: 18px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    color: #64748b;
    text-align: center;
    background: #f8fafc;
}
.dashboard-timeline {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.dashboard-timeline-item {
    display: flex;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    min-width: 0;
}
.dashboard-timeline-item > span {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    margin-top: 5px;
    border-radius: 50%;
    background: #2563eb;
    box-shadow: 0 0 0 4px #dbeafe;
}
.dashboard-timeline-item b,
.dashboard-timeline-item small {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dashboard-timeline-item small {
    color: #64748b;
    margin-top: 3px;
}
.min-w-0 { min-width: 0; }
@media (max-width: 1399px) {
    .dashboard-finance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
    .dashboard-hero { flex-direction: column; padding: 22px; }
    .dashboard-hero-actions { justify-content: flex-start; min-width: 0; width: 100%; }
}
@media (max-width: 575px) {
    .dashboard-hero-actions .btn { flex: 1 1 100%; }
    .dashboard-finance-grid,
    .dashboard-timeline { grid-template-columns: 1fr; }
    .dashboard-card { padding: 16px; border-radius: 18px; }
    .dashboard-kpi { min-height: auto; }
}

/* v1.9.4_stable: гибкая страница пользователя */
.profile-hero {
    margin-bottom: 18px;
}
.profile-notification-counter {
    color: #0f172a;
    font-size: 48px;
    line-height: 1;
    font-weight: 850;
}
.profile-notification-list {
    display: grid;
    gap: 12px;
}
.profile-notification {
    display: flex;
    gap: 12px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #fff;
}
.profile-notification.is-unread {
    border-color: #bfdbfe;
    background: linear-gradient(135deg, #ffffff, #eff6ff);
}
.profile-notification.is-read {
    opacity: .82;
}
.profile-notification-main {
    min-width: 0;
    flex: 1 1 auto;
}
.profile-notification-side {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}
.profile-notification-title {
    color: #0f172a;
    font-weight: 800;
}
.profile-notification-meta {
    margin-top: 2px;
    color: #64748b;
    font-size: 13px;
}
.profile-notification-text {
    margin-top: 10px;
    color: #334155;
    overflow-wrap: anywhere;
}
.profile-notification-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.profile-click-card {
    color: inherit;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.profile-click-card:hover {
    color: inherit;
    transform: translateY(-2px);
    border-color: #bfdbfe;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .09);
}
.profile-click-card .detail-grid {
    pointer-events: none;
}
.profile-security-state {
    display: grid;
    gap: 4px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
}
.profile-security-state strong {
    color: #0f172a;
    font-size: 24px;
    line-height: 1.1;
}
.profile-security-state span {
    color: #64748b;
}
.profile-security-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.profile-security-warning {
    border-color: #fde68a;
    background: #fffbeb;
}
.profile-security-danger {
    border-color: #fecaca;
    background: #fef2f2;
}
.profile-2fa-box {
    height: 100%;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #f8fafc;
}
.profile-2fa-label {
    color: #64748b;
    font-size: 13px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.profile-2fa-secret {
    margin-top: 10px;
    padding: 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px dashed #94a3b8;
    color: #0f172a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .08em;
    overflow-wrap: anywhere;
}
.profile-2fa-uri {
    min-height: 104px;
    margin-top: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
}
.profile-2fa-confirm {
    display: grid;
    grid-template-columns: minmax(220px, 360px) auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
    border: 1px solid #bfdbfe;
    border-radius: 18px;
    background: #eff6ff;
}
@media (max-width: 575px) {
    .profile-notification {
        flex-direction: column;
    }
    .profile-notification-side {
        justify-content: flex-start;
    }
    .profile-2fa-confirm {
        grid-template-columns: 1fr;
    }
}

/* v1.6.3: обзорные панели внутри категорий навигации */
.category-hero {
    background:
        radial-gradient(circle at 82% 12%, rgba(99, 102, 241, .18), transparent 32%),
        linear-gradient(135deg, #ffffff 0%, #f9fbff 52%, #f1f7ff 100%);
}
.category-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.category-mini-grid small {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}
.category-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    min-height: 78px;
}
.category-flow span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    font-weight: 750;
    font-size: 13px;
}
.category-flow i {
    color: #94a3b8;
    font-style: normal;
    font-weight: 800;
}
.nav-group-items .nav-link:first-child {
    font-weight: 800;
}
@media (max-width: 575px) {
    .category-mini-grid { grid-template-columns: 1fr; }
    .category-flow { align-items: flex-start; }
    .category-flow i { display: none; }
    .category-flow span { width: 100%; justify-content: center; }
}

/* v1.8.0: улучшенные рабочие карточки объектов */
.workspace-hero {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr) auto;
    gap: 22px;
    align-items: center;
    padding: 22px;
    border-radius: 28px;
    background:
        radial-gradient(circle at 86% 12%, rgba(59, 130, 246, .14), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #f8fbff 52%, #eff6ff 100%);
    border: 1px solid rgba(226, 232, 240, .95);
    box-shadow: 0 18px 48px rgba(15, 23, 42, .08);
}
.workspace-photo {
    width: 148px;
    height: 112px;
    border-radius: 24px;
    background: linear-gradient(135deg, #dbeafe, #eef2ff);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d4ed8;
    font-weight: 900;
    font-size: 30px;
    letter-spacing: .04em;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.8);
}
.workspace-hero-main h1 {
    margin: 0;
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1.08;
    font-weight: 900;
    color: #0f172a;
}
.workspace-hero-main p {
    margin: 9px 0 0;
    color: #64748b;
    font-size: 15px;
}
.workspace-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}
.workspace-meta-row span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255,255,255,.82);
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 13px;
}
.workspace-meta-row b { color: #0f172a; }
.workspace-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    min-width: 220px;
}
.workspace-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}
.workspace-metric {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, .96);
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
    min-width: 0;
}
.workspace-metric-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: #1d4ed8;
    font-weight: 900;
}
.workspace-metric-body { min-width: 0; }
.workspace-metric-body span,
.workspace-metric-body small {
    display: block;
    color: #64748b;
    font-size: 12px;
}
.workspace-metric-body strong {
    display: block;
    margin: 3px 0;
    color: #0f172a;
    font-size: 20px;
    font-weight: 900;
    overflow-wrap: anywhere;
}
.workspace-metric-success .workspace-metric-icon { background: #ecfdf5; color: #15803d; }
.workspace-metric-warning .workspace-metric-icon { background: #fffbeb; color: #b45309; }
.workspace-metric-danger .workspace-metric-icon { background: #fef2f2; color: #b91c1c; }
.workspace-metric-primary .workspace-metric-icon { background: #eff6ff; color: #1d4ed8; }
.workspace-card { overflow: hidden; }
.workspace-section-title { font-weight: 850; color: #0f172a; margin-bottom: 16px; }
.workspace-side-stack { display: grid; gap: 16px; }
.workspace-note-readonly {
    padding: 14px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: #f8fafc;
    color: #475569;
    min-height: 90px;
}
.workspace-timeline {
    display: grid;
    gap: 10px;
}
.workspace-timeline-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    color: inherit;
    min-width: 0;
}
.workspace-timeline-item:hover {
    border-color: #bfdbfe;
    background: #f8fbff;
}
.workspace-timeline-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    background: #eef2ff;
}
.workspace-timeline-item b,
.workspace-timeline-item small,
.workspace-timeline-item em {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.workspace-timeline-item b { color: #0f172a; font-weight: 800; }
.workspace-timeline-item small { color: #64748b; margin-top: 2px; }
.workspace-timeline-item em { color: #94a3b8; font-style: normal; font-size: 12px; margin-top: 4px; }
@media (max-width: 1399px) {
    .workspace-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
    .workspace-hero { grid-template-columns: 104px minmax(0, 1fr); }
    .workspace-photo { width: 104px; height: 88px; border-radius: 18px; font-size: 22px; }
    .workspace-hero-actions { grid-column: 1 / -1; justify-content: flex-start; min-width: 0; }
    .workspace-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
    .workspace-hero { grid-template-columns: 1fr; padding: 18px; }
    .workspace-photo { width: 100%; height: 150px; }
    .workspace-hero-actions .btn { flex: 1 1 100%; }
    .workspace-metrics { grid-template-columns: 1fr; }
    .workspace-meta-row span { width: 100%; }
}

/* v1.9.31: защита кликабельности навигации и ссылок после аварийно закрытых оверлеев */
.sidebar, .topbar, .content { pointer-events: auto; }
@media (min-width: 992px) {
    body.sidebar-open::after { display: none !important; content: none !important; }
}


/* v1.9.34_stable: красивые карточки экспорта отчетов */
.report-export-card {
    border: 1px solid rgba(13, 110, 253, .10);
    box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
    transition: transform .15s ease, box-shadow .15s ease;
}
.report-export-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .10);
}
.report-export-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(13, 110, 253, .10), rgba(111, 66, 193, .12));
    font-size: 22px;
}
.report-export-cards .btn {
    border-radius: 10px;
}


/* v1.9.40: блок показаний счетчиков в рабочей сводке */
.meter-summary-widget {
    display: grid;
    gap: 12px;
}
.meter-summary-status {
    display: block;
    width: 100%;
    border-radius: 999px;
    text-align: center;
    font-weight: 900;
    font-size: 18px;
    line-height: 1.2;
    padding: 8px 18px;
    color: #111827;
}
.meter-summary-status-submitted {
    background: #fbbc04;
}
.meter-summary-status-accepted {
    background: #22c55e;
    color: #ffffff;
}
.meter-summary-status-not-submitted {
    background: #ef4444;
    color: #ffffff;
}
.meter-summary-status-none {
    background: #cbd5e1;
    color: #334155;
}
.meter-summary-meta {
    color: #475569;
    font-size: 14px;
    line-height: 1.55;
}
.meter-summary-meta strong {
    color: #334155;
    font-weight: 800;
}
.meter-summary-reading,
.meter-summary-empty {
    font-size: 13px;
    color: #475569;
}
.meter-summary-reading-name { font-weight: 700; color: #334155; }
.meter-summary-reading-value { font-weight: 600; }
.meter-summary-link-wrap { margin-top: 2px; }
.meter-summary-link {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
}
.meter-summary-link:hover { text-decoration: underline; }


/* v1.9.42: новая рабочая сводка карточки объекта */
.workspace-summary-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.workspace-summary-item {
    padding: 12px 14px;
    border: 1px solid #edf0f5;
    border-radius: 14px;
    background: #fbfcfe;
    min-width: 0;
}
.workspace-summary-wide { grid-column: 1 / -1; }
.workspace-summary-label {
    color: #64748b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .045em;
    margin-bottom: 5px;
}
.workspace-summary-value {
    color: #0f172a;
    font-weight: 800;
    overflow-wrap: anywhere;
}
.workspace-summary-request-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}
.workspace-summary-request {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    color: inherit;
    text-decoration: none;
}
.workspace-summary-request:hover {
    border-color: #bfdbfe;
    background: #f8fbff;
}
.workspace-summary-request-main {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.workspace-summary-request-main strong {
    font-size: 13px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.workspace-summary-request-main small {
    color: #64748b;
    font-weight: 600;
}
.workspace-summary-request-status { flex: 0 0 auto; }
.workspace-summary-more,
.workspace-summary-empty {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}
.workspace-summary-meter { font-weight: 600; }
@media (max-width: 767px) {
    .workspace-summary-layout { grid-template-columns: 1fr; }
}


/* v1.9.44: гарантированный вывод чисел в KPI-блоках документов */
.dashboard-kpi .dashboard-kpi-value {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.dashboard-kpi-success .dashboard-kpi-value {
    color: #15803d;
}
.dashboard-kpi-success {
    border-color: rgba(22, 163, 74, .22);
}

/* v1.9.57: красивая системная страница 404 */
.rem-404-wrap {
    min-height: calc(100vh - 150px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
}
.rem-404-card {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    gap: 28px;
    align-items: stretch;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(248,250,252,.94));
    box-shadow: 0 28px 70px rgba(15, 23, 42, .12);
    overflow: hidden;
}
.rem-404-visual {
    position: relative;
    min-height: 320px;
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: radial-gradient(circle at 25% 22%, rgba(59,130,246,.32), transparent 34%), linear-gradient(135deg, #0f172a, #1d4ed8 58%, #7c3aed);
    color: #fff;
    isolation: isolate;
}
.rem-404-code {
    font-size: clamp(58px, 9vw, 104px);
    line-height: .9;
    font-weight: 950;
    letter-spacing: -.08em;
    text-shadow: 0 12px 34px rgba(0,0,0,.25);
}
.rem-404-icon {
    width: 86px;
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 26px;
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.24);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
    font-size: 42px;
}
.rem-404-orbit {
    position: absolute;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    z-index: -1;
}
.rem-404-orbit-a { width: 260px; height: 260px; right: -90px; top: -50px; }
.rem-404-orbit-b { width: 180px; height: 180px; left: -70px; bottom: -60px; }
.rem-404-content {
    padding: 36px 36px 34px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.rem-404-kicker {
    width: max-content;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 7px 12px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .055em;
}
.rem-404-content h1 {
    margin: 16px 0 10px;
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.08;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -.045em;
}
.rem-404-content p {
    margin: 0;
    max-width: 680px;
    color: #475569;
    font-size: 16px;
    line-height: 1.65;
}
.rem-404-route {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    overflow-wrap: anywhere;
}
.rem-404-route code {
    color: #0f172a;
    font-weight: 800;
}
.rem-404-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 18px;
    max-width: 650px;
}
.rem-404-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}
@media (max-width: 991px) {
    .rem-404-card { grid-template-columns: 1fr; }
    .rem-404-visual { min-height: 220px; }
    .rem-404-content { padding: 28px; }
}
@media (max-width: 575px) {
    .rem-404-search { grid-template-columns: 1fr; }
    .rem-404-actions .btn { width: 100%; }
}

/* v1.9.76: красивая и информативная страница QR-кода объекта */
.property-qr-page {
    --qr-primary: #2563eb;
    --qr-primary-soft: rgba(37, 99, 235, .10);
    --qr-success-soft: rgba(16, 185, 129, .12);
}
.property-qr-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    border-radius: 28px;
    background:
        radial-gradient(circle at 92% 10%, rgba(37, 99, 235, .22), transparent 30%),
        radial-gradient(circle at 12% 105%, rgba(16, 185, 129, .14), transparent 32%),
        linear-gradient(135deg, #ffffff 0%, #f8fbff 52%, #edf6ff 100%);
    border: 1px solid rgba(226, 232, 240, .94);
    box-shadow: 0 18px 44px rgba(15, 23, 42, .08);
}
.property-qr-hero-main {
    position: relative;
    z-index: 1;
    max-width: 820px;
}
.property-qr-eyebrow {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 8px;
}
.property-qr-hero h1 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.08;
    font-weight: 850;
}
.property-qr-hero p {
    margin: 0;
    color: #64748b;
    font-size: 16px;
}
.property-qr-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}
.property-qr-hero-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .86);
    border: 1px solid rgba(226, 232, 240, .95);
    color: #334155;
    font-size: 13px;
    font-weight: 750;
}
.property-qr-hero-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    min-width: 280px;
}
.property-qr-card,
.property-qr-info,
.property-qr-kpi {
    border: 1px solid rgba(226, 232, 240, .92);
    box-shadow: 0 16px 38px rgba(15, 23, 42, .07);
}
.property-qr-card .card-body {
    padding: 28px;
}
.property-qr-print-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 14px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: var(--qr-primary-soft);
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.property-qr-frame {
    max-width: 356px;
    margin: 0 auto;
    padding: 18px;
    border-radius: 30px;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(135deg, rgba(37, 99, 235, .32), rgba(16, 185, 129, .30)) border-box;
    border: 1px solid transparent;
    box-shadow: inset 0 0 0 8px #f8fafc, 0 18px 34px rgba(15, 23, 42, .08);
}
.property-qr-image {
    display: block;
    max-width: 320px;
    width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 18px;
    background: #fff;
}
.property-qr-title {
    color: #0f172a;
    font-size: 24px;
    font-weight: 850;
}
.property-qr-address,
.property-qr-hint,
.property-qr-print-link {
    color: #64748b;
}
.property-qr-hint {
    padding: 12px 14px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-weight: 650;
}
.property-qr-print-link {
    overflow-wrap: anywhere;
    font-size: 12px;
}
.property-qr-kpi {
    height: 100%;
    min-height: 104px;
    padding: 16px;
    border-radius: 20px;
    background: #fff;
}
.property-qr-kpi-label {
    margin-bottom: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.property-qr-kpi-value {
    color: #0f172a;
    font-size: 20px;
    line-height: 1.16;
    font-weight: 850;
}
.property-qr-section-title {
    color: #0f172a;
    font-size: 18px;
    font-weight: 850;
}
.property-qr-flow {
    display: grid;
    gap: 12px;
}
.property-qr-flow-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.property-qr-flow-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 12px;
    background: var(--qr-primary);
    color: #fff;
    font-weight: 850;
}
.property-qr-flow-step strong {
    display: block;
    color: #0f172a;
    margin-bottom: 2px;
}
.property-qr-flow-step span {
    display: block;
    color: #64748b;
    font-size: 14px;
}
.property-qr-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.property-qr-details > div {
    min-width: 0;
    padding: 13px 14px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.property-qr-details span {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.property-qr-details strong {
    display: block;
    min-width: 0;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (max-width: 991px) {
    .property-qr-hero {
        flex-direction: column;
        padding: 22px;
    }
    .property-qr-hero-actions {
        justify-content: flex-start;
        min-width: 0;
        width: 100%;
    }
    .property-qr-hero-actions .btn {
        flex: 1 1 100%;
    }
}
@media (max-width: 575px) {
    .property-qr-details {
        grid-template-columns: 1fr;
    }
    .property-qr-card .card-body {
        padding: 20px;
    }
}
@media print {
    .property-qr-hero,
    .property-qr-info,
    .property-qr-kpi {
        box-shadow: none !important;
    }
    .property-qr-hero,
    .property-qr-kpi,
    .property-qr-info {
        display: none !important;
    }
    .property-qr-page .row,
    .property-qr-page [class*="col-"] {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .property-qr-card {
        max-width: 460px;
        margin: 0 auto !important;
        border: 1px solid #ddd !important;
    }
    .property-qr-print-link {
        display: block !important;
    }
}

/* v1.9.93: минималистичная карточка объекта с ролевым отображением блоков */
.property-card-page {
    display: block;
}
.property-card-hero {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    padding: 22px;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 22px;
    background: var(--bs-body-bg, #fff);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}
.property-card-photo {
    width: 132px;
    height: 104px;
    border-radius: 18px;
    background: var(--bs-light, #f8f9fa);
    border: 1px solid var(--bs-border-color, #dee2e6);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-primary, #0d6efd);
    font-weight: 800;
    font-size: 26px;
}
.property-card-badges,
.property-card-hero-meta,
.property-card-actions,
.property-card-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}
.property-card-hero-main h1 {
    margin: 0;
    font-size: clamp(24px, 2.6vw, 34px);
    line-height: 1.1;
    font-weight: 800;
    color: var(--bs-heading-color, #212529);
    overflow-wrap: anywhere;
}
.property-card-hero-main p {
    margin: 8px 0 0;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 15px;
    overflow-wrap: anywhere;
}
.property-card-hero-meta {
    margin-top: 12px;
}
.property-card-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--bs-border-color, #dee2e6);
    background: var(--bs-light, #f8f9fa);
    color: var(--bs-secondary-color, #6c757d);
    font-size: 13px;
}
.property-card-hero-meta b {
    color: var(--bs-body-color, #212529);
}
.property-card-actions {
    justify-content: flex-end;
    min-width: 210px;
}
.property-card-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}
.property-card-kpi {
    padding: 16px;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 18px;
    background: var(--bs-body-bg, #fff);
    min-width: 0;
}
.property-card-kpi span,
.property-card-kpi small {
    display: block;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 12px;
}
.property-card-kpi strong {
    display: block;
    margin: 5px 0 3px;
    color: var(--bs-heading-color, #212529);
    font-size: 21px;
    line-height: 1.15;
    font-weight: 800;
    overflow-wrap: anywhere;
}
.property-card-kpi-success { border-left: 4px solid var(--bs-success, #198754); }
.property-card-kpi-warning { border-left: 4px solid var(--bs-warning, #ffc107); }
.property-card-kpi-danger { border-left: 4px solid var(--bs-danger, #dc3545); }
.property-card-kpi-primary { border-left: 4px solid var(--bs-primary, #0d6efd); }
.property-card-kpi-secondary { border-left: 4px solid var(--bs-secondary, #6c757d); }
.property-card-quick {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.property-card-quick-action {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    grid-template-areas: "icon title" "icon text";
    gap: 1px 10px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 16px;
    background: var(--bs-body-bg, #fff);
    color: inherit;
    text-decoration: none;
    min-width: 0;
}
.property-card-quick-action:hover {
    border-color: var(--bs-primary, #0d6efd);
    background: var(--bs-light, #f8f9fa);
}
.property-card-quick-action span {
    grid-area: icon;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-light, #f8f9fa);
    border: 1px solid var(--bs-border-color, #dee2e6);
    color: var(--bs-primary, #0d6efd);
    font-weight: 800;
}
.property-card-quick-action strong {
    grid-area: title;
    font-weight: 800;
    color: var(--bs-heading-color, #212529);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.property-card-quick-action small {
    grid-area: text;
    color: var(--bs-secondary-color, #6c757d);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.property-card-section {
    border-radius: 18px;
    border-color: var(--bs-border-color, #dee2e6);
    overflow: hidden;
}
.property-card-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.property-card-section-head h5 {
    margin: 0;
    font-weight: 800;
    color: var(--bs-heading-color, #212529);
}
.property-card-section-head span {
    display: block;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 13px;
    margin-top: 2px;
}
.property-card-attention-grid {
    display: grid;
    gap: 10px;
}
.property-card-attention {
    display: grid;
    gap: 2px;
    padding: 13px 14px;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 14px;
    background: var(--bs-light, #f8f9fa);
    color: inherit;
    text-decoration: none;
}
.property-card-attention strong {
    color: var(--bs-heading-color, #212529);
    font-weight: 800;
}
.property-card-attention span {
    color: var(--bs-secondary-color, #6c757d);
    font-size: 13px;
}
.property-card-attention-danger { border-left: 4px solid var(--bs-danger, #dc3545); }
.property-card-attention-warning { border-left: 4px solid var(--bs-warning, #ffc107); }
.property-card-attention-primary { border-left: 4px solid var(--bs-primary, #0d6efd); }
.property-card-attention-success { border-left: 4px solid var(--bs-success, #198754); }
.property-card-finance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}
.property-card-finance-grid-five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}
.property-card-finance-grid small {
    display: block;
    margin-top: 3px;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 11px;
    line-height: 1.3;
}
@media (max-width: 1399.98px) {
    .property-card-finance-grid-five {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 767.98px) {
    .property-card-finance-grid-five {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 479.98px) {
    .property-card-finance-grid-five {
        grid-template-columns: 1fr;
    }
}
.property-card-finance-grid > div,
.property-card-payline {
    padding: 12px;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 14px;
    background: var(--bs-light, #f8f9fa);
}
.property-card-finance-grid span,
.property-card-payline span {
    display: block;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 12px;
}
.property-card-finance-grid strong,
.property-card-payline strong {
    display: block;
    color: var(--bs-heading-color, #212529);
    font-weight: 800;
    overflow-wrap: anywhere;
}
.property-card-payline {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}
.property-card-payline span,
.property-card-payline strong { display: inline; }
.property-card-table-wrap {
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 14px;
}
.property-card-table th {
    color: var(--bs-secondary-color, #6c757d);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    white-space: nowrap;
}
.property-card-table td {
    vertical-align: middle;
}
.property-card-mini-list {
    display: grid;
    gap: 8px;
}
.property-card-mini-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}
.property-card-mini-item:hover {
    background: var(--bs-light, #f8f9fa);
}
.property-card-mini-item strong,
.property-card-mini-item small,
.property-card-mini-meta em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.property-card-mini-item strong {
    color: var(--bs-heading-color, #212529);
    font-weight: 800;
}
.property-card-mini-item small,
.property-card-mini-meta em {
    color: var(--bs-secondary-color, #6c757d);
    font-size: 12px;
    font-style: normal;
}
.property-card-mini-meta {
    display: grid;
    justify-items: end;
    gap: 4px;
    flex: 0 0 auto;
    max-width: 42%;
}
.property-card-side-stack {
    display: grid;
    gap: 16px;
}
.property-card-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
}
.property-card-tabs .nav-link {
    white-space: nowrap;
}
@media (max-width: 1399px) {
    .property-card-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .property-card-hero { grid-template-columns: 112px minmax(0, 1fr); }
    .property-card-photo { width: 112px; height: 90px; }
    .property-card-actions { grid-column: 1 / -1; justify-content: flex-start; min-width: 0; }
}
@media (max-width: 767px) {
    .property-card-hero { grid-template-columns: 1fr; padding: 16px; }
    .property-card-photo { width: 100%; height: 150px; }
    .property-card-actions .btn { flex: 1 1 100%; }
    .property-card-kpis { grid-template-columns: 1fr; }
    .property-card-section-head { flex-direction: column; align-items: stretch; }
    .property-card-mini-item { align-items: flex-start; flex-direction: column; }
    .property-card-mini-meta { max-width: 100%; justify-items: start; }
}


/* v1.9.106: пользовательский масштаб интерфейса */
html.ui-scale-90 { font-size: 90%; --sidebar-width: 243px; }
html.ui-scale-80 { font-size: 80%; --sidebar-width: 216px; }
html.ui-scale-90 .topbar { height: 58px; padding-left: 20px; padding-right: 20px; }
html.ui-scale-80 .topbar { height: 52px; padding-left: 16px; padding-right: 16px; }
html.ui-scale-90 .sidebar { padding: 16px 12px; }
html.ui-scale-80 .sidebar { padding: 14px 10px; }
html.ui-scale-90 .content { padding: 20px; }
html.ui-scale-80 .content { padding: 16px; }
html.ui-scale-90 .page-title { font-size: 18px; }
html.ui-scale-80 .page-title { font-size: 16px; }
html.ui-scale-90 .brand { font-size: 18px; margin-bottom: 15px; }
html.ui-scale-80 .brand { font-size: 16px; margin-bottom: 12px; }
html.ui-scale-90 .userbox-profile,
html.ui-scale-90 .userbox-action { min-height: 36px; }
html.ui-scale-80 .userbox-profile,
html.ui-scale-80 .userbox-action { min-height: 32px; }
html.ui-scale-90 .userbox-action { width: 36px; }
html.ui-scale-80 .userbox-action { width: 34px; }
html.ui-scale-90 .userbox-icon { width: 25px; height: 25px; }
html.ui-scale-80 .userbox-icon { width: 23px; height: 23px; }
html.ui-scale-90 .card-body,
html.ui-scale-90 .dashboard-card { padding: .9rem; }
html.ui-scale-80 .card-body,
html.ui-scale-80 .dashboard-card { padding: .8rem; }
html.ui-scale-90 .btn { padding-top: .32rem; padding-bottom: .32rem; }
html.ui-scale-80 .btn { padding-top: .28rem; padding-bottom: .28rem; }

.userbox-scale .dropdown-toggle::after { display: none; }
.userbox-scale .userbox-action { color: #334155; font-weight: 800; font-size: 11px; }
.userbox-scale-value { white-space: nowrap; }
.ui-scale-dropdown { min-width: 250px; padding: 8px; border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 18px 45px rgba(15,23,42,.14); }
.ui-scale-dropdown-title { padding: 6px 10px 8px; color: #64748b; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.ui-scale-choice { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 9px; padding: 9px 10px; }
.ui-scale-choice.active { background: #eef2ff; color: #1d4ed8; font-weight: 700; }
.ui-scale-options { display: grid; gap: 10px; }
.ui-scale-option { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--bs-border-color, #dee2e6); border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.ui-scale-option:hover { border-color: #93c5fd; }
.ui-scale-option.is-selected:has(input:checked),
.ui-scale-option:has(input:checked) { border-color: #2563eb; background: #f8fbff; box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
.ui-scale-option input { width: 18px; height: 18px; accent-color: #2563eb; }
.ui-scale-option-main { min-width: 0; }
.ui-scale-option-main strong,
.ui-scale-option-main small { display: block; }
.ui-scale-option-main small { margin-top: 3px; color: var(--bs-secondary-color, #6c757d); }
.ui-scale-preview { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; height: 38px; border-radius: 10px; background: #eef2f7; color: #334155; font-weight: 800; }
.ui-scale-preview-90 { font-size: 90%; }
.ui-scale-preview-80 { font-size: 80%; }
@media (max-width: 575px) {
    .userbox-scale { display: none; }
    .ui-scale-option { grid-template-columns: auto minmax(0,1fr); }
    .ui-scale-preview { display: none; }
}

/* v1.9.107_stable: компактные списки профиля */
#interface-settings {
    scroll-margin-top: 84px;
}
.profile-scroll-list.is-scrollable {
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding-right: 6px;
}
.profile-events-scroll .app-table-wrap.is-scrollable {
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}
.profile-events-scroll .app-table-wrap.is-scrollable .app-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--bs-body-bg, #fff);
    box-shadow: 0 1px 0 rgba(15, 23, 42, .1);
}

/* Role-aware navigation builder: nested subsection in sidebar */
.nav-subgroup {
    margin: .2rem .35rem .45rem;
    padding: .2rem 0 .25rem;
    border-left: 1px solid rgba(255,255,255,.14);
}
.nav-subgroup-title {
    padding: .35rem .75rem .25rem 1rem;
    color: rgba(255,255,255,.56);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.nav-group-items .nav-link.nav-subgroup-link {
    padding-left: 1.35rem;
    font-size: .82rem;
}

/* v1.9.113_stable: минималистичная страница создания пользователя */
.user-create-page {
    width: min(100%, 1320px);
    margin: 0 auto;
    padding-bottom: 28px;
}
.user-create-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}
.user-create-back:hover { color: #1d4ed8; }
.user-create-back-icon,
.user-create-section-icon,
.user-create-hero-icon,
.user-create-note-head > span,
.user-create-actions .btn span,
.user-password-tools .btn span,
.user-role-hint > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.user-create-back-icon { width: 24px; height: 24px; }
.user-create-back svg,
.user-create-section-icon svg,
.user-create-hero-icon svg,
.user-create-note-head svg,
.user-create-actions svg,
.user-password-tools svg,
.user-role-hint svg,
.user-password-action svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.user-create-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
    padding: 22px 24px;
    border: 1px solid #dbe5f2;
    border-radius: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 70%, #eef4ff 100%);
    box-shadow: 0 12px 32px rgba(15, 23, 42, .055);
}
.user-create-hero-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: #e8efff;
    color: #2458c6;
}
.user-create-hero-icon svg { width: 26px; height: 26px; }
.user-create-hero-copy { min-width: 0; }
.user-create-eyebrow {
    margin-bottom: 4px;
    color: #2563eb;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.user-create-hero h1 {
    margin: 0;
    color: #172033;
    font-size: clamp(22px, 2vw, 30px);
    font-weight: 800;
    letter-spacing: -.025em;
}
.user-create-hero p {
    max-width: 760px;
    margin: 6px 0 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.55;
}
.user-create-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.user-create-progress span { display: inline-flex; align-items: center; gap: 6px; }
.user-create-progress b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid #d9e1ec;
    border-radius: 999px;
    background: #fff;
    color: #64748b;
    font-size: 11px;
}
.user-create-progress span.is-active { color: #1d4ed8; }
.user-create-progress span.is-active b {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}
.user-create-progress i { width: 22px; height: 1px; background: #dbe3ef; }
.user-create-form { min-width: 0; }
.user-create-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    align-items: start;
    gap: 18px;
}
.user-create-main,
.user-create-aside { display: grid; gap: 18px; min-width: 0; }
.user-create-aside { position: sticky; top: 82px; }
.user-create-card,
.user-create-note,
.user-create-actions {
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .045);
}
.user-create-card {
    padding: 22px;
    border-radius: 18px;
}
.user-create-section-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}
.user-create-section-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #eef3fb;
    color: #31598f;
}
.user-create-section-head h2 {
    margin: 1px 0 3px;
    color: #1e293b;
    font-size: 16px;
    font-weight: 800;
}
.user-create-section-head p {
    margin: 0;
    color: #7b8798;
    font-size: 13px;
    line-height: 1.45;
}
.user-create-fields .form-label {
    margin-bottom: 7px;
    color: #334155;
    font-size: 13px;
    font-weight: 750;
}
.user-create-fields .form-label > span { color: #dc2626; }
.user-create-fields .form-control,
.user-create-fields .form-select {
    min-height: 44px;
    border-color: #d8e0ea;
    border-radius: 11px;
    background-color: #fbfcfe;
    color: #1e293b;
    font-size: 14px;
    box-shadow: none;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.user-create-fields .form-control-lg { min-height: 48px; font-size: 15px; }
.user-create-fields .form-control::placeholder { color: #a2adbb; }
.user-create-fields .form-control:hover,
.user-create-fields .form-select:hover { border-color: #b8c5d6; }
.user-create-fields .form-control:focus,
.user-create-fields .form-select:focus {
    border-color: #5b8def;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}
.user-create-fields .form-text {
    margin-top: 6px;
    color: #8893a3;
    font-size: 11.5px;
    line-height: 1.45;
}
.user-role-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 8px;
    padding: 9px 10px;
    border-radius: 10px;
    background: #f6f8fb;
    color: #64748b;
}
.user-role-hint.has-role { background: #f0f6ff; color: #31598f; }
.user-role-hint > span { width: 18px; height: 18px; }
.user-role-hint svg { width: 15px; height: 15px; }
.user-role-hint p { margin: 0; font-size: 11.5px; line-height: 1.45; }
.user-password-input { position: relative; }
.user-password-input .form-control { padding-right: 46px; }
.user-password-action {
    position: absolute;
    top: 50%;
    right: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #8793a4;
    transform: translateY(-50%);
}
.user-password-action:hover,
.user-password-action.is-active { background: #eef3fb; color: #2563eb; }
.user-password-meter {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    margin-top: 8px;
}
.user-password-meter i {
    height: 3px;
    border-radius: 99px;
    background: #e2e8f0;
    transition: background .18s ease;
}
.user-password-meter i.is-on:nth-child(1) { background: #ef4444; }
.user-password-meter i.is-on:nth-child(2) { background: #f59e0b; }
.user-password-meter i.is-on:nth-child(3) { background: #3b82f6; }
.user-password-meter i.is-on:nth-child(4) { background: #16a34a; }
#password-strength-text[data-score="1"] { color: #b91c1c; }
#password-strength-text[data-score="2"] { color: #a16207; }
#password-strength-text[data-score="3"] { color: #1d4ed8; }
#password-strength-text[data-score="4"] { color: #15803d; }
.user-password-match.is-valid { color: #15803d !important; }
.user-password-match.is-invalid { color: #b91c1c !important; }
.user-password-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 2px;
}
.user-password-tools .btn { display: inline-flex; align-items: center; gap: 7px; border-radius: 10px; }
.user-password-tools .btn svg { width: 15px; height: 15px; }
.user-password-tools > span { color: #8a96a6; font-size: 11.5px; }
.user-create-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 15px;
    border: 1px solid #dce5ef;
    border-radius: 13px;
    background: #f8fafc;
}
.user-create-switch-row.is-locked { border-color: #cfe0ff; background: #f3f7ff; }
.user-create-switch-copy { min-width: 0; }
.user-create-switch-copy strong,
.user-create-switch-copy span { display: block; }
.user-create-switch-copy strong { color: #334155; font-size: 13px; }
.user-create-switch-copy span { margin-top: 3px; color: #7b8797; font-size: 11.5px; line-height: 1.4; }
.user-create-switch { position: relative; flex: 0 0 auto; width: 42px; height: 24px; cursor: pointer; }
.user-create-switch input { position: absolute; opacity: 0; pointer-events: none; }
.user-create-switch > span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background .18s ease;
}
.user-create-switch > span::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(15, 23, 42, .22);
    transition: transform .18s ease;
}
.user-create-switch input:checked + span { background: #2563eb; }
.user-create-switch input:checked + span::after { transform: translateX(18px); }
.user-create-switch input:disabled + span { opacity: .75; cursor: not-allowed; }
.user-create-note { padding: 17px; border-radius: 16px; }
.user-create-note-primary { border-color: #cfe0ff; background: #f5f8ff; }
.user-create-note-muted { background: #fafbfc; }
.user-create-note-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.user-create-note-head > span {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: #edf2f8;
    color: #42658f;
}
.user-create-note-primary .user-create-note-head > span { background: #e1ebff; color: #2458c6; }
.user-create-note-head svg { width: 15px; height: 15px; }
.user-create-note h3 { margin: 0; color: #334155; font-size: 13px; font-weight: 800; }
.user-create-note ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.user-create-note li {
    position: relative;
    padding-left: 16px;
    color: #64748b;
    font-size: 11.5px;
    line-height: 1.45;
}
.user-create-note li::before {
    content: "";
    position: absolute;
    top: .55em;
    left: 1px;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: #5b8def;
}
.user-create-note p { margin: 0; color: #6f7c8d; font-size: 11.5px; line-height: 1.55; }
.user-security-fact {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid #eef1f5;
    font-size: 11.5px;
}
.user-security-fact span { color: #7b8797; }
.user-security-fact strong { color: #334155; font-weight: 800; text-align: right; }
.user-create-note > a { display: inline-block; margin-top: 12px; color: #2563eb; font-size: 11.5px; font-weight: 700; }
.user-create-actions {
    position: sticky;
    bottom: 12px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    box-shadow: 0 16px 38px rgba(15, 23, 42, .13);
}
.user-create-actions > div:first-child strong,
.user-create-actions > div:first-child span { display: block; }
.user-create-actions > div:first-child strong { color: #334155; font-size: 13px; }
.user-create-actions > div:first-child span { margin-top: 2px; color: #8a96a6; font-size: 11.5px; }
.user-create-actions-buttons { display: flex; align-items: center; gap: 9px; }
.user-create-actions .btn { min-height: 42px; padding-inline: 17px; border-radius: 10px; font-size: 13px; font-weight: 750; }
.user-create-actions .btn-primary { display: inline-flex; align-items: center; gap: 7px; box-shadow: 0 8px 18px rgba(37, 99, 235, .22); }
.user-create-actions .btn svg { width: 16px; height: 16px; }
.user-create-form.was-validated .form-control:invalid,
.user-create-form.was-validated .form-select:invalid { border-color: #dc3545; }
@media (max-width: 1199px) {
    .user-create-layout { grid-template-columns: minmax(0, 1fr) 280px; }
    .user-create-progress span { font-size: 0; }
    .user-create-progress span b { font-size: 11px; }
}
@media (max-width: 991px) {
    .user-create-hero { grid-template-columns: auto minmax(0, 1fr); }
    .user-create-progress { grid-column: 1 / -1; padding-left: 72px; }
    .user-create-layout { grid-template-columns: 1fr; }
    .user-create-aside { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .user-create-page { padding-bottom: 12px; }
    .user-create-hero { padding: 18px; border-radius: 16px; }
    .user-create-hero-icon { width: 46px; height: 46px; border-radius: 14px; }
    .user-create-hero-icon svg { width: 22px; height: 22px; }
    .user-create-progress { padding-left: 0; justify-content: center; }
    .user-create-card { padding: 17px; border-radius: 15px; }
    .user-create-aside { grid-template-columns: 1fr; }
    .user-create-actions { position: static; align-items: stretch; flex-direction: column; }
    .user-create-actions-buttons { width: 100%; }
    .user-create-actions-buttons .btn { flex: 1 1 0; }
}
@media (max-width: 479px) {
    .user-create-hero { grid-template-columns: 1fr; }
    .user-create-hero-icon { display: none; }
    .user-create-progress { justify-content: flex-start; overflow-x: auto; }
    .user-create-progress i { width: 14px; }
    .user-create-section-head { gap: 10px; }
    .user-create-section-icon { width: 34px; height: 34px; }
    .user-create-switch-row { align-items: flex-start; }
    .user-create-actions-buttons { flex-direction: column-reverse; }
    .user-create-actions-buttons .btn { width: 100%; }
}
