/* =========================================================
   HEALEEX ACCOUNT CENTER
   v0.1.0
   ========================================================= */

.hxa-account {
    --hxa-bg: #07131b;
    --hxa-surface: rgba(10, 27, 37, 0.86);
    --hxa-surface-soft: rgba(255, 255, 255, 0.035);
    --hxa-surface-hover: rgba(80, 231, 177, 0.055);
    --hxa-line: rgba(255, 255, 255, 0.085);
    --hxa-line-strong: rgba(80, 231, 177, 0.23);
    --hxa-text: #f3faf8;
    --hxa-body: rgba(243, 250, 248, 0.66);
    --hxa-muted: rgba(243, 250, 248, 0.43);
    --hxa-primary: #50e7b1;
    --hxa-primary-strong: #00a99d;
    --hxa-blue: #4a8fff;
    --hxa-danger: #ff7a7a;

    width: min(1240px, calc(100% - 32px));
    margin: clamp(32px, 6vw, 76px) auto;

    color: var(--hxa-text);
    font-family: inherit;
}

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


/* HERO */

.hxa-account__hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
    gap: clamp(30px, 5vw, 70px);
    align-items: center;

    margin-bottom: 22px;
    padding: clamp(28px, 5vw, 54px);

    overflow: hidden;

    background:
        radial-gradient(circle at 82% 20%, rgba(74, 143, 255, 0.12), transparent 35%),
        radial-gradient(circle at 8% 80%, rgba(80, 231, 177, 0.09), transparent 36%),
        linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.018));

    border: 1px solid var(--hxa-line);
    border-radius: 30px;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hxa-account__hero::after {
    content: "";
    position: absolute;
    top: -130px;
    right: -80px;
    width: 330px;
    height: 330px;
    border: 1px solid rgba(80, 231, 177, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.hxa-account__identity {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: flex-start;
    gap: 22px;
}

.hxa-account__avatar {
    width: 88px;
    height: 88px;
    flex: 0 0 88px;

    display: grid;
    place-items: center;

    overflow: hidden;

    color: #061018;
    background:
        linear-gradient(135deg, var(--hxa-primary), #3ec9d9);

    border: 1px solid rgba(255,255,255,.15);
    border-radius: 24px;

    box-shadow:
        0 16px 34px rgba(0,0,0,.22),
        0 0 0 7px rgba(80,231,177,.045);

    font-size: 2rem;
    font-weight: 850;
}

.hxa-account__avatar-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hxa-account__identity-copy {
    min-width: 0;
}

.hxa-account__overline,
.hxa-panel__eyebrow {
    color: var(--hxa-primary);

    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .16em;
    line-height: 1.3;
    text-transform: uppercase;
}

.hxa-account__hero h1 {
    margin: 8px 0 10px;

    color: #fff;

    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 780;
    letter-spacing: -.045em;
    line-height: 1;
}

.hxa-account__identity-copy > p {
    max-width: 62ch;
    margin: 0;

    color: var(--hxa-body);

    font-size: .98rem;
    line-height: 1.7;
}

.hxa-account__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.hxa-account__status,
.hxa-account__role {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 0 11px;

    border: 1px solid var(--hxa-line);
    border-radius: 999px;

    color: rgba(243,250,248,.74);
    background: rgba(255,255,255,.025);

    font-size: .72rem;
    font-weight: 700;
}

.hxa-account__status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--hxa-primary);
    box-shadow: 0 0 12px rgba(80,231,177,.65);
}

.hxa-account__summary {
    position: relative;
    z-index: 2;

    display: grid;
    gap: 4px;

    padding: 20px;

    background: rgba(5,16,24,.48);
    border: 1px solid var(--hxa-line);
    border-radius: 20px;

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

.hxa-account__summary span {
    margin-top: 12px;
    color: var(--hxa-muted);
    font-size: .68rem;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hxa-account__summary span:first-child {
    margin-top: 0;
}

.hxa-account__summary strong {
    min-width: 0;
    overflow-wrap: anywhere;

    color: rgba(243,250,248,.88);
    font-size: .88rem;
    font-weight: 700;
}


/* LAYOUT */

.hxa-account__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 22px;
    align-items: start;
}

.hxa-account__main,
.hxa-account__sidebar {
    display: grid;
    gap: 22px;
}

.hxa-account__sidebar {
    position: sticky;
    top: 100px;
}


/* PANELS */

.hxa-panel {
    padding: clamp(24px, 4vw, 38px);

    background:
        linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.016));

    border: 1px solid var(--hxa-line);
    border-radius: 25px;

    box-shadow:
        0 20px 54px rgba(0, 0, 0, 0.16),
        inset 0 1px 0 rgba(255,255,255,.025);
}

.hxa-panel__header {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(260px, .45fr);
    gap: 30px;
    align-items: end;

    margin-bottom: 30px;
    padding-bottom: 22px;

    border-bottom: 1px solid var(--hxa-line);
}

.hxa-panel h2 {
    margin: 7px 0 0;

    color: #fff;

    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    font-weight: 750;
    letter-spacing: -.025em;
    line-height: 1.15;
}

.hxa-panel__header > p,
.hxa-panel--security > p {
    margin: 0;

    color: var(--hxa-body);

    font-size: .86rem;
    line-height: 1.65;
}


/* EMBEDDED CONNECTOR PROFILE */

.hxa-profile-host .healeex-profile {
    max-width: none;
    margin: 0;
    padding: 0;

    color: var(--hxa-text);
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.hxa-profile-host .healeex-profile__title {
    display: none !important;
}

.hxa-profile-host .healeex-profile__form {
    display: grid;
    gap: 20px;
}

.hxa-profile-host .healeex-profile__field {
    display: grid;
    gap: 8px;
    margin: 0;
}

.hxa-profile-host .healeex-profile__field > span {
    color: rgba(243,250,248,.64) !important;

    font-size: .76rem;
    font-weight: 720;
    line-height: 1.2;
}

.hxa-profile-host .healeex-profile__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.hxa-profile-host .healeex-profile__field input,
.hxa-profile-host .healeex-profile__field select {
    width: 100%;
    min-height: 54px;

    padding: 0 15px;

    appearance: none;

    color: rgba(243,250,248,.88) !important;
    background: rgba(255,255,255,.036) !important;

    border: 1px solid rgba(255,255,255,.10) !important;
    border-radius: 14px !important;

    outline: none;

    font: inherit;
    font-size: .9rem;
    font-weight: 600;

    transition:
        border-color 160ms ease,
        background 160ms ease,
        box-shadow 160ms ease;
}

.hxa-profile-host .healeex-profile__field select {
    padding-right: 42px;

    background-image:
        linear-gradient(45deg, transparent 50%, rgba(243,250,248,.55) 50%),
        linear-gradient(135deg, rgba(243,250,248,.55) 50%, transparent 50%) !important;
    background-position:
        calc(100% - 20px) 23px,
        calc(100% - 15px) 23px !important;
    background-size: 5px 5px, 5px 5px !important;
    background-repeat: no-repeat !important;
}

.hxa-profile-host .healeex-profile__field select option {
    color: #102a33;
    background: #fff;
}

.hxa-profile-host .healeex-profile__field input:hover:not(:disabled),
.hxa-profile-host .healeex-profile__field select:hover {
    border-color: rgba(80,231,177,.28) !important;
}

.hxa-profile-host .healeex-profile__field input:focus,
.hxa-profile-host .healeex-profile__field select:focus {
    border-color: var(--hxa-primary) !important;

    background-color: rgba(255,255,255,.05) !important;

    box-shadow:
        0 0 0 4px rgba(80,231,177,.075) !important;
}

.hxa-profile-host .healeex-profile__field input:disabled,
.hxa-profile-host .healeex-profile__field input[readonly] {
    color: rgba(243,250,248,.43) !important;
    background: rgba(255,255,255,.018) !important;

    cursor: not-allowed;
}

.hxa-profile-host .healeex-profile__submit {
    justify-self: start;

    min-height: 48px;
    padding: 0 23px;

    color: #061018 !important;
    background:
        linear-gradient(100deg, var(--hxa-primary), #3ec9d9) !important;

    border: 0 !important;
    border-radius: 999px !important;

    box-shadow: 0 13px 30px rgba(80,231,177,.15);

    font: inherit;
    font-size: .82rem;
    font-weight: 800;

    cursor: pointer;

    transition:
        transform 160ms ease,
        box-shadow 160ms ease;
}

.hxa-profile-host .healeex-profile__submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 17px 34px rgba(80,231,177,.22);
}

.hxa-profile-host .healeex-profile__identity {
    display: none;
}


/* ACCOUNT INFO */

.hxa-account-info {
    display: grid;
    gap: 0;

    margin: 22px 0 0;
}

.hxa-account-info > div {
    display: grid;
    gap: 6px;

    padding: 15px 0;

    border-bottom: 1px solid var(--hxa-line);
}

.hxa-account-info > div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.hxa-account-info dt {
    color: var(--hxa-muted);

    font-size: .68rem;
    font-weight: 760;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.hxa-account-info dd {
    display: flex;
    align-items: center;
    gap: 8px;

    margin: 0;

    color: rgba(243,250,248,.78);

    font-size: .82rem;
    font-weight: 650;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.hxa-status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;

    border-radius: 50%;

    background: var(--hxa-primary);
    box-shadow: 0 0 10px rgba(80,231,177,.5);
}


/* SECURITY */

.hxa-panel--security h2 {
    margin-bottom: 14px;
}

.hxa-security__action {
    margin-top: 22px;
}

.hxa-button {
    min-height: 46px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    padding: 0 20px !important;

    border-radius: 999px !important;

    text-decoration: none !important;

    font-size: .8rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;

    transition:
        transform 160ms ease,
        border-color 160ms ease,
        background 160ms ease,
        color 160ms ease !important;
}

.hxa-button--primary {
    color: #061018 !important;
    background: linear-gradient(100deg, var(--hxa-primary), #3ec9d9) !important;
    border: 0 !important;
}

.hxa-button--logout {
    width: 100%;

    color: rgba(243,250,248,.67) !important;
    background: rgba(255,255,255,.025) !important;

    border: 1px solid var(--hxa-line) !important;
}

.hxa-button:hover {
    transform: translateY(-2px);
}

.hxa-button--logout:hover {
    color: #fff !important;
    background: rgba(255,122,122,.055) !important;
    border-color: rgba(255,122,122,.24) !important;
}


/* ECOSYSTEM */

.hxa-platforms {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.hxa-platform {
    position: relative;

    min-width: 0;
    min-height: 190px;

    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    gap: 16px;

    padding: 20px;

    overflow: hidden;

    color: inherit !important;
    background: var(--hxa-surface-soft);

    border: 1px solid var(--hxa-line);
    border-radius: 19px;

    text-decoration: none !important;

    transition:
        transform 180ms ease,
        border-color 180ms ease,
        background 180ms ease,
        box-shadow 180ms ease;
}

.hxa-platform::after {
    content: "";
    position: absolute;
    width: 170px;
    height: 170px;
    right: -85px;
    top: -90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(80,231,177,.09), transparent 68%);
    opacity: 0;
    transition: opacity 180ms ease;
}

.hxa-platform:hover {
    transform: translateY(-4px);

    background: var(--hxa-surface-hover);
    border-color: var(--hxa-line-strong);

    box-shadow: 0 18px 42px rgba(0,0,0,.16);
}

.hxa-platform:hover::after {
    opacity: 1;
}

.hxa-platform__icon {
    width: 46px;
    height: 46px;

    display: grid;
    place-items: center;

    color: var(--hxa-primary);

    background: rgba(80,231,177,.065);
    border: 1px solid rgba(80,231,177,.13);
    border-radius: 14px;
}

.hxa-platform__icon svg {
    width: 22px;
    height: 22px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hxa-platform__copy {
    min-width: 0;
    display: grid;
    align-content: start;
}

.hxa-platform__copy small {
    color: var(--hxa-primary);

    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.hxa-platform__copy strong {
    margin-top: 5px;

    color: #fff;

    font-size: .95rem;
    font-weight: 740;
}

.hxa-platform__copy > span {
    margin-top: 7px;

    color: var(--hxa-body);

    font-size: .77rem;
    line-height: 1.55;
}

.hxa-platform__cta {
    grid-column: 1 / -1;

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

    padding-top: 13px;

    color: rgba(243,250,248,.68);

    border-top: 1px solid var(--hxa-line);

    font-size: .72rem;
    font-weight: 750;
}

.hxa-platform__cta svg {
    width: 17px;
    height: 17px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}


/* GUEST */

.hxa-account--guest {
    min-height: 58vh;
    display: grid;
    place-items: center;
}

.hxa-guest {
    width: min(620px, 100%);

    padding: clamp(34px, 6vw, 64px);

    text-align: center;

    background:
        radial-gradient(circle at 50% 0%, rgba(80,231,177,.11), transparent 42%),
        linear-gradient(145deg, rgba(255,255,255,.04), rgba(255,255,255,.018));

    border: 1px solid var(--hxa-line);
    border-radius: 30px;

    box-shadow: 0 28px 70px rgba(0,0,0,.24);
}

.hxa-guest h1 {
    margin: 10px 0 15px;

    color: #fff;

    font-size: clamp(2rem, 6vw, 3.4rem);
    letter-spacing: -.045em;
}

.hxa-guest p {
    max-width: 50ch;
    margin: 0 auto 26px;

    color: var(--hxa-body);
    line-height: 1.7;
}


/* ADMIN MISSING CONNECTOR NOTICE */

.hxa-notice {
    padding: 18px 20px;

    color: #102a33;
    background: #fff8dd;

    border-left: 4px solid #dba617;
}

.hxa-notice p {
    margin-bottom: 0;
}


/* RESPONSIVE */

@media (max-width: 1050px) {
    .hxa-account__hero {
        grid-template-columns: 1fr;
    }

    .hxa-account__summary {
        grid-template-columns: 120px minmax(0, 1fr);
        align-items: center;
    }

    .hxa-account__summary span {
        margin: 0;
    }

    .hxa-account__layout {
        grid-template-columns: 1fr;
    }

    .hxa-account__sidebar {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .hxa-account {
        width: min(100% - 20px, 1240px);
        margin-block: 24px;
    }

    .hxa-account__hero,
    .hxa-panel {
        border-radius: 22px;
    }

    .hxa-account__identity {
        display: grid;
    }

    .hxa-account__avatar {
        width: 72px;
        height: 72px;
        flex-basis: 72px;
        border-radius: 20px;
    }

    .hxa-panel__header {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .hxa-profile-host .healeex-profile__row,
    .hxa-platforms,
    .hxa-account__sidebar {
        grid-template-columns: 1fr;
    }

    .hxa-account__summary {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .hxa-account__summary span {
        margin-top: 10px;
    }

    .hxa-account__summary span:first-child {
        margin-top: 0;
    }

    .hxa-profile-host .healeex-profile__submit {
        width: 100%;
        justify-self: stretch;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hxa-account *,
    .hxa-account *::before,
    .hxa-account *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
