/* 个人中心页面：复用全站变量与风格，做更“宋体感”的精致卡片 */

.profile-page{
    padding: 36px 0 56px;
}

.profile-hero{
    position: relative;
    margin: 10px 0 18px;
}

.profile-hero-ornate{
    height: 42px;
    width: min(520px, 92%);
    margin: 0 auto 10px;
    background-image: url('../images/side-ornament.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: .9;
    filter: saturate(1.06) contrast(1.03);
}

.profile-card{
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px 24px;
    border-radius: 18px;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(162,133,78,.24);
    box-shadow: 0 14px 34px rgba(24, 18, 8, .08);
    backdrop-filter: blur(8px);
}

.profile-avatar{
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-weight: 800;
    letter-spacing: .06em;
    color: #2b1e10;
    background: radial-gradient(circle at 30% 25%, rgba(255, 225, 164, .95), rgba(240, 205, 129, .78) 55%, rgba(214, 170, 87, .52));
    border: 1px solid rgba(162,133,78,.34);
    box-shadow: 0 10px 18px rgba(49, 33, 14, .10);
}

.profile-meta{
    min-width: 0;
    flex: 1;
}

.profile-name-row{
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-name{
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: .06em;
    color: #23170b;
}

.profile-badge{
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #6b4e1f;
    background: rgba(255, 240, 212, .86);
    border: 1px solid rgba(162,133,78,.25);
}

.profile-sub{
    margin: 6px 0 0;
    color: rgba(35, 23, 11, .72);
    letter-spacing: .05em;
}

.profile-link{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 14px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: .06em;
    color: #2a1d0e;
    background: rgba(255, 225, 164, .78);
    border: 1px solid rgba(162,133,78,.30);
    box-shadow: 0 10px 20px rgba(26, 18, 8, .08);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.profile-link:hover{
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(26, 18, 8, .10);
    background: rgba(255, 225, 164, .92);
}

.profile-link.ghost{
    background: rgba(255,255,255,.86);
}

.profile-stats{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 4px 0 8px;
}

.stat-card{
    padding: 18px 18px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.88);
    border: 1px solid rgba(162,133,78,.22);
    box-shadow: 0 12px 26px rgba(24, 18, 8, .06);
    backdrop-filter: blur(8px);
    min-width: 0;
}

.stat-top{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.stat-title{
    font-weight: 800;
    letter-spacing: .08em;
    color: rgba(35, 23, 11, .82);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-chip{
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    color: #6b4e1f;
    background: rgba(255, 240, 212, .86);
    border: 1px solid rgba(162,133,78,.22);
    flex: 0 0 auto;
}

.stat-chip.warn{
    color: #7a2f18;
    background: rgba(255, 230, 220, .86);
    border-color: rgba(170, 71, 45, .22);
}

.stat-value{
    margin-top: 10px;
    font-size: 28px;
    font-weight: 900;
    color: #24180b;
    letter-spacing: .04em;
}

.stat-note{
    margin-top: 4px;
    color: rgba(35, 23, 11, .62);
    letter-spacing: .06em;
    font-size: 13px;
}

.stat-card--actions .stat-value,
.stat-card--actions .stat-note{
    display: none;
}

.quick-actions{
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-link{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 12px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: .08em;
    color: #2a1d0e;
    background: rgba(255, 225, 164, .78);
    border: 1px solid rgba(162,133,78,.30);
    box-shadow: 0 10px 20px rgba(26, 18, 8, .08);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.quick-link:hover{
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(26, 18, 8, .10);
    background: rgba(255, 225, 164, .92);
}

.quick-link.ghost{
    background: rgba(255,255,255,.86);
}

.profile-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 14px;
}

.panel{
    border-radius: 18px;
    background: rgba(255,255,255,.90);
    border: 1px solid rgba(162,133,78,.22);
    box-shadow: 0 16px 34px rgba(24, 18, 8, .08);
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.panel-head{
    padding: 14px 16px 10px;
    border-bottom: 1px solid rgba(162,133,78,.18);
    position: relative;
}

.panel-title{
    margin: 0;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: .10em;
    color: #23170b;
}

.panel-ornate{
    height: 18px;
    width: min(240px, 86%);
    margin-top: 8px;
    background-image: url('../images/divider-long.png');
    background-repeat: no-repeat;
    background-position: left center;
    background-size: contain;
    opacity: .8;
}

.item-list{
    list-style: none;
    margin: 0;
    padding: 14px 18px 20px;
}

.item-row{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    transition: background .18s ease;
}

.item-row:hover{
    background: rgba(255, 240, 212, .40);
}

.item-name{
    min-width: 0;
    flex: 1;
    color: rgba(35, 23, 11, .80);
    letter-spacing: .05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-meta{
    flex: 0 0 auto;
    font-size: 12px;
    color: rgba(35, 23, 11, .54);
    letter-spacing: .06em;
}

.settings{
    padding: 12px 16px 16px;
}

.setting-row{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(162,133,78,.22);
}

.setting-row:last-of-type{
    border-bottom: none;
}

.setting-label{
    font-weight: 800;
    color: rgba(35, 23, 11, .72);
    letter-spacing: .10em;
}

.setting-value{
    color: rgba(35, 23, 11, .66);
    letter-spacing: .06em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
    text-align: right;
}

.setting-actions{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

@media (max-width: 980px){
    .profile-stats{
        grid-template-columns: 1fr;
    }
    .profile-grid{
        grid-template-columns: 1fr;
    }
    .profile-card{
        padding: 16px;
    }
}

@media (max-width: 520px){
    .profile-name{
        font-size: 20px;
    }
    .profile-avatar{
        width: 58px;
        height: 58px;
        border-radius: 14px;
    }
}

/* —— 新版个人中心：侧栏 + 分区 —— */
.profile-breadcrumb{
    font-size: 13px;
    color: rgba(35, 23, 11, .55);
    letter-spacing: .06em;
    margin: 8px 0 22px;
}
.profile-breadcrumb a{ color: rgba(109, 78, 31, .85); text-decoration: none; }
.profile-breadcrumb a:hover{ text-decoration: underline; }
.profile-breadcrumb__sep{ margin: 0 8px; opacity: .6; }

.profile-layout{
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 44px;
    align-items: start;
    margin-top: 4px;
}

/**
 * 左侧导航与右侧「个人信息」白色卡片顶部对齐：
 * 主栏首块为区块标题 + 说明，再往下才是卡片；侧栏需下移同等高度，避免显得“高出”右侧卡片。
 * 数值对应：标题下边距 8px + 标题行高约 1.35×18px + 说明一行 1.65×13px + section 内标题与卡片间距 22px。
 */
.profile-layout > .profile-side-nav{
    margin-top: calc(8px + 1.35 * 1.125rem + 1.65 * 0.8125rem + 22px);
}

.profile-side-nav{
    position: sticky;
    top: 88px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.88);
    border: 1px solid rgba(162,133,78,.22);
    box-shadow: 0 12px 28px rgba(24, 18, 8, .06);
}

.profile-side-nav__link{
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .08em;
    color: rgba(35, 23, 11, .78);
    text-decoration: none;
    transition: background .18s ease, color .18s ease;
}
.profile-side-nav__link:hover{
    background: rgba(255, 240, 212, .55);
    color: #2a1d0e;
}

.profile-main{
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 44px;
}

.profile-section{
    scroll-margin-top: 96px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.profile-section__head{
    margin-bottom: 0;
}
.profile-section__title{
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: .12em;
    color: #23170b;
}
.profile-section__desc{
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    color: rgba(35, 23, 11, .58);
    letter-spacing: .04em;
}

.profile-card--hero{
    margin-bottom: 0;
}

.profile-card__body{ min-width: 0; flex: 1; }

.profile-dl{
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
}
.profile-dl li{
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
    font-size: 14px;
    align-items: baseline;
}
.profile-dl__k{
    color: rgba(35, 23, 11, .52);
    letter-spacing: .06em;
}
.profile-dl__v{
    color: rgba(35, 23, 11, .88);
    letter-spacing: .04em;
    word-break: break-word;
}

.profile-badge--muted{
    background: rgba(255,255,255,.75);
    border-style: dashed;
}

.profile-card--form{
    padding: 16px 18px 18px;
}
.profile-form__title{
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: .1em;
    color: #23170b;
}
.profile-form__hint{
    margin: 0 0 12px;
    font-size: 12px;
    color: rgba(35, 23, 11, .55);
    line-height: 1.6;
}
.profile-form__grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.profile-field--full{
    grid-column: 1 / -1;
}
.profile-field{
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.profile-field__label{
    font-size: 12px;
    font-weight: 800;
    color: rgba(35, 23, 11, .62);
    letter-spacing: .06em;
}
.profile-field__input,
.profile-field__textarea{
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(162,133,78,.28);
    background: rgba(255,255,255,.95);
    font-family: var(--font-main);
    font-size: 14px;
    color: #23170b;
    outline: none;
}
.profile-field__textarea{ resize: vertical; min-height: 64px; }
.profile-field__input:focus,
.profile-field__textarea:focus{
    border-color: rgba(197, 160, 89, .75);
}

.profile-form__actions{
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.profile-form__msg{
    font-size: 13px;
    color: rgba(35, 23, 11, .55);
}

.profile-quickbar{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
.profile-quickbar__btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 14px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 900;
    letter-spacing: .08em;
    font-size: 13px;
    border: 1px solid rgba(162,133,78,.32);
    background: rgba(255, 225, 164, .78);
    color: #2a1d0e;
}
.profile-quickbar__btn--ghost{
    background: rgba(255,255,255,.88);
}
.profile-quickbar__btn:hover{ transform: translateY(-1px); }

.profile-subgrid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.profile-card--panel{
    padding: 0;
    overflow: hidden;
    border-radius: 18px;
}
.profile-card--panel .panel-head{
    padding: 18px 22px;
    margin: 0;
    border-bottom: 1px solid rgba(162,133,78,.18);
}
.panel-head--inline{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.panel-more{
    font-size: 12px;
    font-weight: 800;
    color: rgba(109, 78, 31, .9);
    text-decoration: none;
    letter-spacing: .06em;
    white-space: nowrap;
}
.panel-more:hover{ text-decoration: underline; }
.panel-hint{
    margin: 0 0 10px 16px;
    font-size: 12px;
    color: rgba(35, 23, 11, .52);
}

.item-list--dense{
    padding: 14px 18px 18px;
}
.item-list--dense .item-row{
    padding: 11px 14px;
}

.item-name--link{
    color: rgba(35, 23, 11, .88);
    text-decoration: none;
    font-weight: 700;
}
.item-name--link:hover{
    color: var(--primary-gold, #c5a059);
    text-decoration: underline;
}

.item-action{
    flex: 0 0 auto;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    border: 1px solid rgba(170, 71, 45, .35);
    background: rgba(255, 245, 240, .9);
    color: #7a2f18;
    cursor: pointer;
    font-family: var(--font-main);
}
.item-action--muted{
    border-color: rgba(162,133,78,.28);
    background: rgba(255,255,255,.9);
    color: rgba(35, 23, 11, .65);
}

.tag{
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
}
.tag--pending{ background: rgba(255, 230, 200, .9); color: #8a4a12; }
.tag--approved{ background: rgba(220, 245, 230, .95); color: #1d6b3a; }
.tag--rejected{ background: rgba(255, 230, 225, .95); color: #a02818; }

.profile-stats--inline{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 0;
    gap: 20px;
}
.stat-card--compact{
    padding: 18px 18px 16px;
}
.stat-card--compact .stat-value{
    font-size: 22px;
    margin-top: 6px;
}
.stat-value--sm{
    font-size: 16px !important;
    font-weight: 800 !important;
}

.profile-rules{
    margin: 0;
    padding: 0 0 0 18px;
    font-size: 13px;
    line-height: 1.75;
    color: rgba(35, 23, 11, .78);
}
.profile-rules__sub{
    margin: 14px 0 8px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .08em;
    color: rgba(35, 23, 11, .72);
}

@media (max-width: 980px){
    .profile-layout{
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .profile-layout > .profile-side-nav{
        margin-top: 0;
    }
    .profile-main{
        gap: 36px;
    }
    .profile-section{
        gap: 18px;
    }
    .profile-side-nav{
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    .profile-form__grid{
        grid-template-columns: 1fr;
    }
    .profile-subgrid{
        grid-template-columns: 1fr;
    }
    .profile-stats--inline{
        grid-template-columns: 1fr;
    }
    .profile-dl li{
        grid-template-columns: 100px minmax(0, 1fr);
    }
}

/* 个人中心主区域底部：退出登录 */
.profile-main-footer{
    margin-top: 12px;
    padding: 32px 8px 12px;
    border-top: 1px solid rgba(162, 133, 78, .22);
    display: flex;
    justify-content: center;
}
.profile-logout-btn{
    position: relative;
    z-index: 2;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .1em;
    color: rgba(90, 65, 32, .9);
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(162, 133, 78, .32);
    border-radius: 14px;
    padding: 12px 32px;
    cursor: pointer;
    font-family: var(--font-main);
    transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
    box-shadow: 0 8px 22px rgba(24, 18, 8, .06);
}
.profile-logout-btn:hover{
    background: rgba(255, 240, 212, .72);
    border-color: rgba(197, 160, 89, .5);
    box-shadow: 0 10px 26px rgba(24, 18, 8, .08);
}

.profile-dl__value-wrap{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    min-width: 0;
}
.profile-edit-btn{
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(162,133,78,.35);
    background: rgba(255,240,212,.55);
    color: #5c4218;
    cursor: pointer;
    flex-shrink: 0;
}
.profile-edit-btn:hover{
    background: rgba(255,240,212,.85);
}
.profile-inline-input{
    flex: 1;
    min-width: 140px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(162,133,78,.28);
    background: rgba(255,255,255,.95);
    font-family: var(--font-main);
    font-size: 14px;
    color: #23170b;
    outline: none;
}
.profile-mini-btn{
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(162,133,78,.35);
    background: rgba(255,255,255,.9);
    color: #4a3918;
    cursor: pointer;
}
.profile-mini-btn--primary{
    background: rgba(255, 225, 164, .78);
    border-color: rgba(162,133,78,.4);
}
.profile-inline-msg{
    margin: 10px 0 0;
    font-size: 12px;
    color: rgba(35,23,11,.55);
    min-height: 1.2em;
}

.profile-card--my-posts{
    margin-top: 0;
}
.item-list--my-posts{
    margin-top: 0;
    padding-top: 18px;
    padding-bottom: 22px;
}
.item-list--my-posts .item-row.my-post-row{
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 18px 18px;
    border-radius: 16px;
    border: 1px solid rgba(162,133,78,.18);
    background: rgba(255,255,255,.72);
    margin-bottom: 4px;
}
.item-list--my-posts .item-row.my-post-row:last-child{
    margin-bottom: 0;
}
.my-post-main{
    flex: 1 1 220px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.my-post-title-line{
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .04em;
    color: rgba(35, 23, 11, .9);
}
.my-post-sub{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: rgba(35, 23, 11, .54);
}
.my-post-date{
    letter-spacing: .04em;
}

