@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

html,
body {
    min-height: 100%;
    overflow-y: hidden;
    overflow-x: hidden;
}

*, *::before, *::after {
    box-sizing: border-box;
}

.bg-video {
    position: fixed;
    top: var(--topbar-height);       /* was: top: 0 */
    left: 0;
    width: 100%;
    height: calc(100% - var(--topbar-height)); /* was: height: 100% */
    object-fit: contain;
    transform: scale(0.75) translateZ(0);
    will-change: transform;
    z-index: -10;
    pointer-events: none;
}

body {
    margin: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    font-family: Arial, sans-serif;
    overflow-x: hidden;
    background-color: black;
}

a {
    color: #9bd3ff;
    text-decoration: none;
}

a:hover {
    color: #ffffff;
    
}

a:visited {
    color: #9bd3ff;
}

table {
    width: 100%;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 10px;
    overflow: hidden;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 14px;
    text-align: left;
}

thead {
    background: rgba(255, 255, 255, 0.08);
}

tbody tr {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

button {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
}

button:hover {
    background: rgba(0, 0, 0, 1);
}

h1,
h2,
h3 {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.section-box h4 {
    margin: -4px 0 14px 0;
    font-size: 16px;
    font-weight: 600;
}

:root {
    --topbar-height: 60px;
    --sidebar-width: 230px;
    --sidebar-width-collapsed: 70px;
    --frame-color: #063156;
    --frame-radius: 20px;
}


.screen {
    position: relative;
    height: calc(100vh - var(--topbar-height));
    isolation: isolate;
    --ui-scale: 1;
}

.screen::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    pointer-events: none;
    z-index: 0;
}

.core-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.environment-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.env-btn {
    background: rgba(30, 45, 70, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
}

#env-label {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.env-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 70px;
    height: 26px;
    padding: 0;

    box-sizing: border-box;

    background: var(--env-color);
    border-radius: 999px;

    color: #FFFFFF;
    font-family: Poppins, sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    margin-left: 0;
}

.env-key {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.env-color {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--env-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.core-title {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.user-box {
    background: rgba(30, 45, 70, 0.9);
    border-radius: 8px;
    padding: 10px 22px;

    border: 1px solid rgba(255, 255, 255, 0.3);

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.settings-icon {
    margin: 15px auto 0 auto;

    background: rgba(30, 45, 70, 0.9);

    width: 120px;
    height: 40px;

    border-radius: 8px;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 22px;

    cursor: pointer;

    border: 1px solid rgba(255, 255, 255, 0.35);

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.settings-icon:hover {
    background: rgba(0, 0, 0, 1);
}



.settings-wrapper {
    position: relative;
    margin-top: 15px;
}

.settings-dropdown {
    position: absolute;

    top: 40px;
    left: 50%;
    transform: translateX(-50%);

    background: rgba(20, 30, 45, 0.95);

    border-radius: 8px;

    border: 1px solid rgba(255, 255, 255, 0.25);

    display: none;

    flex-direction: column;

    min-width: 150px;

    overflow: hidden;
}

.settings-dropdown a {
    padding: 10px;
    color: white;
    text-decoration: none;
    display: block;
}

.settings-dropdown a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-link {
    text-decoration: none;
    color: white;
}

.perm-btn {
    padding: 6px 10px;
    border: none;
    cursor: pointer;
    color: white;
    font-weight: bold;
}

.perm-btn.enabled {
    background: #2ecc71;
}

.perm-btn.disabled {
    background: #e74c3c;
}

.perm-btn.hidden {
    background: #95a5a6;
}

.form-container {
    width: 100%;
    max-width: 50%;
}

.profile-card {
    width: 100%;
    min-height: calc(100vh - 110px);
    margin: 0;
    padding: 28px 32px;
    border-radius: 18px;

    background:
        linear-gradient(
            180deg,
            rgba(20,35,60,.06) 0%,
            rgba(8,18,35,.10) 100%
        );


    backdrop-filter: blur(6px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);

    border: 1px solid rgba(190,225,255,.20);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.10),
        inset 0 0 1px rgba(255,255,255,.08),
        0 20px 60px rgba(0,0,0,.24),
        0 0 100px rgba(0,140,255,.10);
}

.section-box {
        padding-top: 20px;
         display: flex;
    flex-direction: column;
}

.section-box legend {
    margin-left: 12px;
}

.section-box input[type="checkbox"] {
    transform: scale(1.4);
    accent-color: #4f6d9b;
    cursor: pointer;
}

.section-box input[type="checkbox"]:focus {
    outline: none;
    box-shadow: none;
}

.status-select {
    position: static;

    width: 180px;
    height: 42px;

    padding: 0 38px 0 14px;

    border-radius: 9px;
    border: 1px solid rgba(120, 185, 255, 0.22);

    appearance: none;
    -webkit-appearance: none;

    color: #ffffff;

    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;

    cursor: pointer;

    background-color: rgba(15, 35, 65, 0.82);

    background-image:
        linear-gradient(
            45deg,
            transparent 50%,
            rgba(210, 230, 255, 0.8) 50%
        ),
        linear-gradient(
            135deg,
            rgba(210, 230, 255, 0.8) 50%,
            transparent 50%
        );

    background-position:
        calc(100% - 17px) 18px,
        calc(100% - 12px) 18px;

    background-size:
        5px 5px,
        5px 5px;

    background-repeat: no-repeat;

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 6px 18px rgba(0, 0, 0, 0.18);

    transition:
        background-color .2s ease,
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}


.status-select:hover {
    border-color: rgba(120, 190, 255, 0.42);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 0 16px rgba(40, 120, 255, 0.12);
}


.status-select:focus {
    outline: none;

    border-color: rgba(120, 190, 255, 0.55);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 0 2px rgba(50, 120, 220, 0.12),
        0 0 18px rgba(40, 120, 255, 0.16);
}




.section-box label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

input,
select {
    background: #f0f2f5;
    border-radius: 6px;
    padding: 10px;
    font-size: 14px;

    height: 4   8px;
    box-sizing: border-box;
}



input:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 2px #3498db;
}

input[type="color"] {
    padding: 0;
    border: none;
    background: none;
    width: 50px;
    height: 30px;
    cursor: pointer;
}


.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: black;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 6px;
    margin-bottom: 6px;
}


.btn {
    background: rgba(0, 0, 0, 0.85);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 15px;
    transition: 0.15s;
    margin-bottom: 10px;
    font-weight: 600;
}

.btn:hover {
    background: rgba(0, 0, 0, 1);
    border-color: rgba(255, 255, 255, 0.5);
}


.app-remove-cell {
    width: 40px;
    text-align: right;
}

.app-remove-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.8;
}

.app-remove-btn:hover {
    opacity: 1;
}

.form-row {
    display: block;
    gap: 28px;
    margin-bottom: 10px;
    margin-top: 10px;
}

.form-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-bottom: 14px;
}

.form-field label,
.profile-card label {
    font-family: Poppins, Arial, sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 100%;
    letter-spacing: 0;
    color: #8FA0B8;
    margin-bottom: 7px;
}

.delete-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.env-inactive {
    opacity: 0.5;
    filter: grayscale(70%);
}


.env-off-badge {
    font-size: 11px;
    padding: 2px 6px;
    margin-left: 6px;
    background: #666;
    border-radius: 6px;
    color: white;
}

.app-role-box {
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;

    padding: 12px;
    margin-bottom: 8px;

    background: rgba(15, 25, 40, 0.75);
}


.app-role-header {
    background: #4f6d9b;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-role-header::after {
    content: "▾";
    transition: transform 0.15s;
}

.app-role-box.open .app-role-header::after {
    transform: rotate(180deg);
}

.app-role-content {
    background: white;
    border-radius: 6px;
    padding: 8px;

    display: none;
}

.app-role-box.open .app-role-content {
    display: block;
}


.env-off {
    opacity: 0.55;
    background: rgba(0, 0, 0, 0.15);
    border-left: 4px solid #777;
}

@media (max-width: 640px) {
    .small-input[type="text"],
    select.small-input {
        width: 100%;
        min-width: 0;
    }
}

.small-input[type="text"] {

    width: 260px;
    height: 48px;

    padding: 0 14px;

    color: #eaf4ff;

    background:
        linear-gradient(
            180deg,
            rgba(22,35,58,.78) 0%,
            rgba(10,20,38,.88) 100%
        );

    border: 1px solid rgba(120,180,255,.14);

    border-radius: 10px;

    backdrop-filter: blur(12px);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.04),
        0 0 18px rgba(0,120,255,.05);

    transition: .2s;
}

.small-input[type="text"]:focus {

    outline: none;

    border-color: rgba(120,180,255,.35);

    box-shadow:
        0 0 20px rgba(0,140,255,.12);
}

.small-input[type="text"]::placeholder {
    color: rgba(210,225,245,.55);
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-buttons form {
    margin: 0;
}

.edit-link {
    white-space: nowrap;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

@media (max-width: 640px) {

    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .new-env-btn {
        width: 100%;
        margin-right: 0;
    }

    .users-filter {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .small-input {
        width: 100%;
        flex: none;
    }

    .filter-label {
        display: block;
        margin-bottom: 4px;
    }

    .filter-checkbox-inline {
        margin-left: 0;
    }
}

.expertise-row {
    position: relative;

    width: clamp(170px, 14.5vw, 280px);
    height: 40px;

    box-sizing: border-box;

    border: 1px solid #233046;
    border-radius: 5px;

    background: #08172A;

    cursor: pointer;
    margin-left: 12px;
}

.expertise-native-select {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    opacity: 0;

    cursor: pointer;

    z-index: 3;
}

.expertise-display {
    position: absolute;

    left: 16px;
    top: 0;

    height: 100%;

    display: flex;
    align-items: center;

    pointer-events: none;

    white-space: nowrap;
}

.expertise-label {
    color: #8FA0B8;

    font-family: Poppins, sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 20px;
}

.expertise-value {
    margin-left: 6px;

    color: #FFFFFF;

    font-family: Poppins, sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 20px;
}

.expertise-arrow {
    position: absolute;

    right: 22px;
    top: 50%;

    width: 8px;
    height: 6px;

    transform: translateY(-50%);

    pointer-events: none;

    z-index: 2;
}

@media (max-width: 640px) {
    .expertise-row .small-input {
        flex: 1;
        min-width: 0;
    }
}

.toolbar .btn {
    height: 36px;
}

.small-input {
    height: 48px;
    padding: 0 10px;
    font-size: 14px;
    flex: 1 1 140px;
    min-width: 0;
}

.filter-form {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 13px;
    opacity: 0.7;
    letter-spacing: 0.5px;
}


/* roles section header */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
}

.apps-filter-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.apps-filter-header h4,
.apps-filter-header h3 {
    margin: 0;
}

.apps-filter-header .filter-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

/* role badges container */

.roles-container {

    background: #e7e7e7;

    border-radius: 6px;

    padding: 8px;

    display: flex;

    flex-wrap: wrap;

    gap: 6px;

}

/* add role input */

.new-role-box {
    display: none;
    margin-top: 15px;
}

.new-role-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.new-role-form input {
    width: 100%;
}

.new-role-form button {
    width: 100%;
}


table input[type="checkbox"] {
    transform: scale(1.2);
}

.alert-error,
.alert-success {
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    transition: opacity 0.3s;
}

.alert-error {
    background: #e74c3c;
}

.alert-success {
    background: #2ecc71;
}

.role-delete-btn {
    background: transparent;
    border: none;
    color: white;
    margin-left: 6px;
    cursor: pointer;
    font-size: 12px;
}

textarea {
    background: #f0f2f5;
    border-radius: 6px;
    padding: 10px;
    resize: vertical;
}

#paste-box textarea {
    font-family: monospace;
    resize: vertical;
}

.permissions-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
}

.logout-link {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 9999;
}

.logout-btn {
    background: rgba(0, 0, 0, 0.55);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 9px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(6px);
    transition: 0.15s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.logout-btn:hover {
    background: rgba(0, 0, 0, 0.78);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.logout {
    background: rgba(30, 45, 70, 0.92);

    color: white;

    border: 1px solid rgba(255, 255, 255, 0.35);

    padding: 10px 18px;

    border-radius: 8px;

    cursor: pointer;

    margin-top: 15px;
    margin-bottom: 10px;

    transition: 0.15s;

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.reset-btn {
    background: #c53a04;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.reset-btn:hover {
    background: #b02d06;
}

.profile-save {
    width: 100%;
    margin-top: 10px;
    padding: 14px 0;

    background: #142235;
    color: white;

    border: none;
    border-radius: 8px;

    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    cursor: pointer;
}

.user-save {
 height: 48px;

    border-radius: 5px;

    background: #306797;

    border:
        1px solid rgba(120,180,255,.25);

    color: #C6E2FA;
}

.user-save:hover {
    background: #3a79ad;
}

.reset-btn-admin {

    position: static;

    width: 180px !important;
    min-width: 180px !important;
    height: 40px !important;

    padding: 0 !important;

    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #4F5D6E;
    border-radius: 5px;

    background: #2B3646;

    color: #CCCCCC;

    font-family: Inter, sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 100%;
    letter-spacing: 0;
    text-align: center;

    cursor: pointer;

    transition:
        background .15s ease,
        border-color .15s ease,
        color .15s ease;
}


.reset-btn-admin:hover {

    background: #334154;
    border-color: #5B6A7C;
    color: #FFFFFF;
}


.reset-btn-admin:active {

    background: #273240;
    border-color: #4F5D6E;
}

.profile-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
}

.profile-actions-left {
    display: flex;
    gap: 12px;
}

.profile-actions-right {
    display: flex;
    gap: 12px;
}

.signout-btn {

    border: 1px solid rgba(255,120,120,.22);

    background:
        linear-gradient(
            180deg,
            rgba(120,35,45,.92) 0%,
            rgba(75,18,28,.96) 100%
        );

    color: #ffffff;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        0 0 18px rgba(255,60,60,.12);
}

.signout-btn:hover {

    background:
        linear-gradient(
            180deg,
            rgba(145,45,55,.95) 0%,
            rgba(95,25,35,.98) 100%
        );

    border-color: rgba(255,140,140,.30);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.12),
        0 0 22px rgba(255,60,60,.22);
}

.change-btn {
    background: #1f3552;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 18px;
}

.change-btn:hover {
    background: #274264;
}

.profile-actions button {
    height: 38px;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.profile-header h2 {
    margin: 0;
}

.admin-app-box {
    background: rgba(43, 91, 132, .35);
    border: 1px solid rgba(120, 180, 255, .12);
    border-radius: 12px;

    padding: 8px;
    margin-bottom: 10px;

    backdrop-filter: blur(8px);
}

.admin-app-title {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.admin-app-header {
    background: rgba(43, 91, 132, .55);

    border: 1px solid rgba(120, 180, 255, .12);

    border-radius: 10px;

    padding: 12px 14px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    cursor: pointer;
}

.header-spacer {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
}

.admin-role-list {

    padding-left: 5px;

    margin-top: 8px;

    display: none;

}

.admin-role-list input[type="checkbox"] {

    accent-color: #4f6d9b;

    outline: none;

    box-shadow: none;

}

.admin-role-list input[type="checkbox"]:focus {

    outline: none;

    box-shadow: none;

}

.admin-app-box.open .admin-role-list {
    display: block;
}

.admin-app-header::after {
    content: "▾";
    transition: transform 0.15s;
    opacity: 0.8;
}

.admin-app-box.open .admin-app-header::after {
    transform: rotate(180deg);
}

.admin-actions {
    display: flex;
    gap: 14px;
    margin-top: 25px;
}

.admin-role-list label {

    display: flex;
    align-items: center;

    gap: 8px;

    margin-bottom: 8px;

    font-size: 13px;

}

input,
select,
textarea {
    height: 52px;

    border-radius: 10px;

    padding: 0 16px;

    background: rgba(43,91,132,.55);

    border: 1px solid rgba(120,180,255,.12);

    color: white;
}
textarea {
    height: 90px;
    padding-top: 14px;
}

input:focus,
select:focus,
textarea:focus {

    outline: none;

    border-color:
        rgba(120,200,255,.8);

    box-shadow:
        0 0 15px rgba(80,180,255,.20);
}


.admin-role-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 10px;
}

.admin-role-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.profile-checkbox-row {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* ENV TABLE */

.env-table {
    margin-top: 20px;
    overflow-x: auto;
}





.env-header {
    padding: 0 14px 6px 14px;
    opacity: 0.85;
    font-weight: 600;

}

.env-row {
    min-height: 72px;
    margin-bottom: 12px;
    padding: 0 18px;
    border-radius: 14px;




    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.06),
        0 8px 22px rgba(0,0,0,.12);

    transition: .18s ease;
}

.env-row:hover {
    transform: translateY(-1px);
    border-color: rgba(130,210,255,.35);
    background: rgba(45,70,110,.08);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        0 0 30px rgba(0,150,255,.20);
}

.env-color-box {
    width: 34px;
    height: 24px;
    border-radius: 6px;
    background: var(--env-color);
}

.env-key a {
    font-weight: 600;
    color: #cde6ff;
}

.env-description {
    max-width: 1100px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;

}

.env-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
}

.env-delete-btn {

    width: 42px;
    height: 42px;

    border-radius: 10px;

    border: 1px solid rgba(255,120,120,.22);

    background:
        linear-gradient(
            180deg,
            rgba(120,35,45,.92) 0%,
            rgba(75,18,28,.96) 100%
        );

    backdrop-filter: blur(12px);

    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    transition: all .18s ease;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        0 0 18px rgba(255,60,60,.12);
}

.env-delete-btn:hover {

    transform: translateY(-1px);

    border-color: rgba(255,140,140,.35);

    background:
        linear-gradient(
            180deg,
            rgba(145,45,55,.96) 0%,
            rgba(95,25,35,.98) 100%
        );

    box-shadow:
        0 0 22px rgba(255,80,80,.22);
}



.env-inactive {
    opacity: .55;
    filter: grayscale(40%);
}

.new-env-btn {
    width: 40px;
    min-width: 40px;
    height: 35px;

    padding: 0;
    
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 5px;

    background: #0C3050;
    border: 1px solid #2A4A73;

    color: #A2C4E2;

    font-family: Poppins, sans-serif;
    font-size: 26px;
    font-weight: 500;
    line-height: 100%;

    cursor: pointer;

    transition:
        background .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

.new-env-btn:hover {
    background: #143F65;
    border-color: #3A6795;

    color: #A2C4E2;

    box-shadow:
        0 0 12px rgba(42, 74, 115, .25);
}

.env-date {

    font-size: 15px;

    opacity: 0.9;

    white-space: nowrap;

    letter-spacing: 0.3px;

}

/* environment detail */

.env-color-edit {

    height: 42px;

    border-radius: 6px;

    background: var(--env-color);

    margin-bottom: 18px;

    position: relative;

    display: flex;
    align-items: center;

    padding-right: 40px;

}

.env-color-pencil {

    position: absolute;

    right: 10px;

    font-size: 18px;

    color: white;

    pointer-events: none;

}

.env-color-edit input[type="color"] {

    position: absolute;

    right: 0;

    top: 0;

    width: 100%;
    height: 100%;

    opacity: 0;

    cursor: pointer;

}

.env-description-input {
    width: 100%;
    height: 90px;
    resize: vertical;
    padding: 10px;
    border-radius: 6px;
    background: #f0f2f5;
    box-sizing: border-box;

}


.env-app-box {

    background: rgba(20, 30, 45, 0.75);

    border-radius: 10px;

    padding: 14px;

    border: 1px solid rgba(255, 255, 255, 0.18);

}

.env-app-key a {
    color: #9bd3ff;
    font-weight: 600;
}

.env-app-remove {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    font-size: 18px;
}

.env-app-remove:hover {

    background: rgba(255, 255, 255, 0.1);

}

.env-app-list {
    background: rgba(43, 91, 132, .55);
    border: 1px solid rgba(120, 180, 255, .12);
    border-radius: 10px;

    padding: 12px;

    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.env-app-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(120, 180, 255, .12);
    border-radius: 6px;
    padding: 4px 8px;
}

.env-app-key {
    color: white;
}

.env-app-key,
.env-app-key:visited,
.env-app-key:hover,
.env-app-key:active {

    color: #ffffff;

    text-decoration: none;

}

.env-app-remove {

    border: none;

    background: transparent;

    color: white;

    font-size: 14px;

    cursor: pointer;

    padding-left: 2px;

    line-height: 1;

}

.env-app-remove:hover {

    opacity: 0.6;

}

.env-save {
    margin-top: 25px;
    width: 100%;
}


.users-filter {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.4vw, 24px);
    flex-wrap: nowrap;
    min-width: 0;
    flex: 1;
}

.status-filter {

    display: flex;

    gap: 10px;

    background: #2c3e55;

    padding: 6px 10px;

    border-radius: 6px;

}

.status-chip {

    display: inline-block;

    padding: 4px 12px;

    border-radius: 6px;

    font-size: 12px;

    font-weight: 600;

}


.users-list {
    margin-top: 10px;
    overflow-x: auto;
}

.user-row>div,
.users-header>div {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.users-header,
.user-row {
    display: grid;
    grid-template-columns:
        60px
        minmax(100px, 0.9fr)
        minmax(100px, 0.9fr)
        minmax(180px, 1.05fr)
        minmax(140px, 0.95fr)
        125px
        125px
        50px;

    align-items: center;
    column-gap: 18px;

    width: fit-content;
    min-width: 100%;

    box-sizing: border-box;
}

.users-header {
    height: 40px;

    padding: 0 14px;

    background: #063156;

    border: none;
    border-radius: 5px;

    color: #FFFFFF;

    font-family: Poppins, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 100%;
}

.env-header,
.env-row {
    grid-template-columns:
        210px
        300px
        minmax(220px, 1fr)
        190px
        190px
        70px;
}

.user-row {
    min-height: 48px;

    margin-bottom: 1px;
    padding: 0 14px;

    border-radius: 0;

    background: rgba(32, 61, 97, 0.30);

    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;

    box-shadow: none;

    transition:
        background .15s ease,
        border-color .15s ease;
}

.user-row:nth-child(odd) {
    background: rgba(32, 61, 97, 0.15);
}

.user-row.user-created {
    background: rgba(221, 221, 221, 0.2);
}

.user-row.user-inactive > *:not(:first-child):not(:last-child) {
    opacity: 0.25;
}

.user-row.user-inactive .user-avatar img {
    filter: grayscale(1);
}

.user-row:hover {
    transform: none;
    background: rgba(42, 74, 115, 0.35);
    box-shadow: none;
}

.user-name-cell,
.user-row>div {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.env-row>div {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}



.user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
}

.user-status {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-select.status-active,
.status-active {
    background-color: rgba(48, 125, 82, 0.82);

    border-color: rgba(105, 235, 155, 0.48);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 18px rgba(55, 220, 125, 0.18);
}


/* INACTIVE */

.status-select.status-inactive,
.status-inactive {
    background-color: rgba(105, 42, 48, 0.78);

    border-color: rgba(230, 95, 105, 0.34);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 16px rgba(220, 65, 80, 0.10);
}


/* CREATED */



/* DROPDOWN OPTIONS */

.status-select option {
    background: #0d1d34;
    color: #ffffff;

    font-weight: 600;
}

.status-all {
    background: #5e6b7d;
    color: white;
    border: 2px solid #5e6b7d;
}

.status-filter {
    display: flex;
    gap: 14px;
    background: #2c3e55;
    padding: 8px 12px;
    border-radius: 8px;
    align-items: center;
}

.status-filter label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.default-object-dot {
    width: 10px;
    height: 10px;
    background: #f0d34a;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.apps-header,
.app-row {

    grid-template-columns:
        140px     
        190px    
        260px 
        minmax(110px, 1fr) 
        150px   
        150px   
        70px;  
}


.app-users-list {
    margin-top: 10px;
}

.app-user-box {
     background: rgba(43, 91, 132, .35);
    border: 1px solid rgba(120, 180, 255, .12);
    border-radius: 12px;

    padding: 8px;
    margin-bottom: 10px;

    backdrop-filter: blur(8px);
}

.app-user-header {
     background: rgba(43, 91, 132, .55);

    border: 1px solid rgba(120, 180, 255, .12);

    border-radius: 10px;

    padding: 12px 14px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    cursor: pointer;
}

.app-user-roles {
    display: none;
    margin-top: 10px;

    padding: 12px;

    background: rgba(20, 35, 55, .55);

    border: 1px solid rgba(120, 180, 255, .10);

    border-radius: 10px;
}


.app-user-box.open .app-user-roles {
    display: block;
}

.app-user-roles label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 13px;
}

.perm-header,
.perm-row {
    display: grid;
    min-width: 1350px;
    grid-template-columns:
        220px
        200px
        260px
        minmax(320px, 750px)
        170px
        170px;

    align-items: center;
    column-gap: 24px;

    width: fit-content;
    min-width: 100%;
}



.permissions-matrix {
    background: rgba(10, 20, 35, 0.85);
    border-radius: 10px;
     overflow-x: auto;
    overflow-y: auto;    
    max-height: calc(100vh - 300px); 
    position: relative;
}

.permissions-matrix table {
    background: none;
    border-collapse: collapse;
    width: 100%;
}

.permissions-matrix thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    font-weight: 600;
    opacity: 0.85;
    padding: 14px 16px;
    background: rgb(18, 30, 48);
}




/* top-left corner cells need to beat both sticky layers */
.permissions-matrix thead th:nth-child(1),
.permissions-matrix thead th:nth-child(2) {
    z-index: 4;
    background: rgb(18, 30, 48);
}


.permissions-matrix thead {
    background: rgba(255, 255, 255, 0.05);
}

.permissions-matrix th {
    font-weight: 600;
    opacity: 0.85;
    padding: 14px 16px;
}

.permissions-matrix td {
    padding: 14px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.perm-section td {
    background: rgba(0, 0, 0, 0.55); /* solid-ish, was 0.35 — needs to be more opaque since it's sticky and now scrolls under sticky header */
    font-weight: 600;
    border-top: none;
    position: sticky;
    left: 0;
    z-index: 1;
}

.permissions-matrix select {
    width: 120px;
    text-align: center;
}

.permissions-matrix tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

.perm-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    width: 70%;
    box-sizing: border-box;
}

.permissions-detail-group .permissions-matrix {
    padding-top: 0;
    overflow-x: auto;
    overflow-y: auto;
}
.permissions-detail-group .permissions-table {
    width: max-content;
    min-width: 100%;
}

.perm-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header {
    position: relative;

    display: flex;
    align-items: center;

    gap: 12px;

    margin-bottom: 18px;
}

.page-header h2 {
    word-break: break-all;
     margin: 0 0 0 8px;
     font-family: Poppins, sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 24px;
    line-height: 100%;
    letter-spacing: 0;
    vertical-align: middle;
}

.page-back {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 35px;
    height: 35px;

    box-sizing: border-box;

    border-radius: 5px;

    background: #0C3050;
    border: 1px solid #2A4A73;

    color: #A2C4E2;
    text-decoration: none;

    transition:
        background .2s ease,
        box-shadow .2s ease;
}

.page-back svg {
    width: 7px;
    height: 12px;

    display: block;
}

.page-back:hover {
    background: #143F65;
    border-color: #3A6795;

    box-shadow:
        0 0 12px rgba(42, 74, 115, .25);
}

.perm-actions {
    display: flex;
    gap: 10px;
}

.perm-save {
    background: #1f3552;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
}

.perm-save:hover {
    background: #274264;
}

.perm-copy {
    background: #9bb874;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    color: #1e2a35;
    font-weight: 600;
}

.perm-copy:hover {
    background: #8fae66;
}

.perm-paste {
    background: #6f86b3;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 600;
}

.perm-paste:hover {
    background: #5f78a5;
}

.permissions-matrix select {
    width: 120px;
    text-align: center;
    border-radius: 6px;
    border: none;
    font-weight: 600;
}

.permissions-matrix select.perm-enabled {
    background: #7fb069;
    color: white;
}

.permissions-matrix select.perm-disabled {
    background: #d0675e;
    color: white;
}

.permissions-matrix select.perm-hidden {
    background: #bfc3c7;
    color: #1e2a35;
}

.permissions-matrix select option {
    background: #f0f2f5;
    color: #1e2a35;
}

.page-back,
.page-back:visited,
.page-back:hover,
.page-back:active {
    color: white;
    text-decoration: none;
}

.profile-top {
    display: flex;
    gap: 35px;
    align-items: stretch;
    margin-bottom: 10px;
}

.profile-photo {
    width: 200px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-photo img {
    display: block;
}

.profile-avatar {
    width: 200px;
    height: 210px;

    border-radius: 5px;

    object-fit: cover;

    border: 1px solid #233046;

    background: #08172A;

    padding: 6px;

    box-sizing: border-box;

    cursor: pointer;
}

.profile-top-fields {
    flex: 1;
    
}

.profile-last-row {
    align-items: flex-end;
    grid-template-columns: minmax(0, 1fr) 420px;
}

.profile-position {
    flex: 2;
}

.profile-checkbox-right {
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
}

.assignments-save {
    display: block;
    margin-top: 25px;
    margin-left: 0px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-box {
    background: #1e2c40;
    padding: 25px;
    border-radius: 10px;
    width: 420px;
}

.modal-role input[type="checkbox"]:focus {
    outline: none;
    box-shadow: none;
}

.modal-app-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.modal-app-item {
    background: white;
    color: #1b2a40;
    border-radius: 8px;
    padding: 12px;
}

.modal-app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    cursor: pointer;
}

.modal-app-header span:last-child {
    font-size: 14px;
}

.modal-app-roles {
    display: none;
    margin-top: 10px;
    gap: 15px;
    flex-wrap: wrap;
}

.modal-app-item.open .modal-app-roles {
    display: flex;
}

.modal-role {
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-app-item.open .modal-app-header span:last-child {
    transform: rotate(180deg);
}

.users-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

input[readonly] {
    cursor: not-allowed;
}

.core-version {
    font-size: 18px;
    color: #ffb347;
    margin-left: 6px;
    text-decoration: none;
}

.core-version:hover {
    cursor: pointer;
}

.core-version,
.core-version:visited {
    color: #ffb347;
}

.version-box {
    background: rgba(20, 30, 45, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 20px;
}

.version-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.version-current {
    border-left: 4px solid #9DC778;
}

.version-tag {
    font-weight: 700;
    font-size: 18px;
    color: #9DC778;
}

.version-date {
    font-size: 13px;
    opacity: 0.7;
}

.version-box ul {
    margin: 0;
    padding-left: 20px;
}

.version-box li {
    margin-bottom: 4px;
}

.confirm-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.confirm-dialog-box {
    background: #1e2c40;
    padding: 26px;
    border-radius: 10px;
    width: 360px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
}

.confirm-dialog-text {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.4;
    color: #e6edf5;
    letter-spacing: 0.2px;
}

.confirm-dialog-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
}


.confirm-dialog-cancel-btn {

    height: 44px;

    padding: 0 18px;

    border-radius: 10px;

    border: 1px solid rgba(120,180,255,.12);

    background: rgba(43,91,132,.55);

    backdrop-filter: blur(12px);

    color: white;

    font-weight: 600;

    cursor: pointer;

    transition: .18s ease;
}

.confirm-dialog-cancel-btn:hover {

    background: rgba(58,110,160,.65);

    border-color: rgba(120,180,255,.22);
}


.confirm-dialog-confirm-btn {

    height: 44px;

    padding: 0 18px;

    border-radius: 10px;

    border: 1px solid rgba(120,255,170,.18);

    background:
        linear-gradient(
            180deg,
            rgba(40,140,85,.92) 0%,
            rgba(28,95,58,.96) 100%
        );

    color: white;

    font-weight: 600;

    cursor: pointer;

    transition: .18s ease;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        0 0 18px rgba(40,255,120,.10);
}

.confirm-dialog-confirm-btn:hover {

    transform: translateY(-1px);

    background:
        linear-gradient(
            180deg,
            rgba(52,170,105,.95) 0%,
            rgba(35,120,72,.98) 100%
        );

    border-color: rgba(120,255,170,.30);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        0 0 24px rgba(40,255,120,.18);
}

.user-name-cell {
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-link.disabled {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

select.small-input {

    width: 240px;
    min-width: 240px;

    height: 48px;

    padding: 0 14px;

    color: #eaf4ff;

    background:
        linear-gradient(
            180deg,
            rgba(22,35,58,.78) 0%,
            rgba(10,20,38,.88) 100%
        );

    border: 1px solid rgba(120,180,255,.14);

    border-radius: 10px;

    backdrop-filter: blur(12px);

  

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.04),
        0 0 18px rgba(0,120,255,.05);
}

select.small-input option {
    background: #16233a;
    color: #eaf4ff;
}

.filter-btn {

    height: 42px;

    padding: 0 22px;

    border-radius: 10px;

    border: 1px solid rgba(90,170,255,.20);

    background:
        linear-gradient(
            180deg,
            rgba(28,58,108,.95) 0%,
            rgba(18,38,72,.95) 100%
        );

    color: #9fd8ff;

    font-weight: 600;

    letter-spacing: .4px;

    cursor: pointer;

    transition: .2s;
}

.filter-btn:hover {

    color: #d7efff;

    border-color: rgba(120,190,255,.35);

    box-shadow:
        0 0 18px rgba(0,140,255,.15);
}

.filter-bar {
    margin-top: 15px;
    margin-bottom: 10px;
}

.filter-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;

    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;

    font-size: 14px;
    font-weight: 500;
    color: #ffffff;

    cursor: pointer;
    transition: 0.2s;
}

.filter-checkbox:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* checkbox */
.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #22c55e;
    /* zelená = aktívny filter */
    cursor: pointer;
}

.filter-checkbox-inline {
    display: flex;
    align-items: center;

    margin-left: 14px;

    gap: 20px;

    font-family: Poppins, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 100%;

    color: #FFFFFF;

    cursor: pointer;
}

/* override .section-box label */
.section-box label.filter-checkbox-inline {
    gap: 20px;
    font-size: 14px;
    color: #FFFFFF;
}

.filter-checkbox-inline input[type="checkbox"] {
    appearance: none;

    width: 16px;
    height: 16px;

    flex: 0 0 16px;

    position: relative;

    box-sizing: border-box;

    border-radius: 3px;

    border: 1px solid #233046 !important;

    background: #08172A;

    margin: 0;
    padding: 0;

    cursor: pointer;

    transition:
        background .15s ease,
        border-color .15s ease;
}

.filter-checkbox-inline input[type="checkbox"]:checked {
    background: #0C3050;

    border-color: #2A4A73;

    box-shadow: none;
}

.filter-checkbox-inline input[type="checkbox"]:checked::after {
    content: "";

    position: absolute;

    width: 12px;
    height: 9px;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    background: url("data:image/svg+xml,%3Csvg width='12' height='9' viewBox='0 0 12 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.91926 8.26827L0 4.34901L0.979816 3.36919L3.91926 6.30864L10.2279 0L11.2077 0.979815L3.91926 8.26827Z' fill='white'/%3E%3C/svg%3E")
        center / 12px 9px
        no-repeat;
}



.sidebar {

    position: fixed;
    top: 60px;
    left: 0;

    width: 230px;
    height: calc(100vh - 60px);

    box-sizing: border-box;

    background: linear-gradient(60deg,
        #063156 0%,
        #0a5596 35%,
        #063156 70%);

    padding: 22px 10px;

    display: flex;
    flex-direction: column;

    z-index: 1000;

    overflow: hidden;

    transition: width .45s cubic-bezier(.4, 0, .2, 1);
}



.sidebar-logo,
.sidebar-logo:visited,
.sidebar-logo:hover,
.sidebar-logo:active {
    font-family: "Nico Moji", sans-serif;
    font-size: 30px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0;

    color: #e6edf5;
    text-decoration: none;
    display: block;
    margin-top: 10px;
}

.sidebar .sidebar-logo {
    margin-bottom: 25px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;

    width: 100%;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;

    width: 100%;
    height: 36px;

    /* 13px + 1px transparent border = the old 14px, so icons don't move */
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 3px;

    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.3px;
    color: #d6e4ff;

    box-sizing: border-box;
    justify-content: flex-start;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.sidebar-menu a:hover {
    background: rgba(24, 92, 151, 0.25);   /* half-strength version of active */
    color: #ffffff;
}

.sidebar-menu a.active,
.sidebar-menu a.active:hover {
    background: rgba(24, 92, 151, 0.5);    /* #185C97 at 50% */
    border-color: #3582C5;
    color: #ffffff;
}

.sidebar-icon {
    width: 18px;
    height: 18px;

    object-fit: contain;

    opacity: 0.85;
    filter: brightness(0) invert(1);

    flex-shrink: 0;
}

.sidebar-footer {
    margin-top: auto;

    padding: 16px 12px 18px 12px;

    border-top: none;
    transition: opacity 0.2s ease, transform 0.2s ease;

}

.sidebar-footer,
.sidebar-menu a {
    white-space: nowrap;
}

.sidebar-menu a:hover .sidebar-icon {
    opacity: 1;
}

.sidebar-footer .sidebar-footer-top .core-version {
    font-size: 12px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif; 
    color: rgba(109, 177, 235, 1);

    margin-bottom: 6px;

    display: inline-block;
    width: auto;
}

.sidebar-footer .copyright {
    font-size: 13px;
    opacity: 0.8;
    display: block;
    width: 100%;
    padding-top: 6px;
}

.sidebar-footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-footer-logo img {
    height: 22px;
    width: auto;

    opacity: 0.9;

    filter: brightness(1.1);
}




.topbar-logo,
.topbar-logo:visited,
.topbar-logo:hover,
.topbar-logo:active {
    font-size: 22px;
    font-weight: 700;
    color: #e6edf5;
    text-decoration: none;
}



/* logo úplne vľavo */
.topbar-logo-box {
    position: relative;
    margin-left: 10px;
}

/* env switch vždy vycentrovaný */
.topbar-env {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);


}
.topbar {

    position: fixed;

    top: 0;
    left: 0;
    right: 0;

    height: 60px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 0 20px;

    background: var(--frame-color);

    border-bottom: none;

    z-index: 900;
}

.frame-corner {
    position: fixed;
    top: var(--topbar-height);
    left: var(--sidebar-width);
    width: var(--frame-radius);
    height: var(--frame-radius);
    z-index: 950;              /* above video/content, below topbar (900) is not needed: no overlap */
    pointer-events: none;

    background: radial-gradient(
        circle at 100% 100%,
        transparent calc(var(--frame-radius) - 0.5px),
        var(--frame-color) var(--frame-radius)
    );

    transition: left .45s cubic-bezier(.4, 0, .2, 1); /* same timing as the sidebar */
}

.sidebar.collapsed ~ .frame-corner {
    left: var(--sidebar-width-collapsed);
}

@media (max-width: 900px) {
    .frame-corner { display: none; }
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;

    text-decoration: none;

    padding: 6px 10px;
    border-radius: 10px;

    transition: all 0.2s ease;
}

.topbar-logout {
    position: relative;
    overflow: hidden;

    width: 53px;
    height: 40px;
    min-width: 53px;
    padding: 0;

    background: #6D1010;
    border: none;
    border-radius: 5px;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    transition: background .2s ease;
}

.topbar-logout:hover {
    background: #8A1616;     /* slightly lighter red on hover */
}

.topbar-logout .logout-label {
    position: relative;
    z-index: 1;              /* keeps the icon above the hold-progress fill */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* progress layer */
.logout-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;

    background: #C0392B; 

    transition: width 1.2s linear;
}

/* keď držíš */
.topbar-logout.holding .logout-progress {
    width: 100%;
}


.sidebar a,
.sidebar a:visited,
.sidebar a:hover,
.sidebar a:active {
    color: inherit;
    text-decoration: none;
}


.topbar-avatar {
    width: 34px;
    height: 34px;

    border-radius: 50%;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 2px solid rgba(255, 255, 255, 0.25);

    background: rgba(255, 255, 255, 0.05);
}

.topbar-avatar img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;
}

.topbar-user,
.topbar-user:visited,
.topbar-user:hover,
.topbar-user:active {
    color: #e6edf5;
    text-decoration: none;
}

.topbar-username {
    font-size: 14px;
    font-weight: 600;

    letter-spacing: 0.6px;
    white-space: nowrap;
}

.topbar-user:hover {
    background: rgba(255, 255, 255, 0.08);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.env-switch {
    display: flex;
    gap: 14px;
    align-items: center;
}

.env-pill {
    width: 121px;
    height: 30px;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border-radius: 10px;
    border: 1px solid color-mix(
        in srgb,
        var(--env-color) 45%,
        rgba(255, 255, 255, 0.25)
    );

    background: color-mix(
        in srgb,
        var(--env-color) 20%,
        rgba(255, 255, 255, 0.04)
    );

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    color: rgba(255, 255, 255, 0.55);

    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.8px;
    line-height: 1;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 4px 8px rgba(0, 0, 0, 0.25);

    cursor: pointer;

    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        color 0.25s ease,
        transform 0.2s ease;
}

.env-pill.active {
    color: #FFFFFF;

    background: color-mix(
        in srgb,
        var(--env-color) 30%,
        rgba(255, 255, 255, 0.05)
    );

    border-color: color-mix(
        in srgb,
        var(--env-color) 75%,
        rgba(255, 255, 255, 0.35)
    );

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 4px 8px rgba(0, 0, 0, 0.25),
        0 0 10px color-mix(
            in srgb,
            var(--env-color) 45%,
            transparent
        );
}

.env-pill:hover {
    color: #FFFFFF;

    background: color-mix(
        in srgb,
        var(--env-color) 28%,
        rgba(255, 255, 255, 0.05)
    );

    border-color: color-mix(
        in srgb,
        var(--env-color) 60%,
        rgba(255, 255, 255, 0.3)
    );

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 4px 8px rgba(0, 0, 0, 0.25),
        0 0 8px color-mix(
            in srgb,
            var(--env-color) 35%,
            transparent
        );
}



.topbar-left {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
}

.app-layout {
    position: absolute;
    top: 60px;
    left: 230px;
    right: 0;
    bottom: 0;
    padding: 16px 20px;

    overflow-y: auto;
    overflow-x: hidden;

    transition: left .45s cubic-bezier(.4, 0, .2, 1); /* match sidebar's timing */
}

.sidebar.collapsed ~ .app-layout {
    left: 70px;
}

.home .app-layout,
.home .screen {
    overflow: hidden !important;
}

.page-center {
     width: 100%;
    max-width: none;
}

.home .screen {
    height: calc(100vh - 60px);
    overflow: hidden;
}

.home .app-layout {
    overflow: hidden;
}

.auth .app-layout {
    left: 0;
    top: 0;
    padding-top: 0;

    overflow-y: hidden;
}

.auth .login-wrapper {
    position: fixed;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;
    box-sizing: border-box;
}


.signature-click::after {

    display: block;

}

.signature-inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.signature-remove {
    width: 28px;
    height: 28px;

    border-radius: 50%;
    border: none;

    background: rgba(0, 0, 0, 0.7);
    color: white;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;
}

.signature-remove:hover {
    background: #e74c3c;
}

.signature-click {
    cursor: pointer;
    display: inline-block;
}

.signature-click img {

    width: 160px;
    height: 160px;

    min-width: 160px;
    min-height: 160px;

    max-width: 160px;
    max-height: 160px;

    object-fit: contain;

    border-radius: 12px;

    padding: 12px;

    border: 1px solid rgba(255,255,255,.18);
}

/* hover efekt */
.signature-click:hover img {
    border-color: #6d91fd;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}



/* =========================================================
   HOME - CENTER OVERLAY (fits inside the INNER sphere)
   ========================================================= */

#signature-overlay {
    --d: calc(var(--sphere-fit-diameter, 600px) * 0.52);

    position: absolute;
    left: 50%;                       /* circle.js may override */
    top: 50%;
    width: calc(var(--d) * 0.86);
    height: calc(var(--d) * 0.86);   /* fixed box so the stage can anchor to the bottom */
    transform: translate(-50%, -50%);
    z-index: 20;

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    pointer-events: none;
    opacity: 0;
    transition: opacity .25s ease;
}

#signature-overlay.active { opacity: 1; }

#signature-overlay::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: calc(var(--d) * 1.05);
    height: calc(var(--d) * 1.05);
    transform: translate(-50%, -50%);
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(0, 0, 0, .55) 0%,
        rgba(0, 0, 0, .35) 55%,
        transparent 75%);
}

/* text block: sits higher, independent from the stage */
#signature-title {
    margin-top: calc(var(--d) * 0.15    );
    font-family: "Nico Moji", sans-serif;
    font-size: calc(var(--d) * 0.12);
    font-weight: 400;
    line-height: 1;
    color: #FFFFFF;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#signature-description {
    margin-top: calc(var(--d) * 0.04);
    max-width: 100%;

    font-family: Poppins, sans-serif;
    font-size: clamp(9px, calc(var(--d) * 0.05), 13px);
    font-weight: 400;
    line-height: 1.3;
    color: rgba(255, 255, 255, .9);

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* stage anchored to the bottom of the overlay box */
.sig-stage {
    position: absolute;
    left: 50%;
    bottom: calc(var(--d) * -0.03);      /* negative = lower, still inside the sphere */
    width: calc(var(--d) * 0.62);
    aspect-ratio: 273 / 122;
    transform: translateX(-50%);
}

.sig-portal {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#signature-image {
    position: absolute;
    left: 50%;
    bottom: 38%;
    width: calc(var(--d) * 0.26);
    height: calc(var(--d) * 0.26);
    object-fit: contain;
    transform: translateX(-50%);
}

#signature-image[src=""],
#signature-image:not([src]) { display: none; }

/* ---------- animation (only while active) ---------- */

#signature-overlay.active #signature-image {
    animation: sigFloat 3.6s ease-in-out infinite;
}

#signature-overlay.active .sig-portal {
    animation: sigPortalPulse 3.6s ease-in-out infinite;
}

@keyframes sigFloat {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, -6%); }
}

@keyframes sigPortalPulse {
    0%, 100% { opacity: .85; }
    50%      { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    #signature-overlay.active #signature-image,
    #signature-overlay.active .sig-portal { animation: none; }
}



/* === COLLAPSE === */
.sidebar.collapsed {
    width: 70px;
}

/* === MENU === */


/* ICON alignment fix */
.sidebar.collapsed .sidebar-menu a {
    gap: 0;
}


/* TEXT (smooth hide) */
.sidebar-menu a span {
    display: inline-block;
    white-space: nowrap;

    clip-path: inset(0 0 0 0);
    max-width: 200px;

    overflow: hidden;

    transition:
        clip-path 0.35s ease,
        max-width 0.35s ease;
}

.sidebar.collapsed .sidebar-menu a span {
    clip-path: inset(0 100% 0 0);
    max-width: 0;
}


/* =========================================================
   SIDEBAR FOOTER: smooth collapse
   Same idea as the menu text: the full versions get clipped
   away while the sidebar narrows, the mini versions fade in.
   Collapsed center line = x 35px = 22px (content start) + 13px
   ========================================================= */

.sidebar-footer-top,
.sidebar-footer-logo,
.sidebar-footer .copyright {
    white-space: nowrap;
    overflow: visible;
}

/* ---------- VERSION: glides to the center ---------- */

.sidebar-footer-top .core-version {
    position: relative;
    left: 0;
    transform: translateX(0);
    transition:
        left .45s cubic-bezier(.4, 0, .2, 1),
        transform .45s cubic-bezier(.4, 0, .2, 1),
        margin-left .45s cubic-bezier(.4, 0, .2, 1);
}

.sidebar.collapsed .sidebar-footer-top .core-version {
    margin-left: 0;
    left: 13px;
    transform: translateX(-50%);
}

/* ---------- LOGO ---------- */

.sidebar-footer-logo {
    position: relative;
    display: block;
    height: 22px;
}

.sidebar-footer-logo .logo-full {
    display: block;
    height: 22px;
    width: auto;
    clip-path: inset(0 0 0 0);
    transition: clip-path .35s ease;
}

.sidebar-footer-logo .logo-mini {
    display: block;
    position: absolute;
    top: 0;
    left: 13px;
    transform: translateX(-50%);
    height: 22px;
    width: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease;
}

.sidebar.collapsed .sidebar-footer-logo .logo-full {
    clip-path: inset(0 100% 0 0);
}

.sidebar.collapsed .sidebar-footer-logo .logo-mini {
    opacity: 0.9;
    transition: opacity .2s ease .25s;
}

/* ---------- COPYRIGHT ---------- */

/* fixed height in both states = nothing moves vertically.
   padding-top = gap between logo and copyright */
.sidebar-footer .copyright {
    position: relative;
    display: block;
    width: 100%;
    height: 40px;
    padding: 14px 0 0;
    opacity: 1;
}

.sidebar-footer .copyright .copyright-full {
    display: inline-block;
    vertical-align: top;
    font-size: 13px;
    opacity: 0.8;
    clip-path: inset(0 0 0 0);
    transition: clip-path .35s ease;
}

.sidebar-footer .copyright .copyright-mini {
    position: absolute;
    top: 14px;                 /* same as padding-top above */
    left: 13px;
    transform: translateX(-50%);
    width: max-content;
    text-align: center;
    font-size: 8px;
    line-height: 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease;
}

.sidebar.collapsed .sidebar-footer .copyright .copyright-full {
    clip-path: inset(0 100% 0 0);
}

.sidebar.collapsed .sidebar-footer .copyright .copyright-mini {
    opacity: 0.8;
    transition: opacity .2s ease .25s;
}



.sidebar-collapse-btn {
    display: flex;
    align-items: center;
    gap: 10px;

    width: 152px;
    height: 20px;
    padding: 0;
    margin: 0 0 18px -2px;   /* -2px: footer + sidebar padding = 22px, Figma wants 20px */

    background: none;
    border: none;
    border-radius: 0;

    color: #FFFFFF;
    font-family: Poppins, sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1;
    white-space: nowrap;

    opacity: 1;
    cursor: pointer;
    transition: opacity .15s ease;
}

.sidebar-collapse-btn:hover {
    background: none;
    opacity: 0.8;
}

.sidebar-collapse-icon {
    flex: 0 0 15px;
}

.sidebar-collapse-label {
    display: inline-block;
    max-width: 200px;
    overflow: hidden;
    clip-path: inset(0 0 0 0);
    transition: clip-path .35s ease, max-width .35s ease;
}

/* collapsed: icon only, label slides away like the menu text */
.sidebar.collapsed .sidebar-collapse-btn {
    gap: 0;
}

.sidebar.collapsed .sidebar-collapse-label {
    clip-path: inset(0 100% 0 0);
    max-width: 0;
}

.sortable {

    display: flex;

    align-items: center;

    gap: 10px;

    cursor: pointer;

    white-space: nowrap;
}

.sort-icon {
    width: 13px;
    height: 10px;

    flex: 0 0 13px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-left: 2px;
}

.sortable:hover {
    text-decoration: underline;
}


.topbar-user.disabled {
    cursor: default;
    opacity: 0.7;
    pointer-events: none;
}


.app-detail-layout {
     display: grid;
    grid-template-columns: auto 1fr;
    gap: 32px;
    align-items: stretch;
}

.app-signature-column {
    display: flex;
    flex-direction: column;

    height: 100%;
    padding-bottom: 40px;
}

.app-fields-column {
    display: flex;
    flex-direction: column;
    gap: 18px;
}


    .app-fields-column .form-row {
        display: flex;
    }

.app-fields-column .form-row .form-field {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}



.app-full-width-field {
    margin-top: 22px;
}

.signature-wrapper {
    position: relative;
    display: inline-block;
    flex: 1;
}

.signature-click {
    display: inline-block;
    cursor: pointer;
}

.signature-click img {
    display: block;

    min-width: 200px;
    min-height: 200px;

    max-width: 340px;
    max-height: 220px;

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 10px;

    background: rgba(0, 0, 0, 0.25);

    border: 2px solid rgba(255, 255, 255, 0.25);

    padding: 6px;

    box-sizing: border-box;
}

.signature-remove {
    position: absolute;

    top: -10px;
    right: -10px;

    width: 28px;
    height: 28px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    z-index: 5;
}

.avatar-wrapper {
    position: relative;
    display: inline-block;
}

.avatar-remove {
    position: absolute;

    top: -6px;
    right: -6px;

    width: 22px;
    height: 22px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    z-index: 5;

    box-sizing: border-box;
    appearance: none;

    background: #0C1C32;

    border: 1px solid #233046;

    color: #FFFFFF;

    font-family: Poppins, sans-serif;
    font-size: 12px;
    font-weight: 400;
    font-style: normal;
    line-height: 100%;
    letter-spacing: 0;

    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.avatar-remove:hover {
    background: #0C1C32;
    border-color: #233046;
    color: #FFFFFF;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.template-header,
.template-row {
    display: grid;

    width: fit-content;
    min-width: 100%;

    grid-template-columns:
        100px
        minmax(180px, 1fr)
        minmax(180px, 1fr)
        minmax(180px, 1fr)
        180px
        180px
        50px
        50px;

    column-gap: 8px;
}



.pagination {
    margin-left: auto;
    align-self: center;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    margin-top: 0;
}

.pagination-nav {

    height: 40px;

    padding: 0 14px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 10px;

    background: rgba(255, 255, 255, 0.06);

    border: 1px solid rgba(255, 255, 255, 0.08);

    color: rgba(255, 255, 255, 0.85);

    text-decoration: none;

    font-size: 14px;

    font-weight: 600;

    transition: background 0.15s ease;
}

.pagination-nav:hover {

    background: rgba(255, 255, 255, 0.12);

    color: white;

    text-decoration: none;
}

.pagination-nav:visited,
.pagination-nav:focus,
.pagination-nav:active {

    color: rgba(255, 255, 255, 0.85);

    text-decoration: none;
}

.pagination-current {

    min-width: 110px;

    text-align: center;

    color: rgba(255, 255, 255, 0.75);

    font-size: 13px;

    font-weight: 600;
}

.audit-filters {

    display: flex;

    flex-direction: column;

    gap: 12px;

    margin-bottom: 28px;
}

.audit-filters-main {

    display: grid;

    grid-template-columns:
        1.3fr 1fr 1fr 1fr 1fr;

    gap: 12px;
}


.audit-filters-bottom {

    display: flex;

    justify-content: flex-end;

    align-items: center;

    gap: 12px;
}

.audit-filters input[name="q"] {

    flex: 1.5 1 240px;
}

.audit-filters>.filter-input {

    flex: 1 1 180px;

    min-width: 180px;
}

.filter-input {

    width: 100%;

    height: 44px;

    padding: 0 14px;

    border-radius: 12px;

    border: 1px solid rgba(255, 255, 255, 0.08);

    background: rgba(0, 0, 0, 0.18);

    color: white;

    font-size: 14px;

    outline: none;
}

.filter-input:focus {

    border-color: rgba(255, 255, 255, 0.2);
}

.filter-button {

    height: 44px;

    padding: 0 20px;

    margin-left: 4px;
}

.filter-button:hover {

    background: rgba(255, 255, 255, 0.16);
}

.filter-input option {

    background: #24304a;

    color: white;
}

.filter-input::placeholder {

    color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 1500px) {

    .audit-filters {

        grid-template-columns:
            1fr 1fr 1fr 1fr;

    }
}

@media (max-width: 1000px) {

    .audit-filters {

        grid-template-columns:
            1fr 1fr;

    }
}

@media (max-width: 700px) {

    .audit-filters {

        grid-template-columns: 1fr;

    }
}


.date-range-group {

    display: flex;

    align-items: center;

    gap: 10px;

    margin-left: auto;
}

.date-range-group .filter-input {

    width: 160px;

    min-width: 160px;
}

.date-range-separator {

    color: rgba(255, 255, 255, 0.7);

    font-size: 18px;
}

.language-dropdown {

    position: relative;
}

.language-current {
    width: 53px;
    height: 40px;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #114978;
    border: none;
    border-radius: 6px;

    cursor: pointer;
    transition: background .2s ease;
}

.language-current:hover {
    background: #1A5C94;   /* beats the global button:hover (black) */
}

.language-flag {

    width: 20px;

    height: 15px;

    object-fit: cover;

    border-radius: 3px;

    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}



.language-menu {

    position: absolute;

    top: calc(100% + 10px);

    right: 0;

    min-width: 190px;

    padding: 8px;

    border-radius: 16px;

    background: #223252;

    border: 1px solid rgba(255, 255, 255, 0.08);

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.35);

    backdrop-filter: blur(10px);

    display: none;

    z-index: 1000;
}

.language-menu.open {

    display: block;
}

.language-option {

    width: 100%;

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 12px;

    border: none;

    background: transparent;

    color: white;

    border-radius: 12px;

    cursor: pointer;

    font-size: 14px;

    transition: 0.18s;
}

.language-option:hover {

    background: rgba(255, 255, 255, 0.08);
}

.project-table {
    margin-top: 20px;
    overflow-x: auto;
}

.project-header,
.project-row {
    grid-template-columns:
        minmax(150px, 1fr)
        minmax(180px, 1fr)
        minmax(180px, 1fr)
        minmax(180px, 1fr)
        minmax(180px, 1fr)
        minmax(180px, 1fr)
        minmax(180px, 1fr)
        60px;

    column-gap: 24px;
}

.project-row > div,
.project-header > div {
    min-width: 0;
}

.admin-app-title a,
.admin-app-title a:visited {
    color: white;
    text-decoration: none;
}

.project-members {
    display: none;
    padding: 12px 20px;
}

.project-members.open {
    display: block;
}


.required {
    color: #ff6b6b;
    margin-left: 2px;
}

.env-color-edit {
    margin-top: 6px;
}

.signature-wrapper {
    margin-top: 6px;
}



/* modal applications picker */

.selection-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.selection-item.app-item {
    position: relative !important;
    width: 100% !important;
    height: auto !important;

    opacity: 1 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    padding: 10px 14px !important;

    overflow: visible !important;

    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px;

    cursor: pointer;
    box-sizing: border-box;
}

.selection-item.app-item input[type="checkbox"] {
    margin-right: 10px;
    flex-shrink: 0;
}

.selection-item.app-item span {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;

    color: white !important;

    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;

    max-width: none !important;
    clip-path: none !important;
}

.project-selection-modal .modal-box {
    width: 700px;
    max-width: 90vw;
}

.project-selection-modal .selection-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;

    max-height: 350px;
    overflow-y: auto;
}

.project-selection-modal .selection-item {
    display: flex;
    align-items: center;
    gap: 12px;

    min-height: 42px;
    padding: 10px 14px;

    color: white;

    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;

    cursor: pointer;
    transition: 0.15s;
}

.project-selection-modal .selection-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.project-selection-modal .selection-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
}

.project-selection-modal .selection-item span {
    color: white;
    display: block;

    white-space: normal;
    overflow: visible;
    text-overflow: unset;
}

.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 12px;
    margin-bottom: 12px;
}

.selected-tag {
    display: inline-flex;
    align-items: center;

    padding: 6px 12px;

    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;

    color: white;
    font-size: 13px;
    font-weight: 500;
}

.project-selection-modal .modal-actions {
    margin-top: 20px;

    display: flex;
    gap: 10px;
}


.date-range-group input.flatpickr-input {
    background: rgba(0, 0, 0, 0.18) !important;
    color: white !important;
    -webkit-text-fill-color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.date-range-group input.flatpickr-input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

#birthday {
    height: 52px;
    border-radius: 10px;
    padding: 0 16px;
    background: rgba(43, 91, 132, .55);
    border: 1px solid rgba(120, 180, 255, .12);
    color: white;
}





.object-metadata {
    margin-top: 25px;

    display: flex;
    flex-direction: column;
    gap: 8px;

    padding: 12px 16px;

    background: rgba(43, 91, 132, .25);
    border: 1px solid rgba(120, 180, 255, .10);
    border-radius: 10px;

    width: fit-content;
    min-width: 320px;
}

.metadata-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.metadata-label {
    color: rgba(180, 210, 255, .75);
    font-size: 13px;
    font-weight: 600;
}

.metadata-value {
    color: rgba(255,255,255,.9);
    font-size: 14px;
}



.new-role-btn {

    height: 38px;
    margin-bottom: 10px;
    padding: 0 28px;

    border-radius: 10px;

    border: 1px solid rgba(90,170,255,.25);

    background:
        linear-gradient(
            180deg,
            rgba(32,74,130,.95) 0%,
            rgba(20,48,92,.95) 100%
        );

    color: #9fd8ff;

    font-size: 15px;
    font-weight: 500;

    letter-spacing: .8px;
    

    cursor: pointer;

    transition: all .2s ease;
    margin-right: 15px;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        0 0 18px rgba(0,120,255,.10);
}

.new-role-btn:hover {

    background:
        linear-gradient(
            180deg,
            rgba(42,92,160,.95) 0%,
            rgba(26,60,115,.95) 100%
        );

    color: #b7e4ff;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.12),
        0 0 24px rgba(0,140,255,.20);
}


.section-subtitle {
    margin: 24px 0 12px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}


.project-app-item {
    display: flex;
    align-items: center;

    padding: 12px 14px;

    border-radius: 10px;

    background: rgba(43, 91, 132, .35);

    border: 1px solid rgba(120, 180, 255, .12);

    margin-bottom: 8px;

    cursor: pointer;
}

.project-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 12px 14px;
    margin-bottom: 10px;

    background: rgba(43, 91, 132, .35);
    border: 1px solid rgba(120, 180, 255, .12);

    border-radius: 12px;

    backdrop-filter: blur(8px);
}

.project-list-title {
    flex: 1;
    text-align: center;
    font-weight: 600;
}


.test-env-warning {
    background: rgba(255, 165, 0, 0.15);
    border: 1px solid rgba(255, 165, 0, 0.4);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 16px 0;
    color: #ffaa55;
    font-weight: 600;
}


/* PROFILE TABS */

.profile-tabs {

    display: grid;

    grid-auto-flow: column;

    grid-auto-columns: 1fr;

    gap: 8px;

    width: fit-content;

    min-width: 480px;

    max-width: 900px;

    margin: 20px 0;

    padding: 6px;

    border-radius: 14px;

    background:
        linear-gradient(
            180deg,
            rgba(15, 35, 65, 0.72),
            rgba(7, 20, 42, 0.82)
        );

    border: 1px solid rgba(120, 185, 255, 0.12);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 8px 24px rgba(0, 0, 0, 0.18);
}


.profile-tab {

    min-width: 0;

    min-height: 48px;

    padding: 10px 18px;

    border: 1px solid transparent;

    border-radius: 10px;

    background: transparent;

    color: rgba(190, 215, 245, 0.68);

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

    transition:
        color .18s ease,
        background .18s ease,
        border-color .18s ease,
        box-shadow .18s ease,
        transform .18s ease;
}


.profile-tab:hover {

    color: #ffffff;

    background: rgba(65, 115, 185, 0.14);
}


.profile-tab.active {

    color: #ffffff;

    background:
        linear-gradient(
            180deg,
            rgba(52, 105, 180, 0.82),
            rgba(27, 65, 125, 0.92)
        );

    border-color: rgba(120, 190, 255, 0.28);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 20px rgba(35, 115, 255, 0.14);
}


.profile-tab-panel {

    display: none;
}


.profile-tab-panel.active {

    display: block;

    animation: profileTabShow .2s ease;
}


@keyframes profileTabShow {

    from {

        opacity: 0;

        transform: translateY(4px);
    }

    to {

        opacity: 1;

        transform: translateY(0);
    }
}


@media (max-width: 700px) {

    .profile-tabs {

        grid-template-columns: 1fr;
    }
}


.profile-action-link {
    text-decoration: none;
}


.profile-header-actions {
    display: grid;

    align-items: center;

    gap: 12px;

    width: fit-content;

    margin: 18px 0 10px;
    min-height: 42px;
}


.profile-header-actions-admin {
    grid-template-columns:
        180px
        190px
        150px;
}


.profile-header-actions-self {
    grid-template-columns:
        190px
        150px;
}

.profile-header-action-slot {
    display: flex;
    align-items: center;

    width: 100%;
    min-width: 0;
}


.profile-header-status-slot {
    justify-content: flex-start;
}


.profile-header-primary-slot {
    justify-content: stretch;
}


.profile-header-secondary-slot {
    justify-content: flex-start;
}

.profile-header-status {
    position: static !important;

    width: 180px;
    height: 42px;

    margin: 0;
}

.profile-header-actions [hidden] {
    display: none !important;
}

.profile-header-secondary {
    position: static !important;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    width: 150px !important;
    min-width: 150px !important;
    height: 42px !important;

    padding: 0 !important;
    margin: 0 !important;
}
.profile-header-top-actions .btn,
.profile-header-top-actions .new-role-btn {
    margin: 0 !important;
    height: 42px !important;
}


.reset-btn-admin {
    width: 180px !important;
    min-width: 180px !important;
    height: 40px !important;
}


.profile-header-actions .profile-action-link {
    display: inline-flex;

    text-decoration: none;
}

.profile-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 180px;
    height: 42px;

    padding: 0 14px;

    border: 1px solid;
    border-radius: 8px;

    font-size: 13px;
    font-weight: 700;

    letter-spacing: 0.3px;

    cursor: default;

    box-sizing: border-box;
}

.profile-header-top-actions {
    position: absolute;

    top: 0;
    left: 0;

    width: 70%;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 12px;

    pointer-events: none;
}

.profile-header-top-actions button,
.profile-header-top-actions a,
.profile-header-top-actions form,
.profile-header-top-actions select {
    pointer-events: auto;
}


.profile-header-top-actions .profile-action-link {
    display:flex;
    align-items:center;
}

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform .3s ease;
    }

    .sidebar:not(.collapsed) {
        transform: translateX(0);
        z-index: 1100;
    }

    .app-layout,
    .sidebar.collapsed ~ .app-layout {
        left: 0;
    }
}


::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(8,18,35,.25);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        rgba(120,190,255,.25) 0%,
        rgba(70,130,220,.20) 100%
    );
    border-radius: 10px;
    border: 1px solid rgba(180,220,255,.15);
    backdrop-filter: blur(6px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg,
        rgba(140,210,255,.40) 0%,
        rgba(90,160,240,.32) 100%
    );
    border-color: rgba(190,225,255,.30);
    box-shadow: 0 0 12px rgba(0,140,255,.25);
}

::-webkit-scrollbar-corner {
    background: transparent;
}


/* ============================================
   GLOBAL SCROLLBAR (Firefox)
   ============================================ */

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(120,190,255,.30) rgba(8,18,35,.20);
}


/* ============================================
   SCOPED — inside glass containers like .audit-list
   (slightly lighter track since it sits over the card's own tint)
   ============================================ */

.audit-list::-webkit-scrollbar-track,
.env-table::-webkit-scrollbar-track {
    background: rgba(255,255,255,.02);
}

.audit-list::-webkit-scrollbar-thumb,
.env-table::-webkit-scrollbar-thumb {
    background: linear-gradient(
        90deg,
        rgba(120,190,255,.22) 0%,
        rgba(70,130,220,.18) 100%
    );
}

@font-face {
    font-family: "Nico Moji";
    src: url("/static/fonts/Nico-Moji.woff") format("woff");
    font-weight: 400;
    font-style: normal;
}

.application-roles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 28px;
    margin-top: 12px;
}

.application-role-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.core-info {

    position: relative;

    display: inline-flex;

    align-items: center;

    margin-left: 10px;

}

.core-info-icon {

    width: 18px;
    height: 18px;

    border-radius: 50%;

    border: 1px solid rgba(255,255,255,.35);

    color: rgba(255,255,255,.85);

    font-size: 12px;
    font-weight: 700;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: help;

    transition: .2s;

}

.core-info-icon:hover {

    background: rgba(255,255,255,.12);

    border-color: rgba(120,170,255,.8);

}

.core-info-tooltip {

    position: absolute;

    top: 28px;
    left: 50%;

    transform: translateX(-50%);

    min-width: 280px;
    max-width: 340px;

    padding: 10px 14px;

    border-radius: 8px;

    background: rgba(20,24,34,.98);

    border: 1px solid rgba(90,120,170,.35);

    color: #d9e4f6;

    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;

    opacity: 0;
    visibility: hidden;

    transition: .18s;

    pointer-events: none;

    z-index: 100;
}

.core-info-tooltip::before {

    content: "";

    position: absolute;

    top: -6px;
    left: 50%;

    transform: translateX(-50%);

    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(20,24,34,.98);

}

.core-info:hover .core-info-tooltip {

    opacity: 1;

    visibility: visible;

}

.project-head::after {
    display: none;
}

.readonly-input {
    background:
        linear-gradient(rgba(255, 255, 255, .03), rgba(255, 255, 255, .03)),
        rgba(8, 23, 42, 1) !important;

    color: rgba(147, 147, 147, 1) !important;
    border: 1px solid rgba(35, 48, 70, 1) !important;

    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);

    cursor: not-allowed;
    opacity: 1;
}

.permission-empty-state {
    margin-top: 24px;
    padding: 60px 40px;
    text-align: center;

    border-radius: 14px;

    background: rgba(255,255,255,.03);
    border: 1px solid rgba(150,205,255,.14);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.06),
        0 8px 22px rgba(0,0,0,.12);
}


.permission-empty-state h3 {
    margin: 0 0 12px;
    font-size: 22px;
}

.permission-empty-state p {
    margin: 0;
    color: var(--text-secondary);
    max-width: 520px;
    margin-inline: auto;
    line-height: 1.6;
}

.profile-tab.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.profile-tab.disabled:hover {
    background: inherit;
}

.profile-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
    width: 100%;
}

.profile-form-actions:has(.profile-next[id^="back-"]) {
    justify-content: space-between;
}

.profile-form-actions .profile-next,
.roles-modal-actions .profile-next,
.profile-form-actions .user-save,
.roles-modal-actions .user-save {
    flex: 0 0 120px;
    width: 120px;
    height: 40px;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: 5px;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;
    line-height: 100%;
}

.permissions-detail-group .profile-form-actions .user-save {
    flex: 1 1 auto;
    width: 100%;
}

.profile-form-actions .profile-next,
.roles-modal-actions .profile-next {
    background: rgba(48, 103, 151, 1);
    border: 1px solid rgba(81, 141, 192, 1);
    color: rgba(198, 226, 250, 1);

    font-family: Inter, sans-serif;
    font-weight: 600;
    font-style: normal;
    font-size: 15px;
    letter-spacing: 0;
}

.profile-form-actions .user-save,
.roles-modal-actions .user-save {
    background: rgba(48, 103, 151, 1);
    border: 1px solid rgba(81, 141, 192, 1);
    color: rgba(198, 226, 250, 1);

    font-family: Inter, sans-serif;
    font-weight: 600;
    font-style: normal;
    font-size: 15px;
    letter-spacing: 0;
}

.profile-form-actions .profile-next[id^="back-"],
.roles-modal-actions .profile-next {
    background: rgba(43, 54, 70, 1);
    border: 1px solid rgba(79, 93, 110, 1);
    color: rgba(204, 204, 204, 1);

    font-family: Poppins, sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 15px;
    letter-spacing: 0;
}

.empty-state {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 40px 20px;

    color: var(--text-secondary);
    font-size: 18px;
    font-weight: 500;

    text-align: center;
}

.empty-state-small {
    width: 100%;
    min-height: 120px;
    padding: 24px;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
    line-height: 100%;
    text-align: center;
}

.section-empty-message {
    padding: 12px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.projects-empty {
    margin-top: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-size: 14px;
}

.users-empty {
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-size: 14px;
}

.modal-empty-state {
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
}

.project-empty-message {
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.modal-no-results {
    padding: 10px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}


.profile-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Wider form area, borderless inputs (replaces earlier 100% suggestion) */
.profile-card .form-container {
    max-width: 100%;
}

.profile-card .form-container input,
.profile-card .form-container select,
.profile-card .form-container textarea,
.profile-card #birthday {
    background: #08172A;
    border: 1px solid rgba(35, 48, 70, 1);
    border-radius: 5px;
    transition: border-color .15s ease;
}
.profile-card .form-container input:focus,
.profile-card .form-container select:focus,
.profile-card .form-container textarea:focus,
.profile-card #birthday:focus {
    border-color: rgba(120, 180, 255, .5);
    box-shadow: none;
}




/* New 3-column rows */
.profile-triple-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 15px;

    min-height: 52px;
}

.profile-triple-row input,
.profile-triple-row select {
    width: 100%;
}

.application-detail-section .profile-triple-row {
    grid-template-columns: 150px 1fr 1.2fr;
    gap: 20px;
}

.application-detail-section .profile-triple-row > .form-field:first-child,
.application-detail-section .profile-triple-row > .form-field:nth-child(2),
.application-detail-section .profile-triple-row > .form-field:nth-child(3) {
    width: 100%;
}

.application-detail-section .profile-triple-row select,
.application-detail-section .profile-triple-row input {
    width: 100%;
}

.profile-checkbox-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.profile-photo .profile-checkbox-col {
    margin-top: 25px;
    align-items: flex-start;
    gap: 18px;

    position: relative;
    top: -6px;
}





.profile-tabs-group {
    position: relative;

    width: 70%;
    max-width: none;

    /* space for the tabs sticking above the frame */
    margin: 80px 0 20px;

    padding: 24px 20px 28px;

    box-sizing: border-box;

    background: rgba(32, 61, 97, .60);

    border: 1px solid #2A4A73;
    border-radius: 0 5px 5px 5px;

    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.05),
        0 12px 35px rgba(0,0,0,.18);
}



.profile-tabs-group .profile-tabs {
    position: absolute;

    left: -1px;
    top: -49px;

    display: flex;
    align-items: stretch;

    width: auto;
    height: 49px;

    margin: 0;
    padding: 0;

    gap: 0;

    background: transparent;
    border: none;
    box-shadow: none;

    z-index: 10;
}


/* =========================================================
   INDIVIDUAL TAB
   ========================================================= */

.profile-tabs-group .profile-tab {

    position: relative;

    width: 214px;
    flex: 0 1 214px;
    min-width: 0;

    height: 49px;

    padding: 0 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    border: none;
    border-radius: 5px 5px 0 0;

    background: #0B1A2B;

    color: #9DA3AA;

    font-family: Poppins, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 100%;
    letter-spacing: 0;
    text-align: center;

    cursor: pointer;

    transition:
        background .18s ease,
        color .18s ease;

    z-index: 1;
}


/* No double vertical borders */
.profile-tabs-group .profile-tab + .profile-tab {
    margin-left: -1px;
}


/* =========================================================
   HOVER
   ========================================================= */

.profile-tabs-group .profile-tab:hover {
    color: #ffffff;
    background: #0B1A2B;

    border: none;

    z-index: 2;
}


/* =========================================================
   ACTIVE TAB
   ========================================================= */

.profile-tabs-group .profile-tab.active {
    position: relative;
    z-index: 5;

    color: #ffffff;
    
    background: rgba(32, 61, 97, .60);

    /* EXACTLY the same as profile-tabs-group */
    border-top: 1px solid #2A4A73;
    border-left: 1px solid #2A4A73;
    border-right: 1px solid #2A4A73;
    border-bottom: none;
    font-weight: 600;

    margin-bottom: -1px;

    box-shadow: none;
}



/* =========================================================
   CONTENT
   ========================================================= */

.profile-tabs-content {
    position: relative;

    width: 100%;

    margin: 0;
    padding: 0;

    box-sizing: border-box;

    background: transparent;

    border: none;
    box-shadow: none;

    z-index: 1;
}



@media (max-width: 1300px) {

    .profile-tabs-group .profile-tabs {
        width: 100%;
    }

    .profile-tabs-group .profile-tab {
        width: 33.3333%;
        flex: 1 1 0;
        min-width: 0;
    }

}


.profile-status-action {

    width: 40px;
    min-width: 40px;
    height: 40px;

    padding: 0;

    border: none;
    border-radius: 0;

    background-color: transparent;

    background-position: center;
    background-size: 40px 40px;
    background-repeat: no-repeat;

    display: block;

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;
}


.profile-status-deactivate {

    background-image: url("/static/images/deactivate-user.png");
}


.profile-status-activate {

    background-image: url("/static/images/activate-user.png");
}


/* HOVER — zachovať presne rovnaký vzhľad */

.profile-status-deactivate:hover {

    background:
        transparent
        url("/static/images/deactivate-user.png")
        center / 40px 40px
        no-repeat !important;

    border: none;
    box-shadow: none;
    transform: none;
}


.profile-status-activate:hover {

    background:
        transparent
        url("/static/images/activate-user.png")
        center / 40px 40px
        no-repeat !important;

    border: none;
    box-shadow: none;
    transform: none;
}


.profile-status-action:focus,
.profile-status-action:active {

    border: none;
    box-shadow: none;
    outline: none;
    transform: none;
}


.profile-status-badge {
    height: 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    margin-left: 12px;

    border-radius: 8px;

    font-family: Poppins, sans-serif;
    font-size: 10px;
    font-weight: 500;
    line-height: 100%;
}

.profile-status-active {
    width: 78px;
    flex: 0 0 78px;
    background: #173D32;
    border: 1px solid #16593A;
    color: #2FE08A;
}

.profile-status-dot {
    width: 8px;
    height: 8px;

    flex: 0 0 8px;

    margin-right: 7px;

    border-radius: 50%;
}

.profile-status-active .profile-status-dot {
    background: #2FE08A;
}

.profile-status-inactive {
     width: 94px;
    flex: 0 0 94px;
    background: #501D25;
    border: 1px solid #642226;
    color: #FF6B6F;
}

.profile-status-inactive .profile-status-dot {
    background: #FF6B6F;
}

.profile-status-created {
    width: 82px;
    flex: 0 0 82px;
    background: #2F2F2F;
    border: 1px solid #47494C;
    color: #9DA3AA;
}

.profile-status-created .profile-status-dot {
    background: #9DA3AA;
}


.profile-dates {
    width: fit-content;
    height: 44px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    box-sizing: border-box;

    padding: 5px 14px;

    border: 1px solid #4F5D6E;
    border-radius: 5px;

    margin-right: 16px;

    font-family: Poppins, sans-serif;
    font-size: 12px;
    font-weight: 400;

    line-height: 15px;
}


.profile-date-row {
    display: grid;

    grid-template-columns: 60px auto;

    column-gap: 12px;

    align-items: center;
}

.profile-date-label {
    color: #8FA0B8;
}


.profile-date-value {
    color: #FFFFFF;
}


.search-filter {
    width: clamp(160px, 14vw, 270px);
    height: 40px;

    margin-left: 24px;

    display: flex;
    align-items: stretch;

    box-sizing: border-box;

    border: 1px solid #233046;
    border-radius: 5px;
    overflow: hidden;

    background: #08172A;
}

.search-filter input {
    flex: 1;
    min-width: 0;
    height: 100%;

    padding: 0 16px;

    box-sizing: border-box;

    border: none;
    outline: none;

    background: #08172A;
    color: #FFFFFF;

    font-family: Poppins, sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 24px;
}

.search-filter input::placeholder {
    color: #8A91AA;
    opacity: 1;
}

.search-filter-button {
    width: 50px;
    min-width: 50px;
    height: 40px;

    margin: -1px -1px -1px 0;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    border: 1px solid rgba(35, 48, 70, 1);
    border-radius: 0 5px 5px 0;

    background: rgba(48, 103, 151, 1);

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;

    transition:
        background .2s ease,
        border-color .2s ease;
}

.filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: clamp(6px, 0.6vw, 12px);
    min-height: 40px;
    cursor: pointer;
}

.filter-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.filter-toggle-switch {
    position: relative;
    width: 44px;
    height: 22px;
    flex: 0 0 44px;
    box-sizing: border-box;

    border: 1px solid #233046;
    border-radius: 999px;
    background: #08172A80;

    transition:
        background .2s ease,
        border-color .2s ease;
}

.filter-toggle-switch::after {
    content: "";
    position: absolute;

    top: 2px;
    left: 2px;

    width: 16px;
    height: 16px;

    border-radius: 50%;
    background: #30679780;

    transition:
        left .2s ease,
        background .2s ease;
}

.filter-toggle input:checked + .filter-toggle-switch {
    background: #08172A;
    border-color: #233046;
}

.filter-toggle input:checked + .filter-toggle-switch::after {
    left: 24px;
    background: #306797;
}


.filter-toggle-text {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: clamp(11px, 0.83vw, 16px);
    font-weight: 400;
    line-height: 100%;
    letter-spacing: 0;
    color: #FFFFFF;
    margin: 0;
}


.pagination {
    margin-left: auto;

    display: flex;
    align-items: center;
    gap: 12px;
}

.pagination-info {
    color: #8A91AA;

    font-family: Poppins, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 100%;
    white-space: nowrap;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-button {
    width: 35px;
    min-width: 35px;
    height: 35px;

    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    background: rgba(8, 23, 42, 1);
    border: 1px solid #233046;
    border-radius: 5px;

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;

    transition:
        background .15s ease,
        border-color .15s ease;
}

.pagination-button:hover:not(:disabled) {
    background: #143F65;
    border-color: #3A6795;
}

.pagination-button:disabled {
    cursor: default;
    opacity: 0.45;
}

.pagination-current {
    width: 35px;
    min-width: 35px;
    height: 35px;

    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    border-radius: 50%;

    background: rgba(35, 48, 70, 1);
    border: 1px solid #233046;

    color: #FFFFFF;

    font-family: Poppins, sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 100%;
}

.application-status-deactivate {
    background-image: url("/static/images/deactivate-app.png");
    background-position: center;
    background-size: 40px 40px;
    background-repeat: no-repeat;
}

.application-status-activate {
    background-image: url("/static/images/activate-app.png");
    background-position: center;
    background-size: 40px 40px;
    background-repeat: no-repeat;
}

.application-status-deactivate:hover {
    background:
        transparent
        url("/static/images/deactivate-app.png")
        center / 40px 40px
        no-repeat !important;

    border: none;
    box-shadow: none;
    transform: none;
}

.application-status-activate:hover {
    background:
        transparent
        url("/static/images/activate-app.png")
        center / 40px 40px
        no-repeat !important;

    border: none;
    box-shadow: none;
    transform: none;
}


.environment-status-deactivate {
    background-image: url("/static/images/deactivate-environment.png");
    background-position: center;
    background-size: 40px 40px;
    background-repeat: no-repeat;
}

.environment-status-activate {
    background-image: url("/static/images/activate-environment.png");
    background-position: center;
    background-size: 40px 40px;
    background-repeat: no-repeat;
}

.environment-status-deactivate:hover {
    background:
        transparent
        url("/static/images/deactivate-environment.png")
        center / 40px 40px
        no-repeat !important;

    border: none;
    box-shadow: none;
    transform: none;
}

.environment-status-activate:hover {
    background:
        transparent
        url("/static/images/activate-environment.png")
        center / 40px 40px
        no-repeat !important;

    border: none;
    box-shadow: none;
    transform: none;
}


.template-status-deactivate {
    background-image: url("/static/images/deactivate-template.png");
    background-position: center;
    background-size: 40px 40px;
    background-repeat: no-repeat;
}

.template-status-activate {
    background-image: url("/static/images/activate-template.png");
    background-position: center;
    background-size: 40px 40px;
    background-repeat: no-repeat;
}

.template-status-deactivate:hover {
    background:
        transparent
        url("/static/images/deactivate-template.png")
        center / 40px 40px
        no-repeat !important;

    border: none;
    box-shadow: none;
    transform: none;
}

.template-status-activate:hover {
    background:
        transparent
        url("/static/images/activate-template.png")
        center / 40px 40px
        no-repeat !important;

    border: none;
    box-shadow: none;
    transform: none;
}

.project-status-deactivate {
    background-image: url("/static/images/deactivate-project.png");
    background-position: center;
    background-size: 40px 40px;
    background-repeat: no-repeat;
}

.project-status-activate {
    background-image: url("/static/images/activate-project.png");
    background-position: center;
    background-size: 40px 40px;
    background-repeat: no-repeat;
}

.project-status-deactivate:hover {
    background:
        transparent
        url("/static/images/deactivate-project.png")
        center / 40px 40px
        no-repeat !important;

    border: none;
    box-shadow: none;
    transform: none;
}

.project-status-activate:hover {
    background:
        transparent
        url("/static/images/activate-project.png")
        center / 40px 40px
        no-repeat !important;

    border: none;
    box-shadow: none;
    transform: none;
}

.permissions-toolbar .search-filter {
    margin-left: 0;
}



.environment-create-group {
    width: 70%;
    margin: 20px 0;
    padding: 20px 20px 10px;
    border-radius: 8px;
}

.environment-create-group .form-container {
    max-width: 100%;
}

.environment-create-row {
    display: flex;
    gap: 20px;
}

.environment-create-row .form-field:first-child {
    flex: 0 0 25%;
}

.environment-create-row .form-field:last-child {
    flex: 1;
}

.environment-create-group .form-field {
    margin-bottom: 18px;
}

.environment-create-group textarea {
    width: 100%;
    height: 90px;
    resize: vertical;
    box-sizing: border-box;
}

.environment-create-group .env-color-edit {
    width: 100%;
    height: 42px;
    margin-bottom: 8px;
    margin-top: 0;
}

.environment-production {
    margin-top: 0;
    margin-bottom: 0;
}

.environment-production .filter-checkbox-inline {
    display: inline-flex;
    width: fit-content;
    margin-left: 0;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 1);
    font-size: 14px;
}



.environment-production-info {
    margin-left: 6px;
    width: 15px;
    height: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
}

.environment-create-button {
    width: 100%;
    margin-top: 0;
}

.environment-production .filter-checkbox-inline input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    margin: 0 !important;
}

.environment-color-field .env-color-edit {
    margin-top: 0;
}


.env-app-table {
    width: 100%;
    border: 1px solid #2A4A73;
    border-radius: 5px;
    overflow: hidden;
    background: rgba(32, 61, 97, 0.15);
}

.env-app-header,
.env-app-row {
    display: grid;
    grid-template-columns: 135px minmax(0, 1fr);
    align-items: center;
    column-gap: 24px;
    box-sizing: border-box;
}

.env-app-header {
    height: 30px;
    padding: 0 24px;
    background: #063156;
    color: #FFFFFF;
    font-family: Poppins, sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 100%;
}

.env-app-body {
    overflow: visible;
}

.env-app-row {
    height: 49px;
    padding: 0 24px;
    border-top: 1px solid rgba(81, 141, 192, 0.45);
    background: rgba(11, 20, 31, 0.33);
    color: #FFFFFF;
    font-family: Poppins, sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 100%;
    box-sizing: border-box;
}

.env-app-row:first-child {
    border-top: none;
}

.env-app-row > div {
    min-width: 0;
}

.env-app-key {
    color: #FFFFFF;
    text-decoration: none;
}

.env-app-key:hover {
    text-decoration: underline;
}

.env-app-header .sortable {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.env-app-header .sort-icon {
    width: 13px;
    height: 10px;
    flex: 0 0 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#profile-tab-applications .section-box {
    height: 100%;
    padding: 18px 16px;
    box-sizing: border-box;
}

#profile-tab-applications .form-container {
    padding-top: 0;
}


.user-project-table {
    width: 100%;
    margin-top: 0;
    border: 1px solid #2A4A73;
    border-radius: 5px;
    overflow: hidden;
    box-sizing: border-box;
    background: rgba(11, 20, 31, 0.33);
}

.user-project-header,
.user-project-row {
    display: grid !important;
    grid-template-columns: 40px 120px minmax(0, 1fr) !important;
    align-items: center;
    column-gap: 24px;
    width: 100%;
    min-width: 0;
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
}

.user-project-header {
    height: 30px;
    padding-left: 16px;
    padding-right: 16px;
    background: #063156;
    color: #FFFFFF;
    font-family: Poppins, sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 100%;
}

.user-project-body {
    width: 100%;
    margin: 0;
    padding: 0;
}

.user-project-row {
    height: 48px;
    margin: 0 !important;
    padding-left: 16px;
    padding-right: 16px;
    padding-top: 0;
    padding-bottom: 0;
    border: 0;
    border-radius: 0;
    background: rgba(11, 20, 31, 0.33);
    color: #FFFFFF;
    font-family: Poppins, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 100%;
}

.user-project-row + .user-project-row {
    border-top: 1px solid rgba(81, 141, 192, 0.45);
}

/* Header cells */
.user-project-header > div,
.user-project-row > div {
    min-width: 0;
}


/* Checkbox */
.user-project-row .project-checkbox-cell {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.user-project-row .project-checkbox-cell input[type="checkbox"] {
    appearance: none;

    width: 16px;
    height: 16px;

    min-width: 16px;
    min-height: 16px;

    flex: 0 0 16px;

    position: relative;

    box-sizing: border-box;

    border-radius: 3px;

    border: 1px solid #233046 !important;

    background: #08172A;

    margin: 0;
    padding: 0;

    cursor: pointer;

    transition:
        background .15s ease,
        border-color .15s ease;
}

.user-project-row .project-checkbox-cell input[type="checkbox"]:checked {
    background: #0C3050;

    border-color: #2A4A73;

    box-shadow: none;
}

.user-project-row .project-checkbox-cell input[type="checkbox"]:checked::after {
    content: "";

    position: absolute;

    width: 12px;
    height: 9px;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    background: url("data:image/svg+xml,%3Csvg width='12' height='9' viewBox='0 0 12 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.91926 8.26827L0 4.34901L0.979816 3.36919L3.91926 6.30864L10.2279 0L11.2077 0.979815L3.91926 8.26827Z' fill='white'/%3E%3C/svg%3E")
        center / 12px 9px
        no-repeat;
}

/* Key */
.user-project-row .project-key-cell {
    min-width: 0;
    color: rgba(238, 243, 250, 1);
}

.user-project-row .project-key-cell a {
    color: #FFFFFF;
    text-decoration: none;
}

.user-project-row .project-key-cell a:hover {
    text-decoration: underline;
}

/* Name */
.user-project-row .project-name-cell {
    min-width: 0;
    color: rgba(238, 243, 250, 1);
}

.projects-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    margin-left: 0;
    padding-left: 0;
    flex-wrap: nowrap;
}

.user-project-header .sortable {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

.user-project-header .sort-icon {
    position: absolute;
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
}

.user-project-header > div:nth-child(3) {
    transform: translateX(-12px);
    justify-self: start;
    width: max-content;
}

.user-project-row.project-filter-hidden {
    display: none !important;
}

.user-project-row.project-selected {
    background: rgba(74, 145, 206, 0.2);
}


.profile-tabs-group .form-field input,
.profile-tabs-group .form-field select,
.profile-tabs-group .form-field textarea {
    font-family: Poppins, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #FFFFFF;
}

/* Chrome / Edge autofill */
.profile-tabs-group .form-field input:-webkit-autofill,
.profile-tabs-group .form-field input:-webkit-autofill:hover,
.profile-tabs-group .form-field input:-webkit-autofill:focus,
.profile-tabs-group .form-field input:-webkit-autofill:active {
    -webkit-text-fill-color: #FFFFFF;
    -webkit-box-shadow: 0 0 0 1000px #0B1A2B inset;
    box-shadow: 0 0 0 1000px #0B1A2B inset;
    font-family: Poppins, sans-serif;
    font-size: 14px;
    transition: background-color 5000s ease-in-out 0s;
}



#profile-tab-details .project-detail-row {
    display: flex;
    gap: 20px;
}

#profile-tab-details .project-detail-row > .form-field {
    flex: 1;
}

#profile-tab-details .project-detail-row > .project-detail-key {
    flex: 0 0 20%;
}

#profile-tab-details .project-detail-row > .project-detail-name {
    flex: 1;
}

#profile-tab-members .user-project-header,
#profile-tab-members .user-project-row {
    grid-template-columns: 70px 0.2fr 0.2fr 0.75fr !important;
    column-gap: 12px;
}


#profile-tab-applications .user-project-header,
#profile-tab-applications .user-project-row {
    grid-template-columns: 70px 0.2fr 0.2fr 0.75fr !important;
    column-gap: 12px;
}

#profile-tab-members .user-project-header .sortable,
#profile-tab-applications .user-project-header .sortable {
    display: flex;
    align-items: center;
    gap: 6px;
    width: max-content;
}

#profile-tab-members .user-project-header .sort-icon,
#profile-tab-applications .user-project-header .sort-icon {
    position: static;
    transform: none;
    width: 13px;
    height: 10px;
    flex: 0 0 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#profile-tab-applications .expertise-row {
    width: 180px;
    flex-shrink: 0;
}

#profile-tab-applications .expertise-row .expertise-native-select,
#profile-tab-applications .expertise-row .expertise-display {
    width: 180px;
}

#profile-tab-members .section-box,
#profile-tab-applications .section-box {
    padding: 0;
}

.projects-toolbar .search-filter {
    margin-left: 0;
}

.projects-toolbar .expertise-row {
    margin-left: 0;
}

.custom-select-wrapper {
    position: relative;
}

.custom-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    padding-right: 30px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* =========================================================
   LOGIN PAGE
   ========================================================= */

.login-wrapper {
    width: 100%;
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;
}


.login-card {
    position: relative;

    width: 751px;
    height: 392px;

    box-sizing: border-box;

    padding: 40px 110px;

    background: transparent;

    border: none;

    isolation: isolate;
}


.login-card::before {
    content: "";

    position: absolute;
    inset: 0;

    z-index: -2;

    background: rgba(3, 14, 20, 0.6);

    clip-path: polygon(
        8% 0%,
        92% 0%,
        100% 50%,
        92% 100%,
        8% 100%,
        0% 50%
    );

    box-shadow:
        0 4px 4px rgba(0, 0, 0, 0.25);

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* =========================================================
   HEXAGON FILL
   ========================================================= */

.login-hex-border {
    position: absolute;

    inset: 0;

    z-index: -1;

    pointer-events: none;
}


.login-hex-border svg {
    display: block;

    width: 100%;
    height: 100%;
}
/* =========================================================
   TITLE
   ========================================================= */

.login-card h2 {
    width: 100%;

    margin: 0 0 30px 0;

    color: #ffffff;

    font-family: "Nico Moji", sans-serif;
    font-size: 48px;
    font-weight: 400;
    line-height: 1;

    text-align: center;
    white-space: nowrap;
}


/* =========================================================
   ALERTS
   ========================================================= */

.login-card .alert-error,
.login-card .alert-success {
    width: 100%;

    box-sizing: border-box;

    padding: 9px 11px;
    margin-bottom: 14px;

    border-radius: 5px;

    font-family: Inter, sans-serif;
    font-size: 12px;
    line-height: 1.4;

    transition: opacity 0.3s ease;
}

.login-card .alert-error {
    background: rgba(150, 35, 35, 0.25);
    border: 1px solid rgba(190, 70, 70, 0.65);
    color: #ffb8b8;
}

.login-card .alert-success {
    background: rgba(35, 130, 80, 0.20);
    border: 1px solid rgba(70, 160, 110, 0.65);
    color: #a9e8c5;
}


/* =========================================================
   FORM
   ========================================================= */

.login-card form {
    width: 100%;
}

.login-card label {
    display: block;

    margin: 0 0 8px 0;

    color: #9da3aa;

    font-family: Inter, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1;
}


/* =========================================================
   INPUTS
   ========================================================= */

.login-card input[type="email"],
.login-card input[type="password"] {
    width: 100%;
    height: 44px;
    box-sizing: border-box;
    padding: 0 14px;
    margin: 0 0 18px 0;

    background: rgba(29, 48, 71, 1);
    border: 1px solid rgba(35, 48, 70, 1);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);

    outline: none;
    color: #ffffff;
    font-family: Inter, sans-serif;
    font-size: 13px;
    font-weight: 400;
}

.login-card input[type="password"] {
    margin-bottom: 24px;
}

.login-card input[type="email"]:focus,
.login-card input[type="password"]:focus {
    border-color: rgba(62, 104, 141, 0.9);

    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(62, 104, 141, 0.25);
}

.login-card input::placeholder {
    color: #657285;
}


/* =========================================================
   SIGN IN BUTTON
   ========================================================= */

.login-submit {
    width: 100%;
    height: 44px;

    margin: 2px 0 0 0;
    padding: 0;

    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    background: rgba(48, 103, 151, 1);

    border: 1px solid rgba(81, 141, 192, 1);
    border-radius: 4px;

    color: rgba(198, 226, 250, 1)f;

    font-family: Inter, sans-serif;
    font-size: 13px;
    font-weight: 600;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.login-submit:hover {
    background: rgba(57, 116, 165, 1);
    border-color: rgba(95, 153, 201, 1);
}

.login-submit:active {
    background: rgba(43, 91, 134, 1);
}


/* =========================================================
   FORGOT PASSWORD
   ========================================================= */

.forgot-password {
    margin-top: 9px;

    text-align: left;
}

.forgot-password a {
    color: #8faed0;

    font-family: Poppins, sans-serif;
    font-size: 12px;
    font-weight: 400;

    text-decoration: none;

    transition: color 0.15s ease;
}

.forgot-password a:hover {
    color: #b7d2ed;
    text-decoration: underline;
}


/* =========================================================
   RESET PASSWORD MODAL
   ========================================================= */

#reset-modal {
    display: none;

    position: fixed;
    inset: 0;

    z-index: 9999;

    align-items: center;
    justify-content: center;

    padding: 24px;
    box-sizing: border-box;

    background: rgba(0, 0, 0, 0.6);

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}


.reset-modal-content {
    width: 100%;
    max-width: 320px;

    box-sizing: border-box;

    padding: 22px 24px;

    background: rgba(3, 14, 20, 0.92);

    border: 1px solid rgba(62, 104, 141, 0.8);
    border-radius: 8px;

    box-shadow:
        0 4px 4px rgba(0, 0, 0, 0.25);

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}


.reset-modal-content h3 {
    margin: 0 0 18px 0;

    color: #ffffff;

    font-family: Inter, sans-serif;
    font-size: 18px;
    font-weight: 600;
}


.reset-modal-content label {
    display: block;

    margin-bottom: 6px;

    color: #9da3aa;

    font-family: Inter, sans-serif;
    font-size: 11px;
}


.reset-modal-content input {
    width: 100%;
    height: 35px;

    box-sizing: border-box;

    padding: 0 10px;
    margin-bottom: 14px;

    background: rgba(29, 48, 71, 1);

    border: 1px solid rgba(35, 48, 70, 1);
    border-radius: 4px;

    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.15);

    outline: none;

    color: #ffffff;

    font-family: Inter, sans-serif;
    font-size: 12px;
}


.reset-modal-content input:focus {
    border-color: rgba(62, 104, 141, 0.9);
}


.reset-submit {
    width: 100%;
    height: 35px;

    padding: 0;

    box-sizing: border-box;

    cursor: pointer;

    background: rgba(48, 103, 151, 1);

    border: 1px solid rgba(81, 141, 192, 1);
    border-radius: 4px;

    color: #ffffff;

    font-family: Inter, sans-serif;
    font-size: 12px;
    font-weight: 600;
}


.reset-cancel {
    width: 100%;
    height: 35px;

    margin-top: 10px;
    padding: 0;

    box-sizing: border-box;

    cursor: pointer;

    background: rgba(43, 54, 70, 1);

    border: 1px solid rgba(79, 93, 110, 1);
    border-radius: 4px;

    color: rgba(204, 204, 204, 1);

    font-family: Inter, sans-serif;
    font-size: 12px;
    font-weight: 500;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 800px) {

    .login-wrapper {
        padding: 20px;
    }

    .login-card {
        width: 100%;
        max-width: 751px;
    }

}

.login-card input[type="email"]:-webkit-autofill,
.login-card input[type="email"]:-webkit-autofill:hover,
.login-card input[type="email"]:-webkit-autofill:focus,
.login-card input[type="password"]:-webkit-autofill,
.login-card input[type="password"]:-webkit-autofill:hover,
.login-card input[type="password"]:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff;
    -webkit-box-shadow: 0 0 0 1000px rgba(29, 48, 71, 1) inset;
    box-shadow: 0 0 0 1000px rgba(29, 48, 71, 1) inset;
    border: 1px solid rgba(35, 48, 70, 1);
    caret-color: #ffffff;
}


.login-footer {
    position: fixed;
    left: 12px;
    bottom: 18px;
}

.login-footer-wrapper {
    position: fixed;
    left: 0;
    bottom: 0;

    height: 100vh;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.versions-no-sidebar .app-layout,
.profile-no-sidebar .app-layout {
    left: 0;
}




/* =========================================================
   APPLICATION DETAIL - ROLES
   ========================================================= */

.application-roles-section {
    padding: 28px 15px 5px;
}


/* =========================================================
   APPLICATION DETAIL - ROLES TABLE
   Reuses the existing Projects table design
   ========================================================= */

.roles-table {
    margin-top: 0;
}





/* Header sortable cells */

.roles-table-header .sortable {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}



/* Delete column */

.roles-action-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    min-width: 0;
}

.roles-table-row:last-child {
    border-bottom: none;
}



.roles-delete-button {
    width: 30px;
    height: 30px;

    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(100, 34, 38, 1);
    border-radius: 5px;

    background: rgba(80, 29, 37, 1);

    cursor: pointer;
}

.roles-delete-button svg {
    width: 13px;
    height: 14px;

    display: block;
}

.roles-delete-button:hover {
    background: rgba(80, 29, 37, 1);
}


/* -------------------------
   EMPTY
   ------------------------- */

.roles-empty {
    min-height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #9DA3AA;

    font-family: Poppins, sans-serif;
    font-size: 13px;
}


/* -------------------------
   ADD BUTTON
   ------------------------- */

.roles-add-button {
    width: 100%;
    height: 35px;

    margin-top: 14px;

    border: 1px solid rgba(42, 74, 115, 1);
    border-radius: 5px;

    background: rgba(8, 23, 42, 1);

    color: rgba(162, 196, 226, 1);

    font-family: Poppins, sans-serif;
    font-size: 24px;
    font-weight: 500;

    line-height: 1;

    cursor: pointer;
}

.roles-add-button:hover {
    background: rgba(8, 23, 42, 1);
}


/* =========================================================
   ADD ROLE MODAL
   ========================================================= */

.roles-modal {
    display: none;

    position: fixed;
    inset: 0;

    z-index: 1000;

    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.55);
}

.roles-modal-box {
    width: min(520px, calc(100vw - 40px));

    border: 1px solid #2A4A73;
    border-radius: 8px;

    background: #10253B;

    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);

    overflow: hidden;
}


/* HEADER */

.roles-modal-header {
    min-height: 54px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 20px;

    border-bottom: 1px solid #2A4A73;
}

.roles-modal-header h3 {
    margin: 0;

    font-family: Poppins, sans-serif;
    font-size: 17px;
    font-weight: 600;

    color: #FFFFFF;
}

.roles-modal-close {
    width: 30px;
    height: 30px;

    border: none;
    border-radius: 5px;

    background: transparent;

    color: #9DA3AA;

    cursor: pointer;
}


/* CONTENT */

.roles-modal-content {
    display: flex;
    flex-direction: column;
    gap: 20px;

    padding: 24px 20px;
}

.roles-modal-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.roles-modal-field label {
    font-family: Poppins, sans-serif;
    font-size: 12px;
    font-weight: 400;

    color: #8FA0B8;
}

.roles-modal-field input {
    width: 100%;
    height: 35px;

    box-sizing: border-box;

    padding: 0 12px;

    border: 1px solid #233046;
    border-radius: 4px;

    background: #0B1A2B;

    color: #FFFFFF;

    font-family: Poppins, sans-serif;
    font-size: 13px;

    outline: none;
}

.roles-modal-field input:focus {
    border-color: #2A4A73;
}


/* ACTIONS */

.roles-modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 20px 20px;
}

.roles-modal-cancel,
.roles-modal-add {
    min-width: 100px;
    height: 36px;

    border-radius: 5px;

    font-family: Poppins, sans-serif;
    font-size: 13px;

    cursor: pointer;
}

.roles-modal-cancel {
    border: 1px solid #2A4A73;
    background: transparent;
    color: #9DA3AA;
}

.roles-modal-add {
    border: 1px solid #4B78A6;
    background: #416D9B;
    color: #FFFFFF;
}

.roles-table .user-project-header,
.roles-table .user-project-row {
    grid-template-columns:
        40px
        120px
        minmax(0, 1fr)
        40px !important;
}

.roles-role-cell {
    position: relative;
    left: -21px;
}



/* =========================================================
   APPLICATION DETAIL - USERS MATRIX
   ========================================================= */

.users-matrix-header,
.users-matrix-row {
    grid-template-columns:
        60px
        minmax(110px, 0.8fr)
        minmax(110px, 0.8fr)
        minmax(150px, 1fr)
        minmax(150px, 1.2fr)
        44px !important;
}

.users-matrix-header > div,
.users-matrix-row > div {
    min-width: 0;
}

/* Posun obsahu všetkých row columns okrem checkboxu */
.users-matrix-row > div:not(:first-child) {
    position: relative;
    left: -21px;
}


/* USER CELLS */

.user-last-name-cell,
.user-first-name-cell,
.user-username-cell {
    min-width: 0;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;

    color: rgba(238, 243, 250, 1);
}


/* ROLES */

.user-roles-cell {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 6px;

    min-height: 100%;

    overflow: hidden;
    white-space: nowrap;
}


/* ACTIVE ROLE */

.user-role-badge {
    flex: 0 0 auto;

    min-width: 54px;
    max-width: 90px;
    height: 20px;

    padding: 0 8px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 2px;

    background: rgba(8, 23, 42, 1);
    color: #FFFFFF;

    font-family: Poppins, sans-serif;
    font-size: 12px;
    font-weight: 500;
    font-style: normal;
    line-height: 100%;
    letter-spacing: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* INACTIVE ROLE */

.user-role-badge-inactive {
    flex: 0 0 auto;

    color: rgba(238, 243, 250, 0.3);

    font-family: Poppins, sans-serif;
    font-size: 12px;
    font-weight: 500;
    font-style: italic;
    line-height: 100%;
    letter-spacing: 0;

    background: none;
    border: none;
    padding: 0;
    margin: 0;

    white-space: nowrap;
}


/* COMMA BETWEEN INACTIVE ROLES */

.user-role-badge-inactive:not(:last-child)::after {
    content: ",";
    color: rgba(238, 243, 250, 0.3);
    margin-left: 1px;
}


.user-role-badge:nth-of-type(n + 4) {
    display: none;
}


.user-roles-cell:has(.user-role-badge:nth-of-type(4))::after {
    content: "...";

    color: #9DA3AA;

    font-family: Poppins, sans-serif;
    font-size: 11px;
}

/* CHANGE BUTTON */

.user-change-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}


.user-change-button {
    width: 28px;
    height: 28px;

    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    border: none;
    border-radius: 4px;

    cursor: pointer;
}


.user-change-button:hover {
    background: rgba(255, 255, 255, 0.08);
}


/* SEARCH */

.users-table-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;

    margin-bottom: 12px;
}



/* FILTER */

.users-only-selected {
    margin-left: 0;
}


/* FILTERED ROW */

.users-matrix-row.user-filter-hidden {
    display: none !important;
}


/* =========================================================
   USER ROLES MODAL
   ========================================================= */

.user-roles-modal {
    position: fixed;
    inset: 0;

    z-index: 1000;

    display: none;

    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.55);
}


.user-roles-modal-box {
    width: 500px;
    max-width: calc(100vw - 32px);

    max-height: 80vh;

    display: flex;
    flex-direction: column;

    background: #0B1A2B;

    border: 1px solid #2A4A73;
    border-radius: 6px;

    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.5);
}


.user-roles-modal-header {
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 14px;

    border-bottom: 1px solid #2A4A73;
}


.user-roles-modal-header h3 {
    margin: 0;

    font-family: Poppins, sans-serif;
    font-size: 17px;
    font-weight: 500;

    color: #FFFFFF;
}


.user-roles-modal-close {
    width: 28px;
    height: 28px;

    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;

    color: #FFFFFF;

    font-size: 20px;
}


.user-roles-modal-content {
    max-height: 360px;

    overflow-y: auto;

    padding: 0;
}


.user-role-modal-row {
    height: 40px;

    display: flex;
    align-items: center;

    gap: 12px;

    padding: 0 14px;

    border-bottom: 1px solid rgba(81, 141, 192, 0.35);

    background: rgba(11, 20, 31, 0.33);

    color: #FFFFFF;

    font-family: Poppins, sans-serif;
    font-size: 11px;

    cursor: pointer;
}


.user-role-modal-row:nth-child(even) {
    background: rgba(74, 145, 206, 0.10);
}


.user-role-modal-row input[type="checkbox"] {
    appearance: none;

    width: 16px;
    height: 16px;

    flex: 0 0 16px;

    margin: 0;

    border: 1px solid #233046;
    border-radius: 3px;

    background: #08172A;

    position: relative;

    cursor: pointer;
}


.user-role-modal-row input[type="checkbox"]:checked {
    background: #0C3050;
    border-color: #2A4A73;
}


.user-role-modal-row input[type="checkbox"]:checked::after {
    content: "";

    position: absolute;

    width: 12px;
    height: 9px;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    background: url("data:image/svg+xml,%3Csvg width='12' height='9' viewBox='0 0 12 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.91926 8.26827L0 4.34901L0.979816 3.36919L3.91926 6.30864L10.2279 0L11.2077 0.979815L3.91926 8.26827Z' fill='white'/%3E%3C/svg%3E")
        center / 12px 9px
        no-repeat;
}


.user-roles-modal-actions {
    display: flex;
    justify-content: space-between;

    padding: 12px 14px;

    border-top: 1px solid #2A4A73;
}


.user-roles-modal-back,
.user-roles-modal-confirm {
    min-width: 80px;
    height: 34px;

    border-radius: 4px;

    font-family: Poppins, sans-serif;
    font-size: 11px;
}


.user-roles-modal-back {
    background: #29384B;
    color: #FFFFFF;
}


.user-roles-modal-confirm {
    background: #416D9B;
    border: 1px solid #4B78A6;
    color: #FFFFFF;
}

.users-matrix-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.users-matrix {
    min-width: 900px;
}

.user-change-cell {
    width: 50px;
    min-width: 50px;
    flex-shrink: 0;
}

.user-change-button {
    width: 32px;
    min-width: 32px;
    height: 32px;
    flex-shrink: 0;
}



.audit-toolbar {
    display: block;
    width: 100%;
    margin-bottom: 20px;
}

.audit-filter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.audit-filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.audit-search {
    flex: 0 0 auto;
    width: clamp(220px, 22vw, 340px);
    margin-left: 0;
}

.audit-filter-row > .pagination {
    margin-left: auto;
    flex-shrink: 0;
}

.audit-filter-select {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    margin-left: 0;
}

/* ---------- DATE FIELDS ---------- */

.audit-date-field {
    position: relative;
    flex: 0 0 auto;
    width: 180px;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 40px 0 16px;
    box-sizing: border-box;
    border: 1px solid #233046;
    border-radius: 5px;
    background: #08172A;
}

.audit-date-field:focus-within {
    border-color: #3A6795;
}

.audit-date-field input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #FFFFFF;
    font-family: Poppins, sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.audit-date-field input:focus {
    border: none;
    box-shadow: none;
}

.audit-date-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* ---------- ACTION BUTTONS ---------- */

.audit-clear-btn,
.audit-submit-btn {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    cursor: pointer;
}

.audit-clear-btn {
    background: rgba(83, 22, 31, 1);
    border: 1px solid rgba(142, 51, 58, 1);
}

.audit-clear-btn:hover {
    background: rgba(100, 30, 40, 1);
    border-color: rgba(160, 62, 70, 1);
}

.audit-submit-btn {
    background: rgba(48, 103, 151, 1);
    border: 1px solid rgba(81, 141, 192, 1);
}

.audit-submit-btn:hover {
    background: rgba(57, 116, 165, 1);
}

/* =========================================================
   AUDIT TABLE
   ========================================================= */

.audit-list {
    margin-top: 10px;
    width: 100%;
    overflow-x: auto;
}

.audit-table-header,
.audit-table-row {
    display: grid;
    grid-template-columns:
        150px
        100px
        minmax(120px, 0.8fr)
        minmax(180px, 1.2fr)
        minmax(180px, 1.1fr)
        minmax(180px, 1fr);
    align-items: center;
    column-gap: 18px;
    width: 100%;
    min-width: 1050px;
    box-sizing: border-box;
}

.audit-table-header {
    height: 40px;
    padding: 0 14px;
    background: #063156;
    border-radius: 5px;
    color: #FFFFFF;
    font-family: Poppins, sans-serif;
    font-size: 13px;
    font-weight: 600;
}

.audit-table-row {
    min-height: 48px;
    margin-bottom: 1px;
    padding: 0 14px;
    border-radius: 0;
    font-family: Poppins, sans-serif;
    font-size: 14px;
    font-weight: 500;
    box-shadow: none;
    transition: background .15s ease;
}

/* same zebra as Applications (header is child 1, first event is child 2) */
.audit-event:nth-child(even) > .audit-table-row { background: rgba(32, 61, 97, 0.30); }
.audit-event:nth-child(odd)  > .audit-table-row { background: rgba(32, 61, 97, 0.15); }
.audit-event > .audit-table-row:hover           { background: rgba(42, 74, 115, 0.35); }

.audit-table-header > div,
.audit-table-row > div {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audit-event.has-changes > .audit-table-row {
    cursor: pointer;
}

/* =========================================================
   AUDIT CHANGES (hidden until the row is clicked)
   ========================================================= */

.audit-change-row {
    display: none;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    min-width: 1050px;
    box-sizing: border-box;
    padding: 12px 14px 14px 28px;
    background: rgba(8, 23, 42, 0.55);
    border-left: 2px solid #306797;
    border-bottom: 1px solid rgba(35, 48, 70, 0.8);
}

.audit-event.open > .audit-change-row {
    display: flex;
}

.audit-event.open > .audit-table-row {
    background: rgba(42, 74, 115, 0.35);
}


.audit-change-item {
    display: grid;
    grid-template-columns: 160px fit-content(360px) 20px fit-content(360px);
    justify-content: start;
    align-items: center;
    column-gap: 12px;
    min-height: 26px;
    font-family: Poppins, sans-serif;
    font-size: 12px;
}

.audit-change-field {
    color: #8FA0B8;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audit-change-old,
.audit-change-new {
    min-width: 0;
    padding: 2px 8px;
    border-radius: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audit-change-old {
    color: #8A96A8;
    background: rgba(255, 255, 255, 0.04);
}

.audit-change-arrow {
    color: #52657E;
    text-align: center;
}

.audit-change-new {
    color: #C7DDF2;
    background: rgba(48, 103, 151, 0.25);
}

.audit-list .empty-state {
    margin-top: 10px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {
    .audit-filter-row { flex-wrap: wrap; }
    .audit-filter-select { flex: 1 1 200px; }
}

.application-permissions-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        height: 40px;
        min-width: 150px;
        padding: 0 16px;
        box-sizing: border-box;
        border: 1px solid rgba(24, 107, 178, 1);
        border-radius: 5px;
        background: rgba(22, 51, 75, 1);
        color: #A2C4E2;
        font-family: Poppins, sans-serif;
        font-size: 14px;
        font-weight: 500;
        line-height: 1;
        text-decoration: none;
        white-space: nowrap;
        transition: background .15s ease, border-color .15s ease;
    }

    .application-permissions-button:hover {
        background: rgba(24, 61, 88, 1);
        border-color: rgba(24, 107, 178, 1);
        color: #FFFFFF;
    }

    .application-permissions-button svg {
        flex: 0 0 auto;
    }


        .roles-modal-table {
        width: 100%;
    }

    .roles-modal-table-body {
        display: flex;
        flex-direction: column;
    }

    .roles-modal-role-row {
        grid-template-columns: 60px minmax(0, 1fr) !important;
        min-height: 50px;
    }

    .roles-modal-role-row .project-checkbox-cell {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .roles-modal-role-row .roles-modal-role-name {
        position: static;
        left: auto;
        display: flex;
        align-items: center;
        min-width: 0;
        color: rgba(238, 243, 250, 1);
        font-family: Poppins, sans-serif;
        font-size: 16px;
        font-weight: 400;
    }


    /* =========================================================
   TEMPLATE DETAIL CARD
   Same glass background as .profile-tabs-group, but standalone
   (no tab bar above it), so normal corners and normal margin.
   ========================================================= */

.template-detail-card {
    width: 70%;
    margin: 20px 0;

    padding: 24px 20px 28px;
    box-sizing: border-box;

    background: rgba(32, 61, 97, .60);

    border: 1px solid #2A4A73;
    border-radius: 5px;

    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.05),
        0 12px 35px rgba(0,0,0,.18);
}

.template-detail-card .form-container {
    max-width: 100%;
}

/* Two fields side by side: ID/Name, Owner/Author */
.profile-double-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.profile-double-row .form-field {
    margin-bottom: 0;
}

@media (max-width: 700px) {
    .profile-double-row {
        grid-template-columns: 1fr;
    }
}

.template-detail-card .form-field input,
.template-detail-card .form-field select,
.template-detail-card .form-field textarea {
    font-family: Poppins, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #FFFFFF;
}

.content-field label {
    margin-bottom: 14px;
}


.content-hint-icon {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-left: 8px;
    cursor: help;
}

.content-hint-icon svg {
    display: block;
}


/* =========================================================
   TINYMCE EDITOR (Content field)
   ========================================================= */

.tox.tox-tinymce {
    border: 1px solid rgba(35, 48, 70, 1) !important;
    border-radius: 5px !important;
    overflow: hidden;
}

/* Toolbar bar */
.tox .tox-editor-header {
    background: #063156 !important;
    border-bottom: 1px solid rgba(35, 48, 70, 1) !important;
    box-shadow: none !important;
}

.tox .tox-toolbar,
.tox .tox-toolbar__primary,
.tox .tox-toolbar-overlord {
    background: #063156 !important;
}

/* Icons: light gray by default, white on hover/active */
.tox .tox-tbtn {
    color: rgba(198, 226, 250, 1) !important;
}

.tox .tox-tbtn svg {
    fill: rgba(198, 226, 250, 1) !important;
}

.tox .tox-tbtn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

.tox .tox-tbtn:hover svg {
    fill: #FFFFFF !important;
}

.tox .tox-tbtn--enabled,
.tox .tox-tbtn--enabled:hover {
    background: rgba(255, 255, 255, 0.14) !important;
}

.tox .tox-tbtn--enabled svg {
    fill: #FFFFFF !important;
}

/* Separators between toolbar groups */
.tox .tox-toolbar__group {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Status bar (path + resize handle at the bottom) */
.tox .tox-statusbar {
    background: #063156 !important;
    border-top: 1px solid rgba(35, 48, 70, 1) !important;
}

.tox .tox-statusbar__path-item,
.tox .tox-statusbar a {
    color: rgba(198, 226, 250, 1) !important;
}

.tox .tox-statusbar__resize-handle svg {
    fill: rgba(198, 226, 250, 1) !important;
}


/* =========================================================
   TEMPLATE DETAIL HEADER
   ========================================================= */

.template-header-actions {
    gap: 14px;
}

/* --- Status pill (still a real <select>, just restyled) --- */

.template-status-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.template-status-dot {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2FE08A;
    pointer-events: none;
    z-index: 1;
}

.template-status-pill:has(select.status-inactive) .template-status-dot {
    background: #FF6B6F;
}

.template-status-select.status-select {
    width: auto;
    min-width: 90px;
    height: 30px;

    padding: 0 26px 0 26px;

    border-radius: 8px;

    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;

    background-position: calc(100% - 12px) 13px, calc(100% - 8px) 13px;
    background-size: 5px 5px, 5px 5px;
}

/* --- Preview button --- */

.template-preview-btn {
    width: 142px;
    height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    border-radius: 5px;
    border: 1px solid rgba(81, 141, 192, 1);
    background: rgba(48, 103, 151, 1);

    color: rgba(198, 226, 250, 1);

    font-family: Inter, sans-serif;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition: background .15s ease, border-color .15s ease;
}

.template-preview-btn:hover {
    background: rgba(81, 141, 192, 1);
}

.template-preview-btn svg {
    flex-shrink: 0;
}

/* --- Request button --- */

.template-request-btn {
    width: 160px;
    height: 40px;
    padding: 0 18px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    border-radius: 5px;
    border: 1px solid rgba(24, 107, 178, 1);
    background: rgba(22, 51, 75, 1);

    color: rgba(184, 222, 255, 1);

    font-family: Poppins, sans-serif;
    font-size: 13px;
    font-weight: 500;

    cursor: pointer;

    transition: background .15s ease, border-color .15s ease;
}

.template-request-btn:hover {
    background: rgba(30, 65, 92, 1);
}

.template-request-btn svg {
    flex-shrink: 0;
    stroke: rgba(184, 222, 255, 1);
}

/* =========================================================
   TEMPLATE PREVIEW
   ========================================================= */

.template-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;

    display: none;
    align-items: center;
    justify-content: center;
}

.template-preview-modal.is-open {
    display: flex;
}


/* blurred background */

.template-preview-backdrop {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.62);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}


/* modal */

.template-preview-dialog {
    position: relative;
    z-index: 1;

    width: min(1000px, calc(100vw - 70px));
    max-height: calc(100vh - 70px);

    display: flex;
    flex-direction: column;

    background: #0E2743;

    border: 1px solid #2A4A73;
    border-radius: 7px;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.55),
        0 0 35px rgba(24, 91, 145, 0.18);

    overflow: hidden;

    padding: 14px;
}


/* header */

.template-preview-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    padding: 8px 8px 10px 8px;
}

.template-preview-header h3 {
    margin: 0 0 16px 0;

    color: #FFFFFF;

    font-family: Poppins, Arial, sans-serif;
    font-size: 24px;
    font-weight: 500;
    font-style: normal;
    line-height: 100%;
    letter-spacing: 0;

    vertical-align: middle;
}


/* subject */

.template-preview-subject {
    display: flex;
    align-items: baseline;
    gap: 4px;

    font-family: Poppins, Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    font-style: normal;
    line-height: 100%;
    letter-spacing: 0;
}

.template-preview-subject-label {
    color: rgba(143, 160, 184, 1);
}

.template-preview-subject-value {
    color: #FFFFFF;
}


/* close */

.template-preview-close {
    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: none;
    background: transparent;

    color: #AFC3D7;

    font-size: 22px;
    font-weight: 300;

    cursor: pointer;

    transition: color 0.15s ease;
}

.template-preview-close:hover {
    color: #FFFFFF;
}


/* toolbar */

.template-preview-toolbar {
    display: flex;
    align-items: center;

    padding: 0 8px 12px 8px;
}


/* Theme label */

.template-theme-toggle {
    margin: 0;

    font-family: Poppins, Arial, sans-serif;
}

.template-theme-toggle .filter-toggle-text {
    font-family: Poppins, Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
}


/* preview area */

.template-preview-content {
    margin: 0 8px 8px 8px;

    min-height: 430px;
    max-height: calc(100vh - 225px);

    border-radius: 6px;

    overflow: hidden;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}


.template-preview-light {
    background: #FFFFFF;
    border: 1px solid #D7DEE7;
}

.template-preview-dark {
    background: #101820;
    border: 1px solid #30445A;
}


/* actual email */

.template-preview-frame {
    display: block;

    width: 100%;
    height: 100%;

    min-height: 430px;

    border: 0;

    background: transparent;
}


/* responsive */

@media (max-width: 700px) {

    .template-preview-dialog {
        width: calc(100vw - 30px);
        max-height: calc(100vh - 30px);

        padding: 10px;
    }

    .template-preview-header {
        padding: 8px 6px 10px 6px;
    }

    .template-preview-toolbar {
        padding: 0 6px 10px 6px;
    }

    .template-preview-content {
        margin: 0 6px 6px 6px;
    }
}


.template-list-preview-btn {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    background: rgba(22, 51, 75, 1);
    border: 1px solid rgba(76, 129, 175, 0.5);
    border-radius: 6px;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.template-list-preview-btn:hover {
    background: rgba(27, 61, 89, 1);
    border-color: rgba(76, 129, 175, 0.8);
}

.template-list-preview-btn svg {
    width: 23px;
    height: 15px;
    pointer-events: none;
}

.permissions-detail-group .profile-tabs {
    width: 100%;
    max-width: 100%;
    display: flex;
}

.permissions-detail-group .profile-tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 16px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    border-radius: 0;
}

.permissions-detail-group .profile-tab.active {
    border-radius: 5px 5px 0 0;
}

@media (max-width: 1700px) {

    .permissions-detail-group .profile-tabs {
        width: 100%;
        max-width: 100%;
    }

    .permissions-detail-group .profile-tab {
        width: 0;
        min-width: 0;
        flex: 1 1 0;

        padding: 0 16px;

        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;

        border-radius: 0;
    }

    .permissions-detail-group .profile-tab.active {
        border-radius: 5px 5px 0 0;
    }

}



.permissions-table .user-project-header,
.permissions-table .user-project-row {
    grid-template-columns:
        220px
        repeat(var(--permission-role-count), minmax(140px, 1fr)) !important;
}

.permissions-table .permission-functionality-cell {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.permission-status-toggle {
    width: 105px;
    height: 30px;

    flex: 0 0 105px;

    margin-left: 0;

    border-radius: 5px;

    box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.07);

    padding: 0;

    cursor: pointer;
}

.permission-status-toggle .profile-status-dot {
    width: 8px;
    height: 8px;

    flex: 0 0 7px;

    margin-right: 8px;
}

.permissions-detail-group .permission-status-toggle .profile-status-text {
    font-size: 12px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}

.permission-status-toggle.profile-status-active {
    background: rgba(23, 61, 50, 1);
    border: 1px solid rgba(22, 89, 58, 1);
    color: rgba(47, 224, 138, 1);
}

.permission-status-toggle.profile-status-inactive {
    background: rgba(80, 29, 37, 1);
    border: 1px solid rgba(100, 34, 38, 1);
    color: rgba(255, 107, 111, 1);
}

.permission-status-toggle.profile-status-active .profile-status-dot {
    background: rgba(47, 224, 138, 1);
}

.permission-status-toggle.profile-status-inactive .profile-status-dot {
    background: rgba(255, 107, 111, 1);
}

.permission-status-toggle:disabled {
    cursor: default;
    opacity: 1;
}

.permissions-detail-group .permissions-table-row {
    min-height: 64px;
    height: 64px;

    background: rgba(11, 20, 31, 0.33);

    box-shadow: 0px 1px 0px 0px rgba(107, 137, 172, 0.55);
}

.permissions-detail-group .permissions-table-header > div,
.permissions-detail-group .permissions-table-row > div {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;

}

.permissions-detail-group .permissions-table-header > div,
.permissions-detail-group .permissions-table-row > div {
    position: static;
    left: auto;
}

.page-header .profile-dates {
    min-width: 155px;
}

.page-header .profile-date-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    column-gap: 12px;
}

.page-header .profile-date-label {
    white-space: nowrap;
}

.permissions-page-header .env-badge {
    margin-left: 10px;
}

.permission-warning {
    width: 100%;
    min-height: 28px;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    gap: 8px;

    margin-top: 10px;
    margin-bottom: 10px;
    padding: 6px 12px;

    background: rgba(161, 105, 0, 0.3);
    border: 1px solid rgba(206, 149, 60, 0.7);
    border-radius: 5px;

    box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.07);

    color: rgba(238, 171, 69, 1);
    font-family: Poppins, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
}

.permission-warning svg {
    flex: 0 0 auto;
}


/* ============================================================
   USER CREATE - APPLICATIONS MATRIX
   ============================================================ */

.applications-matrix-header,
.applications-matrix-row {

    grid-template-columns:
        50px
        130px
        140px
        minmax(150px, 1fr)
        minmax(180px, 1.4fr)
        44px !important;

}

.applications-matrix .applications-matrix-header,
.applications-matrix .user-project-body {
    min-width: 740px;   /* adjust the min-width in the first block accordingly */
}


.applications-matrix-header > div,
.applications-matrix-row > div {

    min-width: 0;

}


/* obsah rovnako ako users matrix */

.applications-matrix-row > div:not(:first-child) {

    position: relative;
    left: -21px;

}

.applications-matrix-row > div:nth-child(3) {
    left: -31px;
}


/* ENV */

.application-environment-cell {

    display: flex;
    align-items: center;

    min-width: 0;

}


/* KEY */

.application-key-cell {

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;

    color: rgba(238, 243, 250, 1);

}


/* NAME */

.application-name-cell {

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;

    color: rgba(238, 243, 250, 1);

}


/* ROLES */

.application-roles-cell {

    min-width: 0;

    display: flex;
    align-items: center;

    overflow: hidden;
    white-space: nowrap;

}


.application-role-list {

    display: flex;
    align-items: center;
    gap: 6px;

    min-width: 0;

    overflow: hidden;

}


/* CORE ROLE WARNING */

.application-role-warning {
    width: 120px;
    height: 20px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    background: rgba(80, 29, 37, 1);
    border: 1px solid rgba(100, 34, 38, 1);
    border-radius: 2px;

    padding: 0;
}

.application-role-warning-icon {
    width: 22px;
    height: 16px;

    display: block;
    flex: 0 0 22px;
}


/* HIDDEN BY FILTER */

.application-filter-hidden {

    display: none !important;

}


/* TOOLBAR */

.apps-table-toolbar {

    display: flex;
    align-items: center;

    gap: 12px;

}




/* EDIT BUTTON */

.applications-matrix .user-change-cell {

    display: flex;
    align-items: center;
    justify-content: center;

}


.applications-matrix .user-change-button {

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;

    padding: 0;

    border: none;
    background: transparent;

    cursor: pointer;

}


.applications-matrix .user-change-button:hover {

    opacity: 0.8;

}


.profile-section-save-actions {
    width: 100%;
    margin-top: 40px;
}

.profile-section-save-actions .profile-section-save {
    flex: 1 1 auto;
    width: 100%;
    height: 40px;
    margin: 0;
}

.user-dropdown {
    position: relative;
}

button.topbar-user {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

button.topbar-user:hover {
    background: rgba(255, 255, 255, 0.08);
}

.user-arrow {
    flex-shrink: 0;
    margin-left: 2px;
}

.user-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 160px;
    padding: 6px;

    background: #0B1A2B;
    border: 1px solid #2A4A73;
    border-radius: 6px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);

    display: none;
    z-index: 1000;
}

.user-menu.open {
    display: block;
}

.user-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 4px;
    font-family: Poppins, sans-serif;
    font-size: 13px;
    color: #FFFFFF;
}

.user-menu a:hover {
    background: rgba(42, 74, 115, 0.5);
}



/* =========================================================
   HOME - APP ITEM (shape is an SVG built by JS)
   ========================================================= */

.apps-layer .app-wrap {
    position: absolute;
    width: 150px;
    height: 150px;
}

.apps-layer .app-item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);   /* centering only, never changes */
    isolation: isolate;

    display: flex;
    align-items: center;
    justify-content: center;

    width: max-content;                 /* grows with the name */
    min-width: 220px;
    height: 94px;
    padding: 0 60px;
    box-sizing: border-box;

    cursor: pointer;
    text-decoration: none;
}

.apps-layer .app-shape {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: visible;                  /* lets the glow spill outside */
    pointer-events: none;
}

/* hover: crossfade base -> gold, glow fades in */
.apps-layer .app-shape .shape-base,
.apps-layer .app-shape .shape-hover,
.apps-layer .app-shape .shape-glow {
    transition: opacity .25s ease;
}

.apps-layer .app-shape .shape-hover,
.apps-layer .app-shape .shape-glow { opacity: 0; }

.apps-layer .app-item:hover .shape-hover,
.apps-layer .app-item:hover .shape-glow { opacity: 1; }

.apps-layer .app-item:hover .shape-base { opacity: 0; }

.apps-layer .app-name {
    position: relative;
    font-family: "Nico Moji", sans-serif;
    font-size: 35px;
    font-weight: 400;
    line-height: 1;
    color: #FFFFFF;
    text-align: center;
    white-space: nowrap;
}




.standalone-footer {
    position: fixed;
    left: 20px;
    bottom: 14px;

    z-index: 100;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    white-space: nowrap;
}

.standalone-footer-top {
    margin-bottom: 6px;
}

.standalone-footer .core-version {
    display: inline-block;

    font-size: 12px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;

    color: rgba(109, 177, 235, 1);

    text-decoration: none;
}

.standalone-footer .core-version:hover {
    color: #FFFFFF;
}

.standalone-footer-logo {
    display: flex;
    align-items: center;
}

.standalone-footer-logo img {
    height: 22px;
    width: auto;

    opacity: 0.9;
    filter: brightness(1.1);
}

.standalone-copyright {
    padding-top: 6px;

    font-size: 13px;
    font-family: 'Poppins', sans-serif;

    color: #FFFFFF;
    opacity: 0.8;
}


#signature-overlay.no-sig #signature-image,
#signature-overlay.no-sig .sig-portal {
    display: none;
}


/* Inactive rows: dim the content, not the status action */
.env-inactive {
    opacity: 1;
    filter: none;
}

.env-inactive > *:not(.env-actions) {
    opacity: 0.55;
    filter: grayscale(40%);
}

/* ============================================================
   USER CREATE - APPLICATIONS MATRIX: horizontal scroll fallback
   ============================================================ */

.applications-matrix {
    overflow-x: auto;      /* was: hidden (from .user-project-table) */
    overflow-y: hidden;
}

/* header + body share the same minimum width, so columns stay aligned
   and the edit column is reachable by scrolling */
.applications-matrix .applications-matrix-header,
.applications-matrix .user-project-body {
    min-width: 880px;
}

/* make sure rows fill the (possibly wider) body */
.applications-matrix .applications-matrix-row {
    width: 100%;
    min-width: 0;
}


/* ============================================================
   USER DETAIL HEADER: fix overlap on ~125% scale (FullHD)
   The default layout (>1600px) is untouched.
   ============================================================ */

@media (min-width: 901px) and (max-width: 1600px) {

    /* same width as the tab block below, so the right edge stays aligned */
    .page-header:has(> .profile-header-top-actions) {
        width: 70%;
        flex-wrap: nowrap;
    }

    /* actions take real space in the row instead of overlaying it,
       still aligned to the right edge of the 70% block */
    .page-header > .profile-header-top-actions {
        position: static;
        width: auto;
        margin-left: auto;
        flex: 0 0 auto;
        gap: 10px;
        pointer-events: auto;
    }

    /* title is slightly smaller and shortens with "..." if still too long */
    .page-header:has(> .profile-header-top-actions) h2 {
        flex: 0 1 auto;
        min-width: 0;
        font-size: 20px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        word-break: normal;
    }

    .page-header:has(> .profile-header-top-actions) .profile-status-badge {
        flex-shrink: 0;
        margin-left: 4px;
    }

    /* compact dates box */
    .page-header > .profile-header-top-actions .profile-dates {
        min-width: 0;
        margin-right: 0;
        padding: 5px 10px;
        flex-shrink: 0;
    }

    .page-header > .profile-header-top-actions .profile-date-row {
        grid-template-columns: 58px auto;
        column-gap: 8px;
    }

    /* narrower Reset Password button (original uses !important) */
    .page-header > .profile-header-top-actions .reset-btn-admin {
        width: 140px !important;
        min-width: 140px !important;
        font-size: 13px;
        flex-shrink: 0;
    }

    .page-header > .profile-header-top-actions .profile-status-action {
        flex-shrink: 0;
    }
}


/* ============================================================
   PERMISSION DETAIL: header + tabs (all scales above 900px)
   Normal screens keep the 70% width, narrower ones get a minimum
   ============================================================ */

@media (min-width: 901px) {

    /* ---------- HEADER ---------- */

    .page-header.permissions-page-header:has(> .profile-header-top-actions) {
        width: max(70%, 1100px);
        max-width: 100%;
        flex-wrap: nowrap;
        gap: 10px;
    }

    .page-header.permissions-page-header h2 {
        flex: 0 1 auto;
        min-width: 0;
        margin-left: 0;
        font-size: 20px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* badges never shrink and never get covered */
    .permissions-page-header .env-badge,
    .permissions-page-header .profile-status-badge {
        flex: 0 0 auto;
        margin-left: 0;
    }

    .permissions-page-header .env-badge {
        width: 60px;
    }

    /* actions are part of the row, so they cannot overlay the badges */
    .permissions-page-header > .profile-header-top-actions {
        position: static;
        width: auto;
        margin-left: auto;
        flex: 0 0 auto;
        flex-wrap: nowrap;
        gap: 10px;
        pointer-events: auto;
    }

    .permissions-page-header .perm-actions {
        flex-shrink: 0;
        gap: 8px;
    }

    .permissions-page-header .perm-copy,
    .permissions-page-header .perm-paste {
        height: 40px;
        padding: 0 16px;
    }

    .permissions-page-header .application-permissions-button {
        min-width: 0;
        padding: 0 14px;
        flex-shrink: 0;
    }

    .permissions-page-header .profile-dates {
        min-width: 0;
        margin-right: 0;
        padding: 5px 12px;
        flex-shrink: 0;
    }

    /* wider label column, so "Last import" never touches the date */
    .permissions-page-header .profile-date-row {
        grid-template-columns: 100px auto;
        column-gap: 10px;
    }

    .permissions-page-header .profile-date-label,
    .permissions-page-header .profile-date-value {
        white-space: nowrap;
    }

    /* ---------- TABS ---------- */

    .profile-tabs-group.permissions-detail-group {
        width: max(70%, 1100px);
        max-width: 100%;
    }

    .permissions-detail-group .profile-tabs .profile-tab {
        /* block (not flex), so text-overflow: ellipsis works */
        display: block;
        flex: 1 1 0;
        width: 0;
        min-width: 0;

        padding: 0 6px;
        line-height: 49px;
        text-align: center;
        font-size: 14px;

        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}


.page-header .profile-dates,
.profile-dates {
    display: grid;
    grid-template-columns: max-content max-content;
    column-gap: 14px;              /* guaranteed space label <-> value */
    align-content: center;
    align-items: center;
    width: fit-content;
    min-width: 0;
}

.page-header .profile-dates .profile-date-row {
    display: contents;             /* ignores the old fixed column widths */
}

.profile-dates .profile-date-label,
.profile-dates .profile-date-value {
    white-space: nowrap;
}


/* ============================================================
   TEMPLATE DETAIL: header and form card share one width,
   actions end at the right edge of the form (all scales)
   ============================================================ */

@media (min-width: 901px) {

    .page-header:has(> .template-header-actions),
    .template-detail-card {
        width: max(70%, 1000px);   /* 70% on wide screens, at least 1000px on narrow ones */
        max-width: 100%;
    }

    .page-header:has(> .template-header-actions) {
        flex-wrap: nowrap;
        gap: 10px;
    }

    .page-header:has(> .template-header-actions) h2 {
        flex: 0 0 auto;
        min-width: auto;
        white-space: nowrap;
        overflow: visible;
        word-break: normal;
        margin-left: 8px;
    }

    .page-header:has(> .template-header-actions) .profile-status-badge {
        flex: 0 0 auto;
        margin-left: 0;
    }

    /* actions take part in the row (no overlay), pushed to the right edge */
    .page-header > .template-header-actions {
        position: static;
        width: auto;
        margin-left: auto;
        flex: 0 0 auto;
        flex-wrap: nowrap;
        gap: 10px;
        pointer-events: auto;
    }

    .template-header-actions > * {
        flex-shrink: 0;
    }

    .template-header-actions .profile-dates {
        margin-right: 0;
    }
}

/* compact sizes only on narrower screens (about 125% scale) */
@media (min-width: 901px) and (max-width: 1600px) {

    .page-header:has(> .template-header-actions) h2 {
        font-size: 20px;
    }

    .template-header-actions .template-preview-btn {
        width: 120px;
    }

    .template-header-actions .template-request-btn {
        width: 125px;
        padding: 0 10px;
    }

    .template-header-actions .profile-dates {
        padding: 5px 10px;
    }
}

/* ============================================================
   TABS must never be wider than the block below them
   (app detail / app create / user detail / user create ...)
   ============================================================ */

@media (min-width: 901px) {

    .profile-tabs-group > .profile-tabs {
        left: -1px;
        right: -1px;      /* tab bar = exactly the width of the block */
        width: auto;
        max-width: none;
    }

    .profile-tabs-group > .profile-tabs .profile-tab {
        flex: 0 1 214px;  /* keeps 214px when there is room, shrinks when not */
        width: auto;
        min-width: 0;
        padding: 0 12px;

        /* block (not flex), so text-overflow: ellipsis works */
        display: block;
        line-height: 49px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* ============================================================
   AUDIT LOGS: first filter row stays on ONE row (~125% and up)
   The search box is the flexible item and absorbs missing space
   ============================================================ */

@media (min-width: 1301px) and (max-width: 1700px) {

    .audit-filter-row:first-child {
        flex-wrap: nowrap;
        gap: 10px;
    }

    /* search shrinks first, up to a minimum width */
    .audit-filter-row:first-child .audit-search {
        flex: 1 1 0;
        width: auto;
        min-width: 140px;
        max-width: 260px;
    }

    /* compact date fields */
    .audit-filter-row:first-child .audit-date-field {
        flex: 0 0 156px;
        width: 156px;
        padding: 0 32px 0 12px;
    }

    .audit-filter-row:first-child .audit-date-icon {
        right: 10px;
    }

    /* toggle keeps its text on one line and never shrinks */
    .audit-filter-row:first-child .filter-toggle {
        flex: 0 0 auto;
        gap: 8px;
    }

    .audit-filter-row:first-child .filter-toggle-text {
        white-space: nowrap;
    }

    /* pagination never shrinks, stays at the right edge of the card */
    .audit-filter-row:first-child .pagination {
        flex: 0 0 auto;
        margin-left: auto;
        gap: 10px;
    }

    .audit-filter-row:first-child .pagination-info {
        white-space: nowrap;
    }
}

/* only on small laptops (viewport 1300px and below) may the row wrap */
@media (min-width: 901px) and (max-width: 1300px) {

    .audit-filter-row:first-child {
        flex-wrap: wrap;
        row-gap: 12px;
    }

    .audit-filter-row:first-child .pagination {
        margin-left: auto;
    }
}

.sidebar-menu a > img.sidebar-icon,
.sidebar-menu a > svg {
    flex: 0 0 18px;      /* same slot width for everything */
    width: 18px;
    height: 18px;
    padding: 0;
    box-sizing: border-box;
}

/* img icons: keep your existing look */
.sidebar-icon {
    object-fit: contain;
    opacity: 0.85;
    filter: brightness(0) invert(1);
}

/* svg icons: draw at 13x13 centered inside the 18x18 slot */
.sidebar-menu a > svg {
    padding: 2.5px;      /* (18 - 13) / 2 */
}


/* ---------- MENU LINKS: center icon when collapsed ---------- */
.sidebar-menu a {
    /* add padding to your existing transition list so the icon glides, not jumps */
    transition:
        background .2s ease,
        border-color .2s ease,
        color .2s ease,
        padding .45s cubic-bezier(.4, 0, .2, 1);
}

.sidebar.collapsed .sidebar-menu a {
    padding: 0 15px;   /* 10 + 1 + 15 = 26px slot start -> centered at 35px */
}

/* ---------- COLLAPSE BUTTON: same 18px slot as the menu icons ---------- */
.sidebar-collapse-btn {
    width: 152px;
    margin: 0 0 18px 0;          /* was: 0 0 18px -2px */
    padding: 0 0 0 2px;          /* footer starts at 22px, +2 = 24px, same as menu icons */
    gap: 12px;                   /* same gap as menu links, so the label lines up with menu text */
    transition: opacity .15s ease, padding .45s cubic-bezier(.4, 0, .2, 1);
}

.sidebar-collapse-icon {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    padding: 1.5px;              /* (18 - 15) / 2 -> 15px glyph centered in the 18px slot */
    box-sizing: border-box;
}

.sidebar.collapsed .sidebar-collapse-btn {
    gap: 0;
    padding-left: 4px;           /* footer content starts at 22px, +4 = 26px -> centered at 35px */
}


/* =========================================================
   SIDEBAR FOOTER: smooth collapse
   ========================================================= */

.sidebar-footer-top,
.sidebar-footer-logo,
.sidebar-footer .copyright {
    white-space: nowrap;
}

/* ---------- VERSION: slides to the center ---------- */

.sidebar-footer-top .core-version {
    position: relative;
    left: 0;
    transform: translateX(0);
    transition:
        left .45s cubic-bezier(.4, 0, .2, 1),
        transform .45s cubic-bezier(.4, 0, .2, 1),
        margin-left .45s cubic-bezier(.4, 0, .2, 1);
}

.sidebar.collapsed .sidebar-footer-top .core-version {
    left: 50%;
    transform: translateX(-50%);
    margin-left: 0;
}

/* ---------- LOGO: crossfade full <-> mini ---------- */

.sidebar-footer-logo {
    position: relative;
    height: 22px;
}

.sidebar-footer-logo .logo-full {
    flex: none;
    opacity: 0.9;
    transition: opacity .15s ease .3s;      /* fades in late when expanding */
}

.sidebar-footer-logo .logo-mini {
    display: block;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 22px;
    width: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity .1s ease;           /* disappears quickly when expanding */
}

.sidebar.collapsed .sidebar-footer-logo .logo-full {
    opacity: 0;
    transition: opacity .15s ease;          /* disappears quickly when collapsing */
}

.sidebar.collapsed .sidebar-footer-logo .logo-mini {
    opacity: 0.9;
    transition: opacity .15s ease .3s;      /* fades in when the sidebar is almost narrow */
}

/* ---------- COPYRIGHT: crossfade full <-> mini ---------- */

/* fixed height in both states, so nothing moves vertically.
   padding-top = the gap between logo and copyright (change it freely) */
.sidebar-footer .copyright {
    position: relative;
    height: 40px;
    padding-top: 14px;
    opacity: 1;
}

.sidebar-footer .copyright .copyright-full {
    display: block;
    font-size: 13px;
    opacity: 0.8;
    transition: opacity .15s ease .3s;
}

.sidebar-footer .copyright .copyright-mini {
    position: absolute;
    top: 14px;                              /* same as padding-top above */
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    text-align: center;
    font-size: 8px;
    line-height: 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .1s ease;
}

.sidebar.collapsed .sidebar-footer .copyright .copyright-full {
    opacity: 0;
    transition: opacity .15s ease;
}

.sidebar.collapsed .sidebar-footer .copyright .copyright-mini {
    opacity: 0.8;
    transition: opacity .15s ease .3s;
}