:root {
    --bg: #08111f;
    --panel: #0d1929;
    --panel2: #111f32;
    --border: #21334a;
    --text: #edf4fb;
    --muted: #8ea1b8;
    --accent: #e21d2f;
    --green: #22c55e;
    --yellow: #eab308;
    --blue: #3b82f6;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Segoe UI, Arial, sans-serif;
}

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #060d17;
    border-right: 1px solid var(--border);
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    margin-bottom: 30px;
}

.logo {
    background: var(--accent);
    color: white;
    font-weight: 900;
    padding: 9px 8px;
    border-radius: 6px;
    font-size: 15px;
}

.brand strong {
    display: block;
    font-size: 15px;
}

.brand span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-top: 2px;
}

nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav {
    border: 0;
    background: transparent;
    color: #aebed0;
    text-align: left;
    padding: 11px 12px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 13px;
}

.nav:hover {
    background: #101d2d;
    color: white;
}

.nav.active {
    background: #17283d;
    color: white;
    border-left: 3px solid var(--accent);
}

.nav-title {
    color: #50647b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 22px 10px 7px;
}

.sidebar-footer {
    margin-top: auto;
    color: #50647b;
    font-size: 10px;
    line-height: 1.6;
    padding: 10px;
}

main {
    flex: 1;
    min-width: 0;
}

header {
    height: 78px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    background: #091422;
}

.eyebrow {
    font-size: 9px;
    letter-spacing: 1.5px;
    color: var(--muted);
}

h1 {
    margin: 4px 0 0;
    font-size: 23px;
}

.header-right {
      align-items: center;
    gap: 18px;
    color: var(--muted);
    font-size: 12px;
}

.status {
    padding: 5px 9px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.status.ok {
    color: var(--green);
}

.status.error {
    color: var(--accent);
}

.status.neutral {
    color: var(--muted);
}

#content {
    padding: 28px 30px 50px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 18px;
}

.metric {
    font-size: 29px;
    font-weight: 700;
    margin-top: 8px;
}

.label {
    color: var(--muted);
    font-size: 11px;
}

.sub {
    color: var(--muted);
    font-size: 11px;
    margin-top: 5px;
}

.section-title {
    font-size: 14px;
    margin: 25px 0 10px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 9px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel);
}

th,
td {
    padding: 11px 13px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-size: 12px;
}

th {
    color: var(--muted);
    font-weight: 600;
    background: var(--panel2);
}

td {
    color: #d8e3ee;
}

.badge {
    display: inline-block;
    padding: 4px 7px;
    border-radius: 5px;
    font-size: 10px;
    background: #152338;
}

.badge.green {
    color: var(--green);
}

.badge.red {
    color: var(--accent);
}

.badge.yellow {
    color: var(--yellow);
}

.topology {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.topology-row {
    width: min(100%, 1050px);
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.topology-node {
    min-width: 180px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 15px;
    text-align: center;
}

.arrow {
    color: #50647b;
    font-size: 20px;
}

.info {
    padding: 16px;
    background: #0b1726;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 1000px) {
    .sidebar {
        width: 205px;
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   KSLAB PREMIUM USER MANAGEMENT
   ============================================================ */

.user-modal {
    width: min(1180px, 94vw);
    max-height: 88vh;
    overflow: auto;
    background: #0b1422;
    border: 1px solid #263b55;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0,0,0,.55);
    padding: 0;
}

.user-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 26px 30px 22px;
    border-bottom: 1px solid #203247;
    background:
        linear-gradient(
            135deg,
            rgba(24,53,84,.95),
            rgba(10,21,36,.98)
        );
}

.user-title-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-icon-big {
    width: 54px;
    height: 54px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: #16385e;
    border: 1px solid #2c608f;
    font-size: 27px;
    box-shadow: inset 0 0 20px rgba(50,130,200,.15);
}

.user-modal h2 {
    margin: 2px 0 3px;
    font-size: 24px;
    letter-spacing: -.3px;
}

.eyebrow {
    color: #6ca9db;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.8px;
}

.user-domain {
    color: #7f94a9;
    font-size: 13px;
}

.modal-close {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid #30455d;
    background: rgba(255,255,255,.035);
    color: #b9c8d8;
    font-size: 25px;
    cursor: pointer;
    transition: .18s ease;
}

.modal-close:hover {
    background: rgba(255,255,255,.09);
    color: white;
    transform: rotate(4deg);
}

.user-summary {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 12px;
    padding: 18px 30px;
    background: #09121e;
}

.user-summary-card {
    border: 1px solid #1e3249;
    border-radius: 13px;
    padding: 13px 16px;
    background: #0d1928;
}

.summary-number {
    display: block;
    font-size: 19px;
    font-weight: 800;
    color: #e8f1fb;
}

.summary-label {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    color: #738ba3;
    text-transform: uppercase;
    letter-spacing: .8px;
}

.user-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px 13p}

.toolbar-title {
    font-size: 16px;
    font-weight: 800;
    color: #edf4fb;
}

.toolbar-subtitle {
    margin-top: 3px;
    font-size: 12px;
    color: #71879e;
}

.user-count-badge {
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid #315372;
    background: #10283e;
    color: #75b8eb;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1px;
}

.users-list {
    padding: 0 20px 15px;
}

.sso-user-row {
    min-height: 76px;
    display: grid;
    grid-template-columns: 38px 48px minmax(220px,1fr) 130px 190px;
    align-items: center;
    gap: 13px;
    padding: 11px 14px;
    margin: 0;
    border-top: 1px solid #203349;
    border-bottom: 1px solid rgba(255,255,255,.025);
    transition:
        background .16s ease,
        transform .16s ease,
        border-color .16s ease;
}

.sso-user-row:nth-child(odd) {
    background: #0d1928;
}

.sso-user-row:nth-child(even) {
    background: #101e2e;
}

.sso-user-row:hover {
    background: #16283c;
    border-top-color: #315675;
    transform: translateX(3px);
}

.sso-user-number {
    color: #50677f;
    font-family: Consolas, monospace;
    font-size: 11px;
    text-align: center;
}

.sso-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #173653;
    border: 1px solid #2c587b;
    color: #a9d7f7;
    font-weight: 900;
    font-size: 15px;
}

.sso-user-main {
    min-width: 0;
}

.sso-user-name {
    color: #f0f5fa;
    font-size: 15px;
    font-weight: 750;
    line-height: 1.35;
}

.sso-user-upn {
    margin-top: 3px;
    color: #71879e;
    font-family: Consolas, monospace;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sso-source {
    color: #8299ae;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .7px;
    white-space: nowrap;
}

.source-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 50%;
    background: #52d48a;
    box-shadow: 0 0 9px rgba(82,212,138,.45);
}

.reset-password-btn {
    height: 40px;
    min-width: 178px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #74373e;
    border-radius: 9px;
    background: linear-gradient(
        180deg,
        #54242b,
        #3b1c22
    );
    color: #ffb8be;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .75px;
    cursor: pointer;
    transition:
        .18s ease,
        box-shadow .18s ease,
        transform .18s ease;
}

.reset-password-btn:hover {
    background: linear-gradient(
        180deg,
        #713039,
        #4c2229
    );
    border-color: #a14a55;
    color: #fff;
    box-shadow:
        0 7px 20px rgba(160,50,65,.22);
    transform: translateY(-1px);
}

.reset-password-btn:active {
    transform: translateY(0);
}

.reset-password-btn:disabled {
    opacity: .65;
    cursor: wait;
}

.reset-icon {
    font-size: 16px;
}

.reset-password-btn.resetting {
    background: #182d40;
    border-color: #315674;
    color: #83b9dc;
}

.spinner {
    width: 13px;
    height: 13px;
    border: 2px solid #315675;
    border-top-color: #9bd2f5;
    border-radius: 50%;
    animation: kslab-spin .7s linear infinite;
}

@keyframes kslab-spin {
    to {
        transform: rotate(360deg);
    }
}

.user-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 16px 30px;
    border-top: 1px solid #203247;
    background: #08111c;
    color: #60778d;
    font-size: 11px;
}

.secondary-btn {
    padding: 9px 17px;
    border: 1px solid #30465e;
    border-radius: 8px;
    background: #142235;
    color: #b4c4d4;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

.secondary-btn:hover {
    background: #1b2e44;
    color: white;
}

.reset-result {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 15px 20px 0;
    padding: 13px 16px;
    border-radius: 11px;
    border: 1px solid;
}

.reset-result .result-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    font-weight: 900;
}

.reset-result strong {
    display: block;
    font-size: 13px;
}

.reset-result span {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    color: #91a5b8;
}

.reset-success {
    background: rgba(32,110,69,.13);
    border-color: #286d49;
}

.reset-success .result-icon {
    background: #174d35;
    color: #65e59c;
}

.reset-success strong {
    color: #7df0ac;
}

.reset-error {
    background: rgba(130,45,52,.13);
    border-color: #71383f;
}

.reset-error .result-icon {
    background: #54272c;
    color: #ff8e98;
}

.reset-error strong {
    color: #ff9ba4;
}

.users-empty {
    text-align: center;
    padding: 60px 20px;
    border: 1px dashed #2b4055;
    border-radius: 12px;
    background: #0d1927;
}

.empty-icon {
    font-size: 34px;
    opacity: .45;
}

.empty-title {
    margin-top: 10px;
    font-size: 16px;
    font-weight: 800;
}

.empty-subtitle {
    margin-top: 6px;
    color: #71879d;
    font-size: 12px;
}

.user-error {
    margin: 25px;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #69363d;
    background: #24151a;
    color: #ffabb3;
}

@media (max-width: 900px) {

    .sso-user-row {
        grid-template-columns: 34px 42px 1fr;
    }

    .sso-source {
        display: none;
    }

    .reset-password-btn {
        grid-column: 3;
        justify-self: start;
    }
}

@media (max-width: 620px) {

    .user-summary {
        grid-template-columns: 1fr;
    }

    .user-modal-head,
    .user-toolbar,
    .user-modal-footer {
        padding-left: 17px;
        padding-right: 17px;
    }

    .users-list {
        padding-left: 10px;
        padding-right: 10px;
    }

    .sso-user-row {
        grid-template-columns: 32px 40px 1fr;
    }

    .sso-user-name {
        font-size: 14px;
    }

    .reset-password-btn {
        grid-column: 1 / -1;
        width: 100%;
    }

    .user-modal-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}



/* ============================================================
   KSLAB USERS / SSO PREMIUM UI
   ============================================================ */

.users-page {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
}

.users-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 30px;
    margin-bottom: 22px;
    border: 1px solid #24425d;
    border-radius: 18px;
    background:
        linear-gradient(
            135deg,
            rgba(17, 43, 67, .95),
            rgba(8, 22, 37, .98)
        );
    box-shadow:
        0 18px 45px rgba(0,0,0,.22);
}

.users-hero h1 {
    margin: 5px 0 8px;
    font-size: 27px;
    letter-spacing: -.3px;
}

.users-hero p {
    margin: 0;
    max-width: 780px;
    color: #91a9c0;
    font-size: 14px;
    line-height: 1.6;
}

.eyebrow {
    color: #62a8d6;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.6px;
}

.users-hero-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: #102b43;
    border: 1px solid #2b5878;
    font-size: 34px;
    flex: 0 0 auto;
}

.users-vcenter {
    margin-bottom: 22px;
    border: 1px solid #223b52;
    border-radius: 17px;
    overflow: hidden;
    background: #091725;
    box-shadow:
        0 12px 32px rgba(0,0,0,.17);
}

.users-vcenter-head {
    min-height: 78px;
    padding: 17px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background:
        linear-gradient(
            90deg,
            #0e2438,
            #0a1b2b
        );
    border-bottom: 1px solid #27435b;
}

.users-vcenter-info {
    display: flex;
    align-items: center;
    gap: 13px;
}

.vcenter-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #58d79b;
    box-shadow:
        0 0 0 5px rgba(88,215,155,.09),
        0 0 15px rgba(88,215,155,.35);
}

.users-vcenter-title {
    font-size: 17px;
    font-weight: 750;
    color: #eef6ff;
}

.users-vcenter-sub {
    margin-top: 5px;
    color: #7f98b0;
    font-size: 12px;
}

.users-vcenter-sub strong {
    color: #a7bdd1;
}

.separator-dot {
    margin: 0 7px;
    color: #45627c;
}

.users-vcenter-count {
    min-width: 80px;
    text-align: right;
}

.user-count-number {
    display: block;
    color: #dcecff;
    font-size: 25px;
    font-weight: 800;
    line-height: 1;
}

.user-count-label {
    display: block;
    margin-top: 5px;
    color: #718aa1;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.users-list {
    width: 100%;
}

.user-row {
    min-height: 79px;
    padding: 13px 17px;
    display: grid;
    grid-template-columns:
        minmax(270px, 1fr)
        190px
        175px;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid #20364b;
    transition:
        background .16s ease,
        transform .16s ease,
        border-color .16s ease;
}

/* Zebra */
.user-row:nth-child(odd) {
    background: #0b1d2d;
}

.user-row:nth-child(even) {
    background: #0e2436;
}

.user-row:last-child {
    border-bottom: 0;
}

.user-row:hover {
    background: #14314a;
    border-bottom-color: #35617e;
}

.user-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 13px;
}

.user-avatar {
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid #315b79;
    background: #102a41;
    color: #a9d4f0;
    font-size: 16px;
    font-weight: 800;
}

.user-identity {
    min-width: 0;
}

.user-name {
    color: #f0f7ff;
    font-size: 15px;
    font-weight: 750;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-upn {
    margin-top: 4px;
    color: #7f9bb3;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.user-source,
.user-domain {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 7px;
    border: 1px solid #294963;
    background: #0c2134;
    color: #91b0c9;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .5px;
}

.user-domain {
    color: #7798b3;
}

.reset-password-btn {
    min-height: 42px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #9a4d55;
    border-radius: 9px;
    background:
        linear-gradient(
            180deg,
            #4d252c,
            #371b20
        );
    color: #ffdce0;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .5px;
    cursor: pointer;
    box-shadow:
        0 5px 14px rgba(0,0,0,.16);
    transition:
        background .15s ease,
        border-color .15s ease,
        transform .15s ease,
        box-shadow .15s ease;
}

.reset-password-btn:hover {
    background:
        linear-gradient(
            180deg,
            #683038,
            #4a2229
        );
    border-color: #d26b75;
    box-shadow:
        0 7px 18px rgba(0,0,0,.25);
    transform: translateY(-1px);
}

.reset-password-btn:active {
    transform: translateY(0);
}

.reset-password-btn:disabled {
    opacity: .65;
    cursor: wait;
    transform: none;
}

.reset-icon {
    font-size: 18px;
    line-height: 1;
}

.resetting {
    color: #ffe6c4;
    border-color: #8d7045;
    background: #352c20;
}

.reset-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: reset-spin .7s linear infinite;
}

@keyframes reset-spin {
    to {
        transform: rotate(360deg);
    }
}

.users-empty {
    min-height: 120px;
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #8ca5bb;
}

.users-empty-icon {
    font-size: 28px;
    color: #55728a;
}

.users-empty strong,
.users-empty span {
    display: block;
}

.users-empty strong {
    color: #c8d8e7;
    font-size: 14px;
}

.users-empty span {
    margin-top: 5px;
    color: #708aa2;
    font-size: 12px;
}

.users-loading {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #88a1b8;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #27445c;
    border-top-color: #6baad1;
    border-radius: 50%;
    animation: reset-spin .7s linear infinite;
}

.users-error {
    margin: 18px;
    padding: 17px 19px;
    border: 1px solid #63363e;
    border-radius: 11px;
    background: #29191e;
    color: #f0aab1;
    font-size: 13px;
}

/* ============================================================
   RESET RESULT MODAL
   ============================================================ */

.reset-result-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(5px);
}

.reset-result-card {
    position: relative;
    width: min(510px, 94vw);
    padding: 32px;
    border-radius: 18px;
    border: 1px solid #2a455d;
    background:
        linear-gradient(
            145deg,
            #0c1d2d,
            #081522
        );
    box-shadow:
        0 30px 80px rgba(0,0,0,.48);
    text-align: center;
}

.reset-result-success {
    border-color: #2f7058;
}

.reset-result-error {
    border-color: #73434a;
}

.reset-result-close {
    position: absolute;
    right: 13px;
    top: 10px;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #718ba2;
    font-size: 26px;
    cursor: pointer;
}

.reset-result-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 17px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    font-size: 28px;
    font-weight: 900;
}

.reset-result-success .reset-result-icon {
    background: #123729;
    border: 1px solid #32745a;
    color: #70dfa9;
}

.reset-result-error .reset-result-icon {
    background: #351c22;
    border: 1px solid #75414a;
    color: #f08d99;
}

.reset-result-title {
    font-size: 16px;
    font-weight: 850;
    letter-spacing: .8px;
    color: #edf6ff;
}

.reset-result-user {
    margin-top: 13px;
    color: #c7dced;
    font-size: 14px;
    font-weight: 750;
}

.reset-result-vcenter {
    margin-top: 5px;
    color: #7794ad;
    font-size: 12px;
}

.reset-result-message {
    margin-top: 19px;
    padding: 13px;
    border-radius: 10px;
    background: #0d2234;
    border: 1px solid #223e56;
    color: #a8bfd2;
    font-size: 13px;
    line-height: 1.5;
}

.reset-result-note {
    margin-top: 12px;
    color: #7591a9;
    font-size: 11px;
    line-height: 1.5;
}

.reset-result-ok {
    margin-top: 22px;
    min-width: 130px;
    min-height: 40px;
    border: 1px solid #355b76;
    border-radius: 8px;
    background: #112c43;
    color: #cfe5f5;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.reset-result-ok:hover {
    background: #173952;
    border-color: #4c7795;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1000px) {

    .user-row {
        grid-template-columns:
            minmax(220px, 1fr)
            140px
            160px;
        gap: 10px;
    }

    .user-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 760px) {

    .users-hero {
        padding: 22px;
    }

    .users-hero-icon {
        display: none;
    }

    .users-vcenter-head {
        padding: 15px;
    }

    .user-row {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
    }

    .user-meta {
        flex-direction: row;
    }

    .reset-password-btn {
        width: 100%;
    }
}


/* ===== FIXED SIDEBAR / SCROLLING CONTENT ===== */
html,
body {
    height: 100%;
    overflow: hidden;
}

.app {
    height: 100vh;
    min-height: 100vh;
}

.app > aside {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 250px;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
}

.app > main {
    margin-left: 250px;
    height: 100vh;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Power state */
.power-on {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #16a34a;
    background: rgba(22,163,74,.12);
    border: 1px solid rgba(22,163,74,.30);
}

.power-off {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #dc2626;
    background: rgba(220,38,38,.12);
    border: 1px solid rgba(220,38,38,.30);
}

/* Storage access */
.storage-access {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
}

.storage-access .storage-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.storage-access .storage-button {
    white-space: nowrap;
}

/* ============================================================
   KSLAB - FIXED SIDEBAR / RIGHT CONTENT SCROLL
   ============================================================ */

html,
body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

.layout {
    display: flex;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
}

/* SOL MENU SABIT */
.layout > .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;

    width: 250px;
    height: 100vh;

    flex: 0 0 250px;

    overflow-y: auto;
    overflow-x: hidden;

    z-index: 1000;
}

/* SADECE SAG I?ERIK SCROLL */
.layout > main {
    margin-left: 250px;

    width: calc(100% - 250px);
    height: 100vh;
    min-height: 100vh;

    min-width: 0;

    overflow-y: auto;
    overflow-x: hidden;
}

/* HEADER SAG PANEL I?INDE SABIT */
.layout > main > header {
    position: sticky;
    top: 0;
    z-index: 50;
}

/* DAR EKRAN */
@media (max-width: 1000px) {
    .layout > .sidebar {
        width: 205px;
        flex-basis: 205px;
    }

    .layout > main {
        margin-left: 205px;
        width: calc(100% - 205px);
    }
}

/* BLADE ROLE BADGES */

.blade-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 105px;
    padding: 5px 10px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .25px;
    color: #fff;
    border: 1px solid rgba(255,255,255,.18);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,.25),
        inset 0 -2px 4px rgba(0,0,0,.20),
        0 2px 6px rgba(0,0,0,.25);
}

.blade-role-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 900;
    color: #fff;
    background: rgba(255,255,255,.18);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,.3),
        0 1px 2px rgba(0,0,0,.25);
}

.blade-role-esxi {
    background: linear-gradient(180deg,#1689e8 0%,#075ca9 100%);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,.3),
        0 0 8px rgba(25,145,255,.35),
        0 2px 6px rgba(0,0,0,.3);
}

.blade-role-proxmox {
    background: linear-gradient(180deg,#ff8b3d 0%,#d94b0b 100%);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,.3),
        0 0 8px rgba(255,110,40,.35),
        0 2px 6px rgba(0,0,0,.3);
}

.blade-role-off {
    background: linear-gradient(180deg,#ff555f 0%,#b81727 100%);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,.3),
        0 0 8px rgba(255,45,60,.4),
        0 2px 6px rgba(0,0,0,.3);
}

.blade-role-eve {
    background: linear-gradient(180deg,#8b63ff 0%,#5431b4 100%);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,.3),
        0 0 8px rgba(130,90,255,.35),
        0 2px 6px rgba(0,0,0,.3);
}

.blade-role-fault {
    background: linear-gradient(180deg,#ff4d4d 0%,#8f101d 100%);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,.3),
        0 0 8px rgba(255,35,50,.45),
        0 2px 6px rgba(0,0,0,.3);
}

/* =========================================================
   OVERVIEW DASHBOARD
   ========================================================= */

.overview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding: 4px 2px 2px;
}

.overview-kicker {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.6px;
    color: #6f8aa3;
    margin-bottom: 5px;
}

.overview-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: .2px;
}

.overview-description {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
}

.overview-live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #1d5c48;
    border-radius: 999px;
    background: #09231d;
    color: #68e0b0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .8px;
}

.overview-live-dot,
.overview-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    background: #39d98a;
    box-shadow: 0 0 10px rgba(57,217,138,.8);
}

.overview-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.overview-card {
    position: relative;
    min-height: 128px;
    padding: 15px 16px 13px;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    transition:
        transform .16s ease,
        border-color .16s ease,
        box-shadow .16s ease,
        background .16s ease;
}

.overview-card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    opacity: .65;
    background: currentColor;
}

.overview-card:hover {
    transform: translateY(-3px);
    border-color: #4b7598;
    background: #101f30;
    box-shadow:
        0 10px 25px rgba(0,0,0,.28),
        0 0 18px rgba(70,150,210,.12);
}

.overview-card:focus-visible {
    outline: 2px solid #61b8ff;
    outline-offset: 2px;
}

.overview-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.overview-open {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .7px;
    color: #6e9cbd;
    opacity: .9;
    white-space: nowrap;
}

.overview-card:hover .overview-open {
    color: #8bd0ff;
}

.overview-click-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 11px;
    font-size: 10px;
    color: #60778d;
    opacity: .9;
}

.overview-card:hover .overview-click-hint {
    color: #8ba8bd;
}

.overview-card .metric {
    font-size: 28px;
    line-height: 1;
    margin-top: 10px;
}

.overview-card-green {
    color: #55d99b;
}

.overview-card-red {
    color: #ff6678;
}

.overview-card-yellow {
    color: #f1c75b;
}

.overview-card-blue {
    color: #63baff;
}

.overview-card-orange {
    color: #f29a50;
}

.overview-card-gray {
    color: #8998a8;
}

.overview-status-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.overview-status-item {
    padding: 11px 13px;
    background: #0c1724;
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.overview-status-label {
    color: #7f98ad;
    font-size: 11px;
    font-weight: 700;
}

.overview-status-item strong {
    font-size: 16px;
}

.overview-status-muted {
    color: #64798d;
    font-size: 10px;
}

.overview-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .4px;
}

.overview-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-green {
    color: #55d99b;
    background: rgba(45,180,120,.10);
    border: 1px solid rgba(85,217,155,.25);
}

.status-red {
    color: #ff6678;
    background: rgba(255,80,100,.10);
    border: 1px solid rgba(255,102,120,.25);
}

.status-gray {
    color: #8998a8;
    background: rgba(130,145,160,.08);
    border: 1px solid rgba(130,145,160,.20);
}

.overview-health-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.overview-health-card {
    padding: 15px;
    border-radius: 9px;
    background: #0b1726;
    border: 1px solid var(--border);
    border-left-width: 3px;
}

.health-green {
    border-left-color: #55d99b;
}

.health-yellow {
    border-left-color: #f1c75b;
}

.health-red {
    border-left-color: #ff6678;
}

.health-gray {
    border-left-color: #8998a8;
}

.overview-health-title {
    color: #8097aa;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .7px;
}

.overview-health-value {
    margin-top: 7px;
    font-size: 22px;
    font-weight: 800;
}

.overview-health-sub {
    margin-top: 5px;
    color: #60768a;
    font-size: 11px;
    line-height: 1.4;
}

.overview-source-info {
    margin-top: 14px;
}

@media (max-width: 1200px) {
    .overview-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .overview-status-strip,
    .overview-health-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .overview-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .overview-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .overview-kpi-grid,
    .overview-status-strip,
    .overview-health-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== OVERVIEW ESXi MODAL ===== */

.overview-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(2, 8, 18, 0.78);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity .16s ease;
}

.overview-modal-backdrop.overview-modal-visible {
    opacity: 1;
}

.overview-modal {
    width: min(1100px, 94vw);
    max-height: 82vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, #0c1828, #07111e);
    border: 1px solid #2d5578;
    border-radius: 16px;
    box-shadow:
        0 30px 90px rgba(0,0,0,.65),
        0 0 35px rgba(45,120,190,.18);
    transform: translateY(12px) scale(.98);
    transition: transform .16s ease;
}

.overview-modal-visible .overview-modal {
    transform: translateY(0) scale(1);
}

.overview-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 26px 18px;
    border-bottom: 1px solid var(--border);
}

.overview-modal-kicker {
    font-size: 11px;
    letter-spacing: 1.5px;
    color: #67b7ff;
    font-weight: 700;
}

.overview-modal h2 {
    margin: 5px 0 4px;
    font-size: 25px;
}

.overview-modal-subtitle {
    color: var(--muted);
    font-size: 13px;
}

.overview-modal-close {
    width: 38px;
    height: 38px;
    border: 1px solid #31516c;
    border-radius: 9px;
    background: #0b1725;
    color: #bcd3e7;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.overview-modal-close:hover {
    background: #14283c;
    color: #fff;
    border-color: #5e9bc8;
}

.overview-modal-summary {
    display: flex;
    gap: 12px;
    padding: 16px 26px;
}

.overview-modal-stat {
    min-width: 130px;
    padding: 11px 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(12, 28, 45, .72);
}

.overview-modal-stat span {
    display: block;
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 1px;
}

.overview-modal-stat strong {
    display: block;
    margin-top: 3px;
    font-size: 21px;
}

.overview-modal-table {
    overflow: auto;
    padding: 0 26px 18px;
}

.overview-modal-table .table-wrap {
    margin: 0;
}

.overview-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 15px 26px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
}

.overview-modal-action {
    border: 1px solid #315f84;
    border-radius: 8px;
    padding: 9px 13px;
    background: #0d2134;
    color: #9fd3ff;
    cursor: pointer;
    font-weight: 600;
}

.overview-modal-action:hover {
    background: #15324c;
    border-color: #5c9fd0;
    color: #fff;
}

@media (max-width: 700px) {
    .overview-modal-backdrop {
        padding: 12px;
    }

    .overview-modal {
        width: 98vw;
        max-height: 90vh;
    }

    .overview-modal-header {
        padding: 18px;
    }

    .overview-modal-summary,
    .overview-modal-table {
        padding-left: 18px;
        padding-right: 18px;
    }

    .overview-modal-footer {
        padding: 13px 18px;
        flex-direction: column;
        align-items: stretch;
    }

    .overview-modal-action {
        width: 100%;
    }
}
/* ===== OVERVIEW ESXi MODAL ===== */

.overview-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(2, 8, 18, 0.78);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity .16s ease;
}

.overview-modal-backdrop.overview-modal-visible {
    opacity: 1;
}

.overview-modal {
    width: min(1100px, 94vw);
    max-height: 82vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, #0c1828, #07111e);
    border: 1px solid #2d5578;
    border-radius: 16px;
    box-shadow:
        0 30px 90px rgba(0,0,0,.65),
        0 0 35px rgba(45,120,190,.18);
    transform: translateY(12px) scale(.98);
    transition: transform .16s ease;
}

.overview-modal-visible .overview-modal {
    transform: translateY(0) scale(1);
}

.overview-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 26px 18px;
    border-bottom: 1px solid var(--border);
}

.overview-modal-kicker {
    font-size: 11px;
    letter-spacing: 1.5px;
    color: #67b7ff;
    font-weight: 700;
}

.overview-modal h2 {
    margin: 5px 0 4px;
    font-size: 25px;
}

.overview-modal-subtitle {
    color: var(--muted);
    font-size: 13px;
}

.overview-modal-close {
    width: 38px;
    height: 38px;
    border: 1px solid #31516c;
    border-radius: 9px;
    background: #0b1725;
    color: #bcd3e7;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.overview-modal-close:hover {
    background: #14283c;
    color: #fff;
    border-color: #5e9bc8;
}

.overview-modal-summary {
    display: flex;
    gap: 12px;
    padding: 16px 26px;
}

.overview-modal-stat {
    min-width: 130px;
    padding: 11px 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(12, 28, 45, .72);
}

.overview-modal-stat span {
    display: block;
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 1px;
}

.overview-modal-stat strong {
    display: block;
    margin-top: 3px;
    font-size: 21px;
}

.overview-modal-table {
    overflow: auto;
    padding: 0 26px 18px;
}

.overview-modal-table .table-wrap {
    margin: 0;
}

.overview-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 15px 26px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
}

.overview-modal-action {
    border: 1px solid #315f84;
    border-radius: 8px;
    padding: 9px 13px;
    background: #0d2134;
    color: #9fd3ff;
    cursor: pointer;
    font-weight: 600;
}

.overview-modal-action:hover {
    background: #15324c;
    border-color: #5c9fd0;
    color: #fff;
}

@media (max-width: 700px) {
    .overview-modal-backdrop {
        padding: 12px;
    }

    .overview-modal {
        width: 98vw;
        max-height: 90vh;
    }

    .overview-modal-header {
        padding: 18px;
    }

    .overview-modal-summary,
    .overview-modal-table {
        padding-left: 18px;
        padding-right: 18px;
    }

    .overview-modal-footer {
        padding: 13px 18px;
        flex-direction: column;
        align-items: stretch;
    }

    .overview-modal-action {
        width: 100%;
    }
}
/* ===== OVERVIEW MODAL CLOSE ICON ===== */

.overview-modal-close {
    position: relative;
    font-size: 0 !important;
}

.overview-modal-close::before,
.overview-modal-close::after {
    content: "";
    position: absolute;
    left: 10px;
    top: 18px;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.overview-modal-close::before {
    transform: rotate(45deg);
}

.overview-modal-close::after {
    transform: rotate(-45deg);
}

.overview-modal-close:hover::before,
.overview-modal-close:hover::after {
    background: #ffffff;
}