:root {
--sidebar-width: 256px;
    --sidebar-background-start: #123762;
    --sidebar-background-end: #0c2f56;
    --sidebar-text: #dce8f7;
    --sidebar-muted: #a9bdd4;
    --sidebar-active-start: #1762ad;
    --sidebar-active-end: #205fa2;
    --page-background: #f4f7fb;
    --surface: #ffffff;
    --border: #e5eaf1;
    --heading: #172337;
    --text: #344054;
    --muted: #667085;
    --primary: #1c67b2;
    --success: #12b76a;
    --danger: #f04438;
}

html {
font-size: 14px;
}

* {
box-sizing: border-box;
}

body {
margin: 0;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    background: var(--page-background);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
font-family: inherit;
}

.auth-page {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: radial-gradient( circle at top right, rgba(37, 99, 235, 0.08), transparent 35% ), #f5f7fb;
}

.auth-card {
    width: 100%;
    max-width: 470px;
    padding: 38px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.auth-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.login-brand-logo {
    position: relative;
    width: 60px;
    height: 56px;
    flex: 0 0 60px;
}

.login-brand-monitor {
    position: relative;
    width: 54px;
    height: 40px;
    overflow: hidden;
    border: 3px solid #123762;
    border-radius: 5px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(28, 103, 178, 0.08), 0 5px 14px rgba(18, 55, 98, 0.10);
}

    .login-brand-monitor::after {
        position: absolute;
        right: 6px;
        bottom: 6px;
        left: 6px;
        height: 1px;
        content: "";
        background: rgba(18, 55, 98, 0.14);
    }

.login-brand-monitor-stand {
    position: absolute;
    bottom: 3px;
    left: 19px;
    width: 20px;
    height: 12px;
    border-bottom: 3px solid #123762;
    border-radius: 1px;
}

    .login-brand-monitor-stand::before {
        position: absolute;
        top: -6px;
        left: 9px;
        width: 3px;
        height: 9px;
        content: "";
        background: #123762;
    }

.login-chart-bar {
    position: absolute;
    bottom: 8px;
    width: 6px;
    border-radius: 2px 2px 0 0;
    background: linear-gradient( 180deg, #48b8f5 0%, #1c67b2 100% );
}

.login-chart-bar-one {
    left: 9px;
    height: 11px;
}

.login-chart-bar-two {
    left: 19px;
    height: 20px;
}

.login-chart-bar-three {
    left: 29px;
    height: 15px;
}

.login-chart-bar-four {
    left: 39px;
    height: 25px;
}

.login-brand-text {
    text-align: left;
}

.login-brand-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
    color: #123762;
    letter-spacing: -0.5px;
}

.login-brand-subtitle {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #718096;
}

@media (max-width: 480px) {
    .login-brand {
        gap: 11px;
    }

    .login-brand-logo {
        transform: scale(0.9);
        transform-origin: center;
    }

    .login-brand-title {
        font-size: 20px;
    }

    .login-brand-subtitle {
        font-size: 11px;
    }
}


.auth-heading {
    text-align: center;
    margin-bottom: 28px;
}

    .auth-heading h1 {
        margin-bottom: 8px;
        font-size: 30px;
        font-weight: 700;
        color: #172033;
    }

    .auth-heading p {
        margin: 0;
        color: #6b7280;
    }

.auth-card .form-control {
    min-height: 57px;
    border-radius: 10px;
}

    .auth-card .form-control:focus {
        border-color: #2878bd;
        box-shadow: 0 0 0 0.2rem rgba(40, 120, 189, 0.15);
    }

.auth-submit {
    min-height: 50px;
    border: 0;
    border-radius: 10px;
    font-weight: 600;
    background: linear-gradient( 135deg, #0f5fa8, #2176d2 );
}

    .auth-submit:hover {
        background: linear-gradient( 135deg, #0b4f8e, #1c65b5 );
    }

.auth-link {
    color: #1469b8;
    text-decoration: none;
    font-weight: 500;
}

    .auth-link:hover {
        color: #0f4f8c;
        text-decoration: underline;
    }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 26px 0 18px;
    color: #8a94a6;
    font-size: 13px;
}

    .auth-divider::before,
    .auth-divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background: #e5e7eb;
    }

.auth-footer {
    margin-top: 28px;
    padding-top: 20px;
    text-align: center;
    border-top: 1px solid #eef1f5;
    color: #9ca3af;
    font-size: 12px;
}

@media (max-width: 576px) {
    .auth-page {
        padding: 20px 14px;
    }

    .auth-card {
        padding: 28px 22px;
        border-radius: 14px;
    }

    .auth-heading h1 {
        font-size: 26px;
    }
}
.authenticator-step {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 24px 0;
    border-bottom: 1px solid #e8edf3;
}

    .authenticator-step:last-child {
        border-bottom: 0;
    }

.authenticator-step-number {
    display: flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    background: #1c67b2;
    border-radius: 50%;
}

.authenticator-qr-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 210px;
    min-height: 210px;
    padding: 16px;
    margin-top: 10px;
    background: #ffffff;
    border: 1px solid #dfe6ee;
    border-radius: 12px;
}

    .authenticator-qr-wrapper canvas,
    .authenticator-qr-wrapper img {
        display: block;
        max-width: 180px;
        height: auto;
    }

.authenticator-key {
    display: inline-block;
    padding: 10px 14px;
    font-family: Consolas, monospace;
    font-size: 14px;
    font-weight: 600;
    color: #123762;
    letter-spacing: 1px;
    word-break: break-all;
    background: #f4f7fb;
    border: 1px solid #dce4ed;
    border-radius: 8px;
}
.auth-card-wide {
    max-width: 620px;
}

.security-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    margin-bottom: 10px;
    color: #17466f;
    background: #edf6ff;
    border: 1px solid #cfe5f8;
    border-radius: 12px;
}

.security-notice-icon {
    display: flex;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #1c67b2;
    border-radius: 10px;
}

    .security-notice-icon svg {
        width: 20px;
        height: 20px;
    }

.security-notice strong {
    display: block;
    margin-bottom: 3px;
    font-size: 14px;
}

.security-notice p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #54718b;
}

.setup-step {
    display: flex;
    align-items: flex-start;
    gap: 17px;
    padding: 23px 0;
    border-bottom: 1px solid #e8edf3;
}

.setup-step-last {
    border-bottom: 0;
}

.setup-step-number {
    display: flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient( 135deg, #1e6db5, #164d82 );
    border-radius: 50%;
}

.setup-step-content {
    width: 100%;
    min-width: 0;
}

    .setup-step-content h2 {
        margin: 4px 0 6px;
        font-size: 17px;
        font-weight: 700;
        color: #172337;
    }

    .setup-step-content p {
        margin: 0 0 15px;
        font-size: 13px;
        line-height: 1.6;
        color: #667085;
    }

.authenticator-qr-wrapper {
    display: flex;
    width: 216px;
    min-height: 216px;
    align-items: center;
    justify-content: center;
    padding: 17px;
    margin: 13px auto 17px;
    background: #ffffff;
    border: 1px solid #dfe6ee;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(18, 55, 98, 0.07);
}

    .authenticator-qr-wrapper img,
    .authenticator-qr-wrapper canvas {
        display: block;
        width: 180px !important;
        height: 180px !important;
    }

.manual-key-section {
    padding: 14px;
    text-align: center;
    background: #f7f9fc;
    border: 1px solid #e4eaf1;
    border-radius: 10px;
}

    .manual-key-section > span {
        display: block;
        margin-bottom: 9px;
        font-size: 12px;
        color: #667085;
    }

.authenticator-key {
    display: inline-block;
    padding: 8px 12px;
    font-family: Consolas, monospace;
    font-size: 13px;
    font-weight: 600;
    color: #123762;
    letter-spacing: 1px;
    word-break: break-all;
    background: #ffffff;
    border: 1px solid #dce4ed;
    border-radius: 7px;
}

.verification-code-input {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 5px;
}

.button-icon {
    width: 19px;
    height: 19px;
    margin-right: 7px;
    vertical-align: -4px;
}

@media (max-width: 576px) {
    .auth-card-wide {
        max-width: 100%;
    }

    .setup-step {
        gap: 12px;
    }

    .authenticator-qr-wrapper {
        width: 200px;
        min-height: 200px;
    }

        .authenticator-qr-wrapper img,
        .authenticator-qr-wrapper canvas {
            width: 168px !important;
            height: 168px !important;
        }
}
.onboarding-step-icon {
    display: flex;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #1e6db5, #164d82);
    border-radius: 12px;
}

    .onboarding-step-icon svg {
        width: 21px;
        height: 21px;
    }

.installation-key-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #f7f9fc;
    border: 1px solid #dfe6ee;
    border-radius: 12px;
}

.installation-key-value {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    font-family: Consolas, monospace;
    font-size: 18px;
    font-weight: 700;
    color: #174f82;
    letter-spacing: 1px;
}

.installation-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #e4eaf1;
    border-radius: 10px;
}

    .installation-detail span {
        font-size: 12px;
        color: #7a899b;
    }

    .installation-detail strong {
        font-size: 14px;
        color: #24364b;
    }

.installation-instruction {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 18px;
}

    .installation-instruction:last-child {
        margin-bottom: 0;
    }

    .installation-instruction > span {
        display: flex;
        width: 30px;
        height: 30px;
        flex: 0 0 30px;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        font-weight: 700;
        color: #ffffff;
        background: #1e6db5;
        border-radius: 50%;
    }

    .installation-instruction strong {
        display: block;
        margin-bottom: 3px;
        font-size: 14px;
        color: #24364b;
    }

    .installation-instruction p {
        margin: 0;
        font-size: 13px;
        color: #667085;
    }

.empty-agent-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 16px;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed #cfd9e5;
    border-radius: 12px;
}

    .empty-agent-state svg {
        width: 34px;
        height: 34px;
        margin-bottom: 12px;
        color: #7890a8;
    }

    .empty-agent-state strong {
        color: #24364b;
    }

    .empty-agent-state span {
        margin-top: 4px;
        font-size: 13px;
        color: #7a899b;
    }

.detected-agent-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e4eaf1;
    border-radius: 10px;
}

.detected-agent-icon {
    display: flex;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    color: #1e6db5;
    background: #eaf3fb;
    border-radius: 9px;
}

    .detected-agent-icon svg {
        width: 18px;
        height: 18px;
    }

.detected-agent-row strong,
.detected-agent-row span {
    display: block;
}

.detected-agent-row strong {
    font-size: 13px;
    color: #24364b;
}

.detected-agent-row .flex-grow-1 > span {
    margin-top: 2px;
    font-size: 12px;
    color: #7a899b;
}

.min-width-0 {
    min-width: 0;
}

@media (max-width: 576px) {
    .installation-key-box {
        align-items: stretch;
        flex-direction: column;
    }
}
/* =========================================================
   Resumable onboarding
   ========================================================= */

.onboarding-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
    padding: 16px 18px;
    background: #ffffff;
    border: 1px solid #dce7f1;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(28, 51, 84, 0.06);
}

.onboarding-banner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    color: #1e6db5;
    background: #eaf4ff;
    border-radius: 11px;
}

    .onboarding-banner-icon svg {
        width: 21px;
        height: 21px;
    }

.onboarding-banner-content {
    flex: 1;
    min-width: 0;
}

.onboarding-banner-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

    .onboarding-banner-heading strong {
        color: #172337;
        font-size: 15px;
    }

    .onboarding-banner-heading span {
        color: #667085;
        font-size: 12px;
        white-space: nowrap;
    }

.onboarding-banner-text {
    margin-bottom: 10px;
    color: #667085;
    font-size: 13px;
}

.onboarding-progress-track {
    width: 100%;
    height: 7px;
    overflow: hidden;
    background: #e8edf3;
    border-radius: 999px;
}

.onboarding-progress-value {
    height: 100%;
    background: linear-gradient( 90deg, #1e6db5, #4d9bdd );
    border-radius: 999px;
    transition: width 0.25s ease;
}

.onboarding-banner-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    padding: 10px 15px;
    color: #ffffff;
    background: #1e6db5;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

    .onboarding-banner-button:hover {
        color: #ffffff;
        background: #185d9b;
    }

    .onboarding-banner-button svg {
        width: 16px;
        height: 16px;
    }

/* Modal */

.onboarding-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(19, 33, 51, 0.46);
    backdrop-filter: blur(3px);
}

.onboarding-modal {
    width: 100%;
    max-width: 500px;
    padding: 30px;
    background: #ffffff;
    border: 1px solid #e1e8ef;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(20, 38, 61, 0.22);
}

.onboarding-modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 18px;
    color: #1e6db5;
    background: #eaf4ff;
    border-radius: 14px;
}

    .onboarding-modal-icon svg {
        width: 25px;
        height: 25px;
    }

.onboarding-modal h2 {
    margin: 0 0 10px;
    color: #172337;
    font-size: 23px;
    line-height: 1.3;
}

.onboarding-modal > p {
    margin: 0;
    color: #667085;
    font-size: 14px;
    line-height: 1.65;
}

.onboarding-modal-progress {
    margin-top: 24px;
    padding: 18px;
    background: #f7f9fc;
    border: 1px solid #e4eaf1;
    border-radius: 12px;
}

.onboarding-modal-progress-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #526174;
    font-size: 13px;
}

    .onboarding-modal-progress-heading strong {
        color: #174f82;
    }

.onboarding-modal-next-step {
    margin-top: 10px;
    color: #667085;
    font-size: 12px;
}

.onboarding-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

    .onboarding-modal-actions form {
        margin: 0;
    }

.onboarding-primary-button,
.onboarding-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.onboarding-primary-button {
    color: #ffffff;
    background: #1e6db5;
    border: 1px solid #1e6db5;
}

    .onboarding-primary-button:hover {
        color: #ffffff;
        background: #185d9b;
    }

    .onboarding-primary-button svg {
        width: 16px;
        height: 16px;
    }

.onboarding-secondary-button {
    color: #344054;
    background: #ffffff;
    border: 1px solid #d0d5dd;
}

    .onboarding-secondary-button:hover {
        background: #f8fafc;
    }

@media (max-width: 720px) {
    .onboarding-banner {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .onboarding-banner-content {
        flex-basis: calc(100% - 60px);
    }

    .onboarding-banner-button {
        width: 100%;
    }

    .onboarding-banner-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .onboarding-modal {
        padding: 24px 20px;
    }

    .onboarding-modal-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

        .onboarding-modal-actions form,
        .onboarding-primary-button,
        .onboarding-secondary-button {
            width: 100%;
        }
}
.dashboard-finish-setup-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 10px 15px;
    color: #1e6db5;
    background: #ffffff;
    border: 1px solid #cfe0ef;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

    .dashboard-finish-setup-button:hover {
        color: #185d9b;
        background: #f6faff;
    }

    .dashboard-finish-setup-button svg {
        width: 16px;
        height: 16px;
    }
.onboarding-user-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    color: #1e6db5;
    background: #edf6ff;
    border-radius: 10px;
}

/* Shared Portal table behaviour: consistent sortable headings and paging. */
.portal-standard-grid .portal-sortable-column {
    position: relative;
    padding-right: 28px;
    cursor: pointer;
    user-select: none;
}

.portal-standard-grid .portal-sortable-column::after {
    position: absolute;
    top: 50%;
    right: 10px;
    color: #98a2b3;
    font-size: 11px;
    line-height: 1;
    content: "\2195";
    transform: translateY(-50%);
}

.portal-standard-grid .portal-sortable-column[aria-sort="ascending"]::after {
    color: #175cd3;
    content: "\2191";
}

.portal-standard-grid .portal-sortable-column[aria-sort="descending"]::after {
    color: #175cd3;
    content: "\2193";
}

.portal-standard-grid .portal-sortable-column:focus-visible {
    outline: 2px solid #84adff;
    outline-offset: -2px;
}

.employee-connectivity-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 5px;
    color: #667085;
    font-size: 12px;
}

.employee-connectivity-legend span {
    white-space: nowrap;
}

.employee-sort-select {
    min-width: 155px;
}

.portal-grid-controls,
.portal-grid-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    color: #667085;
    background: #ffffff;
}

.portal-grid-controls {
    border-bottom: 1px solid #eaecf0;
}

.portal-grid-search {
    width: min(320px, 100%);
}

.portal-grid-pagination {
    border-top: 1px solid #eaecf0;
    font-size: 12px;
}

.portal-grid-page-actions {
    display: flex;
    gap: 8px;
}

@media (max-width: 600px) {
    .portal-grid-controls,
    .portal-grid-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-grid-search {
        width: 100%;
    }
}

    .onboarding-user-icon svg {
        width: 18px;
        height: 18px;
    }
