@charset "utf-8";
/* ==========================================================================
   提桶软件 · 个人中心
   依赖: site.css(品牌变量/顶部栏/页脚/按钮) + auth.css(表单字段与错误提示)
   ========================================================================== */

body {
    background: var(--page);
    /* auth.css 把 body 的 min-height 设成了 100%, 这里改回视口高度, 保证页脚贴底 */
    min-height: 100vh;
}

.account-main {
    flex: 1 0 auto;
    background: var(--page);
}

/* -------------------------------------------------------------- 页头 */
.account-hero {
    padding: 30px 0 20px;
}

.account-hero h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: .5px;
}

.account-hero p {
    margin-top: 8px;
    font-size: 13.5px;
    color: var(--ink-3);
}

/* -------------------------------------------------------------- 两栏布局 */
.account-layout {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    padding-bottom: 48px;
}

/* -------------------------------------------------------------- 左侧导航 */
.account-side {
    position: sticky;
    top: 84px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: 0 4px 14px rgba(24, 60, 120, .04);
}

.side-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.side-avatar {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--brand-light);
    color: var(--brand);
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #e3ecfb;
}

.side-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.side-user-meta {
    min-width: 0;
}

.side-user-meta b {
    display: block;
    font-size: 15px;
    color: var(--ink);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.side-user-meta span {
    display: block;
    margin-top: 2px;
    font-size: 12.5px;
    color: var(--ink-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 0;
}

.side-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--ink-2);
    transition: background .16s, color .16s;
}

.side-nav a svg {
    width: 17px;
    height: 17px;
    opacity: .8;
}

.side-nav a:hover {
    background: #f5f9ff;
    color: var(--brand);
}

.side-nav a.is-active {
    background: var(--brand-light);
    color: var(--brand);
    font-weight: 600;
}

.side-nav a.is-active svg {
    opacity: 1;
}

.side-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.side-links a {
    font-size: 13px;
    color: var(--ink-3);
}

.side-links a:hover {
    color: var(--brand);
}

.side-logout {
    width: 100%;
    height: 38px;
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink-2);
    font-size: 13.5px;
    transition: all .16s;
}

.side-logout:hover {
    color: #d4382c;
    border-color: #ffd9d4;
    background: #fff7f6;
}

/* -------------------------------------------------------------- 内容面板 */
.account-content {
    min-width: 0;
}

.panel {
    display: none;
}

.panel.is-active {
    display: block;
}

.panel-card {
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 4px 14px rgba(24, 60, 120, .04);
}

.card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}

.card-head h2 {
    font-size: 16.5px;
    font-weight: 600;
    color: var(--ink);
}

.card-head .hint {
    font-size: 12.5px;
    color: var(--ink-3);
}

.card-body {
    padding: 8px 22px 22px;
}

/* -------------------------------------------------------------- 资料行 */
.form-row {
    display: flex;
    gap: 18px;
    padding: 16px 0;
    border-bottom: 1px dashed #eef2f8;
}

.form-row:last-child {
    border-bottom: 0;
}

.row-label {
    flex: 0 0 92px;
    padding-top: 9px;
    font-size: 14px;
    color: var(--ink-2);
}

.row-field {
    flex: 1 1 auto;
    min-width: 0;
}

.row-tip {
    margin-top: 7px;
    font-size: 12.5px;
    color: var(--ink-3);
    line-height: 1.6;
}

.readonly {
    max-width: 340px;
    height: 38px;
    line-height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    background: #f7f9fc;
    color: var(--ink-2);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 昵称输入 */
.inline-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.inline-form input[type="text"] {
    flex: 0 1 260px;
    min-width: 180px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line-input);
    border-radius: 8px;
    font-size: 14px;
    color: var(--ink);
    transition: border-color .18s, box-shadow .18s;
}

.inline-form input[type="text"]:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(43, 108, 246, .13);
}

.inline-form .btn {
    height: 38px;
    border-radius: 8px;
    padding: 0 20px;
}

/* -------------------------------------------------------------- 密码 / 实名表单 */
.pw-form,
#verify-form {
    max-width: 420px;
    padding-top: 14px;
}

.pw-form .field,
#verify-form .field {
    margin-bottom: 16px;
}

.pw-form .control input,
#verify-form .control input {
    height: 44px;
}

.btn-save {
    height: 42px;
    margin-top: 8px;
    padding: 0 26px;
    border-radius: 8px;
}

.plain-text {
    padding-top: 14px;
    margin-bottom: 14px;
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--ink-2);
}

.btn-danger {
    height: 38px;
    margin-top: 6px;
    border-radius: 8px;
    color: #d4382c;
    border-color: #ffd9d4;
    background: #fff;
}

.btn-danger:hover {
    color: #c02d21;
    border-color: #ffc4bd;
    background: #fff7f6;
}

/* 已认证标记 */
.verify-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 30px;
    margin: 16px 0 6px;
    padding: 0 12px;
    border-radius: 15px;
    background: #f1fbf6;
    border: 1px solid #c8ecd9;
    color: #1a8f63;
    font-size: 13px;
}

.verify-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22b07d;
}

/* -------------------------------------------------------------- 轻提示 */
.toast {
    position: fixed;
    left: 50%;
    top: 22px;
    z-index: 300;
    max-width: 80vw;
    padding: 10px 18px;
    border-radius: 8px;
    background: #1d2734;
    color: #fff;
    font-size: 13.5px;
    box-shadow: 0 10px 24px rgba(15, 30, 60, .22);
    opacity: 0;
    transform: translate(-50%, -12px);
    pointer-events: none;
    transition: opacity .2s, transform .2s;
}

.toast.is-show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.toast.is-err {
    background: #d4382c;
}

.toast.is-ok {
    background: #17875f;
}

/* -------------------------------------------------------------- 响应式 */
@media (max-width: 900px) {
    .account-layout {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .account-side {
        position: static;
    }

    .side-user,
    .side-links,
    .side-logout {
        display: none;
    }

    .side-nav {
        flex-direction: row;
        padding: 0;
        gap: 6px;
    }

    .side-nav a {
        flex: 1 1 0;
        height: 42px;
        justify-content: center;
        font-size: 13.5px;
        padding: 0 6px;
    }

    .side-nav a svg {
        display: none;
    }

    .card-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 16px 16px;
    }

    .card-body {
        padding: 6px 16px 18px;
    }

    .form-row {
        flex-direction: column;
        gap: 8px;
        padding: 14px 0;
    }

    .row-label {
        /* 列方向下 flex-basis 会变成高度, 这里必须改回自适应, 否则标签会撑出 92px 空白 */
        flex: 0 0 auto;
        padding-top: 0;
        font-size: 13px;
        color: var(--ink-3);
    }

    .readonly {
        max-width: 100%;
    }

    .account-hero {
        padding: 22px 0 16px;
    }

    .account-hero h1 {
        font-size: 21px;
    }
}

/* 窄屏手机: 顶部导航收起, 只留 LOGO + 用户块, 避免挤成两行 */
@media (max-width: 640px) {
    .site-nav {
        display: none;
    }
}
