/* ── PROFILE PAGE STYLES ─────────────────────── */

.profile-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 14px 18px 110px
}

/* Profile Header */
.profile-header {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #0d1b2a 0%, #1a2d4a 55%, #0f2336 100%);
    border-radius: 20px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden
}

.profile-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 60% 40%, rgba(91, 78, 232, .2), transparent 70%)
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5B4EE8, #7B6CF0);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 20px rgba(91, 78, 232, .4)
}

.profile-name {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 2px;
    position: relative;
    z-index: 1
}

.profile-email {
    font-size: 12px;
    color: rgba(255, 255, 255, .5);
    position: relative;
    z-index: 1
}

/* Stats */
.profile-stats {
    display: flex;
    gap: 10px;
    margin-bottom: 16px
}

.pstat {
    flex: 1;
    background: var(--white, #FAFAFA);
    border: 1px solid var(--ink-100, #E8E8F0);
    border-radius: 14px;
    padding: 14px 10px;
    text-align: center
}

.pstat-num {
    font-size: 22px;
    font-weight: 800;
    color: var(--violet, #5B4EE8)
}

.pstat-lbl {
    font-size: 10px;
    color: var(--ink-400, #6B6B88);
    font-weight: 600;
    margin-top: 2px
}

/* Sections */
.psection {
    background: var(--white, #FAFAFA);
    border: 1px solid var(--ink-100, #E8E8F0);
    border-radius: 14px;
    margin-bottom: 12px;
    overflow: hidden
}

.psection-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--ink-400);
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 14px 16px 8px
}

.prow {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
    border-top: 1px solid var(--ink-050, #F4F4F8);
    cursor: pointer;
    transition: background .15s
}

.prow:first-child {
    border-top: none
}

.prow:hover {
    background: var(--ink-050, #F4F4F8)
}

.prow-ico {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0
}

.prow-ico.violet {
    background: rgba(91, 78, 232, .1);
    color: #5B4EE8
}

.prow-ico.amber {
    background: rgba(217, 122, 40, .1);
    color: #D97A28
}

.prow-ico.sage {
    background: rgba(45, 138, 110, .1);
    color: #2D8A6E
}

.prow-ico.red {
    background: rgba(220, 38, 38, .1);
    color: #DC2626
}

.prow-info {
    flex: 1;
    min-width: 0
}

.prow-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-700, #2D2D3A)
}

.prow-desc {
    font-size: 11px;
    color: var(--ink-400);
    margin-top: 1px
}

.prow-val {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-400);
    flex-shrink: 0
}

.prow-arrow {
    color: var(--ink-300);
    flex-shrink: 0
}

/* Edit modal */
.edit-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px
}

.edit-overlay.show {
    display: flex
}

.edit-card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .2)
}

.edit-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink-900);
    margin-bottom: 16px
}

.edit-field {
    margin-bottom: 12px
}

.edit-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-500);
    display: block;
    margin-bottom: 5px
}

.edit-field input,
.edit-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--ink-100);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--ink-900);
    background: var(--white);
    outline: none
}

.edit-field input:focus,
.edit-field select:focus {
    border-color: var(--violet)
}

.edit-btns {
    display: flex;
    gap: 8px;
    margin-top: 16px
}

.edit-btn {
    flex: 1;
    padding: 11px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none
}

.edit-btn.cancel {
    background: var(--ink-050);
    color: var(--ink-500)
}

.edit-btn.save {
    background: var(--violet);
    color: white
}

/* Logout */
.logout-btn {
    width: 100%;
    padding: 14px;
    border: 1.5px solid #DC2626;
    border-radius: 14px;
    background: transparent;
    color: #DC2626;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all .15s;
    margin-bottom: 16px
}

.logout-btn:hover {
    background: #DC2626;
    color: white
}

/* Loading */
.profile-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--ink-300)
}

/* Dark mode */
[data-theme="dark"] .profile-header {
    background: linear-gradient(135deg, #0d0d1a, #1a1a2e)
}

[data-theme="dark"] .edit-card {
    background: #1a1a2e;
    border: 1px solid #2a2a3e
}