html,
body {
    height: 100%;
    margin: 0;
}

body.mps-zis-body {
    overflow: hidden !important;
    color: #1f2937;
    background: #eef3f8 !important;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
}

.mps-zis-body #container {
    height: 100vh;
    overflow: hidden;
}

.mps-zis-body .zis-brand-block {
    width: 205px !important;
}

.mps-zis-body .zis-logo-3d {
    letter-spacing: 2px !important;
}

.mps-zis-body .zis-account-dropdown {
    min-width: 170px;
}

.mps-zis-body .zis-account-caret-svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: rgba(255,255,255,.82);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mps-zis-body #sidebar .sidebar-list .mps-nav-disabled,
.mps-zis-body #sidebar .sidebar-list .mps-nav-disabled:hover,
.mps-zis-body #sidebar .sidebar-list .mps-nav-disabled:focus {
    color: rgba(255,255,255,.48) !important;
    cursor: default !important;
    background: transparent !important;
}

.mps-zis-body #sidebar .sidebar-list .mps-nav-disabled i {
    color: rgba(255,255,255,.42) !important;
}

/* CSK superadmin navigation groups use native disclosure semantics. */
.mps-zis-body #sidebar .sidebar-list .csk-nav-group {
    margin: 3px 0 6px;
}

.mps-zis-body #sidebar .sidebar-list .csk-nav-group > summary {
    list-style: none;
}

.mps-zis-body #sidebar .sidebar-list .csk-nav-group > summary::-webkit-details-marker {
    display: none;
}

.mps-zis-body #sidebar .sidebar-list .csk-nav-group-toggle {
    min-height: 34px !important;
    margin: 0 !important;
    color: #fff !important;
    cursor: pointer;
    background: rgba(255,255,255,.075) !important;
    border-color: rgba(255,255,255,.14) !important;
    font-weight: 600 !important;
}

.mps-zis-body #sidebar .sidebar-list .csk-nav-group[open] > .csk-nav-group-toggle {
    background: rgba(255,255,255,.12) !important;
    border-color: rgba(255,255,255,.20) !important;
}

.mps-zis-body #sidebar .sidebar-list .csk-nav-group-toggle:focus-visible {
    outline: 2px solid #fff !important;
    outline-offset: -2px !important;
}

.mps-zis-body #sidebar .sidebar-list .csk-nav-group-toggle .csk-nav-group-caret {
    width: 0 !important;
    min-width: 0 !important;
    height: 0 !important;
    margin-left: auto !important;
    opacity: .68 !important;
    transform: none !important;
    transition: none !important;
}

.mps-zis-body #sidebar .sidebar-list .csk-nav-group-items {
    list-style: none !important;
}

.mps-zis-body #sidebar .sidebar-list .csk-nav-group-items > li {
    margin: 0;
    padding: 0;
}

.mps-zis-body .mps-filter-short {
    max-width: 150px;
}

body.zis-layout-table.ima-pretragu #view-panel.mps-users-view {
    overflow: hidden !important;
    padding: 8px !important;
    background: #eef3f8 !important;
}

.mps-page-shell {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: 82px minmax(0, 1fr);
    gap: 8px;
    overflow: hidden;
}

.mps-summary-row {
    min-height: 0;
    display: grid;
    grid-template-columns: 150px 150px 150px minmax(320px, 1fr);
    gap: 8px;
    overflow: hidden;
}

.mps-card {
    min-width: 0;
    background: #ffffff;
    border: 1px solid #d7e3f1;
    border-radius: 8px;
    box-shadow: 0 2px 7px rgba(15, 23, 42, .07);
}

.mps-stat {
    padding: 8px 10px;
}

.mps-stat-label {
    display: block;
    color: #63758c;
    font-size: 11px;
    line-height: 14px;
}

.mps-stat strong {
    display: block;
    margin-top: 4px;
    color: #2f4664;
    font-size: 26px;
    line-height: 30px;
}

.mps-note {
    padding: 8px 10px;
    color: #50647c;
    font-size: 12px;
    line-height: 16px;
    overflow: auto;
}

.mps-note p {
    margin: 4px 0 0;
}

.mps-note-title {
    color: #2f4664;
    font-weight: 700;
}

.mps-table-card {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mps-panel-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 38px;
    padding: 7px 9px;
    color: #40516c;
    background: #f5f8fc;
    border-bottom: 1px solid #dbe6f2;
}

.mps-panel-title {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
}

.mps-panel-subtitle {
    display: inline-block;
    margin-left: 8px;
    color: #6b7c91;
    font-size: 12px;
}

.mps-pager {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mps-pager .form-control {
    width: 78px;
    height: 30px;
    padding: 4px 6px;
    font-size: 12px;
}

.mps-pager span {
    min-width: 72px;
    color: #40516c;
    font-weight: 700;
    text-align: center;
}

.mps-table-wrap {
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
}

.mps-table {
    width: 100%;
    min-width: 1180px;
    margin: 0;
    table-layout: fixed;
    font-size: 11.5px;
}

.mps-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    color: #344766;
    background: #f5f8fc;
    border-bottom: 1px solid #dbe6f2 !important;
}

.mps-table thead th[data-sort] {
    cursor: pointer;
}

.mps-table th,
.mps-table td {
    padding: 5px 6px !important;
    line-height: 16px !important;
    vertical-align: middle !important;
    white-space: normal;
    overflow-wrap: anywhere;
}

.mps-table .col-actions { width: 96px; }
.mps-table th:nth-child(2), .mps-table td:nth-child(2) { width: 112px; }
.mps-table th:nth-child(3), .mps-table td:nth-child(3) { width: 150px; }
.mps-table th:nth-child(4), .mps-table td:nth-child(4) { width: 116px; }
.mps-table th:nth-child(5), .mps-table td:nth-child(5) { width: 210px; }
.mps-table th:nth-child(6), .mps-table td:nth-child(6) { width: 78px; }
.mps-table th:nth-child(7), .mps-table td:nth-child(7) { width: 150px; }
.mps-table th:nth-child(8), .mps-table td:nth-child(8) { width: 190px; }
.mps-table th:nth-child(9), .mps-table td:nth-child(9) { width: 106px; }
.mps-table th:nth-child(10), .mps-table td:nth-child(10) { width: 110px; }
.mps-table th:nth-child(11), .mps-table td:nth-child(11) { width: 76px; }

.mps-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.mps-action-btn,
.mps-icon-btn {
    width: 27px;
    height: 27px;
    padding: 0;
    color: #244f82;
    background: #eef5fc;
    border: 1px solid #c9d8e8;
    border-radius: 4px;
    line-height: 25px;
}

.mps-icon-btn {
    width: 30px;
    height: 30px;
    line-height: 28px;
}

.mps-action-btn:hover,
.mps-action-btn:focus,
.mps-icon-btn:hover,
.mps-icon-btn:focus {
    color: #0f2f63;
    background: #e2eef9;
}

.mps-action-danger {
    color: #922823;
    background: #fff1f0;
    border-color: #f1c2bf;
}

.mps-action-success {
    color: #256729;
    background: #eff8ef;
    border-color: #c7e2c9;
}

.mps-empty {
    padding: 18px !important;
    color: #68798e;
    text-align: center;
}

.mps-badge {
    display: inline-block;
    margin: 1px 2px 1px 0;
    padding: 2px 6px;
    color: #244f82;
    background: #eef5fc;
    border: 1px solid #c9d8e8;
    border-radius: 12px;
    font-size: 11px;
    line-height: 14px;
    white-space: nowrap;
}

.mps-status {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 12px;
    font-size: 11px;
    line-height: 15px;
    font-weight: 700;
}

.mps-status.active {
    color: #256729;
    background: #eff8ef;
    border: 1px solid #c7e2c9;
}

.mps-status.inactive {
    color: #922823;
    background: #fff1f0;
    border: 1px solid #f1c2bf;
}

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

.mps-form-grid > .form-group {
    min-width: 0;
}

.mps-form-grid label,
.app-modal label {
    display: block;
    margin: 0 0 4px 0;
    color: #344766;
    font-size: 12px;
    line-height: 14px;
    font-weight: 700;
}

.app-modal .select2-container {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

#user_modal .select2-container {
    width: 100% !important;
    max-width: 100% !important;
}

#user_modal .mps-form-grid .form-group > .select2-container {
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

#user_modal .mps-form-grid .select2-selection--single {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
}

.mps-form-grid .form-control,
.app-modal .form-control,
.app-modal .select2-container--default .select2-selection--single {
    height: 32px !important;
    min-height: 32px !important;
    border: 1px solid #aebed0 !important;
    border-radius: 4px !important;
    box-shadow: inset 0 1px 1px rgba(15, 23, 42, .05) !important;
    color: #111827 !important;
    font-size: 13px !important;
}

.app-modal .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 30px !important;
}

.app-modal .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 30px !important;
}

.mps-check-section {
    margin-top: 12px;
    padding: 10px;
    border: 1px solid #dbe6f2;
    border-radius: 6px;
    background: #f8fbff;
}

.mps-check-title {
    margin-bottom: 8px;
    color: #344766;
    font-weight: 700;
}

.mps-check-help {
    margin: -2px 0 8px;
    color: #5f6f86;
    font-size: 12px;
    line-height: 1.35;
}

.mps-field-help {
    min-height: 16px;
    margin-top: 3px;
    color: #66758b;
    font-size: 11px;
    line-height: 14px;
}

.mps-field-help.pending {
    color: #66758b;
}

.mps-field-help.success {
    color: #18794e;
}

.mps-field-help.error {
    color: #a12622;
}

.mps-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 6px 10px;
}

.mps-check {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: #1f2937;
    font-size: 13px;
    font-weight: 400;
}

.mps-check input {
    margin: 0;
}

.mps-check-disabled {
    color: #7b8794 !important;
    opacity: .65;
    cursor: not-allowed;
}

.mps-check-disabled input {
    cursor: not-allowed;
}

.has-error label,
.mps-check-section.has-error .mps-check-title {
    color: #a12622 !important;
}

.has-error .form-control,
.mps-check-section.has-error {
    border-color: #c62828 !important;
    box-shadow: 0 0 0 2px rgba(198, 40, 40, .10) !important;
}

.mps-btn {
    height: 32px;
    min-height: 32px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    line-height: 18px;
    box-shadow: none;
}

.mps-btn-light {
    color: #244f82;
    background: #eef5fc;
    border-color: #c9d8e8;
}

.mps-btn-primary {
    color: #ffffff;
    background: #2f67ad;
    border-color: #285893;
}

.mps-btn-danger {
    color: #ffffff;
    background: #b4322d;
    border-color: #922823;
}

.app-modal .modal-content {
    border: 1px solid #cbd8e6;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .28);
}

.app-modal .modal-header {
    min-height: 42px;
    padding: 10px 12px;
    color: #2f4664;
    background: #f5f8fc;
    border-bottom: 1px solid #dbe6f2;
    cursor: move;
}

.app-modal .modal-title {
    font-size: 15px;
    font-weight: 700;
}

.app-modal .modal-body {
    background: #ffffff;
}

.app-modal .modal-footer {
    background: #f8fbff;
    border-top: 1px solid #dbe6f2;
}

.mps-loader {
    position: fixed;
    inset: 0;
    z-index: 30000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(238, 243, 248, .64);
}

.mps-loader-box {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 16px;
    color: #2f4664;
    background: #ffffff;
    border: 1px solid #cbd8e6;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .16);
    font-weight: 700;
}

.mps-loader-box i {
    color: #2f67ad;
}

@media (max-width: 1100px) {
    .mps-summary-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: 72px 60px;
        height: 140px;
    }

    .mps-note {
        grid-column: 1 / -1;
    }

    .mps-page-shell {
        grid-template-rows: 140px minmax(0, 1fr);
    }
}

@media (max-width: 720px) {
    .mps-summary-row,
    .mps-form-grid {
        grid-template-columns: 1fr;
    }
}

/* CSUK header keeps ZIS chrome positions; long system name stays clipped in the fixed brand block. */
.mps-zis-body .zis-logo-subtitle {
    max-width: 190px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}


.mps-search-autocomplete {
    z-index: 30020 !important;
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px !important;
    border: 1px solid #9fb5cc !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .18) !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 12px !important;
}

.mps-search-autocomplete .ui-menu-item {
    margin: 0 !important;
    padding: 0 !important;
}

.mps-search-autocomplete .ui-menu-item-wrapper,
.mps-search-autocomplete .ui-state-active {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.mps-autocomplete-item {
    position: relative;
    min-height: 42px;
    padding: 6px 72px 6px 8px;
    color: #22344d;
    border-radius: 4px;
    cursor: pointer;
}

.mps-autocomplete-item:hover,
.ui-state-active .mps-autocomplete-item {
    background: #eef5fc;
}

.mps-autocomplete-main {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #244f82;
    font-weight: 700;
    line-height: 16px;
}

.mps-autocomplete-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #5e7188;
    line-height: 15px;
}

.mps-autocomplete-status {
    position: absolute;
    right: 7px;
    top: 7px;
    padding: 2px 6px;
    color: #256729;
    background: #eff8ef;
    border: 1px solid #c7e2c9;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    line-height: 13px;
}


.mps-table tbody tr.mps-row-selected > td {
    background: #fff7d6 !important;
    box-shadow: inset 0 1px 0 #f2d05a, inset 0 -1px 0 #f2d05a;
}

.mps-table tbody tr.mps-row-selected > td:first-child {
    box-shadow: inset 3px 0 0 #d69e00, inset 0 1px 0 #f2d05a, inset 0 -1px 0 #f2d05a;
}

.mps-table tbody tr.mps-row-selected:hover > td {
    background: #ffefad !important;
}

.mps-toolbar-note {
    flex: 1 1 auto;
    min-width: 260px;
    color: #40516c;
    font-size: 12px;
    line-height: 30px;
}

.mps-toolbar-note code,
.mps-panel-subtitle code {
    color: #244f82;
    background: #eef5fc;
}

.mps-level-shell {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: 82px minmax(0, 1fr);
    gap: 8px;
    overflow: hidden;
}

.mps-level-summary {
    grid-template-columns: 140px 140px 150px 150px minmax(360px, 1fr);
}

.mps-level-grid {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    grid-template-rows: minmax(0, .85fr) minmax(0, 1fr) minmax(0, .75fr);
    gap: 8px;
    overflow: hidden;
}

.mps-level-grid .mps-table-card {
    min-height: 0;
}

.mps-level-wide {
    grid-column: 1 / -1;
}

.mps-table.mps-table-auto {
    min-width: 0;
    table-layout: auto;
}

.mps-table.mps-table-auto th,
.mps-table.mps-table-auto td {
    width: auto !important;
}

.mps-level-def {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 12px;
    font-size: 11px;
    line-height: 15px;
    font-weight: 700;
    white-space: nowrap;
}

.mps-level-def.defined {
    color: #256729;
    background: #eff8ef;
    border: 1px solid #c7e2c9;
}

.mps-level-def.legacy {
    color: #8a5a00;
    background: #fff7d6;
    border: 1px solid #ecd184;
}

.mps-row-muted td {
    color: #68798e;
    background: #fafcff;
}

@media (max-width: 1180px) {
    .mps-level-summary {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-template-rows: 72px 62px;
        height: 142px;
    }

    .mps-level-summary .mps-note {
        grid-column: 1 / -1;
    }

    .mps-level-shell {
        grid-template-rows: 142px minmax(0, 1fr);
    }

    .mps-level-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(5, minmax(170px, 1fr));
    }

    .mps-level-wide {
        grid-column: auto;
    }
}



.mps-form-wide {
    grid-column: 1 / -1;
}

.mps-row-sub {
    margin-top: 2px;
    color: #6b7c91;
    font-size: 10.5px;
    line-height: 13px;
}

.mps-module-shell {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: 82px minmax(0, 1fr);
    gap: 8px;
    overflow: hidden;
}

.mps-module-summary {
    grid-template-columns: 130px 130px 130px 130px minmax(360px, 1fr);
}

.mps-module-grid {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    overflow: hidden;
}

.mps-module-grid .mps-table-card {
    min-height: 0;
}

.mps-module-grid .mps-table th:first-child,
.mps-module-grid .mps-table td:first-child {
    width: 54px !important;
    text-align: center;
}

.mps-module-grid .mps-table th,
.mps-module-grid .mps-table td {
    white-space: normal;
    overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
    .mps-module-summary {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-template-rows: 72px 62px;
        height: 142px;
    }

    .mps-module-summary .mps-note {
        grid-column: 1 / -1;
    }

    .mps-module-shell {
        grid-template-rows: 142px minmax(0, 1fr);
    }

    .mps-module-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, minmax(180px, 1fr));
    }
}

.mps-role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 7px;
    max-height: 190px;
    overflow: auto;
    padding-right: 2px;
}

.mps-role-check {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 6px 8px;
    align-items: start;
    min-width: 0;
    margin: 0;
    padding: 7px 8px;
    color: #40516c;
    background: #f8fbff;
    border: 1px solid #d6e2ef;
    border-radius: 6px;
    cursor: pointer;
}

.mps-role-check input {
    margin-top: 2px;
}

.mps-role-main {
    min-width: 0;
}

.mps-role-main strong,
.mps-role-main em,
.mps-role-perms {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.mps-role-main strong {
    color: #2f4664;
    font-size: 12px;
    line-height: 15px;
}

.mps-role-main em {
    margin-top: 2px;
    color: #66788d;
    font-size: 11px;
    font-style: normal;
    line-height: 14px;
}

.mps-role-perms {
    grid-column: 2;
    color: #6d7d91;
    font-size: 10.5px;
    line-height: 14px;
}

.mps-role-empty {
    grid-column: 1 / -1;
    padding: 8px;
}

/* Korisnički dijalog: viewport-safe layout kao u sređenim plodnost modalima. */
#user_modal {
    overflow: hidden !important;
}

#user_modal .modal-dialog {
    width: 720px !important;
    max-width: calc(100vw - 36px) !important;
    margin: 18px auto !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
}

#user_modal .modal-content {
    max-height: calc(100vh - 36px) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

#user_modal #user_form {
    min-height: 0;
    max-height: inherit;
    display: flex;
    flex-direction: column;
}

#user_modal .modal-header {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 7px 10px;
    cursor: default;
}

#user_modal .modal-header .close {
    width: 22px;
    height: 22px;
    margin-top: -1px;
    line-height: 20px;
}

#user_modal .modal-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    line-height: 20px;
}

#user_modal .modal-body {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 12px;
    background: #ffffff;
}

#user_modal .modal-footer {
    flex: 0 0 auto;
    padding: 8px 10px;
}

#user_modal .form-group {
    margin-bottom: 2px;
}

#user_modal .mps-check-section {
    margin-top: 9px;
    padding: 8px;
}

#user_modal .mps-check-title {
    margin-bottom: 6px;
}

#user_modal .mps-check-grid {
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: 5px 8px;
    min-width: 0;
}

#user_modal label.mps-check {
    display: grid !important;
    grid-template-columns: 16px minmax(0, 1fr);
    align-items: start;
    min-width: 0;
    font-weight: 400 !important;
    line-height: 16px;
    white-space: normal;
}

#user_modal label.mps-check span {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
}

#user_modal .mps-role-grid {
    max-height: 150px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

@media (max-width: 720px) {
    #user_modal .modal-dialog {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        margin: 10px auto !important;
    }

    #user_modal .modal-content {
        max-height: calc(100vh - 20px) !important;
    }

    #user_modal .modal-body {
        padding: 8px;
    }
}

.mps-credentials-shell {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: 82px minmax(0, 1fr);
    gap: 8px;
    overflow: hidden;
}

.mps-credentials-summary {
    grid-template-columns: 120px 150px 130px 130px 120px minmax(320px, 1fr);
}

.mps-credentials-table th:first-child,
.mps-credentials-table td:first-child {
    width: 132px !important;
    text-align: left;
}

.mps-credential-actions {
    display: inline-grid;
    grid-template-columns: repeat(4, 27px);
    gap: 4px;
}

.mps-credential-actions .mps-action-btn[disabled] {
    opacity: .42;
    cursor: default;
}

@media (max-width: 1180px) {
    .mps-credentials-summary {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        grid-template-rows: 72px 62px;
        height: 142px;
    }

    .mps-credentials-summary .mps-note {
        grid-column: 1 / -1;
    }

    .mps-credentials-shell {
        grid-template-rows: 142px minmax(0, 1fr);
    }
}

body.mps-auth-body {
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
    color: #1f2937;
    background: #eef3f8;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
}

.mps-auth-topbar {
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 14px;
    color: #ffffff;
    background: #233a5a;
    border-bottom: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 2px 8px rgba(15, 23, 42, .18);
}

.mps-auth-brand,
.mps-auth-top-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mps-auth-logo {
    flex: 0 0 42px;
    width: 42px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #233a5a;
    background: #ffffff;
    border-radius: 6px;
    font-weight: 800;
    letter-spacing: 1px;
    box-shadow: inset 0 -2px 0 rgba(15,23,42,.12);
}

.mps-auth-system {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
    line-height: 18px;
}

.mps-auth-page {
    color: rgba(255,255,255,.72);
    font-size: 12px;
    line-height: 16px;
}

.mps-auth-emblem {
    width: 36px;
    height: 42px;
    object-fit: contain;
}

.mps-auth-top-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    color: #ffffff;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 5px;
    line-height: 30px;
}

.mps-auth-top-btn:hover,
.mps-auth-top-btn:focus {
    color: #ffffff;
    background: rgba(255,255,255,.18);
}

.mps-auth-main {
    height: calc(100vh - 54px);
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: auto;
}

.mps-auth-card {
    min-width: 0;
    width: min(430px, 100%);
    background: #ffffff;
    border: 1px solid #d7e3f1;
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .14);
    overflow: hidden;
}

.mps-auth-card-wide {
    width: min(500px, 100%);
}

.mps-auth-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 12px;
    color: #2f4664;
    background: #f5f8fc;
    border-bottom: 1px solid #dbe6f2;
    font-weight: 700;
}

.mps-auth-card-head i {
    color: #2f67ad;
}

.mps-auth-form {
    padding: 14px;
}

.mps-auth-form label {
    display: block;
    margin: 0 0 4px;
    color: #344766;
    font-size: 12px;
    font-weight: 700;
}

.mps-auth-form .form-control {
    height: 34px;
    margin-bottom: 10px;
    border: 1px solid #aebed0;
    border-radius: 4px;
    color: #111827;
    box-shadow: inset 0 1px 1px rgba(15, 23, 42, .05);
}

.mps-auth-password-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 6px;
    margin-bottom: 12px;
}

.mps-auth-password-row .form-control {
    margin-bottom: 0;
}

.mps-auth-eye {
    width: 36px;
    height: 34px;
    padding: 0;
    color: #244f82;
    background: #eef5fc;
    border: 1px solid #c9d8e8;
    border-radius: 4px;
}

.mps-auth-submit {
    width: 100%;
    height: 34px;
    color: #ffffff;
    background: #2f67ad;
    border: 1px solid #285893;
    border-radius: 4px;
    font-weight: 700;
}

.mps-auth-submit:hover,
.mps-auth-submit:focus {
    color: #ffffff;
    background: #285893;
}

.mps-auth-actions-row {
    display: grid;
    grid-template-columns: minmax(0, .75fr) minmax(0, 1fr);
    gap: 8px;
    margin-top: 4px;
}

.mps-auth-portal {
    height: calc(100vh - 54px);
    min-height: 0;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    overflow: hidden;
}

.mps-auth-profile,
.mps-auth-modules-card {
    width: auto;
    height: 100%;
    box-shadow: 0 3px 12px rgba(15, 23, 42, .10);
}

.mps-auth-profile-body {
    padding: 12px;
}

.mps-auth-profile-body strong,
.mps-auth-profile-body span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mps-auth-profile-body strong {
    color: #20324c;
    font-size: 16px;
    line-height: 22px;
}

.mps-auth-profile-body span {
    margin-top: 5px;
    color: #5e7188;
    line-height: 17px;
}

.mps-auth-mini-badge {
    display: inline-block !important;
    width: auto;
    max-width: 100%;
    padding: 3px 8px;
    color: #244f82 !important;
    background: #eef5fc;
    border: 1px solid #c9d8e8;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.mps-auth-modules-card {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.mps-auth-modules {
    min-height: 0;
    flex: 1 1 auto;
    padding: 10px;
    overflow: auto;
}

.mps-auth-module {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 52px;
    padding: 8px;
    border-bottom: 1px solid #edf2f8;
}

.mps-auth-module:last-child {
    border-bottom: 0;
}

.mps-auth-module-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2f67ad;
    background: #eef5fc;
    border: 1px solid #c9d8e8;
    border-radius: 6px;
}

.mps-auth-module-main {
    min-width: 0;
}

.mps-auth-module-main strong,
.mps-auth-module-main span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mps-auth-module-main strong {
    color: #20324c;
    line-height: 18px;
}

.mps-auth-module-main span {
    color: #6b7c91;
    font-size: 11px;
    line-height: 15px;
}

.mps-auth-empty {
    padding: 18px;
    color: #68798e;
    text-align: center;
}

@media (max-width: 760px) {
    body.mps-auth-body {
        overflow: auto;
    }

    .mps-auth-main,
    .mps-auth-portal {
        height: auto;
        min-height: calc(100vh - 54px);
    }

    .mps-auth-portal {
        grid-template-columns: 1fr;
        overflow: auto;
    }

    .mps-auth-actions-row,
    .mps-auth-module {
        grid-template-columns: 1fr;
    }

    .mps-auth-module-action .btn {
        width: 100%;
    }
}

.mps-session-shell {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: 82px minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    overflow: hidden;
}

.mps-session-summary {
    grid-template-columns: 140px 140px 140px 120px 120px minmax(320px, 1fr);
}

.mps-session-card {
    min-height: 0;
}

.mps-session-table th:first-child,
.mps-session-table td:first-child {
    width: 74px !important;
    text-align: center;
}

.mps-session-table th:nth-child(2),
.mps-session-table td:nth-child(2) { min-width: 180px; }
.mps-session-table th:nth-child(3),
.mps-session-table td:nth-child(3) { min-width: 150px; }
.mps-session-table th:nth-child(4),
.mps-session-table td:nth-child(4) { width: 90px !important; }
.mps-session-table th:nth-child(5),
.mps-session-table td:nth-child(5) { min-width: 105px; }

.mps-audit-table th:nth-child(1),
.mps-audit-table td:nth-child(1) { min-width: 128px; }
.mps-audit-table th:nth-child(2),
.mps-audit-table td:nth-child(2) { min-width: 190px; }
.mps-audit-table th:nth-child(3),
.mps-audit-table td:nth-child(3) { width: 86px !important; }
.mps-audit-table th:nth-child(8),
.mps-audit-table td:nth-child(8) { min-width: 220px; }

@media (max-width: 1180px) {
    .mps-session-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: 72px 72px;
        height: 150px;
    }
    .mps-session-summary .mps-note { grid-column: 1 / -1; }
    .mps-session-shell { grid-template-rows: 150px minmax(0, 1fr) minmax(0, 1fr); }
}

.mps-integration-shell {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: 82px minmax(0, 1fr);
    gap: 8px;
    overflow: hidden;
}

.mps-integration-summary {
    grid-template-columns: 130px 130px 130px minmax(420px, 1fr);
}

.mps-integration-grid {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-auto-rows: minmax(170px, auto);
    gap: 8px;
    overflow: auto;
    padding-right: 2px;
}

.mps-integration-wide {
    grid-column: 1 / -1;
}

.mps-integration-list {
    padding: 8px 10px 10px;
    display: grid;
    gap: 7px;
    overflow: auto;
}

.mps-integration-list > div {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 6px;
}

.mps-integration-list span {
    color: #627187;
    font-size: 12px;
    font-weight: 700;
}

.mps-integration-list code {
    white-space: normal;
    word-break: break-word;
    background: #f5f8fc;
    color: #24354f;
}

.mps-code-block {
    margin: 0;
    padding: 10px 12px;
    height: 100%;
    min-height: 130px;
    overflow: auto;
    border: 0;
    border-radius: 0;
    background: #17212f;
    color: #e8f0f8;
    font-size: 12px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 1180px) {
    .mps-integration-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: 72px 72px;
        height: 150px;
    }
    .mps-integration-summary .mps-note { grid-column: 1 / -1; }
    .mps-integration-shell { grid-template-rows: 150px minmax(0, 1fr); }
    .mps-integration-grid { grid-template-columns: 1fr; }
    .mps-integration-wide { grid-column: auto; }
    .mps-integration-list > div { grid-template-columns: 1fr; gap: 4px; }
}


.mps-ready-shell {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: 82px minmax(0, 1fr);
    gap: 8px;
    overflow: hidden;
}

.mps-ready-summary {
    grid-template-columns: 130px 130px 130px 150px minmax(320px, 1fr);
}

.mps-ready-grid {
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(210px, auto);
    gap: 8px;
    overflow: auto;
    padding-right: 2px;
}

.mps-ready-wide {
    grid-column: 1 / -1;
}

.mps-ready-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 10px;
    color: #24364f;
    font-size: 12.5px;
    line-height: 18px;
}

.mps-ready-kv {
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 5px 0;
    border-bottom: 1px solid #edf3fa;
}

.mps-ready-kv span {
    color: #61758e;
    font-weight: 700;
}

.mps-ready-kv strong,
.mps-ready-kv code,
.mps-ready-doc-grid code {
    min-width: 0;
    overflow-wrap: anywhere;
}

.mps-ready-note {
    margin-top: 10px;
    padding: 8px;
    color: #4c617a;
    background: #f8fbff;
    border: 1px solid #dbe6f2;
    border-radius: 6px;
}

.mps-ready-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.mps-ready-list {
    margin: 0 0 10px 18px;
    padding: 0;
}

.mps-ready-list li {
    margin-bottom: 6px;
}

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

.mps-ready-doc-grid div {
    min-width: 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #edf3fa;
}

.mps-ready-doc-grid span {
    display: block;
    color: #61758e;
    font-weight: 700;
}

.mps-ready-table {
    min-width: 980px;
}

.mps-muted {
    color: #7a8796;
}

@media (max-width: 1100px) {
    .mps-ready-summary {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-template-rows: 72px 60px;
        height: 140px;
    }
    .mps-ready-summary .mps-note {
        grid-column: 1 / -1;
    }
    .mps-ready-shell {
        grid-template-rows: 140px minmax(0, 1fr);
    }
    .mps-ready-grid,
    .mps-ready-doc-grid {
        grid-template-columns: 1fr;
    }
}

/* CSK korisnički dijalog: kompaktnija gornja forma i veći prostor za prava. */
#user_modal .modal-dialog {
    width: 840px !important;
}

#user_modal .modal-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 7px;
    overflow: hidden !important;
}

#user_modal .mps-form-grid {
    flex: 0 0 auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 8px;
}

#user_modal .mps-form-grid label {
    margin-bottom: 2px;
    font-size: 11px;
    line-height: 12px;
}

#user_modal .mps-form-grid .form-control,
#user_modal .mps-form-grid .select2-container--default .select2-selection--single {
    height: 28px !important;
    min-height: 28px !important;
    font-size: 12px !important;
}

#user_modal .mps-form-grid .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 26px !important;
}

#user_modal .mps-form-grid .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 26px !important;
}

#user_modal #group_modules {
    flex: 0 0 auto;
    margin-top: 0;
    padding: 7px 8px;
}

#user_modal #group_modules .mps-check-title {
    margin-bottom: 4px;
}

#user_modal #modules_box {
    max-height: 58px;
    overflow-y: auto;
    padding-right: 2px;
}

#user_modal #group_roles {
    flex: 1 1 auto;
    min-height: 245px;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#user_modal .mps-check-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

#user_modal .mps-check-count {
    margin-top: 1px;
    color: #64748b;
    font-size: 11px;
    line-height: 13px;
    font-weight: 400;
}

#user_modal .mps-check-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

#user_modal .mps-mini-btn {
    height: 26px;
    padding: 3px 8px;
    color: #2f4664;
    background: #ffffff;
    border: 1px solid #b9c9db;
    border-radius: 4px;
    font-size: 11px;
    line-height: 18px;
    box-shadow: none;
}

#user_modal .mps-mini-btn:hover,
#user_modal .mps-mini-btn:focus {
    color: #1f5f9f;
    background: #eef5fc;
    border-color: #8fb0d4;
}

#user_modal .mps-mini-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

#user_modal #group_roles .mps-check-help {
    flex: 0 0 auto;
    margin: 0 0 5px 0;
}

#user_modal #group_roles .mps-role-grid {
    flex: 1 1 auto;
    min-height: 165px;
    max-height: none;
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
    align-content: start;
    overflow-y: auto;
}

@media (max-width: 760px) {
    #user_modal .modal-body {
        display: block !important;
        overflow-y: auto !important;
    }

    #user_modal .mps-form-grid {
        grid-template-columns: 1fr;
    }

    #user_modal #group_roles {
        min-height: 260px;
    }

    #user_modal .mps-check-head {
        align-items: flex-start;
        flex-direction: column;
    }

    #user_modal .mps-check-actions {
        justify-content: flex-start;
    }
}

/* CSK portal uses the operational topbar, not the standalone auth header. */
body.mps-portal-body {
    overflow: hidden !important;
    background: #eef3f8 !important;
}

.mps-portal-body .zis-brand-block {
    width: 205px !important;
}

.mps-portal-body .zis-logo-3d {
    letter-spacing: 2px !important;
}

.mps-portal-body .zis-account-dropdown {
    min-width: 178px;
}

.mps-portal-body .zis-account-caret-svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: rgba(255,255,255,.82);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mps-portal-main {
    position: fixed;
    top: 54px;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 0;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    overflow: hidden;
    background: #eef3f8;
}

.mps-portal-profile-card,
.mps-portal-modules-card {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mps-portal-profile-body {
    padding: 13px;
}

.mps-portal-profile-body strong,
.mps-portal-profile-body span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mps-portal-profile-body strong {
    color: #20324c;
    font-size: 17px;
    line-height: 24px;
}

.mps-portal-profile-body span {
    margin-top: 6px;
    color: #5e7188;
    line-height: 18px;
}

.mps-portal-modules {
    min-height: 0;
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    align-content: start;
    gap: 10px;
    padding: 10px;
    overflow: auto;
}

.mps-portal-module-card {
    min-height: 148px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 10px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #d7e3f1;
    border-radius: 8px;
    box-shadow: 0 2px 7px rgba(15, 23, 42, .07);
}

.mps-portal-module-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2f67ad;
    background: #eef5fc;
    border: 1px solid #c9d8e8;
    border-radius: 7px;
    font-size: 18px;
}

.mps-portal-module-main {
    min-width: 0;
}

.mps-portal-module-main strong,
.mps-portal-module-main span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mps-portal-module-main strong {
    color: #20324c;
    font-size: 16px;
    line-height: 22px;
}

.mps-portal-module-main span {
    margin-top: 4px;
    color: #6b7c91;
    font-size: 12px;
    line-height: 17px;
}

.mps-portal-module-action .btn {
    width: 100%;
}

@media (max-width: 860px) {
    .mps-portal-main {
        position: static;
        min-height: calc(100vh - 54px);
        grid-template-columns: 1fr;
        padding-top: 64px;
        overflow: auto;
    }

    .mps-portal-modules {
        grid-template-columns: 1fr;
        overflow: visible;
    }
}

/* CSK: modal za kreiranje/uredjivanje uloga mora ostati unutar vidljivog ekrana. */
.mps-role-modal .modal-dialog {
    width: calc(100vw - 36px);
    max-width: 960px;
    margin: 14px auto;
}

.mps-role-modal .modal-content {
    max-height: calc(100vh - 28px);
    overflow: hidden;
}

.mps-role-modal #role_form {
    max-height: calc(100vh - 28px);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.mps-role-modal .modal-header,
.mps-role-modal .modal-footer {
    flex: 0 0 auto;
}

.mps-role-modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 16px;
}

.mps-role-modal .mps-form-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px 12px;
}

.mps-role-modal .mps-form-wide {
    grid-column: 1 / -1;
}

.mps-role-modal .mps-check-section {
    margin-top: 10px;
}

.mps-role-modal .mps-check-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}


.mps-role-modal .mps-check-actions,
.mps-structure-modal .mps-check-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-left: auto;
}

.mps-role-modal .mps-mini-action,
.mps-structure-modal .mps-mini-action {
    min-width: 46px;
    height: 23px;
    padding: 2px 8px;
    border: 1px solid #c9d8e8;
    border-radius: 5px;
    background: #f5f8fc;
    color: #2f4664;
    font-size: 11px;
    font-weight: 600;
    line-height: 17px;
}

.mps-role-modal .mps-mini-action:hover,
.mps-structure-modal .mps-mini-action:hover {
    background: #eaf2fb;
}

.mps-role-modal .mps-mini-action:disabled,
.mps-structure-modal .mps-mini-action:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.mps-role-modal .mps-check-count {
    min-width: 44px;
    padding: 2px 8px;
    border: 1px solid #c9d8e8;
    border-radius: 999px;
    color: #2f4664;
    background: #eef5fc;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
}

.mps-role-modal .mps-role-permissions-grid {
    max-height: 300px;
    max-height: min(34vh, 300px);
    overflow-y: auto;
    padding-right: 4px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mps-role-modal .mps-check {
    min-width: 0;
    padding: 3px 4px;
    line-height: 1.25;
}

.mps-role-modal .mps-check span {
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .mps-role-modal .mps-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .mps-role-modal .modal-dialog {
        width: calc(100vw - 16px);
        margin: 8px auto;
    }

    .mps-role-modal .modal-content,
    .mps-role-modal #role_form {
        max-height: calc(100vh - 16px);
    }

    .mps-role-modal .mps-form-grid,
    .mps-role-modal .mps-role-permissions-grid {
        grid-template-columns: 1fr;
    }
}
/* CSK: uskladjen role modal sa ostalim viewport-safe dijalozima. */
.mps-role-modal {
    overflow: hidden !important;
}

.mps-role-modal .modal-dialog {
    width: 720px !important;
    max-width: calc(100vw - 36px) !important;
    margin: 18px auto !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
}

.mps-role-modal .modal-content {
    max-height: calc(100vh - 36px) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.mps-role-modal #role_form {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    max-height: inherit !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
}

.mps-role-modal .modal-header {
    flex: 0 0 auto !important;
    width: 100% !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 7px 10px !important;
    box-sizing: border-box !important;
    cursor: default !important;
}

.mps-role-modal .modal-header .close {
    width: 22px !important;
    height: 22px !important;
    margin-top: -1px !important;
    line-height: 20px !important;
}

.mps-role-modal .modal-title {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 14px !important;
    line-height: 20px !important;
}

.mps-role-modal .modal-body {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
}

.mps-role-modal .modal-footer {
    flex: 0 0 auto !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 8px 10px !important;
    box-sizing: border-box !important;
}

.mps-role-modal .mps-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px 10px !important;
}

.mps-role-modal .mps-check-section {
    margin-top: 9px !important;
    padding: 8px !important;
}

.mps-role-modal .mps-role-permissions-grid {
    max-height: 220px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

@media (max-width: 720px) {
    .mps-role-modal .modal-dialog {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        margin: 10px auto !important;
    }

    .mps-role-modal .modal-content,
    .mps-role-modal #role_form {
        max-height: calc(100vh - 20px) !important;
    }

    .mps-role-modal .modal-body {
        padding: 8px !important;
    }

    .mps-role-modal .mps-form-grid,
    .mps-role-modal .mps-role-permissions-grid {
        grid-template-columns: 1fr !important;
    }
}
/* CSK: uredjen gornji dio forme u modalima za uloge. */
.mps-role-modal .mps-form-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: end !important;
    column-gap: 12px !important;
    row-gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.mps-role-modal .mps-form-grid > .form-group {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.mps-role-modal .mps-form-grid .form-control,
.mps-role-modal .mps-form-grid select,
.mps-role-modal .mps-form-grid input,
.mps-role-modal .mps-form-grid .select2-container,
.mps-role-modal .mps-form-grid .select2-selection--single {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.mps-role-modal .mps-form-grid label {
    display: block !important;
    height: 15px !important;
    margin: 0 0 4px 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.mps-role-modal #role_opis,
.mps-role-modal .mps-form-wide {
    grid-column: 1 / -1 !important;
}

@media (min-width: 900px) {
    .mps-role-modal .mps-form-grid {
        grid-template-columns: 1.2fr 1.2fr .9fr 1.1fr !important;
    }

    .mps-role-modal .mps-form-grid > .form-group:nth-child(1),
    .mps-role-modal .mps-form-grid > .form-group:nth-child(2) {
        grid-column: span 2 !important;
    }

    .mps-role-modal .mps-form-grid > .form-group:nth-child(3),
    .mps-role-modal .mps-form-grid > .form-group:nth-child(4),
    .mps-role-modal .mps-form-grid > .form-group:nth-child(5),
    .mps-role-modal .mps-form-grid > .form-group:nth-child(6),
    .mps-role-modal .mps-form-grid > .form-group:nth-child(7) {
        grid-column: span 1 !important;
    }
}

@media (max-width: 720px) {
    .mps-role-modal .mps-form-grid {
        grid-template-columns: 1fr !important;
    }

    .mps-role-modal .mps-form-grid > .form-group,
    .mps-role-modal .mps-form-grid > .form-group:nth-child(1),
    .mps-role-modal .mps-form-grid > .form-group:nth-child(2),
    .mps-role-modal .mps-form-grid > .form-group:nth-child(3),
    .mps-role-modal .mps-form-grid > .form-group:nth-child(4),
    .mps-role-modal .mps-form-grid > .form-group:nth-child(5),
    .mps-role-modal .mps-form-grid > .form-group:nth-child(6),
    .mps-role-modal .mps-form-grid > .form-group:nth-child(7) {
        grid-column: 1 / -1 !important;
    }
}
.mps-role-modal #role_sifra[readonly] {
    color: #53657a !important;
    background: #eef3f8 !important;
    cursor: default !important;
}
/* CSK Moduli i prava: zaglavlja dijaloga kao u usvojenom Korisnici dijalogu. */
#module_modal .modal-header,
#podmodule_modal .modal-header,
#permission_modal .modal-header,
#role_modal .modal-header,
#message_modal .modal-header {
    min-height: 24px !important;
    padding: 4px 6px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    cursor: default !important;
}

#module_modal .modal-title,
#podmodule_modal .modal-title,
#permission_modal .modal-title,
#role_modal .modal-title,
#message_modal .modal-title {
    min-width: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    line-height: 14px !important;
    font-weight: 700 !important;
}

#module_modal .modal-header .close,
#podmodule_modal .modal-header .close,
#permission_modal .modal-header .close,
#role_modal .modal-header .close,
#message_modal .modal-header .close {
    width: 16px !important;
    height: 14px !important;
    min-width: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 12px !important;
    font-size: 11px !important;
    text-align: center !important;
}

#role_modal .modal-body {
    width: auto !important;
    margin: 4px !important;
    padding: 6px !important;
}
/* CSK: naslov dijaloga uvijek lijevo, X dugme uvijek desno. */
.app-modal .modal-header,
.modal.app-modal .modal-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
}

.app-modal .modal-header .modal-title,
.modal.app-modal .modal-header .modal-title {
    order: 1 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    text-align: left !important;
}

.app-modal .modal-header .close,
.modal.app-modal .modal-header .close {
    order: 2 !important;
    flex: 0 0 auto !important;
    float: none !important;
    margin-left: auto !important;
}

.app-modal .modal-header .modal-title i,
.modal.app-modal .modal-header .modal-title i {
    flex: 0 0 auto !important;
}
/* CSK: standardne ikonice za sistemske dijaloge bez ručno dodate ikonice. */
.app-modal .modal-title#message_title::before,
.app-modal .modal-title#auth_message_title::before,
.modal.app-modal .modal-title#message_title::before,
.modal.app-modal .modal-title#auth_message_title::before {
    content: "\f05a";
    font-family: FontAwesome;
    font-weight: normal;
    margin-right: 6px;
    flex: 0 0 auto;
}

.app-modal .modal-title#confirm_title::before,
.modal.app-modal .modal-title#confirm_title::before {
    content: "\f059";
    font-family: FontAwesome;
    font-weight: normal;
    margin-right: 6px;
    flex: 0 0 auto;
}
/* CSK: široka polja u modal formama uvijek zauzimaju cijeli red. */
.app-modal .mps-form-grid > .mps-form-wide,
.mps-role-modal .mps-form-grid > .mps-form-wide {
    grid-column: 1 / -1 !important;
}

.app-modal .mps-form-grid > .mps-form-wide .form-control {
    width: 100% !important;
    max-width: 100% !important;
}

/* CSK: Opis u dijalogu uloge mora pregaziti nth-child raspored. */
#role_modal .mps-form-grid > .form-group.mps-form-wide,
#role_modal .mps-form-grid > .form-group.mps-form-wide:nth-child(7) {
    grid-column: 1 / -1 !important;
}

#role_modal .mps-form-grid > .form-group.mps-form-wide .form-control {
    width: 100% !important;
    max-width: 100% !important;
}

/* CSK: centriranje ikonice na dugmetu Nova uloga u alatnoj traci. */
body.ima-pretragu #pretrazivanje .buttons-group > #btn_new_role {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

body.ima-pretragu #pretrazivanje .buttons-group > #btn_new_role > i {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    line-height: 1 !important;
    text-align: center !important;
}

/* CSK: neaktivni zapisi nemaju aktivno dugme za uredjivanje. */
.mps-action-btn.mps-action-disabled,
.mps-action-btn[disabled] {
    color: #8a97a8 !important;
    background: #edf1f5 !important;
    border-color: #d5dde7 !important;
    opacity: .62 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

.mps-action-btn.mps-action-disabled:hover,
.mps-action-btn.mps-action-disabled:focus,
.mps-action-btn[disabled]:hover,
.mps-action-btn[disabled]:focus {
    color: #8a97a8 !important;
    background: #edf1f5 !important;
    border-color: #d5dde7 !important;
}

.mps-action-btn.mps-action-disabled i,
.mps-action-btn[disabled] i {
    color: inherit !important;
}

/* CSK: tabela Dozvole - status badge u jednom redu. */
.mps-status {
    white-space: nowrap !important;
}

.mps-permission-table {
    table-layout: fixed !important;
    min-width: 0 !important;
}

.mps-table.mps-table-auto.mps-permission-table th,
.mps-table.mps-table-auto.mps-permission-table td {
    width: auto !important;
}

.mps-table.mps-table-auto.mps-permission-table th:nth-child(1),
.mps-table.mps-table-auto.mps-permission-table td:nth-child(1) {
    width: 52px !important;
}

.mps-table.mps-table-auto.mps-permission-table th:nth-child(2),
.mps-table.mps-table-auto.mps-permission-table td:nth-child(2) {
    width: 18% !important;
}

.mps-table.mps-table-auto.mps-permission-table th:nth-child(3),
.mps-table.mps-table-auto.mps-permission-table td:nth-child(3) {
    width: 18% !important;
}

.mps-table.mps-table-auto.mps-permission-table th:nth-child(4),
.mps-table.mps-table-auto.mps-permission-table td:nth-child(4) {
    width: 25% !important;
}

.mps-table.mps-table-auto.mps-permission-table th:nth-child(5),
.mps-table.mps-table-auto.mps-permission-table td:nth-child(5) {
    width: 54px !important;
}

.mps-table.mps-table-auto.mps-permission-table th:nth-child(6),
.mps-table.mps-table-auto.mps-permission-table td:nth-child(6) {
    width: 96px !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
}
/* CSK: jedinstven stil za dijaloge strukture modula i prava. */
.mps-structure-modal {
    overflow: hidden !important;
}

.mps-structure-modal .modal-dialog {
    width: 720px !important;
    max-width: calc(100vw - 36px) !important;
    margin: 18px auto !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
}

.mps-structure-modal .modal-content {
    max-height: calc(100vh - 36px) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.mps-structure-modal form {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    max-height: inherit !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
}

.mps-structure-modal .modal-header {
    flex: 0 0 auto !important;
    width: 100% !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 7px 10px !important;
    box-sizing: border-box !important;
    cursor: default !important;
}

.mps-structure-modal .modal-header .close {
    width: 22px !important;
    height: 22px !important;
    margin: -1px 0 0 8px !important;
    line-height: 20px !important;
    font-size: 16px !important;
}

.mps-structure-modal .modal-title {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 14px !important;
    line-height: 20px !important;
}

.mps-structure-modal .modal-body {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
}

.mps-structure-modal .modal-footer {
    flex: 0 0 auto !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 8px 10px !important;
    box-sizing: border-box !important;
}

.mps-structure-modal .mps-form-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: end !important;
    column-gap: 12px !important;
    row-gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.mps-structure-modal .mps-form-grid > .form-group {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.mps-structure-modal .mps-form-grid .form-control,
.mps-structure-modal .mps-form-grid select,
.mps-structure-modal .mps-form-grid input,
.mps-structure-modal .mps-form-grid .select2-container,
.mps-structure-modal .mps-form-grid .select2-selection--single {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.mps-structure-modal .mps-form-grid label {
    display: block !important;
    height: 15px !important;
    margin: 0 0 4px 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.mps-structure-modal .mps-form-grid .form-control[readonly] {
    color: #53657a !important;
    background: #eef3f8 !important;
    cursor: default !important;
}

.mps-structure-modal .mps-form-wide,
.mps-structure-modal .mps-form-grid > .form-group.mps-form-wide,
.mps-structure-modal .mps-form-grid > .form-group.mps-form-wide:nth-child(n) {
    grid-column: 1 / -1 !important;
}

.mps-structure-modal .mps-check-section {
    margin-top: 9px !important;
    padding: 8px !important;
}

.mps-structure-modal .mps-check-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
}

.mps-structure-modal .mps-check-count {
    min-width: 44px !important;
    padding: 2px 8px !important;
    border: 1px solid #c9d8e8 !important;
    border-radius: 999px !important;
    color: #2f4664 !important;
    background: #eef5fc !important;
    font-size: 12px !important;
    line-height: 16px !important;
    text-align: center !important;
}

.mps-structure-modal .mps-role-permissions-grid {
    max-height: 220px !important;
    overflow-y: auto !important;
    padding-right: 4px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.mps-structure-modal .mps-check {
    min-width: 0 !important;
    padding: 3px 4px !important;
    line-height: 1.25 !important;
}

.mps-structure-modal .mps-check span {
    min-width: 0 !important;
    overflow-wrap: anywhere !important;
}

@media (min-width: 900px) {
    .mps-structure-modal .mps-form-grid {
        grid-template-columns: 1.2fr 1.2fr .9fr 1.1fr !important;
    }

    .mps-structure-modal .mps-form-grid > .form-group:nth-child(1),
    .mps-structure-modal .mps-form-grid > .form-group:nth-child(2) {
        grid-column: span 2 !important;
    }

    .mps-structure-modal .mps-form-grid > .form-group:nth-child(n+3):not(.mps-form-wide) {
        grid-column: span 1 !important;
    }
}

@media (max-width: 720px) {
    .mps-structure-modal .modal-dialog {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        margin: 10px auto !important;
    }

    .mps-structure-modal .modal-content,
    .mps-structure-modal form {
        max-height: calc(100vh - 20px) !important;
    }

    .mps-structure-modal .modal-body {
        padding: 8px !important;
    }

    .mps-structure-modal .mps-form-grid,
    .mps-structure-modal .mps-role-permissions-grid {
        grid-template-columns: 1fr !important;
    }

    .mps-structure-modal .mps-form-grid > .form-group,
    .mps-structure-modal .mps-form-grid > .form-group:nth-child(n) {
        grid-column: 1 / -1 !important;
    }
}
/* CSK: ID override za dijaloge strukture modula i prava. */
#module_modal.mps-structure-modal .modal-dialog,
#podmodule_modal.mps-structure-modal .modal-dialog,
#permission_modal.mps-structure-modal .modal-dialog,
#role_modal.mps-structure-modal .modal-dialog {
    width: 720px !important;
    max-width: calc(100vw - 36px) !important;
    margin: 18px auto !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
}

#module_modal.mps-structure-modal .modal-content,
#podmodule_modal.mps-structure-modal .modal-content,
#permission_modal.mps-structure-modal .modal-content,
#role_modal.mps-structure-modal .modal-content {
    max-height: calc(100vh - 36px) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

#module_modal.mps-structure-modal form,
#podmodule_modal.mps-structure-modal form,
#permission_modal.mps-structure-modal form,
#role_modal.mps-structure-modal form {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    max-height: inherit !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
}

#module_modal.mps-structure-modal .modal-header,
#podmodule_modal.mps-structure-modal .modal-header,
#permission_modal.mps-structure-modal .modal-header,
#role_modal.mps-structure-modal .modal-header {
    flex: 0 0 auto !important;
    width: 100% !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 7px 10px !important;
    box-sizing: border-box !important;
    cursor: default !important;
}

#module_modal.mps-structure-modal .modal-title,
#podmodule_modal.mps-structure-modal .modal-title,
#permission_modal.mps-structure-modal .modal-title,
#role_modal.mps-structure-modal .modal-title {
    min-width: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 14px !important;
    line-height: 20px !important;
    font-weight: 700 !important;
}

#module_modal.mps-structure-modal .modal-header .close,
#podmodule_modal.mps-structure-modal .modal-header .close,
#permission_modal.mps-structure-modal .modal-header .close,
#role_modal.mps-structure-modal .modal-header .close {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    margin: -1px 0 0 8px !important;
    padding: 0 !important;
    line-height: 20px !important;
    font-size: 16px !important;
    text-align: center !important;
}

#module_modal.mps-structure-modal .modal-body,
#podmodule_modal.mps-structure-modal .modal-body,
#permission_modal.mps-structure-modal .modal-body,
#role_modal.mps-structure-modal .modal-body {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
}

#module_modal.mps-structure-modal .modal-footer,
#podmodule_modal.mps-structure-modal .modal-footer,
#permission_modal.mps-structure-modal .modal-footer,
#role_modal.mps-structure-modal .modal-footer {
    flex: 0 0 auto !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 8px 10px !important;
    box-sizing: border-box !important;
}

#module_modal.mps-structure-modal .mps-form-grid,
#podmodule_modal.mps-structure-modal .mps-form-grid,
#permission_modal.mps-structure-modal .mps-form-grid,
#role_modal.mps-structure-modal .mps-form-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: end !important;
    column-gap: 12px !important;
    row-gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

#module_modal.mps-structure-modal .mps-form-grid > .form-group,
#podmodule_modal.mps-structure-modal .mps-form-grid > .form-group,
#permission_modal.mps-structure-modal .mps-form-grid > .form-group,
#role_modal.mps-structure-modal .mps-form-grid > .form-group {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

#module_modal.mps-structure-modal .mps-form-grid label,
#podmodule_modal.mps-structure-modal .mps-form-grid label,
#permission_modal.mps-structure-modal .mps-form-grid label,
#role_modal.mps-structure-modal .mps-form-grid label {
    display: block !important;
    height: 15px !important;
    margin: 0 0 4px 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

#module_modal.mps-structure-modal .mps-form-grid .form-control,
#podmodule_modal.mps-structure-modal .mps-form-grid .form-control,
#permission_modal.mps-structure-modal .mps-form-grid .form-control,
#role_modal.mps-structure-modal .mps-form-grid .form-control,
#module_modal.mps-structure-modal .mps-form-grid select,
#podmodule_modal.mps-structure-modal .mps-form-grid select,
#permission_modal.mps-structure-modal .mps-form-grid select,
#role_modal.mps-structure-modal .mps-form-grid select,
#module_modal.mps-structure-modal .mps-form-grid input,
#podmodule_modal.mps-structure-modal .mps-form-grid input,
#permission_modal.mps-structure-modal .mps-form-grid input,
#role_modal.mps-structure-modal .mps-form-grid input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

#module_modal.mps-structure-modal .mps-form-grid .form-control[readonly],
#podmodule_modal.mps-structure-modal .mps-form-grid .form-control[readonly],
#permission_modal.mps-structure-modal .mps-form-grid .form-control[readonly],
#role_modal.mps-structure-modal .mps-form-grid .form-control[readonly] {
    color: #53657a !important;
    background: #eef3f8 !important;
    cursor: default !important;
}

#module_modal.mps-structure-modal .mps-form-grid > .form-group.mps-form-wide,
#podmodule_modal.mps-structure-modal .mps-form-grid > .form-group.mps-form-wide,
#permission_modal.mps-structure-modal .mps-form-grid > .form-group.mps-form-wide,
#role_modal.mps-structure-modal .mps-form-grid > .form-group.mps-form-wide,
#role_modal.mps-structure-modal .mps-form-grid > .form-group.mps-form-wide:nth-child(7) {
    grid-column: 1 / -1 !important;
}

@media (min-width: 900px) {
    #module_modal.mps-structure-modal .mps-form-grid,
    #podmodule_modal.mps-structure-modal .mps-form-grid,
    #permission_modal.mps-structure-modal .mps-form-grid,
    #role_modal.mps-structure-modal .mps-form-grid {
        grid-template-columns: 1.2fr 1.2fr .9fr 1.1fr !important;
    }

    #module_modal.mps-structure-modal .mps-form-grid > .form-group:nth-child(1),
    #module_modal.mps-structure-modal .mps-form-grid > .form-group:nth-child(2),
    #podmodule_modal.mps-structure-modal .mps-form-grid > .form-group:nth-child(1),
    #podmodule_modal.mps-structure-modal .mps-form-grid > .form-group:nth-child(2),
    #permission_modal.mps-structure-modal .mps-form-grid > .form-group:nth-child(1),
    #permission_modal.mps-structure-modal .mps-form-grid > .form-group:nth-child(2),
    #role_modal.mps-structure-modal .mps-form-grid > .form-group:nth-child(1),
    #role_modal.mps-structure-modal .mps-form-grid > .form-group:nth-child(2) {
        grid-column: span 2 !important;
    }

    #module_modal.mps-structure-modal .mps-form-grid > .form-group:nth-child(n+3):not(.mps-form-wide),
    #podmodule_modal.mps-structure-modal .mps-form-grid > .form-group:nth-child(n+3):not(.mps-form-wide),
    #permission_modal.mps-structure-modal .mps-form-grid > .form-group:nth-child(n+3):not(.mps-form-wide),
    #role_modal.mps-structure-modal .mps-form-grid > .form-group:nth-child(n+3):not(.mps-form-wide) {
        grid-column: span 1 !important;
    }
}

@media (max-width: 720px) {
    #module_modal.mps-structure-modal .modal-dialog,
    #podmodule_modal.mps-structure-modal .modal-dialog,
    #permission_modal.mps-structure-modal .modal-dialog,
    #role_modal.mps-structure-modal .modal-dialog {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        margin: 10px auto !important;
    }

    #module_modal.mps-structure-modal .modal-content,
    #podmodule_modal.mps-structure-modal .modal-content,
    #permission_modal.mps-structure-modal .modal-content,
    #role_modal.mps-structure-modal .modal-content,
    #module_modal.mps-structure-modal form,
    #podmodule_modal.mps-structure-modal form,
    #permission_modal.mps-structure-modal form,
    #role_modal.mps-structure-modal form {
        max-height: calc(100vh - 20px) !important;
    }

    #module_modal.mps-structure-modal .modal-body,
    #podmodule_modal.mps-structure-modal .modal-body,
    #permission_modal.mps-structure-modal .modal-body,
    #role_modal.mps-structure-modal .modal-body {
        padding: 8px !important;
    }

    #module_modal.mps-structure-modal .mps-form-grid,
    #podmodule_modal.mps-structure-modal .mps-form-grid,
    #permission_modal.mps-structure-modal .mps-form-grid,
    #role_modal.mps-structure-modal .mps-form-grid,
    #role_modal.mps-structure-modal .mps-role-permissions-grid {
        grid-template-columns: 1fr !important;
    }

    #module_modal.mps-structure-modal .mps-form-grid > .form-group,
    #podmodule_modal.mps-structure-modal .mps-form-grid > .form-group,
    #permission_modal.mps-structure-modal .mps-form-grid > .form-group,
    #role_modal.mps-structure-modal .mps-form-grid > .form-group {
        grid-column: 1 / -1 !important;
    }
}
/* CSK: levels.php nakon uklanjanja modula i laboratorijskih uloga. */
.mps-level-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, .9fr) minmax(0, 1.15fr) !important;
    gap: 8px !important;
}

.mps-level-grid > .mps-table-card {
    min-height: 0 !important;
}

.mps-level-grid > .mps-table-card:first-child,
.mps-level-grid > .mps-table-card:nth-child(2) {
    min-height: 220px !important;
}

.mps-level-grid > .mps-level-wide {
    grid-column: 1 / -1 !important;
    min-height: 250px !important;
}

.mps-level-summary .mps-note p {
    margin-top: 4px !important;
    line-height: 16px !important;
}

@media (max-width: 1180px) {
    .mps-level-grid {
        grid-template-columns: 1fr !important;
        grid-template-rows: repeat(3, minmax(190px, 1fr)) !important;
    }

    .mps-level-grid > .mps-level-wide {
        grid-column: auto !important;
    }
}

/* CSK: akcije statusa korisnika u glavnoj tabeli. */
#users_table .col-actions,
#users_table th:first-child,
#users_table td:first-child {
    width: 128px !important;
    min-width: 128px !important;
}

#users_table .mps-row-actions {
    flex-wrap: nowrap;
}

.mps-action-warning {
    color: #8a5a00;
    background: #fff7e6;
    border-color: #ead4a0;
}

.mps-action-muted {
    color: #55616f;
    background: #f2f5f8;
    border-color: #d5dde7;
}

.mps-status.pending,
.mps-status.status-pozvan {
    color: #8a5a00;
    background: #fff7e6;
    border: 1px solid #ead4a0;
}

.mps-status.locked,
.mps-status.status-zakljucan {
    color: #713f12;
    background: #fff4de;
    border: 1px solid #e6c88f;
}

.mps-status.archived,
.mps-status.status-arhiviran {
    color: #55616f;
    background: #f2f5f8;
    border: 1px solid #d5dde7;
}

/* CSK: tehnicka integracija - kompaktan operativni prikaz. */
.mps-integration-shell {
    grid-template-rows: 82px minmax(0, 1fr) !important;
}

.mps-integration-summary {
    grid-template-columns: 130px 130px 130px minmax(360px, 1fr) !important;
}

.mps-integration-grid {
    grid-template-columns: minmax(360px, .82fr) minmax(460px, 1.18fr) !important;
    grid-auto-rows: minmax(178px, 220px) !important;
    align-content: start !important;
    overflow: auto !important;
    padding-right: 4px !important;
}

.mps-integration-grid > .mps-table-card {
    min-height: 0 !important;
}

.mps-integration-wide {
    min-height: 190px !important;
    max-height: 260px !important;
}

.mps-integration-list {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: auto !important;
    padding: 8px 10px !important;
}

.mps-integration-list > div {
    grid-template-columns: 150px minmax(0, 1fr) !important;
    gap: 8px !important;
    min-width: 0 !important;
}

.mps-integration-list span {
    line-height: 16px !important;
}

.mps-integration-list code {
    display: block !important;
    max-width: 100% !important;
    padding: 2px 5px !important;
    white-space: pre-wrap !important;
    word-break: break-word !important;
}

.mps-code-block {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: auto !important;
    white-space: pre !important;
    word-break: normal !important;
}

#integration_client,
#integration_redirect {
    min-width: 260px;
}

@media (max-width: 1180px) {
    .mps-integration-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .mps-integration-grid {
        grid-template-columns: 1fr !important;
        grid-auto-rows: minmax(180px, 230px) !important;
    }

    .mps-integration-wide {
        grid-column: auto !important;
        max-height: 260px !important;
    }

    .mps-integration-list > div {
        grid-template-columns: 1fr !important;
    }
}

/* CSK: OAuth test stranice - stabilan prikaz unutar viewporta. */
body.mps-oauth-test-page #sidebar,
body.mps-oauth-test-page nav#sidebar {
    top: 52px !important;
    bottom: 0 !important;
    z-index: 1050 !important;
}

body.mps-oauth-test-page #view-panel.mps-users-view {
    top: 52px !important;
    bottom: 0 !important;
    height: auto !important;
    margin-left: var(--zis-sidebar-width, 238px) !important;
    overflow: hidden !important;
    padding: 8px !important;
    background: #eef3f8 !important;
    z-index: 1060 !important;
}

body.mps-oauth-test-page.sidebar-collapsed #view-panel.mps-users-view,
body.mps-oauth-test-page #sidebar.collapsed + #view-panel.mps-users-view {
    margin-left: 0 !important;
}

.mps-oauth-test-shell {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mps-oauth-test-grid {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-auto-rows: minmax(220px, 1fr);
    gap: 8px;
    overflow: auto;
    align-content: start;
}

.mps-oauth-test-card,
.mps-oauth-test-grid > .mps-table-card {
    min-height: 0 !important;
    height: 100%;
}

.mps-oauth-test-wide {
    grid-column: 1 / -1;
    min-height: 180px;
}

.mps-oauth-test-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 14px;
}

.mps-oauth-test-grid .mps-code-block {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: auto !important;
    white-space: pre !important;
    word-break: normal !important;
}

.mps-oauth-test-actions {
    padding: 10px 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 960px) {
    .mps-oauth-test-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: minmax(190px, auto);
    }

    .mps-oauth-test-wide {
        grid-column: auto;
    }
}

/* CSK: spremnost integracije - uskladjen viewport prikaz. */
body.mps-ready-page .mps-ready-shell {
    grid-template-rows: 82px minmax(0, 1fr) !important;
}

body.mps-ready-page .mps-ready-summary {
    grid-template-columns: 124px 124px 112px 150px minmax(300px, 1fr) !important;
    min-height: 0 !important;
}

body.mps-ready-page .mps-ready-grid {
    grid-template-columns: minmax(360px, .9fr) minmax(440px, 1.1fr) !important;
    grid-auto-rows: minmax(176px, 224px) !important;
    align-content: start !important;
    overflow: auto !important;
    padding-right: 4px !important;
}

body.mps-ready-page .mps-ready-grid > .mps-table-card {
    min-height: 0 !important;
}

body.mps-ready-page .mps-ready-wide {
    grid-column: 1 / -1 !important;
    min-height: 210px !important;
    max-height: 330px !important;
}

body.mps-ready-page .mps-ready-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: auto !important;
    padding: 9px 10px !important;
}

body.mps-ready-page .mps-ready-kv {
    grid-template-columns: 142px minmax(0, 1fr) !important;
    gap: 8px !important;
    min-width: 0 !important;
    padding: 4px 0 !important;
}

body.mps-ready-page .mps-ready-kv span {
    line-height: 16px !important;
}

body.mps-ready-page .mps-ready-kv code,
body.mps-ready-page .mps-ready-doc-grid code {
    display: block !important;
    max-width: 100% !important;
    padding: 2px 5px !important;
    white-space: pre-wrap !important;
    word-break: break-word !important;
}

body.mps-ready-page .mps-ready-note {
    margin-top: 8px !important;
    padding: 7px 8px !important;
    line-height: 16px !important;
}

body.mps-ready-page .mps-ready-actions {
    margin-top: 8px !important;
    gap: 6px !important;
}

body.mps-ready-page .mps-ready-list {
    margin: 0 0 8px 18px !important;
}

body.mps-ready-page .mps-ready-list li {
    margin-bottom: 5px !important;
    line-height: 17px !important;
}

body.mps-ready-page .mps-ready-doc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px 12px !important;
}

body.mps-ready-page .mps-ready-doc-grid div {
    min-width: 0 !important;
    padding-bottom: 5px !important;
}

body.mps-ready-page .mps-code-block {
    min-height: 0 !important;
    max-height: 105px !important;
    height: auto !important;
    overflow: auto !important;
    white-space: pre !important;
    word-break: normal !important;
    padding: 8px 10px !important;
}

body.mps-ready-page .mps-ready-table-wrap {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: auto !important;
}

body.mps-ready-page .mps-ready-table {
    width: max-content !important;
    min-width: 1120px !important;
    table-layout: fixed !important;
}

body.mps-ready-page .mps-ready-table th,
body.mps-ready-page .mps-ready-table td,
body.mps-ready-page .mps-ready-table .mps-status {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

body.mps-ready-page .mps-ready-table th,
body.mps-ready-page .mps-ready-table td {
    max-width: none !important;
}

body.mps-ready-page .mps-ready-table th:nth-child(1),
body.mps-ready-page .mps-ready-table td:nth-child(1) { min-width: 86px !important; }
body.mps-ready-page .mps-ready-table th:nth-child(2),
body.mps-ready-page .mps-ready-table td:nth-child(2) { min-width: 150px !important; }
body.mps-ready-page .mps-ready-table th:nth-child(3),
body.mps-ready-page .mps-ready-table td:nth-child(3) { min-width: 120px !important; }
body.mps-ready-page .mps-ready-table th:nth-child(6),
body.mps-ready-page .mps-ready-table td:nth-child(6) { min-width: 220px !important; }
body.mps-ready-page .mps-ready-table th:nth-child(7),
body.mps-ready-page .mps-ready-table td:nth-child(7) { min-width: 135px !important; }
body.mps-ready-page .mps-ready-table th:nth-child(9),
body.mps-ready-page .mps-ready-table td:nth-child(9) { min-width: 130px !important; }

@media (max-width: 1180px) {
    body.mps-ready-page .mps-ready-summary {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        grid-template-rows: 72px 64px !important;
        height: 144px !important;
    }

    body.mps-ready-page .mps-ready-summary .mps-note {
        grid-column: 1 / -1 !important;
    }

    body.mps-ready-page .mps-ready-shell {
        grid-template-rows: 144px minmax(0, 1fr) !important;
    }

    body.mps-ready-page .mps-ready-grid {
        grid-template-columns: 1fr !important;
        grid-auto-rows: minmax(176px, 230px) !important;
    }

    body.mps-ready-page .mps-ready-wide {
        grid-column: auto !important;
        max-height: 330px !important;
    }

    body.mps-ready-page .mps-ready-doc-grid {
        grid-template-columns: 1fr !important;
    }
}

/* CSK: sesije i evidencija - uskladjen viewport i modali. */
body.mps-session-page .mps-session-shell {
    grid-template-rows: 82px minmax(0, .95fr) minmax(0, 1.05fr) !important;
}

body.mps-session-page .mps-session-summary {
    grid-template-columns: 132px 132px 150px 112px 112px minmax(300px, 1fr) !important;
    min-height: 0 !important;
}

body.mps-session-page .mps-session-card {
    min-height: 0 !important;
    overflow: hidden !important;
}

body.mps-session-page .mps-table-wrap {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: auto !important;
}

body.mps-session-page .mps-session-table,
body.mps-session-page .mps-audit-table {
    width: max-content !important;
    table-layout: auto !important;
}

body.mps-session-page .mps-session-table {
    min-width: 1280px !important;
}

body.mps-session-page .mps-audit-table {
    min-width: 1340px !important;
}

body.mps-session-page .mps-session-table th,
body.mps-session-page .mps-session-table td,
body.mps-session-page .mps-audit-table th,
body.mps-session-page .mps-audit-table td,
body.mps-session-page .mps-session-table .mps-status,
body.mps-session-page .mps-audit-table .mps-status,
body.mps-session-page .mps-session-table .mps-level-def,
body.mps-session-page .mps-audit-table code {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

body.mps-session-page .mps-session-table th,
body.mps-session-page .mps-session-table td,
body.mps-session-page .mps-audit-table th,
body.mps-session-page .mps-audit-table td {
    max-width: none !important;
}

body.mps-session-page .mps-session-table th:first-child,
body.mps-session-page .mps-session-table td:first-child {
    min-width: 78px !important;
    width: 78px !important;
    text-align: center !important;
}
body.mps-session-page .mps-session-table th:nth-child(2),
body.mps-session-page .mps-session-table td:nth-child(2) { min-width: 210px !important; }
body.mps-session-page .mps-session-table th:nth-child(3),
body.mps-session-page .mps-session-table td:nth-child(3) { min-width: 150px !important; }
body.mps-session-page .mps-session-table th:nth-child(4),
body.mps-session-page .mps-session-table td:nth-child(4) { min-width: 98px !important; }
body.mps-session-page .mps-session-table th:nth-child(5),
body.mps-session-page .mps-session-table td:nth-child(5) { min-width: 112px !important; }
body.mps-session-page .mps-session-table th:nth-child(6),
body.mps-session-page .mps-session-table td:nth-child(6),
body.mps-session-page .mps-session-table th:nth-child(7),
body.mps-session-page .mps-session-table td:nth-child(7),
body.mps-session-page .mps-session-table th:nth-child(8),
body.mps-session-page .mps-session-table td:nth-child(8) { min-width: 145px !important; }
body.mps-session-page .mps-session-table th:nth-child(9),
body.mps-session-page .mps-session-table td:nth-child(9) { min-width: 105px !important; }

body.mps-session-page .mps-audit-table th:nth-child(1),
body.mps-session-page .mps-audit-table td:nth-child(1) { min-width: 145px !important; }
body.mps-session-page .mps-audit-table th:nth-child(2),
body.mps-session-page .mps-audit-table td:nth-child(2) { min-width: 245px !important; }
body.mps-session-page .mps-audit-table th:nth-child(3),
body.mps-session-page .mps-audit-table td:nth-child(3) { min-width: 92px !important; }
body.mps-session-page .mps-audit-table th:nth-child(4),
body.mps-session-page .mps-audit-table td:nth-child(4) { min-width: 170px !important; }
body.mps-session-page .mps-audit-table th:nth-child(5),
body.mps-session-page .mps-audit-table td:nth-child(5) { min-width: 145px !important; }
body.mps-session-page .mps-audit-table th:nth-child(6),
body.mps-session-page .mps-audit-table td:nth-child(6) { min-width: 112px !important; }
body.mps-session-page .mps-audit-table th:nth-child(7),
body.mps-session-page .mps-audit-table td:nth-child(7) { min-width: 150px !important; }
body.mps-session-page .mps-audit-table th:nth-child(8),
body.mps-session-page .mps-audit-table td:nth-child(8) { min-width: 260px !important; }

body.mps-session-page .mps-session-modal .modal-dialog {
    width: min(560px, calc(100vw - 24px)) !important;
    margin: 7vh auto 0 !important;
}

body.mps-session-page .mps-session-modal .modal-content {
    border: 1px solid #c7d8ea !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 16px 35px rgba(24, 63, 113, .28) !important;
}

body.mps-session-page .mps-session-modal .modal-header {
    min-height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 12px !important;
    color: #fff !important;
    background: linear-gradient(180deg, #3b76bb 0%, #285f9d 100%) !important;
    border-bottom: 1px solid #204f84 !important;
}

body.mps-session-page .mps-session-modal .modal-title {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

body.mps-session-page .mps-session-modal .modal-header .close {
    float: none !important;
    margin: 0 !important;
    color: #fff !important;
    opacity: .9 !important;
    text-shadow: none !important;
}

body.mps-session-page .mps-session-modal .modal-body {
    max-height: calc(100vh - 210px) !important;
    overflow: auto !important;
    padding: 14px !important;
}

body.mps-session-page .mps-session-modal .modal-footer {
    padding: 9px 12px !important;
    background: #f5f8fc !important;
    border-top: 1px solid #dbe6f2 !important;
}

@media (max-width: 1180px) {
    body.mps-session-page .mps-session-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        grid-template-rows: 72px 72px !important;
        height: 150px !important;
    }

    body.mps-session-page .mps-session-summary .mps-note {
        grid-column: 1 / -1 !important;
    }

    body.mps-session-page .mps-session-shell {
        grid-template-rows: 150px minmax(0, 1fr) minmax(0, 1fr) !important;
    }
}

/* CSK: AI asistent - read-only chat pomoć. */
.mps-zis-body #sidebar .sidebar-list > .mps-ai-nav-item {
    margin-top: 10px !important;
    border-top: 1px solid rgba(255,255,255,.16) !important;
    padding-top: 9px !important;
}


/* CSK i18n: language selector in top header. */
.csk-language-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.csk-language-toggle {
    width: 40px !important;
    gap: 0 !important;
}

.csk-language-toggle .fa {
    font-size: 14px !important;
}

.csk-lang-code {
    min-width: 28px;
    color: #fff;
    font-size: 9px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0;
    text-align: center;
}

.csk-language-panel {
    position: absolute !important;
    top: 39px !important;
    right: -8px !important;
    width: 218px !important;
    display: none !important;
    padding: 6px !important;
    border: 1px solid rgba(93,134,181,.42) !important;
    border-radius: 6px !important;
    background: #f8fbff !important;
    box-shadow: 0 10px 22px rgba(24,63,113,.24), inset 0 1px 0 rgba(255,255,255,.85) !important;
    z-index: 23000 !important;
}

.csk-language-menu.open .csk-language-panel {
    display: block !important;
}

.csk-language-title {
    padding: 4px 6px 7px !important;
    color: #244f82 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 16px !important;
    border-bottom: 1px solid #dbe7f3 !important;
}

.csk-language-option {
    min-height: 31px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin-top: 4px !important;
    padding: 6px 8px !important;
    border-radius: 4px !important;
    color: #244f82 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 16px !important;
    text-decoration: none !important;
}

.csk-language-option em {
    min-width: 24px;
    padding: 2px 5px;
    color: #315f91;
    font-style: normal;
    font-size: 10px;
    text-align: center;
    border: 1px solid #c9d9ea;
    border-radius: 10px;
    background: #eef5fd;
}

.csk-language-option:hover,
.csk-language-option:focus,
.csk-language-option.active {
    color: #0f2f63 !important;
    background: #e6f0fb !important;
    text-decoration: none !important;
    outline: none !important;
}

.csk-language-option.active em {
    color: #fff;
    border-color: #315f91;
    background: #315f91;
}

/* CSK documentation viewer */
body.mps-doc-page #view-panel {
    padding: 8px !important;
    background: #eef3f8 !important;
}

body.mps-doc-page .mps-doc-shell {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
}

body.mps-doc-page .mps-doc-card {
    min-height: 0;
    overflow: hidden;
}

body.mps-doc-page .mps-doc-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 18px 22px 26px;
    color: #24364f;
    background: #fff;
    font-size: 13.5px;
    line-height: 1.55;
}

body.mps-doc-page .mps-doc-content h2,
body.mps-doc-page .mps-doc-content h3,
body.mps-doc-page .mps-doc-content h4,
body.mps-doc-page .mps-doc-content h5 {
    margin: 18px 0 8px;
    color: #1f3e66;
    font-weight: 700;
}

body.mps-doc-page .mps-doc-content h2 {
    margin-top: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #dbe6f2;
    font-size: 22px;
}

body.mps-doc-page .mps-doc-content h3 {
    font-size: 18px;
}

body.mps-doc-page .mps-doc-content h4,
body.mps-doc-page .mps-doc-content h5 {
    font-size: 15px;
}

body.mps-doc-page .mps-doc-content p {
    margin: 0 0 10px;
}

body.mps-doc-page .mps-doc-content ul {
    margin: 0 0 12px 20px;
    padding: 0;
}

body.mps-doc-page .mps-doc-content li {
    margin: 4px 0;
}

body.mps-doc-page .mps-doc-content code {
    color: #153a63;
    background: #eef4fb;
    border: 1px solid #dbe6f2;
    border-radius: 4px;
    padding: 1px 4px;
}

body.mps-doc-page .mps-doc-content pre {
    padding: 10px 12px;
    color: #17324d;
    background: #f5f8fc;
    border: 1px solid #dbe6f2;
    border-radius: 6px;
    overflow: auto;
}

/* CSK documentation viewer fixed panel positioning */
body.mps-doc-page #view-panel,
body.mps-doc-page div.viewpanel {
    position: fixed !important;
    top: var(--zis-topbar-height, 52px) !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    margin-left: var(--zis-sidebar-width) !important;
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
    padding: 8px !important;
    display: block !important;
}

body.mps-doc-page.sidebar-collapsed #view-panel,
body.mps-doc-page.sidebar-collapsed div.viewpanel {
    margin-left: 0 !important;
}

body.mps-doc-page .mps-doc-shell {
    height: 100% !important;
    max-height: 100% !important;
}

body.mps-doc-page .mps-doc-card {
    height: 100% !important;
    max-height: 100% !important;
}

body.mps-doc-page .mps-doc-content {
    overflow-y: auto !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}



/* CSK mandatory MFA login panels */
.mps-mfa-panel {
    gap: 10px;
}

.mps-mfa-note {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    color: #20364f;
    background: #f3f7fb;
    border: 1px solid #d9e5f1;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.35;
}

.mps-mfa-note strong {
    font-size: 14px;
    color: #173a63;
}

.mps-mfa-code {
    max-width: 180px;
    letter-spacing: 4px;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
}

.mps-mfa-secret-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px;
    align-items: center;
}

.mps-mfa-secret {
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    letter-spacing: 1px;
}

.mps-auth-secondary {
    width: 100%;
    height: 38px;
    border: 1px solid #cbd9e7;
    background: #fff;
    color: #28435f;
    border-radius: 6px;
    font-weight: 600;
}

.mps-auth-secondary:hover,
.mps-auth-secondary:focus {
    background: #f3f7fb;
    color: #173a63;
}

.mps-mfa-details {
    margin-top: 2px;
    color: #42556c;
    font-size: 12.5px;
}

.mps-mfa-details summary {
    cursor: pointer;
    margin-bottom: 6px;
}

.mps-mfa-details textarea {
    resize: vertical;
    min-height: 72px;
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
}


.mps-mfa-backup-codes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 10px;
}

.mps-mfa-backup-codes code {
    display: block;
    padding: 8px 10px;
    color: #173a63;
    background: #f3f7fb;
    border: 1px solid #d9e5f1;
    border-radius: 5px;
    font-size: 13px;
    text-align: center;
    letter-spacing: 1px;
}


.mps-mfa-qr {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background: #fff;
    border: 1px solid #d9e5f1;
    border-radius: 6px;
}

.mps-mfa-qr svg {
    width: min(220px, 100%);
    height: auto;
    display: block;
}

.mps-mfa-download {
    margin-top: 12px;
    width: 100%;
}

.mps-mfa-download i {
    margin-right: 7px;
}

/* CSK: system checks page */
body.zis-layout-table.ima-pretragu.mps-system-checks-page #view-panel.mps-users-view,
body.zis-layout-table.ima-pretragu.mps-system-checks-page div.viewpanel.mps-users-view {
    overflow: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding-bottom: 28px !important;
}
body.mps-system-checks-page #view-panel.mps-users-view,
body.mps-system-checks-page div.viewpanel.mps-users-view {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
}
body.mps-system-checks-page .mps-system-checks-shell {
    min-height: min-content;
    padding: 14px 14px 24px;
}
body.mps-system-checks-page .mps-system-checks-summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(104px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
    overflow: visible;
    align-items: stretch;
}
body.mps-system-checks-page .mps-system-checks-summary .mps-stat {
    min-height: 66px;
    padding: 8px 10px;
}
body.mps-system-checks-page .mps-system-checks-summary .mps-stat-label {
    min-height: 26px;
    line-height: 13px;
    white-space: normal;
}
body.mps-system-checks-page .mps-system-checks-summary .mps-stat strong {
    margin-top: 2px;
    font-size: 24px;
    line-height: 26px;
}
body.mps-system-checks-page .mps-system-checks-summary .mps-note {
    grid-column: 1 / -1;
    min-height: 42px;
    margin-right: 0;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}
body.mps-system-checks-page .mps-system-checks-summary .mps-note-title {
    flex: 0 0 auto;
    margin: 0;
    white-space: nowrap;
}
body.mps-system-checks-page .mps-system-checks-summary .mps-note p {
    margin: 0;
    line-height: 17px;
}
body.mps-system-checks-page .mps-system-checks-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
body.mps-system-checks-page .mps-check-wide {
    grid-column: 1 / -1;
}
body.mps-system-checks-page .mps-table-wrap {
    max-height: 310px;
    overflow: auto;
}
body.mps-system-checks-page .mps-check-wide .mps-table-wrap {
    max-height: 380px;
}
body.mps-system-checks-page .mps-table-wrap {
    overflow-x: auto !important;
    overflow-y: auto !important;
}
body.mps-system-checks-page .mps-table {
    min-width: 920px;
    table-layout: auto !important;
}
body.mps-system-checks-page .mps-check-wide .mps-table {
    min-width: 1180px;
}
body.mps-system-checks-page .mps-table th,
body.mps-system-checks-page .mps-table td {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    vertical-align: middle !important;
}
body.mps-system-checks-page .mps-table td strong,
body.mps-system-checks-page .mps-table .mps-muted,
body.mps-system-checks-page .mps-table .mps-status {
    white-space: nowrap !important;
}
body.mps-system-checks-page .mps-check-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 10px 0;
    color: #516176;
    font-size: 12px;
}
body.mps-system-checks-page .mps-check-meta span {
    padding: 3px 7px;
    background: #f5f8fb;
    border: 1px solid #dbe5ef;
    border-radius: 4px;
}
@media (max-width: 1350px) {
    body.mps-system-checks-page .mps-system-checks-summary {
        grid-template-columns: repeat(3, minmax(120px, 1fr));
    }
}
@media (max-width: 1100px) {
    body.mps-system-checks-page .mps-system-checks-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 720px) {
    body.mps-system-checks-page .mps-system-checks-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body.mps-system-checks-page .mps-system-checks-summary .mps-note {
        display: block;
    }
    body.mps-system-checks-page .mps-system-checks-summary .mps-note p {
        margin-top: 5px;
    }
}
@media (max-width: 460px) {
    body.mps-system-checks-page .mps-system-checks-summary {
        grid-template-columns: 1fr;
    }
}
/* CSK: server monitor page */
body.zis-layout-table.ima-pretragu.mps-server-monitor-page #view-panel.mps-users-view,
body.zis-layout-table.ima-pretragu.mps-server-monitor-page div.viewpanel.mps-users-view {
    overflow: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding-bottom: 28px !important;
}
body.mps-server-monitor-page .mps-server-monitor-shell {
    min-height: min-content;
    padding: 14px 14px 24px;
}
body.mps-server-monitor-page .mps-server-monitor-summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(104px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
    overflow: visible;
    align-items: stretch;
}
body.mps-server-monitor-page .mps-server-monitor-summary .mps-stat {
    min-height: 66px;
    padding: 8px 10px;
}
body.mps-server-monitor-page .mps-server-monitor-summary .mps-stat-label {
    min-height: 26px;
    line-height: 13px;
    white-space: normal;
}
body.mps-server-monitor-page .mps-server-monitor-summary .mps-stat strong {
    margin-top: 2px;
    font-size: 24px;
    line-height: 26px;
}
body.mps-server-monitor-page .mps-monitor-small-stat {
    font-size: 17px !important;
    line-height: 22px !important;
}
body.mps-server-monitor-page .mps-server-monitor-summary .mps-note {
    grid-column: 1 / -1;
    min-height: 42px;
    margin-right: 0;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}
body.mps-server-monitor-page .mps-server-monitor-summary .mps-note-title {
    flex: 0 0 auto;
    margin: 0;
    white-space: nowrap;
}
body.mps-server-monitor-page .mps-server-monitor-summary .mps-note p {
    margin: 0;
    line-height: 17px;
}
body.mps-server-monitor-page .mps-server-monitor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
body.mps-server-monitor-page .mps-monitor-wide {
    grid-column: 1 / -1;
}
body.mps-server-monitor-page .mps-monitor-kv {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
}
body.mps-server-monitor-page .mps-monitor-kv > div {
    min-width: 0;
    padding: 8px 9px;
    background: #f7fafd;
    border: 1px solid #dbe6f2;
    border-radius: 6px;
}
body.mps-server-monitor-page .mps-monitor-kv span {
    display: block;
    color: #66788d;
    font-size: 11px;
    line-height: 14px;
}
body.mps-server-monitor-page .mps-monitor-kv strong {
    display: block;
    margin-top: 3px;
    color: #2f4664;
    font-size: 13px;
    line-height: 17px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body.mps-server-monitor-page .mps-monitor-meter-list {
    display: grid;
    gap: 10px;
    padding: 10px;
}
body.mps-server-monitor-page .mps-monitor-meter > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 5px;
    color: #50647c;
}
body.mps-server-monitor-page .mps-monitor-meter strong,
body.mps-server-monitor-page .mps-monitor-meter span {
    white-space: nowrap;
}
body.mps-server-monitor-page .mps-monitor-bar {
    height: 8px;
    overflow: hidden;
    background: #e8eef5;
    border: 1px solid #d4e0ec;
    border-radius: 999px;
}
body.mps-server-monitor-page .mps-monitor-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: #4d8fd3;
}
body.mps-server-monitor-page .mps-monitor-bar.warning span { background: #d99a2b; }
body.mps-server-monitor-page .mps-monitor-bar.danger span { background: #c7473e; }
body.mps-server-monitor-page .mps-table-wrap {
    max-height: 360px;
    overflow-x: auto !important;
    overflow-y: auto !important;
}
body.mps-server-monitor-page .mps-monitor-table {
    min-width: 980px;
    table-layout: auto !important;
}
body.mps-server-monitor-page .mps-monitor-table th,
body.mps-server-monitor-page .mps-monitor-table td {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    vertical-align: middle !important;
}
@media (max-width: 1350px) {
    body.mps-server-monitor-page .mps-server-monitor-summary {
        grid-template-columns: repeat(3, minmax(120px, 1fr));
    }
}
@media (max-width: 1100px) {
    body.mps-server-monitor-page .mps-server-monitor-grid,
    body.mps-server-monitor-page .mps-monitor-kv {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 720px) {
    body.mps-server-monitor-page .mps-server-monitor-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body.mps-server-monitor-page .mps-server-monitor-summary .mps-note {
        display: block;
    }
    body.mps-server-monitor-page .mps-server-monitor-summary .mps-note p {
        margin-top: 5px;
    }
}
@media (max-width: 460px) {
    body.mps-server-monitor-page .mps-server-monitor-summary {
        grid-template-columns: 1fr;
    }
}
.csk-superadmin-access-shell {
    max-width: 820px;
    margin: 32px auto;
    padding: 0 18px;
}

.csk-superadmin-access-card {
    padding: 24px;
}

.csk-superadmin-access-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.csk-superadmin-access-form .form-group,
.csk-superadmin-access-form .help-block {
    margin: 0;
}

.csk-superadmin-access-form #municipality_group,
.csk-superadmin-access-form button {
    grid-column: 1 / -1;
}

.csk-superadmin-notice {
    display: flex;
    gap: 14px;
    margin-top: 18px;
    padding: 16px;
    border: 1px solid #b9d5e3;
    border-radius: 8px;
    background: #f1f8fb;
    color: #24495a;
}

.csk-superadmin-notice > .fa {
    margin-top: 2px;
    font-size: 24px;
}

.csk-superadmin-notice p {
    margin: 4px 0 0;
}

.csk-superadmin-handoff {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 20px;
    background: #eef3f7;
}

.csk-superadmin-handoff-card {
    width: min(620px, 100%);
    padding: 30px;
    text-align: center;
}

.csk-superadmin-handoff-card > .fa {
    font-size: 36px;
    color: #287799;
}

@media (max-width: 700px) {
    .csk-superadmin-access-form {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   CSK visual contract aligned with the Opstine module
   --------------------------------------------------------------------------
   Keep this block last. Several CSK pages have focused component styles loaded
   after mps.css; the scoped, explicit rules below keep shared chrome, tables,
   controls and dialogs visually consistent without changing page behavior.
   ========================================================================== */

body.mps-zis-body {
    --csk-ui-border: #d7e3f1;
    --csk-ui-border-strong: #c8d7e6;
    --csk-ui-card: #ffffff;
    --csk-ui-panel: #f5f8fc;
    --csk-ui-panel-soft: #f8fbff;
    --csk-ui-row-even: #eef5fc;
    --csk-ui-row-hover: #e2eef9;
    --csk-ui-text: #1f2937;
    --csk-ui-heading: #2f4664;
    --csk-ui-muted: #63758c;
    --csk-ui-blue: #2f67ad;
    color: var(--csk-ui-text) !important;
    background: #eef3f8 !important;
    font-family: Arial, Helvetica, sans-serif !important;
}

/* Sidebar groups follow the same density and hierarchy as Opstine dropdowns. */
body.mps-zis-body #sidebar .sidebar-list .csk-nav-group {
    margin: 5px 0 6px !important;
}

body.mps-zis-body #sidebar .sidebar-list .csk-nav-group > .csk-nav-group-toggle {
    min-height: 32px !important;
    margin: 0 !important;
    padding: 6px 9px !important;
    gap: 8px !important;
    color: #ffffff !important;
    background: rgba(255,255,255,.075) !important;
    border: 1px solid rgba(255,255,255,.14) !important;
    border-radius: 5px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 18px !important;
}

body.mps-zis-body #sidebar .sidebar-list .csk-nav-group[open] > .csk-nav-group-toggle,
body.mps-zis-body #sidebar .sidebar-list .csk-nav-group > .csk-nav-group-toggle:hover,
body.mps-zis-body #sidebar .sidebar-list .csk-nav-group > .csk-nav-group-toggle:focus {
    color: #ffffff !important;
    background: rgba(255,255,255,.14) !important;
    border-color: rgba(255,255,255,.20) !important;
}

body.mps-zis-body #sidebar .sidebar-list .csk-nav-group-items {
    margin: 2px 0 5px !important;
    padding: 3px 0 4px 13px !important;
    border-left: 1px solid rgba(214,229,246,.34) !important;
    background: transparent !important;
}

body.mps-zis-body #sidebar .sidebar-list .csk-nav-group-items .nav-item {
    min-height: 29px !important;
    margin: 1px 0 !important;
    padding: 5px 8px !important;
    color: #d6e5f6 !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
}

body.mps-zis-body #sidebar .sidebar-list .csk-nav-group-items .nav-item:hover,
body.mps-zis-body #sidebar .sidebar-list .csk-nav-group-items .nav-item:focus,
body.mps-zis-body #sidebar .sidebar-list .csk-nav-group-items .nav-item.active {
    color: #ffffff !important;
}

/* Shared surfaces, panel headers and summary cards. */
body.mps-zis-body .mps-card,
body.mps-zis-body .mps-table-card {
    min-width: 0 !important;
    background: var(--csk-ui-card) !important;
    border: 1px solid var(--csk-ui-border) !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 7px rgba(15,23,42,.07) !important;
}

body.mps-zis-body .mps-panel-head {
    min-height: 38px !important;
    padding: 7px 9px !important;
    color: #40516c !important;
    background: var(--csk-ui-panel) !important;
    border-bottom: 1px solid #dbe6f2 !important;
}

body.mps-zis-body .mps-panel-title {
    color: var(--csk-ui-heading) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
}

body.mps-zis-body .mps-panel-subtitle {
    color: #6b7c91 !important;
    font-size: 12px !important;
}

body.mps-zis-body .mps-stat-label {
    color: var(--csk-ui-muted) !important;
    font-size: 11px !important;
    line-height: 14px !important;
}

body.mps-zis-body .mps-stat strong {
    color: var(--csk-ui-heading) !important;
}

/* Native CSK tables use the same calm blue-gray table system as Opstine. */
body.mps-zis-body .mps-table-wrap,
body.mps-zis-body .csk-support-table-wrap,
body.mps-zis-body .csk-announcements-table-wrap {
    background: #ffffff !important;
}

body.mps-zis-body table.mps-table,
body.mps-zis-body .mps-card table.table {
    margin: 0 !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    background: #ffffff !important;
    color: var(--csk-ui-text) !important;
    font-size: 11.5px !important;
}

body.mps-zis-body table.mps-table > thead > tr > th,
body.mps-zis-body .mps-card table.table > thead > tr > th {
    position: sticky !important;
    top: 0 !important;
    z-index: 2 !important;
    height: 30px !important;
    padding: 5px 7px !important;
    color: #344766 !important;
    background: var(--csk-ui-panel) !important;
    border: 0 !important;
    border-bottom: 1px solid #dbe6f2 !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    line-height: 19px !important;
    text-shadow: none !important;
    vertical-align: middle !important;
}

body.mps-zis-body table.mps-table > tbody > tr > td,
body.mps-zis-body .mps-card table.table > tbody > tr > td {
    min-height: 30px !important;
    padding: 5px 7px !important;
    color: var(--csk-ui-text) !important;
    border: 0 !important;
    border-bottom: 1px solid #edf2f7 !important;
    background: #f7fbff !important;
    font-size: 11.5px !important;
    line-height: 18px !important;
    vertical-align: middle !important;
}

body.mps-zis-body table.mps-table > tbody > tr:nth-child(even) > td,
body.mps-zis-body .mps-card table.table > tbody > tr:nth-child(even) > td {
    background: var(--csk-ui-row-even) !important;
}

body.mps-zis-body table.mps-table > tbody > tr:hover > td,
body.mps-zis-body .mps-card table.table > tbody > tr:hover > td {
    color: #12263f !important;
    background: var(--csk-ui-row-hover) !important;
}

body.mps-zis-body table.mps-table > tbody > tr.mps-row-selected > td {
    color: #0f2f63 !important;
    background: #d8e9fa !important;
}

body.mps-zis-body .mps-empty {
    padding: 18px !important;
    color: #68798e !important;
    background: #ffffff !important;
    text-align: center !important;
}

/* Compact controls and actions mirror Opstine filters and table tools. */
body.mps-zis-body .form-control:not(textarea),
body.mps-zis-body .select2-container--default .select2-selection--single {
    min-height: 30px !important;
    height: 30px !important;
    border: 1px solid #b8cade !important;
    border-radius: 4px !important;
    background: #ffffff !important;
    color: #12263f !important;
    box-shadow: inset 0 1px 1px rgba(15,35,60,.07) !important;
    font-size: 12.5px !important;
}

body.mps-zis-body textarea.form-control {
    border: 1px solid #cfd8e3 !important;
    border-radius: 4px !important;
    background: #ffffff !important;
    color: #24384a !important;
    box-shadow: none !important;
    font-size: 12.5px !important;
}

body.mps-zis-body .form-control:focus,
body.mps-zis-body .select2-container--default.select2-container--focus .select2-selection--single,
body.mps-zis-body .select2-container--default.select2-container--open .select2-selection--single {
    border-color: #6d93ba !important;
    box-shadow: 0 0 0 3px rgba(20,58,90,.12) !important;
    outline: none !important;
}

body.mps-zis-body .mps-action-btn,
body.mps-zis-body .mps-icon-btn,
body.mps-zis-body .mps-mini-btn {
    color: #244f82 !important;
    background: #eef5fc !important;
    border: 1px solid #c9d8e8 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
}

body.mps-zis-body .mps-action-btn:hover,
body.mps-zis-body .mps-action-btn:focus,
body.mps-zis-body .mps-icon-btn:hover,
body.mps-zis-body .mps-icon-btn:focus,
body.mps-zis-body .mps-mini-btn:hover,
body.mps-zis-body .mps-mini-btn:focus {
    color: #0f2f63 !important;
    background: #e2eef9 !important;
    border-color: #adc7e2 !important;
    outline: none !important;
}

body.mps-zis-body .mps-action-danger {
    color: #922823 !important;
    background: #fff1f0 !important;
    border-color: #f1c2bf !important;
}

body.mps-zis-body .mps-action-success {
    color: #256729 !important;
    background: #eff8ef !important;
    border-color: #c7e2c9 !important;
}

/* Bootstrap dialogs: exact Opstine chrome, while existing CSK sizing remains. */
html body .modal.app-modal .modal-content,
html body .app-modal .modal-content,
html body #user_modal.app-modal .modal-content,
html body #client_modal.app-modal .modal-content,
html body #module_modal.app-modal .modal-content,
html body #podmodule_modal.app-modal .modal-content,
html body #permission_modal.app-modal .modal-content,
html body #role_modal.app-modal .modal-content,
html body #message_modal.app-modal .modal-content {
    overflow: hidden !important;
    border: 1px solid #cfd8e3 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    box-shadow: 0 18px 42px rgba(17,34,51,.24) !important;
}

html body .modal.app-modal .modal-header,
html body .app-modal .modal-header,
html body #user_modal.app-modal .modal-header,
html body #client_modal.app-modal .modal-header,
html body #module_modal.app-modal .modal-header,
html body #podmodule_modal.app-modal .modal-header,
html body #permission_modal.app-modal .modal-header,
html body #role_modal.app-modal .modal-header,
html body #message_modal.app-modal .modal-header {
    position: relative !important;
    min-height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 10px 42px 10px 14px !important;
    border: 0 !important;
    border-radius: 8px 8px 0 0 !important;
    color: #ffffff !important;
    background: #143a5a !important;
    cursor: default !important;
    font-family: Roboto, Arial, sans-serif !important;
}

html body .modal.app-modal .modal-title,
html body .app-modal .modal-title,
html body #user_modal.app-modal .modal-title,
html body #client_modal.app-modal .modal-title,
html body #module_modal.app-modal .modal-title,
html body #podmodule_modal.app-modal .modal-title,
html body #permission_modal.app-modal .modal-title,
html body #role_modal.app-modal .modal-title,
html body #message_modal.app-modal .modal-title {
    min-width: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    overflow: hidden !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 18px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

html body .modal.app-modal .modal-header .close,
html body .app-modal .modal-header .close,
html body #user_modal.app-modal .modal-header .close,
html body #client_modal.app-modal .modal-header .close,
html body #module_modal.app-modal .modal-header .close,
html body #podmodule_modal.app-modal .modal-header .close,
html body #permission_modal.app-modal .modal-header .close,
html body #role_modal.app-modal .modal-header .close,
html body #message_modal.app-modal .modal-header .close {
    position: absolute !important;
    top: 9px !important;
    right: 10px !important;
    width: 24px !important;
    min-width: 24px !important;
    height: 24px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 4px !important;
    color: #ffffff !important;
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
    opacity: 1 !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    line-height: 22px !important;
}

html body .modal.app-modal .modal-header .close:hover,
html body .modal.app-modal .modal-header .close:focus,
html body .app-modal .modal-header .close:hover,
html body .app-modal .modal-header .close:focus {
    color: #ffffff !important;
    background: rgba(255,255,255,.14) !important;
    outline: none !important;
}

html body .modal.app-modal .modal-body,
html body .app-modal .modal-body,
html body #user_modal.app-modal .modal-body,
html body #client_modal.app-modal .modal-body,
html body #module_modal.app-modal .modal-body,
html body #podmodule_modal.app-modal .modal-body,
html body #permission_modal.app-modal .modal-body,
html body #role_modal.app-modal .modal-body,
html body #message_modal.app-modal .modal-body {
    max-height: calc(100vh - 150px) !important;
    margin: 0 !important;
    padding: 10px !important;
    overflow: auto !important;
    overflow-x: hidden !important;
    color: #24384a !important;
    background: #f6f8fb !important;
    border: 0 !important;
    font-family: Roboto, Arial, sans-serif !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
}

html body .modal.app-modal .modal-footer,
html body .app-modal .modal-footer,
html body #user_modal.app-modal .modal-footer,
html body #client_modal.app-modal .modal-footer,
html body #module_modal.app-modal .modal-footer,
html body #podmodule_modal.app-modal .modal-footer,
html body #permission_modal.app-modal .modal-footer,
html body #role_modal.app-modal .modal-footer,
html body #message_modal.app-modal .modal-footer {
    min-height: 43px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 7px 10px !important;
    border: 0 !important;
    border-top: 1px solid #dbe6f2 !important;
    background: #f5f8fc !important;
}

html body .modal.app-modal .form-control:not(textarea),
html body .app-modal .form-control:not(textarea),
html body #client_modal.app-modal .form-control:not(textarea),
html body #client_modal.app-modal.mps-client-modal .mps-form-grid .form-control:not(textarea),
html body .modal.app-modal .select2-container--default .select2-selection--single,
html body .app-modal .select2-container--default .select2-selection--single,
html body #client_modal.app-modal .select2-container--default .select2-selection--single {
    width: 100% !important;
    min-height: 30px !important;
    height: 30px !important;
    padding: 5px 8px !important;
    border: 1px solid #cfd8e3 !important;
    border-radius: 4px !important;
    color: #24384a !important;
    background: #ffffff !important;
    box-shadow: none !important;
    font-size: 12.5px !important;
}

html body .modal.app-modal textarea.form-control,
html body .app-modal textarea.form-control,
html body #client_modal.app-modal textarea.form-control,
html body #client_modal.app-modal.mps-client-modal .mps-form-grid textarea.form-control {
    min-height: 70px !important;
    padding: 5px 8px !important;
    border: 1px solid #cfd8e3 !important;
    border-radius: 4px !important;
    color: #24384a !important;
    background: #ffffff !important;
    box-shadow: none !important;
    font-size: 12.5px !important;
}

html body .modal.app-modal .btn:not(.close),
html body .app-modal .btn:not(.close) {
    min-width: 92px !important;
    min-height: 28px !important;
    height: 28px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 4px 10px !important;
    border: 1px solid #c8d9eb !important;
    border-radius: 2px !important;
    color: #244f82 !important;
    background: #eef5fc !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.85) !important;
    font-family: Arial, sans-serif !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 18px !important;
    text-shadow: none !important;
}

html body .modal.app-modal .btn:not(.close):hover,
html body .modal.app-modal .btn:not(.close):focus,
html body .app-modal .btn:not(.close):hover,
html body .app-modal .btn:not(.close):focus {
    color: #0f2f63 !important;
    background: #e2eef9 !important;
    border-color: #adc7e2 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 1px 2px rgba(36,79,130,.16) !important;
    outline: none !important;
}

html body .modal.app-modal .btn:not(.close):active,
html body .app-modal .btn:not(.close):active {
    background: #d5e6f5 !important;
    box-shadow: inset 0 1px 2px rgba(36,79,130,.18) !important;
}

html body .modal.app-modal label,
html body .app-modal label {
    margin: 0 0 4px !important;
    color: #344766 !important;
    font-size: 12px !important;
    line-height: 14px !important;
    font-weight: 700 !important;
}

@media (max-width: 620px) {
    html body .modal.app-modal .modal-dialog,
    html body .app-modal .modal-dialog {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        margin: 62px auto 14px !important;
    }

    body.mps-zis-body .mps-summary-row {
        grid-template-columns: 1fr !important;
        overflow: auto !important;
    }
}

/* Operativni ulaz: compact, consistent typography scoped to this card. */
body.csk-superadmin-access-page .csk-superadmin-access-card {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
}

body.csk-superadmin-access-page .csk-superadmin-access-card .mps-panel-head > div {
    display: flex !important;
    align-items: baseline !important;
    flex-wrap: wrap !important;
    gap: 3px 8px !important;
}

body.csk-superadmin-access-page .csk-superadmin-access-card .mps-panel-title {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 12.5px !important;
    line-height: 18px !important;
    letter-spacing: 0 !important;
}

body.csk-superadmin-access-page .csk-superadmin-access-card .mps-panel-subtitle {
    margin-left: 0 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 11.5px !important;
    font-weight: 400 !important;
    line-height: 17px !important;
    letter-spacing: 0 !important;
}

body.csk-superadmin-access-page .csk-superadmin-notice {
    font-size: 12px !important;
    line-height: 17px !important;
}

body.csk-superadmin-access-page .csk-superadmin-notice strong {
    font-size: 12.5px !important;
    line-height: 17px !important;
}

body.csk-superadmin-access-page .csk-superadmin-access-form label {
    margin: 0 0 4px !important;
    color: #344766 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 16px !important;
}

body.csk-superadmin-access-page .csk-superadmin-access-form .help-block {
    color: #6b7c91 !important;
    font-size: 11.5px !important;
    line-height: 16px !important;
}

body.csk-superadmin-access-page .csk-superadmin-access-form .mps-btn {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
}

/* CSK korisnici: native table pattern from Opstine /pages/zis_parcele.php. */
@font-face {
    font-family: "CSK Roboto";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("https://fonts.gstatic.com/s/roboto/v51/KFOMCnqEu92Fr1ME7kSn66aGLdTylUAMQXC89YmC2DPNWubEbWmT.ttf") format("truetype");
}

@font-face {
    font-family: "CSK Roboto";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("https://fonts.gstatic.com/s/roboto/v51/KFOMCnqEu92Fr1ME7kSn66aGLdTylUAMQXC89YmC2DPNWuYjammT.ttf") format("truetype");
}

@font-face {
    font-family: "Font Awesome 6 Free";
    font-style: normal;
    font-weight: 900;
    font-display: block;
    src: url("https://gs.etfarm.rgurs.org/assets/fontawesome/webfonts/fa-solid-900.woff2") format("woff2");
}

body.csk-users-page .mps-table-card {
    font-family: Roboto, Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 20px !important;
}

body.csk-users-page .csk-users-table-panel-head {
    min-height: 46px !important;
    align-items: center !important;
}

body.csk-users-page .csk-users-table-title-block {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

body.csk-users-page .csk-users-table-title-block .mps-panel-subtitle {
    margin-left: 8px !important;
    line-height: 1.42857143 !important;
}

body.csk-users-page .csk-users-table-tools,
body.csk-users-page .csk-users-per-page-control {
    display: inline-flex;
    align-items: center;
}

body.csk-users-page .csk-users-table-tools {
    flex: 0 0 auto;
    gap: 6px;
}

body.csk-users-page .csk-users-per-page-control {
    gap: 6px;
    margin: 0;
    color: #51647d;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

body.csk-users-page .csk-users-per-page-control select,
body.csk-users-page .csk-users-per-page-control .select2-container {
    width: 74px !important;
    font-family: Roboto, Arial, sans-serif !important;
}

body.csk-users-page .csk-users-column-menu-wrap {
    position: relative;
    display: inline-flex;
}

body.csk-users-page .csk-users-column-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 40;
    width: 270px;
    max-height: min(420px, calc(100vh - 190px));
    overflow: hidden;
    color: #344766;
    background: #ffffff;
    border: 1px solid #bfd0e1;
    border-radius: 6px;
    box-shadow: 0 14px 34px rgba(42,58,79,.18);
    font-family: Roboto, Arial, sans-serif;
}

body.csk-users-page .csk-users-column-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid #e4ebf3;
    background: #f7faff;
    font-size: 12px;
}

body.csk-users-page .csk-users-column-link {
    margin-left: 6px;
    padding: 0;
    color: #245a82;
    background: transparent;
    border: 0;
    font-size: 12px;
    font-weight: 700;
}

body.csk-users-page .csk-users-column-menu-list {
    max-height: 360px;
    overflow: auto;
    padding: 7px 8px;
}

body.csk-users-page .csk-users-column-option {
    min-height: 26px;
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 3px 4px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

body.csk-users-page .csk-users-column-option:hover {
    background: #eef5fc;
}

body.csk-users-page .csk-users-column-option-fixed {
    color: #6d7d90;
    cursor: default;
}

body.csk-users-page .csk-users-column-option-fixed input {
    opacity: .55;
}

body.csk-users-page #users_table .csk-users-col-hidden {
    display: none !important;
}

body.csk-users-page #users_table {
    width: 100% !important;
    min-width: 1358px !important;
    margin: 0 !important;
    table-layout: auto !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #ffffff !important;
    font-family: Roboto, Arial, sans-serif !important;
    font-size: 11.5px !important;
}

body.csk-users-page .mps-table-wrap {
    position: relative !important;
    isolation: isolate !important;
}

body.csk-users-page #users_table .csk-users-action-col {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    text-align: center !important;
}

body.csk-users-page #users_table col.csk-users-col-action { width: 34px !important; }
body.csk-users-page #users_table col.csk-users-col-username { width: 112px !important; }
body.csk-users-page #users_table col.csk-users-col-ime { width: 150px !important; }
body.csk-users-page #users_table col.csk-users-col-institution { width: 116px !important; }
body.csk-users-page #users_table col.csk-users-col-level { width: 78px !important; }
body.csk-users-page #users_table col.csk-users-col-email { width: 150px !important; }
body.csk-users-page #users_table col.csk-users-col-phone { width: 190px !important; }
body.csk-users-page #users_table col.csk-users-col-municipality { width: 106px !important; }
body.csk-users-page #users_table col.csk-users-col-status { width: 110px !important; }

body.csk-users-page #users_table > thead > tr > th {
    position: sticky !important;
    top: 0 !important;
    z-index: 2 !important;
    height: 30px !important;
    padding: 5px !important;
    color: #344766 !important;
    background: #f5f8fc !important;
    border: 0 !important;
    border-bottom: 1px solid #dbe6f2 !important;
    box-shadow: none !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    line-height: 1.42857143 !important;
    text-align: left !important;
    text-shadow: none !important;
    vertical-align: bottom !important;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

body.csk-users-page #users_table > thead > tr > th.csk-users-sortable {
    cursor: pointer !important;
    user-select: none;
}

body.csk-users-page #users_table > thead > tr > th.csk-users-sortable > span {
    display: inline-block;
    padding-right: 4px;
}

body.csk-users-page #users_table .csk-users-sort-icon {
    width: 7.78125px !important;
    height: 10px !important;
    display: inline-block !important;
    color: #8fa0b3 !important;
    font-family: "Font Awesome 6 Free" !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

body.csk-users-page #users_table > thead > tr > th.is-sort-asc,
body.csk-users-page #users_table > thead > tr > th.is-sort-desc {
    color: #163f68 !important;
    background: #edf5fc !important;
}

body.csk-users-page #users_table > thead > tr > th.is-sort-asc .csk-users-sort-icon,
body.csk-users-page #users_table > thead > tr > th.is-sort-desc .csk-users-sort-icon {
    color: #1c5d93 !important;
}

body.csk-users-page #users_table > tbody > tr > td,
body.csk-users-page #users_table > tbody > tr:nth-child(even) > td {
    height: 36px !important;
    padding: 5px !important;
    color: #1f2937 !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid #edf2f7 !important;
    font-size: 11.5px !important;
    line-height: 1.42857143 !important;
    vertical-align: top !important;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

body.csk-users-page #users_table > tbody > tr:hover > td {
    color: #1f2937 !important;
    background: #eef5fc !important;
}

body.csk-users-page #users_table > tbody > tr.mps-row-selected > td {
    color: #0f2f63 !important;
    background: #d8e9fa !important;
}

body.csk-users-page #users_table .csk-users-action-sticky {
    position: sticky !important;
    z-index: 20 !important;
    background-color: #ffffff !important;
    background-image: linear-gradient(#ffffff, #ffffff) !important;
    background-clip: border-box !important;
    isolation: isolate !important;
    overflow: visible !important;
    opacity: 1 !important;
}

/*
 * Opaque paint layer above horizontally scrolling data. Table-cell
 * backgrounds alone are not reliable stacking surfaces in every Chromium
 * composition path, so each sticky action cell gets a real positioned cover.
 */
body.csk-users-page #users_table .csk-users-action-sticky::before {
    content: "";
    position: absolute;
    top: 0;
    right: -1px;
    bottom: 0;
    left: 0;
    z-index: 0;
    display: block;
    background: #ffffff;
    opacity: 1;
    pointer-events: none;
}

body.csk-users-page #users_table > tbody > tr > td.csk-users-action-sticky > .mps-action-btn {
    position: relative !important;
    z-index: 1 !important;
}

body.csk-users-page #users_table > thead > tr > th.csk-users-action-sticky {
    z-index: 30 !important;
    background-color: #f5f8fc !important;
    background-image: linear-gradient(#f5f8fc, #f5f8fc) !important;
}

body.csk-users-page #users_table > thead > tr > th.csk-users-action-sticky::before {
    background: #f5f8fc;
}

body.csk-users-page #users_table .csk-users-sticky-1 { left: 0 !important; }
body.csk-users-page #users_table .csk-users-sticky-2 { left: 34px !important; }
body.csk-users-page #users_table .csk-users-sticky-3 { left: 68px !important; }
body.csk-users-page #users_table .csk-users-sticky-4 {
    left: 102px !important;
    box-shadow: 5px 0 8px rgba(34,51,84,.06);
}

body.csk-users-page #users_table > tbody > tr:hover > td.csk-users-action-sticky {
    background-color: #eef5fc !important;
    background-image: linear-gradient(#eef5fc, #eef5fc) !important;
}

body.csk-users-page #users_table > tbody > tr:hover > td.csk-users-action-sticky::before {
    background: #eef5fc;
}

body.csk-users-page #users_table > tbody > tr.mps-row-selected > td.csk-users-action-sticky {
    background-color: #d8e9fa !important;
    background-image: linear-gradient(#d8e9fa, #d8e9fa) !important;
}

body.csk-users-page #users_table > tbody > tr.mps-row-selected > td.csk-users-action-sticky::before {
    background: #d8e9fa;
}

body.csk-users-page #users_table .mps-action-btn {
    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    margin: 0 1px !important;
    padding: 0 !important;
    border: 1px solid #c7d7e8 !important;
    border-radius: 4px !important;
    background-color: #f8fbff !important;
    background-image: none !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.85) !important;
    color: #315f91 !important;
    -webkit-text-fill-color: #315f91 !important;
    font-family: FontAwesome, "Font Awesome 5 Free", Arial, sans-serif !important;
    font-size: 12px !important;
    line-height: 22px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    text-decoration: none !important;
    text-shadow: none !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    outline: none !important;
}

body.csk-users-page #users_table .mps-action-btn:hover,
body.csk-users-page #users_table .mps-action-btn:focus {
    border-color: #7ea4cc !important;
    background-color: #eaf2fb !important;
    color: #123f73 !important;
    -webkit-text-fill-color: #123f73 !important;
    box-shadow: 0 0 0 2px rgba(94,134,181,.18), inset 0 1px 0 rgba(255,255,255,.85) !important;
    outline: none !important;
}

body.csk-users-page #users_table .mps-action-disabled,
body.csk-users-page #users_table .mps-action-btn[disabled] {
    color: #94a3b8 !important;
    background-color: #f3f6fa !important;
    border-color: #d9e3ee !important;
    -webkit-text-fill-color: #94a3b8 !important;
    box-shadow: none !important;
    opacity: .58 !important;
    cursor: default !important;
    pointer-events: none !important;
    filter: grayscale(1) !important;
}

body.csk-users-page #users_table .mps-action-btn .fa,
body.csk-users-page .csk-users-pager-btn .fa {
    font-family: "Font Awesome 6 Free" !important;
    font-style: normal !important;
    font-weight: 900 !important;
}

body.csk-users-page #users_table .mps-action-btn .fa {
    width: 14px !important;
    height: 14px !important;
    margin: 0 !important;
    font-size: 12px !important;
    line-height: 14px !important;
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
    text-align: center !important;
}

body.csk-users-page #users_table .mps-badge {
    min-width: 20px !important;
    height: 18px !important;
    margin: 0 2px 0 0 !important;
    padding: 1px 5px !important;
    color: #1f5f8f !important;
    background: #dceeff !important;
    border: 1px solid rgba(15,23,42,.12) !important;
    border-radius: 3px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 16px !important;
    text-align: center !important;
}

body.csk-users-page #users_table .mps-status {
    min-width: 82px !important;
    padding: 3px 7px !important;
    border: 0 !important;
    border-radius: 3px !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 14px !important;
    text-align: center !important;
}

body.csk-users-page #users_table .mps-status.active,
body.csk-users-page #users_table .mps-status.status-aktivan {
    color: #ffffff !important;
    background: #2aa198 !important;
}

body.csk-users-page #users_table .mps-status.pending,
body.csk-users-page #users_table .mps-status.status-pozvan {
    color: #111827 !important;
    background: #d89a22 !important;
}

body.csk-users-page #users_table .mps-status.locked,
body.csk-users-page #users_table .mps-status.status-zakljucan {
    color: #ffffff !important;
    background: #c56f2d !important;
}

body.csk-users-page #users_table .mps-status.inactive,
body.csk-users-page #users_table .mps-status.status-deaktiviran {
    color: #ffffff !important;
    background: #c94a4a !important;
}

body.csk-users-page #users_table .mps-status.archived,
body.csk-users-page #users_table .mps-status.status-arhiviran {
    color: #111827 !important;
    background: #94a3b8 !important;
}

body.csk-users-page .csk-users-table-footer {
    flex: 0 0 auto;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 8px;
    color: #40516c;
    background: #fbfdff;
    border-top: 1px solid #dbe6f2;
}

body.csk-users-page .csk-users-pager-info {
    color: #74849a;
    font-size: 11.5px;
}

body.csk-users-page .csk-users-smart-pager {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

body.csk-users-page .csk-users-pager-btn {
    min-width: 24px !important;
    height: 24px !important;
    padding: 2px 6px !important;
    color: #49627e !important;
    background: #f7fafd !important;
    border: 1px solid #d6e1ee !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    font-family: Roboto, Arial, sans-serif !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    line-height: 18px !important;
}

body.csk-users-page .csk-users-pager-btn i {
    font-size: 10px;
}

body.csk-users-page .csk-users-pager-btn:hover,
body.csk-users-page .csk-users-pager-btn:focus {
    color: #244f82 !important;
    background: #eef5fc !important;
    border-color: #bfd0e1 !important;
    outline: none !important;
}

body.csk-users-page .csk-users-pager-btn.active {
    color: #ffffff !important;
    background: #5b7fa4 !important;
    border-color: #5b7fa4 !important;
}

body.csk-users-page .csk-users-pager-btn:disabled {
    color: #aab5c2 !important;
    background: #f8fafc !important;
    border-color: #e1e8f0 !important;
    opacity: .75;
}

body.csk-users-page .csk-users-page-total {
    min-width: 58px;
    padding-left: 4px;
    color: #74849a;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.42857143;
    text-align: right;
}

@media (max-width: 900px) {
    body.csk-users-page .csk-users-table-panel-head,
    body.csk-users-page .csk-users-table-title-block,
    body.csk-users-page .csk-users-table-tools {
        align-items: flex-start !important;
        flex-direction: column;
    }

    body.csk-users-page .csk-users-table-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    body.csk-users-page .csk-users-column-menu {
        right: auto;
        left: 0;
    }
}

/*
 * CSK full-width tables: the visual contract of /csk/index.php.
 * Apply only through the explicit card class so split/nested tables retain
 * their purpose-built compact layouts.
 */
body.mps-zis-body .csk-full-width-table-card {
    font-family: "CSK Roboto", Roboto, Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 20px !important;
}

body.mps-zis-body .csk-full-width-table-card > .mps-panel-head {
    min-height: 46px !important;
    align-items: center !important;
}

body.mps-zis-body .csk-full-width-table-card .mps-panel-title,
body.mps-zis-body .csk-full-width-table-card .mps-panel-subtitle,
body.mps-zis-body .csk-full-width-table-card .mps-pager,
body.mps-zis-body .csk-full-width-table-card .csk-email-pagination {
    font-family: "CSK Roboto", Roboto, Arial, sans-serif !important;
}

body.mps-zis-body .csk-full-width-table-card .mps-panel-subtitle {
    line-height: 1.42857143 !important;
}

body.mps-zis-body .csk-full-width-table-card > .mps-table-wrap,
body.mps-zis-body .csk-full-width-table-card > .mps-table-wrap.mps-ready-table-wrap,
body.mps-zis-body .csk-full-width-table-card > .mps-table-wrap.csk-support-table-wrap,
body.mps-zis-body .csk-full-width-table-card > .mps-table-wrap.csk-announcements-table-wrap,
body.mps-zis-body .csk-full-width-table-card > .mps-table-wrap.mps-client-table-wrap {
    position: relative !important;
    isolation: isolate !important;
    background: #ffffff !important;
}

body.mps-zis-body .csk-full-width-table-card table.mps-table {
    width: 100% !important;
    margin: 0 !important;
    table-layout: auto !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    color: #1f2937 !important;
    background: #ffffff !important;
    font-family: "CSK Roboto", Roboto, Arial, sans-serif !important;
    font-size: 11.5px !important;
}

body.mps-zis-body .csk-full-width-table-card table.mps-table > thead > tr > th {
    position: sticky !important;
    top: 0 !important;
    z-index: 2 !important;
    height: 30px !important;
    padding: 5px !important;
    color: #344766 !important;
    background: #f5f8fc !important;
    border: 0 !important;
    border-bottom: 1px solid #dbe6f2 !important;
    box-shadow: none !important;
    font-family: "CSK Roboto", Roboto, Arial, sans-serif !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    line-height: 1.42857143 !important;
    text-align: left !important;
    text-shadow: none !important;
    vertical-align: bottom !important;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

body.mps-zis-body .csk-full-width-table-card table.mps-table > tbody > tr > td,
body.mps-zis-body .csk-full-width-table-card table.mps-table > tbody > tr:nth-child(even) > td {
    height: 36px !important;
    padding: 5px !important;
    color: #1f2937 !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid #edf2f7 !important;
    font-family: "CSK Roboto", Roboto, Arial, sans-serif !important;
    font-size: 11.5px !important;
    line-height: 1.42857143 !important;
    vertical-align: top !important;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

body.mps-zis-body .csk-full-width-table-card table.mps-table > tbody > tr:hover > td {
    color: #1f2937 !important;
    background: #eef5fc !important;
}

body.mps-zis-body .csk-full-width-table-card table.mps-table > tbody > tr.mps-row-selected > td {
    color: #0f2f63 !important;
    background: #d8e9fa !important;
}

body.mps-zis-body .csk-full-width-table-card table.csk-table-actions-first > thead > tr > th:first-child,
body.mps-zis-body .csk-full-width-table-card table.csk-table-actions-first > tbody > tr > td:first-child:not([colspan]) {
    position: sticky !important;
    left: 0 !important;
    z-index: 20 !important;
    isolation: isolate !important;
    overflow: visible !important;
    background-color: #ffffff !important;
    background-image: linear-gradient(#ffffff, #ffffff) !important;
    opacity: 1 !important;
    text-align: center !important;
}

body.mps-zis-body .csk-full-width-table-card table.csk-table-actions-first > thead > tr > th:first-child {
    z-index: 30 !important;
    background-color: #f5f8fc !important;
    background-image: linear-gradient(#f5f8fc, #f5f8fc) !important;
}

body.mps-zis-body .csk-full-width-table-card table.csk-table-actions-first > thead > tr > th:first-child::before,
body.mps-zis-body .csk-full-width-table-card table.csk-table-actions-first > tbody > tr > td:first-child:not([colspan])::before {
    content: "";
    position: absolute;
    top: 0;
    right: -1px;
    bottom: 0;
    left: 0;
    z-index: 0;
    display: block;
    background: #ffffff;
    opacity: 1;
    pointer-events: none;
}

body.mps-zis-body .csk-full-width-table-card table.csk-table-actions-first > thead > tr > th:first-child::before {
    background: #f5f8fc;
}

body.mps-zis-body .csk-full-width-table-card table.csk-table-actions-first > thead > tr > th:first-child > *,
body.mps-zis-body .csk-full-width-table-card table.csk-table-actions-first > tbody > tr > td:first-child:not([colspan]) > * {
    position: relative !important;
    z-index: 1 !important;
}

body.mps-zis-body .csk-full-width-table-card table.csk-table-actions-first > tbody > tr:hover > td:first-child:not([colspan]),
body.mps-zis-body .csk-full-width-table-card table.csk-table-actions-first > tbody > tr:hover > td:first-child:not([colspan])::before {
    background: #eef5fc !important;
}

body.mps-zis-body .csk-full-width-table-card table.csk-table-actions-first > tbody > tr.mps-row-selected > td:first-child:not([colspan]),
body.mps-zis-body .csk-full-width-table-card table.csk-table-actions-first > tbody > tr.mps-row-selected > td:first-child:not([colspan])::before {
    background: #d8e9fa !important;
}

body.mps-zis-body .csk-full-width-table-card table.mps-table .mps-action-btn {
    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 1px !important;
    padding: 0 !important;
    color: #315f91 !important;
    background-color: #f8fbff !important;
    background-image: none !important;
    border: 1px solid #c7d7e8 !important;
    border-radius: 4px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.85) !important;
    font-size: 12px !important;
    line-height: 22px !important;
    text-align: center !important;
    text-decoration: none !important;
    text-shadow: none !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    outline: none !important;
}

body.mps-zis-body .csk-full-width-table-card table.mps-table .mps-action-btn:hover,
body.mps-zis-body .csk-full-width-table-card table.mps-table .mps-action-btn:focus {
    color: #123f73 !important;
    background-color: #eaf2fb !important;
    border-color: #7ea4cc !important;
    box-shadow: 0 0 0 2px rgba(94,134,181,.18), inset 0 1px 0 rgba(255,255,255,.85) !important;
}

body.mps-zis-body .csk-full-width-table-card table.mps-table .mps-action-btn:disabled,
body.mps-zis-body .csk-full-width-table-card table.mps-table .mps-action-disabled {
    color: #94a3b8 !important;
    background-color: #f3f6fa !important;
    border-color: #d9e3ee !important;
    box-shadow: none !important;
    opacity: .58 !important;
    cursor: default !important;
    pointer-events: none !important;
    filter: grayscale(1) !important;
}

body.mps-zis-body .csk-full-width-table-card table.mps-table .mps-action-btn .fa {
    width: 14px !important;
    height: 14px !important;
    margin: 0 !important;
    color: inherit !important;
    font-family: "Font Awesome 6 Free" !important;
    font-size: 12px !important;
    font-style: normal !important;
    font-weight: 900 !important;
    line-height: 14px !important;
    text-align: center !important;
}

body.mps-zis-body .csk-full-width-table-card table.mps-table .mps-badge {
    min-width: 20px !important;
    height: 18px !important;
    margin: 0 2px 0 0 !important;
    padding: 1px 5px !important;
    color: #1f5f8f !important;
    background: #dceeff !important;
    border: 1px solid rgba(15,23,42,.12) !important;
    border-radius: 3px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 16px !important;
    text-align: center !important;
}

body.mps-zis-body .csk-full-width-table-card table.mps-table .mps-status {
    min-width: 82px !important;
    padding: 3px 7px !important;
    border: 0 !important;
    border-radius: 3px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 14px !important;
    text-align: center !important;
}

body.mps-zis-body .csk-full-width-table-card .mps-pager {
    gap: 3px !important;
}

body.mps-zis-body .csk-full-width-table-card .mps-pager .form-control {
    width: 74px !important;
    font-family: "CSK Roboto", Roboto, Arial, sans-serif !important;
}

body.mps-zis-body .csk-full-width-table-card .mps-pager .mps-icon-btn {
    width: 24px !important;
    min-width: 24px !important;
    height: 24px !important;
    min-height: 24px !important;
    padding: 0 !important;
    font-size: 10px !important;
    line-height: 22px !important;
}

body.mps-zis-body .csk-full-width-table-card .mps-pager > span {
    min-width: 58px !important;
    color: #74849a !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    line-height: 1.42857143 !important;
}

body.mps-zis-body .csk-full-width-table-card > .csk-email-pagination {
    min-height: 33px !important;
    margin: 0 !important;
    padding: 4px 8px !important;
    color: #40516c !important;
    background: #fbfdff !important;
    border-top: 1px solid #dbe6f2 !important;
}
