/* SyncVPN customer portal visual refresh. Kept versioned to bypass stale CDN CSS. */
:root {
    --portal-violet: #6553e7;
    --portal-violet-dark: #4432bd;
    --portal-navy: #111442;
    --portal-soft: #f6f7fc;
    --portal-border: #e7e8f2;
}

.portal-body {
    background:
        radial-gradient(circle at 92% 2%, rgba(114, 91, 242, .08), transparent 24rem),
        #f5f6fb;
}

.portal-sidebar {
    background:
        radial-gradient(circle at 20% 0, rgba(128, 106, 255, .3), transparent 15rem),
        linear-gradient(180deg, #10123e, #171852 58%, #10123e);
}

.portal-nav a {
    border: 1px solid transparent;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.portal-nav a:hover {
    border-color: rgba(255, 255, 255, .08);
    transform: translateX(-2px);
}

.portal-nav a.active {
    background: linear-gradient(90deg, rgba(128, 106, 255, .25), rgba(255, 255, 255, .06));
    border-color: rgba(151, 134, 255, .2);
}

.portal-topbar {
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(229, 231, 241, .85);
    border-radius: 18px;
    box-shadow: 0 12px 35px rgba(26, 29, 69, .05);
    padding: 15px 18px;
    position: sticky;
    top: 12px;
    z-index: 12;
    backdrop-filter: blur(16px);
}

.panel-card,
.stat-card,
.resource-card {
    box-shadow: 0 14px 40px rgba(25, 28, 68, .055);
}

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

.profile-hero {
    align-items: center;
    background:
        radial-gradient(circle at 90% 0, rgba(122, 100, 244, .34), transparent 15rem),
        linear-gradient(135deg, #16194f, #312d8d 62%, #5c43d9);
    border-radius: 24px;
    box-shadow: 0 22px 50px rgba(42, 36, 122, .22);
    color: #fff;
    display: grid;
    gap: 16px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin-bottom: 22px;
    overflow: hidden;
    padding: 25px 28px;
    position: relative;
}

.profile-avatar {
    align-items: center;
    background: linear-gradient(145deg, rgba(255,255,255,.24), rgba(255,255,255,.1));
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 18px;
    box-shadow: inset 0 1px rgba(255,255,255,.24);
    display: flex;
    font-size: 25px;
    font-weight: 900;
    height: 58px;
    justify-content: center;
    width: 58px;
}

.profile-hero h2,
.profile-hero p {
    margin: 0;
}

.profile-hero h2 {
    font-size: 22px;
    margin-top: 4px;
}

.profile-hero p {
    color: #d4d5ec;
    font-size: 12px;
    margin-top: 5px;
    text-align: right;
}

.profile-hero .eyebrow {
    color: #bcb5ff;
}

.profile-security-pill {
    align-items: center;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    display: flex;
    gap: 10px;
    padding: 10px 13px;
}

.profile-security-pill i {
    background: #f5c04f;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(245, 192, 79, .13);
    height: 8px;
    width: 8px;
}

.profile-security-pill.is-secure i {
    background: #53dfb7;
    box-shadow: 0 0 0 5px rgba(83, 223, 183, .13);
}

.profile-security-pill small,
.profile-security-pill strong {
    display: block;
}

.profile-security-pill small {
    color: #c4c7e4;
    font-size: 9px;
}

.profile-security-pill strong {
    font-size: 11px;
    margin-top: 2px;
}

.profile-details-card,
.profile-page .two-factor-card {
    max-width: none;
}

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

.profile-details-card {
    border-color: var(--portal-border);
    border-radius: 22px;
    padding: 27px 28px;
}

.profile-save-state {
    background: #effbf7;
    border: 1px solid #d1eee4;
    border-radius: 999px;
    color: #23785e;
    font-size: 10px;
    font-weight: 700;
    padding: 7px 11px;
}

.profile-form input,
.profile-form textarea {
    background: #fafbfe;
    border-color: #e2e4ee;
    border-radius: 13px;
    transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.profile-form input:focus,
.profile-form textarea:focus {
    background: #fff;
}

.profile-divider {
    align-items: center;
    display: flex;
    gap: 13px;
}

.profile-divider-icon {
    align-items: center;
    background: #f0edff;
    border-radius: 12px;
    color: #6048df;
    display: flex;
    font-weight: 900;
    height: 38px;
    justify-content: center;
    letter-spacing: 2px;
    width: 38px;
}

.profile-form-footer {
    align-items: center;
    border-top: 1px solid #eceef4;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 20px;
}

.profile-form-footer > span {
    color: #8a90a3;
    font-size: 11px;
}

.profile-form-footer .profile-submit {
    margin-top: 0;
}

.profile-ajax-notice {
    animation: portalNoticeIn .25s ease;
    border-radius: 13px;
    box-shadow: 0 13px 35px rgba(26, 29, 69, .12);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
    padding: 14px 17px;
    position: sticky;
    top: 104px;
    z-index: 11;
}

.profile-ajax-notice.success {
    background: #eafbf5;
    border: 1px solid #cceee1;
    color: #17785a;
}

.profile-ajax-notice.error {
    background: #fff0f2;
    border: 1px solid #f5d1d8;
    color: #aa2b42;
}

@keyframes portalNoticeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

[data-ajax-form].is-loading {
    opacity: .68;
    pointer-events: none;
}

.two-factor-card .two-factor-shield {
    flex: 0 0 40px;
}

.two-factor-card .two-factor-shield svg {
    display: block;
}

.two-factor-active-layout {
    display: grid;
    gap: 15px;
    grid-template-columns: 1fr 1fr;
    padding: 22px;
}

.two-factor-active-layout .two-factor-state {
    margin: 0;
}

.two-factor-disable-box {
    background: #fffafb;
    border: 1px solid #f0dfe3;
    border-radius: 16px;
    padding: 17px 18px;
}

.two-factor-disable-box p {
    color: #7d7177;
    font-size: 11px;
    line-height: 1.7;
    margin: 5px 0 13px;
}

.two-factor-disable-box form {
    display: flex;
    gap: 9px;
}

.two-factor-disable-box label {
    flex: 1;
    min-width: 0;
}

.two-factor-disable-box input,
.two-factor-login .totp-login-input {
    border: 1px solid #ded8e9;
    border-radius: 11px;
    font: 800 17px/1.2 "SFMono-Regular", Consolas, monospace;
    letter-spacing: 6px;
    outline: none;
    padding: 11px 12px;
    text-align: center;
    width: 100%;
}

.two-factor-disable-box input:focus {
    border-color: #d76578;
    box-shadow: 0 0 0 4px rgba(215, 101, 120, .1);
}

.danger-button {
    background: #fff;
    border: 1px solid #e8aeb8;
    border-radius: 11px;
    color: #b52f48;
    cursor: pointer;
    font: 800 11px Vazirmatn, sans-serif;
    padding: 10px 14px;
    white-space: nowrap;
}

.danger-button:hover {
    background: #fff0f2;
}

.auth-security-icon {
    align-items: center;
    background: linear-gradient(145deg, #6e59ed, #4833c3);
    border-radius: 17px;
    box-shadow: 0 14px 28px rgba(82, 61, 205, .27);
    color: #fff;
    display: flex;
    height: 54px;
    justify-content: center;
    margin-bottom: 20px;
    width: 54px;
}

.two-factor-login-user {
    align-items: center;
    background: #f5f4fb;
    border: 1px solid #e6e4f0;
    border-radius: 14px;
    display: flex;
    gap: 11px;
    margin: 20px 0;
    padding: 12px;
}

.two-factor-login-user > span {
    align-items: center;
    background: #6553e7;
    border-radius: 11px;
    color: #fff;
    display: flex;
    flex: 0 0 39px;
    font-weight: 900;
    height: 39px;
    justify-content: center;
}

.two-factor-login-user small,
.two-factor-login-user strong {
    display: block;
}

.two-factor-login-user small {
    color: #8a90a4;
    font-size: 9px;
}

.two-factor-login-user strong {
    font-size: 12px;
    margin-top: 3px;
}

.two-factor-login .totp-login-input {
    background: #fff;
    font-size: 22px !important;
    letter-spacing: 10px;
    padding: 15px !important;
}

.two-factor-login-help {
    color: #888ea2;
    font-size: 11px;
    line-height: 1.7;
    margin: 8px 2px 0;
}

.two-factor-back {
    color: #6956d9;
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-top: 20px;
    text-align: center;
    text-decoration: none;
}

.portal-backdrop {
    background: rgba(9, 11, 39, .48);
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity .2s ease;
    z-index: 19;
    backdrop-filter: blur(3px);
}

.portal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 780px) {
    .portal-topbar {
        top: 8px;
    }

    .profile-hero {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 20px;
    }

    .profile-security-pill {
        grid-column: 1 / -1;
        justify-self: stretch;
    }

    .two-factor-active-layout {
        grid-template-columns: 1fr;
        padding: 14px;
    }
}

@media (max-width: 620px) {
    .portal-topbar {
        border-radius: 15px;
        margin-bottom: 20px;
        padding: 12px;
    }

    .portal-topbar h1 {
        font-size: 20px;
    }

    .portal-topbar-actions {
        min-width: 0;
    }

    .profile-hero {
        border-radius: 19px;
    }

    .profile-avatar {
        border-radius: 14px;
        height: 48px;
        width: 48px;
    }

    .profile-details-card {
        border-radius: 18px;
        padding: 20px 16px;
    }

    .profile-details-card .section-head {
        align-items: flex-start;
        gap: 10px;
    }

    .profile-save-state {
        white-space: nowrap;
    }

    .profile-form-footer,
    .two-factor-disable-box form {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-form-footer .profile-submit,
    .danger-button {
        width: 100%;
    }

    .two-factor-card .two-factor-heading {
        grid-template-columns: 34px minmax(0, 1fr);
    }
}
