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

.bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;

    object-fit: cover;

    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;
}

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

a:hover {
    color: #ffffff;
    text-decoration: underline;
}

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;
}

.screen {
    position: relative;
    height: calc(100vh - 60px);
}

.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 {

    background: var(--env-color);

    padding: 3px 10px;

    border-radius: 999px;

    font-size: 11px;

    font-weight: 600;

    margin-left: 10px;

}

.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);
}

.app-item {
    position: absolute;
    width: 110px;
    height: 70px;

    background: rgba(30, 45, 70, 0.92);
    border-radius: 8px;

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

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

    font-size: 14px;
    font-weight: 600;

    z-index: 10;
    cursor: pointer;
    opacity: 0;

    backdrop-filter: blur(6px);

    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
}

.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;
}

.profile-card {
    background: linear-gradient(180deg,
            rgba(80, 110, 150, 0.92),
            rgba(45, 70, 100, 0.92));

    backdrop-filter: blur(14px);
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    position:relative;
    left: calc(-230px / 2);
    width: 100%;
    max-width: none;
}

.section-box {
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    background: rgba(20, 30, 45, 0.75);
    width: 100%;
    box-sizing: border-box;
}

.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: absolute;
    top: -55px;
    right: 0;
    width: 180px;
    height: 40px;
    border-radius: 6px;
    padding: 0 12px;
    font-weight: 600;
    border: none;
    appearance: none;
    cursor: pointer;
    background: #f0f2f5;
    color: #1b2a38;
}




.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: 38px;
    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;
}

label {
    font-size: 13px;
    opacity: 0.9;
}

.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;
}

.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: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 10px;
    margin-top: 10px;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field label {
    margin-bottom: 6px;
}

.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;
}

.small-input[type="text"] {
    width: 180px;
}

.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: 20px;
}

.toolbar .btn {
    height: 36px;
}

.small-input {
    height: 36px;
    padding: 0 10px;
    font-size: 14px;
}

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

.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: 8px;
}

.new-role-form input {
    flex: 1;
}

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 {
    width: 100%;
    margin-top: 10px;
    padding: 14px 0;

    background: #9DC778;
    color: #1e2a35;

    border: none;
    border-radius: 8px;

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

.user-save:hover {
    background: #8fbf65;
}

.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 {
    background: #f06445;
    border: none;
}

.signout-btn:hover {
    background: #e25538;
}

.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(30, 45, 70, 0.75);
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-app-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
}

.admin-app-header {
    background: #5e74a0;

    padding: 10px 14px;

    border-radius: 6px;

    cursor: pointer;

    font-weight: 600;

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

.header-spacer {
    width: 36px; /* rovnaké ako delete button */
    height: 36px;
}

.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;

}


.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;
}

.env-header,
.env-row {

    display: grid;
    grid-template-columns:
        50px 100px 200px 1fr 170px 170px 60px;

    align-items: center;

}


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

}

.env-row {

    padding: 16px 14px;

    border-radius: 12px;

    margin-bottom: 12px;

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

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

    cursor: pointer;

    transition: .15s;

}

.env-row:hover {

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

    transform: translateY(-1px);

}

.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: 220px;
    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: 36px;
    height: 36px;

    border-radius: 8px;

    background: #e66a47;

    border: none;

    color: white;

    cursor: pointer;

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

    font-size: 16px;

}

.env-delete-btn:hover {

    background: #d75a39;

}

.env-delete-btn:hover {
    background: #e25538;
}

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

.new-env-btn {

    background: #1f3552;

    border: none;

    padding: 10px 20px;

    border-radius: 8px;

    font-weight: 600;

}

.new-env-btn:hover {

    background: #274264;

}

.env-date {

    font-size: 13px;

    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: #e7e7e7;

    border-radius: 6px;

    padding: 6px 8px;

    display: flex;

    flex-wrap: wrap;

    gap: 6px;

}

.env-app-chip {

    display: inline-flex;
    align-items: center;
    background: black;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;

}

.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: 12px;

    margin-bottom: 20px;

}

.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;
}

.users-header,
.user-row {
    display: grid;
    grid-template-columns:
        50px
        120px
        120px
        200px
        140px
        130px
        130px
        90px
        50px;

    align-items: center;
    gap: 10px;
}

.users-header {
    opacity: 0.85;
    font-weight: 600;
    padding: 8px 12px;
}

.user-row {
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.user-row:hover {
    background: rgba(255, 255, 255, 0.18);
}

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

.user-refresh button {
    background: #e9643a;
    border: none;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    color: white;
    cursor: pointer;
}

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

.status-active {
    background: #9bb874;
    color: #1e2a35;
    border: 2px solid #9bb874;
}

.status-inactive {
    background: #e9643a;
    color: white;
    border: 2px solid #e9643a;
}

.status-created {
    background: #d9d9d9;
    color: #1e2a35;
    border: 2px solid #7f97b8;
}


/* keď je dropdown otvorený */

.status-select:focus {
    background: #f0f2f5 !important;
    color: #1b2a38 !important;
}

.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 {
    display: grid;
    grid-template-columns:
        80px 120px 200px 1fr 150px 150px 60px;
    align-items: center;
}


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

.app-user-box {
    background: rgba(255, 255, 255, 0.10);
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.app-user-header {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.app-user-roles {
    display: none;
    padding: 12px;
    background: #f0f2f5;
    border-radius: 6px;
    margin: 10px;
    color: black;
}

.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;
    grid-template-columns: 220px 220px 1fr;
    align-items: center;
}

.perm-row {
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: .15s;
}

.perm-row:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}


.permissions-matrix {
    background: rgba(10, 20, 35, 0.85);
    border-radius: 10px;
    overflow-x: auto;
    overflow-y: hidden;
}

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

.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.35);
    font-weight: 600;
    border-top: none;
}

.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;
    margin-bottom: 20px;
}

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

.page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 5px;
}

.page-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    text-decoration: none;
    font-size: 20px;
}

.page-back:hover {
    background: rgba(0, 0, 0, 0.7);
}

.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: 20px;
    align-items: flex-start;
    margin-bottom: 10px;
}

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

.profile-photo img {
    display: block;
}

.profile-avatar {
    width: 130px;
    height: 140px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.25);
    background: #ffffff08;
    padding: 6px;
    box-sizing: border-box;
    cursor: pointer;
}

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

.profile-last-row {
    align-items: flex-end;
}

.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] {
    background: #f3f3f3;
    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-confirm {
    background: #9DC778;
    color: #1e2a35;
}

.confirm-dialog-confirm:hover {
    background: #8fb96a;
}

.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;
}

.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;
    gap: 8px;

    margin-left: 15px;

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

    cursor: pointer;
}

.filter-checkbox-inline input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #22c55e;
    cursor: pointer;
}

.sidebar {
    position: fixed;
    top: 60px;
    left: 0;

    width: 230px;
    height: calc(100vh - 60px); /* 🔥 uprava */

    box-sizing: border-box;

    background: linear-gradient(
        180deg,
        rgba(40, 60, 95, 0.98),
        rgba(30, 50, 80, 0.98)
    );

    padding: 22px 10px;

    display: flex;
    flex-direction: column;

    z-index: 1000;
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.sidebar-logo,
.sidebar-logo:visited,
.sidebar-logo:hover,
.sidebar-logo:active {
    font-size: 22px;
    font-weight: 700;
    color: #e6edf5;
    text-decoration: none;
    letter-spacing: 0.5px;
    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%;
    /* 🔥 roztiahne na celý panel */

    padding: 12px 14px;
    border-radius: 10px;

    font-size: 15px;
    /* väčšie */
    font-weight: 600;
    /* výraznejšie */
    letter-spacing: 0.3px;
    /* jemný spacing */

    color: #d6e4ff;

    transition: all 0.2s ease;
    box-sizing: border-box;
    justify-content: flex-start;
}

.sidebar-menu a::before {
    content: none;
}

.sidebar-menu a:hover {
    background: rgba(255, 255, 255, 0.10);
    color: #ffffff;

    border-left: 3px solid #4f6d9b;
}

.sidebar-menu a.active {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

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

    object-fit: contain;

    opacity: 0.85;
    filter: brightness(0) invert(1); /* 🔥 ak chceš biele ikony */

    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: 15px;
    font-weight: 700;
    color: #ffb347;

    margin-bottom: 6px;

     display: inline-block; /* 🔥 toto je fix */
    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 {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* TOPBAR */
.topbar {
    position: fixed;
    top: 0;
    left: 0px;
    right: 0;
    height: 60px;

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

    padding: 0 20px;

     background: rgba(40, 60, 95, 0.98);
    /* 🔥 rovnaký tone */

    z-index: 900;
}

.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;

    background: #c0392b;
    border: none;

    height: 36px;
    min-width: 70px;
    padding: 0 16px;

    border-radius: 12px;

    color: white;
    font-size: 16px;

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

    cursor: pointer;

    transition: all 0.2s ease;
}

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

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

    transition: width 1.2s linear;
}

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

.topbar-logout:hover {
    background: #e74c3c;
}

.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: 10px;
    align-items: center;
}

.env-pill {
    background: var(--env-color);
    color: white;

    opacity: 0.35;
    filter: grayscale(30%);

    padding: 8px 22px;
    border-radius: 10px;

    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;

    cursor: pointer;

    transition: all 0.25s ease;
}

.env-pill.active {
    opacity: 1;
    filter: none;

    box-shadow: 0 0 12px var(--env-color);
}

.env-pill:hover {
    opacity: 0.7;
    filter: none;
}

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

.app-layout {
    position: absolute;

    top: 60px;
    /* výška topbaru */
    left: 230px;
    /* sidebar */

    right: 0;
    bottom: 0;

    padding: 20px 30px;

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

.page-center {
    max-width: 1250px;
    margin: 0 auto;
    padding-left: 0px;
}

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

.home .app-layout {
    height: calc(100vh - 60px);
    overflow: hidden;
}
.auth .app-layout {
    margin-left: 0;
    padding-top: 0;
    height: 100vh;
    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-preview.placeholder {
    opacity: 0.5;
    filter: grayscale(100%);
}

.signature-click::after {
    content: "Click to upload";
    display: block;
    font-size: 12px;
    opacity: 0.6;
    margin-top: 6px;
}

.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 {
    max-width: 320px;
    max-height: 160px;

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 8px;
    background: rgba(0,0,0,0.25);

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

    padding: 6px;

    display: block;

    transition: all 0.2s ease;
}

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

/* OVERLAY */
#signature-overlay {
    position: absolute;
    top: 48%;
    left: calc(50% - 110px); 

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

    width: 480px;
    height: 480px;

    pointer-events: none;
    opacity: 0;

    transition: 
        opacity 0.35s ease,
        transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 5;
}
#signature-overlay.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* čierna guľa */
.signature-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;

    background: radial-gradient(
        circle,
        rgba(0,0,0,0.98) 0%,
        rgba(0,0,0,0.92) 45%,
        rgba(0,0,0,0.75) 65%,
        rgba(0,0,0,0.4) 80%,
        rgba(0,0,0,0) 100%
    );

    backdrop-filter: blur(18px);
}

/* obrázok */
#signature-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    max-width: 75%;
    max-height: 75%;

    object-fit: contain;

    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.6));
}

/* === 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;
}


/* === FOOTER === */
.sidebar-footer-top,
.sidebar-footer-logo,
.sidebar-footer .copyright {
    display: block;
    white-space: nowrap;

    clip-path: inset(0 0 0 0);
    overflow: hidden;

    transition:
        clip-path 0.35s ease,
        opacity 0.15s ease 0.2s; /* ⬅️ delay */
}
.sidebar.collapsed .sidebar-footer-top,
.sidebar.collapsed .sidebar-footer-logo,
.sidebar.collapsed .sidebar-footer .copyright {
    clip-path: inset(0 100% 0 0);
    opacity: 0;
}

/* === LAYOUT === */
.app-layout {
    left: 230px;
    transition: left 0.25s ease;
}


/* === HOVER FIX === */
.sidebar.collapsed .sidebar-menu a:hover {
    border-left: none;
}

.sidebar-toggle {
    width: 36px;
    height: 36px;

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

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

    cursor: pointer;

    margin-bottom: 20px;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.18);
}

/* burger */
.burger {
    width: 16px;
    height: 2px;
    background: white;
    position: relative;
}

.burger::before,
.burger::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 2px;
    background: white;
    left: 0;
}

.burger::before {
    top: -5px;
}

.burger::after {
    top: 5px;
}
.sidebar.collapsed .burger {
    transform: rotate(90deg);
    transition: transform 0.2s ease;
}