:root {
    --color-orange: #d97669;
    --color-black: #000000;
    --color-main: #914f97;
    --color-blue: #232b66;
    --color-pink: #d15774;
    --color-darkblue: #000040;
    --color-graypink: #e7d9e1;
}

.preloader {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.uk-table-color thead th {
    background-color: var(--color-blue);
}

.padding-top-5
{
    padding-top: 5px;
}
.padding-top-10
{
    padding-top: 10px;
}
.uk-table-color thead th,
.uk-table-color thead a {
    color: white;
}

.uk-table-color thead a:hover {
    color: #d6d6d6;
}

input[disabled] {
    background-color: #e9ecef;
}

/*Custom scrollbar*/
.uk-overflow-auto::-webkit-scrollbar {
    width: 10px;
}

.uk-overflow-auto::-webkit-scrollbar-track {
    background-color: #f9f9f9;
}

.uk-overflow-auto::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background-color: #bec4ca;
}

/* Переопределение стилей для UIkit Notification */
/*
 * Success
 */
.uk-notification-message-success {
    display: flex;
    align-items: center;
    background-color: #32d296;
    color: white;
    font-size: 0.95em;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.uk-notification-message-success::before {
    font-family: "Material Symbols Outlined";
    font-size: 1.4em;
    content: '\e5ca';
    margin-right: 10px;
}

/*
 * Warning
 */
.uk-notification-message-warning {
    display: flex;
    align-items: center;
    background-color: #faa05a;
    color: white;
    font-size: 0.95em;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.uk-notification-message-warning::before {
    font-family: "Material Symbols Outlined";
    font-size: 1.4em;
    content: '\e645';
    margin-right: 10px;
}

.uk-notification-message-primary {
    display: flex;
    align-items: center;
    background-color: #1e87f0;
    color: white;
    font-size: 0.95em;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);

}

.uk-notification-message-primary::before {
    font-family: "Material Symbols Outlined";
    font-size: 1.4em;
    content: '\e88e';
    margin-right: 10px;
}

/*
 * Danger
 */
.uk-notification-message-danger {
    display: flex;
    align-items: center;
    background-color: #f0506e;
    color: white;
    font-size: 0.95em;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);

}

.uk-notification-message-danger::before {
    font-family: "Material Symbols Outlined";
    font-size: 1.4em;
    content: '\e000';
    margin-right: 10px;
}

.uk-notification-message-success .uk-close,
.uk-notification-message-danger .uk-close,
.uk-notification-message-warning .uk-close {
    color: white;
    top: 7px;
    right: 7px;
    width: 12px;
    height: 12px;
}

.ul-spinner {
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Настройка под flatpickr */

.flatpickr-input[readonly],
.flatpickr-input[readonly] {
    background-color: white;
}
.custom-selected-form-overflow{
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.uk-button-default:hover{
    background-color: var(--color-blue);
    color: white;
}
/*
 * White
 */
.uk-button-white {
    background-color: white;
    color: #333;
    border: 1px solid transparent;
}
/* Hover */
.uk-button-white:hover {
    background-color: #e5e5e5;
    color: #333;
}
/* OnClick + Active */
.uk-button-white:active,
.uk-button-white.uk-active {
    background-color: #e5e5e5;
    color: #333;
}

/*
 * Violet
 */
.uk-button-main {
    background-color: #763e7b;
    color: #fff;
    border: 1px solid transparent;
}
/* Hover */
.uk-button-main:hover {
    background-color: #5f3464;
    color: white;
}
/* OnClick + Active */
.uk-button-main:active,
.uk-button-main.uk-active {
    background-color: #5f3464;
    color: #fff;
}

.uk-table-custom th{
    border-left: 2px solid rgba(255, 255, 255, 0.192);
    border-bottom: 2px solid rgba(255, 255, 255, 0.192);
    text-align: center;
    vertical-align: middle;
    text-wrap: nowrap;
    /* font-size: 15px; */
    margin-top: 10px;
    border-collapse: collapse;
    height: 50%;
}

.uk-table-custom td{
    border-left: 1px solid rgba(65, 63, 63, 0.144);
    vertical-align: middle;
}

.force-box {
    max-width: 420px;
    width: 100%;
}

.password-toggle {
    cursor: pointer;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #555;
}
.uk-form-controls {
    position: relative;
}

.layout-viewport-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.layout-viewport-card {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.registry-page {
    box-sizing: border-box;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 16px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.registry-page__section {
    box-sizing: border-box;
    flex: 0 0 auto;
}

.registry-filter-card {
    border: 0;
}

.registry-filter-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: stretch;
}

.registry-filter-search-field {
    flex: 1 1 100%;
}

.registry-filter-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #5c677d;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.registry-filter-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.registry-filter-actions .uk-button.uk-button-danger {
    background: #ffffff !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
}

.registry-filter-actions .uk-button.uk-button-danger:hover {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border-color: #cbd5e1 !important;
}

.registry-filter-toolbar {
    display: flex;
    flex: 0 1 auto;
    flex-wrap: nowrap;
    gap: 12px;
    align-items: end;
    justify-content: flex-start;
    min-width: 0;
}

.registry-filter-toolbar .registry-filter-field {
    flex: 0 0 250px;
    max-width: 250px;
}

.registry-filter-toolbar .registry-filter-field--narrow {
    flex-basis: 250px;
    max-width: 250px;
}

.registry-filter-toolbar .registry-filter-field--tiny {
    flex-basis: 190px;
    max-width: 190px;
}

.registry-filter-toolbar-shell {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(82, 98, 122, 0.12);
}

.registry-filter-toolbar-shell > .registry-filter-actions {
    margin-left: auto;
}

@media (max-width: 1200px) {
    .registry-filter-toolbar-shell {
        flex-wrap: wrap;
        gap: 12px;
    }

    .registry-filter-toolbar {
        flex: 1 1 100%;
        flex-wrap: wrap;
    }

    .registry-filter-toolbar-shell > .registry-filter-actions {
        margin-left: 0;
    }
}

.registry-filter-toggle {
    position: relative;
}

.registry-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    margin-left: 8px;
    padding: 0 6px;
    border-radius: 999px;
    background: #1e87f0;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.registry-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.registry-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f0f4fa;
    color: #334155;
    font-size: 13px;
}

.registry-filter-chip strong {
    font-weight: 700;
}

.registry-filter-drawer-shell[hidden] {
    display: none !important;
}

.registry-filter-drawer-shell {
    position: fixed;
    inset: 0;
    z-index: 1200;
}

.registry-filter-drawer-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.42);
}

.registry-filter-drawer {
    position: absolute;
    top: 0;
    right: 0;
    width: min(460px, 100%);
    height: 100%;
    padding: 24px;
    background: #fff;
    box-shadow: -24px 0 60px rgba(15, 23, 42, 0.18);
    overflow-y: auto;
}

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

.registry-filter-drawer-title {
    margin: 0;
}

.registry-filter-drawer-subtitle {
    margin-top: 6px;
    color: #5c677d;
}

.registry-filter-close {
    border: 0;
    background: transparent;
    color: #334155;
    cursor: pointer;
}

.registry-filter-grid {
    display: grid;
    gap: 16px;
}

.registry-filter-field {
    display: grid;
    gap: 6px;
}

.registry-filter-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.registry-page__table-card {
    box-sizing: border-box;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    margin-top: 4px;
}

.registry-page__table-scroll {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    background: #fff;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.registry-page__table-scroll::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.registry-page__table-scroll .uk-table {
    margin-bottom: 0;
}

.registry-page__table-scroll .uk-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.18);
}

.registry-page__table-scroll .uk-table-color thead th {
    background-color: var(--color-blue);
}

.registry-page__table-scroll .uk-table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(244, 247, 252, 0.72);
}

.registry-page__table-footer {
    flex: 0 0 auto;
    margin-top: 10px;
}

.registry-page__scrollbar {
    position: absolute;
    top: 10px;
    right: 4px;
    bottom: 10px;
    width: 5px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: 4;
}

.registry-page__table-scroll.is-scrollbar-visible .registry-page__scrollbar,
.registry-page__table-scroll:hover .registry-page__scrollbar {
    opacity: 1;
}

.registry-page__scrollbar-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.05);
}

.registry-page__scrollbar-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 24px;
    border-radius: 999px;
    background: rgba(71, 85, 105, 0.42);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
    transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.registry-page__table-scroll.is-scrollbar-visible .registry-page__scrollbar-thumb,
.registry-page__table-scroll:hover .registry-page__scrollbar-thumb {
    background: rgba(71, 85, 105, 0.58);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.16);
}

.users-registry-table-scroll {
    max-height: calc(100vh - 420px);
    min-height: 240px;
    overflow: auto;
    scrollbar-width: thin;
    -ms-overflow-style: auto;
}

.users-registry-table-scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.users-registry-table-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(71, 85, 105, 0.42);
}

.users-registry-table-scroll::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.05);
}

.users-registry-table-scroll .registry-page__scrollbar {
    display: none !important;
}

.users-registry-table-scroll .uk-table {
    min-width: 820px;
}

/* Keep large permission-driven menus inside the header instead of letting
 * UIkit's absolutely positioned .uk-navbar-center overlap the logo/profile. */
.app-navbar {
    align-items: stretch;
    min-width: 0;
}

.app-navbar > .uk-navbar-left,
.app-navbar > .uk-navbar-right {
    flex: 0 0 auto;
}

.app-navbar__menu {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 6px 16px;
    box-sizing: border-box;
}

.app-top-menu {
    width: 100%;
    min-width: 0;
}

.app-top-menu__list.uk-subnav {
    justify-content: center;
    gap: 4px 20px;
    margin: 0;
}

.app-top-menu__list.uk-subnav > * {
    padding-left: 0;
}

.app-top-menu__list > li > a {
    white-space: nowrap;
}

/* Текущий рабочий контекст пользователя. */
.user-context-toggle {
    display: inline-flex;
    min-width: 0;
    max-width: min(320px, 28vw);
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    padding: 4px 0;
    margin-right: 8px;
    line-height: 1.2;
    text-align: right;
}

.user-context-toggle__name,
.user-context-toggle__region {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-context-toggle__name {
    color: #666;
    font-size: 14px;
    font-weight: 600;
}

.user-context-toggle__region {
    color: #586579;
    font-size: 12px;
}

.user-profile-dropdown {
    width: min(360px, calc(100vw - 32px));
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.user-profile-dropdown .uk-nav > li > a {
    display: flex;
    align-items: center;
    min-height: 36px;
    gap: 9px;
    padding: 4px 12px;
    color: #59616d;
    font-size: 14px;
    font-weight: 500;
}

.user-profile-dropdown .uk-nav > li > a:hover,
.user-profile-dropdown .uk-nav > li > a:focus {
    color: #1f2937;
}

.user-profile-dropdown .uk-nav > li > a > .material-symbols-outlined {
    flex: 0 0 22px;
    color: #697482;
    font-size: 16px;
    line-height: 1;
}

.user-profile-dropdown .uk-nav-header {
    margin-top: 5px;
    padding: 8px 12px 4px;
    color: #505862;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.user-profile-dropdown .uk-nav-divider {
    margin: 8px 12px;
    border-top-color: #e2e8f0;
}

.user-profile-group--current > a {
    color: #334155 !important;
    font-weight: 600 !important;
}

.user-profile-group__current {
    margin-left: auto;
    color: #64748b;
    font-size: 11px;
    font-weight: 400;
    white-space: nowrap;
}

.user-profile-region {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    padding: 8px 12px 12px;
    border: 1px solid #e2e5e8;
    border-radius: 4px;
}

.user-profile-region > .material-symbols-outlined {
    flex: 0 0 auto;
    margin-top: 20px;
    color: #64748b;
    font-size: 19px;
}

.user-profile-region__content {
    display: block;
    min-width: 0;
    flex: 1 1 auto;
}

.user-profile-region__label {
    display: block;
    margin-bottom: 5px;
    color: #505862;
    font-size: 12px;
    font-weight: 600;
}

.user-profile-region .uk-select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 40px;
    padding: 0 36px 0 12px;
    border: 1px solid #dfe3e8;
    border-radius: 4px;
    background-color: #fff;
    color: #555b63;
    font-size: 14px;
    line-height: 40px;
}

.user-profile-region .uk-select:hover {
    border-color: #c6ccd4;
}

.user-profile-region .uk-select:focus {
    border-color: #9aa4b2;
    box-shadow: 0 0 0 2px rgba(100, 116, 139, 0.12);
    outline: none;
}

@media (max-width: 640px) {
    .user-context-toggle {
        max-width: 45vw;
    }
}

/* Profile menu layout aligned with the application profile pattern. */
.user-context-toggle__name {
    color: #303846;
    font-size: 14px;
    font-weight: 700;
}

.user-context-toggle__role {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #46628a;
    font-size: 12px;
}

.user-context-toggle__role .material-symbols-outlined {
    color: #a5acb5;
    font-size: 18px;
}

.user-profile-dropdown {
    width: min(380px, calc(100vw - 32px));
    padding: 14px 16px;
    border: 1px solid #e0e4e9;
    border-radius: 0;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.user-profile-dropdown__title {
    padding: 0 8px 5px;
    color: #40536d;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.user-profile-dropdown__divider {
    height: 1px;
    margin: 10px 8px;
    background: #e0e4e9;
}

.user-profile-region {
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 4px 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.user-profile-region > .material-symbols-outlined {
    margin: 0;
    color: #40536d;
    font-size: 25px;
}

.user-profile-region__label {
    margin-bottom: 3px;
    color: #8a929e;
    font-size: 12px;
    font-weight: 400;
}

.user-profile-region .uk-select {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 32px;
    padding: 0 12px;
    border: 1px solid #dfe3e8;
    border-radius: 4px;
    background: #fff;
    color: #202a38;
    font-size: 16px;
    line-height: 32px;
    cursor: pointer;
}

.user-profile-region .uk-select:focus {
    outline: 2px solid rgba(70, 98, 138, 0.2);
    outline-offset: 2px;
}

.user-profile-dropdown .uk-nav > li > a {
    min-height: 36px;
    gap: 12px;
    padding: 3px 8px;
    color: #40536d;
    font-size: 15px;
    font-weight: 400;
}

.user-profile-dropdown .uk-nav > li > a > .material-symbols-outlined {
    flex-basis: 28px;
    color: #40536d;
    font-size: 25px;
}

.user-profile-dropdown .user-profile-group--current > a {
    color: #40536d !important;
    font-weight: 500 !important;
}

.user-profile-group__arrow {
    flex: 0 0 auto !important;
    margin-left: auto;
    font-size: 22px !important;
}

.user-profile-logout,
.user-profile-logout > .material-symbols-outlined {
    color: #b63f3f !important;
}

@media (max-width: 640px) {
    .user-profile-dropdown {
        width: calc(100vw - 24px);
        padding: 16px 12px;
    }

    .user-profile-region .uk-select,
    .user-profile-dropdown .uk-nav > li > a {
        font-size: 14px;
    }
}
