/* XzsnyC Profile — standalone account settings UI */
.profile-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px) saturate(1.5);
}

.profile-topbar-inner {
    width: min(1120px,100%);
    min-height: 72px;
    margin: auto;
    padding: 10px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.profile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.profile-brand>span:last-child {
    display: grid;
    gap: 3px;
}

.profile-brand strong {
    font-size: 19px;
    font-weight: 900;
    letter-spacing: -.06em;
}

.profile-brand strong span,
.profile-hero h1 span {
    color: var(--blue);
}

.profile-brand small {
    font: 700 8px 'JetBrains Mono',monospace;
    letter-spacing: .15em;
    color: var(--muted);
}

.profile-brand .brand-mark {
    width: 39px;
    height: 39px;
    box-shadow: var(--shadow-sm);
}

.profile-topbar nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 9px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    min-height: 38px;
    font-size: 11px;
    font-weight: 800;
    color: var(--ink);
}

.nav-link .icon {
    width: 15px;
}

.nav-buy {
    min-height: 38px!important;
}

.profile-shell {
    width: min(1120px,100%);
    margin: auto;
    padding: 30px 22px 34px;
    display: grid;
    gap: 20px;
}

.profile-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 30px 32px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    animation: profileIn .45s var(--ease) both;
}

.profile-hero h1 {
    margin-top: 12px;
    font-size: clamp(35px,5vw,56px);
    font-weight: 900;
    letter-spacing: -.075em;
    line-height: 1;
}

.profile-hero>div>p:last-child {
    max-width: 60ch;
    margin-top: 13px;
    color: var(--muted-2);
    font-size: 13px;
    line-height: 1.75;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    background: var(--blue-soft);
    font: 700 9px 'JetBrains Mono',monospace;
    color: var(--blue-deep);
    white-space: nowrap;
}

.hero-chip .icon {
    width: 14px;
}

.profile-grid {
    display: grid;
    grid-template-columns: 280px minmax(0,1fr);
    gap: 18px;
    align-items: start;
}

.profile-card {
    padding: 25px;
}

.identity-card {
    position: sticky;
    top: 91px;
    text-align: center;
    animation: profileIn .45s .05s var(--ease) both;
}

.avatar-wrap {
    position: relative;
    width: 104px;
    height: 104px;
    margin: 0 auto 17px;
}

.avatar-wrap img,
.avatar-wrap>#avatar-fallback {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}

.avatar-wrap img {
    display: none;
    object-fit: cover;
}

.avatar-wrap>#avatar-fallback {
    display: grid;
    place-items: center;
    background: var(--blue);
    color: #fff;
    font-size: 35px;
    font-weight: 900;
}

.avatar-upload {
    position: absolute;
    right: -4px;
    bottom: 0;
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform var(--t) var(--ease);
}

.avatar-upload:hover {
    transform: translate(-1px,-1px);
}

.avatar-upload .icon {
    width: 16px;
}

.identity-card h2 {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -.04em;
}

.identity-user {
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
}

.role-badge {
    display: inline-flex;
    margin-top: 10px;
    padding: 5px 8px;
    background: var(--ink);
    color: #fff;
    font: 700 8px 'JetBrains Mono',monospace;
    letter-spacing: .1em;
}

.identity-note {
    margin: 18px 0 12px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.6;
}

.identity-card .btn {
    width: 100%;
    justify-content: center;
}

.identity-card .logout-btn {
    margin-top: 10px;
    color: var(--err);
    border-color: var(--err);
    box-shadow: 0 0 0 3px rgba(180,35,24,.18);
}

.identity-card .logout-btn:hover {
    background: #FFF0EF;
    box-shadow: 0 0 0 3px rgba(180,35,24,.18);
}

.identity-card .logout-btn.loading {
    pointer-events: none;
}

.identity-card .logout-btn.loading .icon {
    animation: logoutSpin .8s linear infinite;
}

@keyframes logoutSpin {
    to {
        transform: rotate(360deg);
    }
}

.profile-stack {
    display: grid;
    gap: 18px;
}

.settings-card {
    animation: profileIn .45s var(--ease) both;
}

.settings-card:nth-child(2) {
    animation-delay: .08s;
}

.settings-card .card-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.settings-card .card-heading h2 {
    margin: 7px 0 0;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -.05em;
}

.fields {
    display: grid;
    gap: 13px;
    margin-top: 22px;
}

.fields label {
    display: grid;
    gap: 7px;
    font-size: 10px;
    font-weight: 800;
    color: var(--ink-2);
}

.fields input {
    width: 100%;
    height: 45px;
    padding: 0 12px;
    border: 1.5px solid var(--line);
    background: #fbfcff;
    font-size: 12px;
    outline: none;
    transition: border-color var(--t) var(--ease),box-shadow var(--t) var(--ease);
}

.fields input:focus {
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(36,91,255,.13);
}

.fields .btn {
    width: 100%;
    justify-content: flex-start;
    min-height: 46px;
    margin-top: 3px;
}

.fields .spinner {
    margin-left: auto;
}

.loading-card {
    display: grid;
    gap: 11px;
}

.loading-card span {
    display: block;
    height: 15px;
    background: linear-gradient(90deg,#f0f2f6,#fafbfc,#f0f2f6);
    background-size: 200% 100%;
    animation: shimmer 1.2s linear infinite;
}

.loading-card span:first-child {
    width: 35%;
    height: 26px;
}

.loading-card span:last-child {
    width: 80%;
}

@keyframes shimmer {
    to {
        background-position: -200% 0;
    }
}

@keyframes profileIn {
    from {
        opacity: 0;
        transform: translateY(9px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.guest-icon {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    margin: 0 auto 12px;
    background: var(--blue-soft);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.guest-icon .icon {
    width: 22px;
}

.profile-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font: 700 8px 'JetBrains Mono',monospace;
    letter-spacing: .12em;
}

.profile-footer span:last-child {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-footer i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--blue);
}

@media (max-width: 800px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
    .identity-card {
        position: relative;
        top: auto;
    }
    .profile-hero {
        padding: 24px;
    }
    .hero-chip {
        display: none;
    }
}

@media (max-width: 600px) {
    .profile-topbar-inner {
        padding: 9px 14px;
        min-height: 63px;
    }
    .profile-brand .brand-mark {
        width: 35px;
        height: 35px;
    }
    .profile-brand strong {
        font-size: 17px;
    }
    .nav-link {
        display: none;
    }
    .profile-shell {
        padding: 20px 14px 25px;
    }
    .profile-hero {
        padding: 22px 19px;
        box-shadow: var(--shadow-md);
    }
    .profile-hero h1 {
        font-size: 38px;
    }
    .profile-card {
        padding: 20px 17px;
    }
    .settings-card .card-heading h2 {
        font-size: 21px;
    }
    .profile-footer {
        font-size: 7px;
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none!important;
        transition: none!important;
    }
}


/* Penyempurnaan profil: identitas bersih, tombol aksi konsisten. */
.profile-brand .brand-mark { width: 34px; height: 38px; font-size: 30px; background: transparent; color: var(--blue); box-shadow: none; border-radius: 0; }
.identity-card { display: flex; flex-direction: column; align-items: stretch; }
.identity-card .avatar-wrap { flex: none; }
.identity-card h2 { text-align: center; font-size: 23px; letter-spacing: -.035em; overflow-wrap: anywhere; }
.identity-card .identity-user { text-align: center; font: 600 13px/1.5 'JetBrains Mono', monospace; margin: 5px 0 0; overflow-wrap: anywhere; }
.identity-card .identity-note { font-size: 11px; margin: 16px 0 12px; }
.identity-card #remove-avatar { order: 5; }
.identity-card .logout-btn { order: 6; margin-top: 8px; color: var(--blue); border-color: var(--blue); box-shadow: none; }
.identity-card .logout-btn:hover { color: #fff; background: var(--blue); border-color: var(--blue); box-shadow: none; }
#save-password { color: #fff; background: var(--blue); border-color: var(--blue); box-shadow: 0 4px 12px rgba(36,91,255,.16); }
#save-password:hover { background: var(--blue-deep); color: #fff; }
#save-password .icon, #save-profile .icon { width: 18px; height: 18px; stroke-width: 2.4; }
