/* =============================================================
 * account.css — 会员中心全部页面样式
 * 适用：登录/注册/忘记密码 + 会员中心布局（侧边导航 + 主内容）
 *      仪表盘/资料/安全/地址/订单列表/订单详情/弹窗
 * 设计语言与站点一致：品牌绿、白卡片、柔阴影、大圆角
 * ============================================================= */

/* =========================================================
 * 一、认证页（登录 / 注册 / 忘记密码）
 * ========================================================= */
.auth-page {
    min-height: calc(100vh - var(--header-h));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px 72px;
    background:
        radial-gradient(720px 380px at 85% -10%, rgba(14, 159, 110, 0.10), transparent 60%),
        radial-gradient(560px 320px at -8% 110%, rgba(14, 159, 110, 0.08), transparent 60%),
        var(--c-bg-soft);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--c-bg);
    border: 1px solid var(--c-line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-sm);
    padding: 40px 36px 28px;
}

.auth-header { text-align: center; margin-bottom: 26px; }

.auth-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-primary-50);
    color: var(--c-primary);
}
.auth-icon .icon { width: 32px; height: 32px; }

.auth-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--c-heading);
    margin-bottom: 6px;
}
.auth-header p { font-size: 14px; color: var(--c-muted); }

.auth-form { margin-bottom: 8px; }

.auth-form .form-group { margin-bottom: 18px; }

.auth-form label,
.ac-form label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--c-heading);
    margin-bottom: 7px;
}
.auth-form label .optional { font-weight: 400; color: var(--c-caption); }

/* 带图标的输入框 */
.input-wrapper { position: relative; }
.input-wrapper .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--c-caption);
    /* 与 aiums 原版登录/注册输入框图标一致：线性描边图标（精灵 symbol 内部 path
       不自带 fill/stroke，必须在此声明，否则浏览器按默认 fill:#000 渲染成实心黑块） */
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
    transition: color .2s ease;
}
/* 输入框聚焦时图标同步变为品牌绿（aiums 原版为红色，本站沿用品牌绿） */
.input-wrapper:focus-within .input-icon { color: var(--c-primary); }
/* 注意：带图标输入框的 padding-left 不能写在这里。
   下方"统一输入控件"规则 .auth-form input[type="text"] 等特异性为 (0,2,1)，
   会覆盖 .input-wrapper input（0,1,1）的 padding-left，导致输入文字压在图标上。
   覆盖规则见本块之后的"带图标输入框左内边距"。 */

/* 统一输入控件 */
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="tel"],
.auth-form input[type="number"],
.auth-form select,
.ac-form input[type="text"],
.ac-form input[type="email"],
.ac-form input[type="password"],
.ac-form input[type="tel"],
.ac-form input[type="number"],
.ac-form select,
.ac-form textarea,
.ac-form input[type="date"],
.modal-body input[type="text"],
.modal-body input[type="email"],
.modal-body input[type="password"],
.modal-body input[type="tel"],
.modal-body input[type="number"],
.modal-body select,
.modal-body textarea,
.reset-steps input[type="text"],
.reset-steps input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--r-sm);
    background: #fff;
    font-size: 14.5px;
    color: var(--c-ink);
    transition: border-color .18s ease, box-shadow .18s ease;
}
.auth-form input:focus,
.auth-form select:focus,
.ac-form input:focus,
.ac-form select:focus,
.ac-form textarea:focus,
.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus,
.reset-steps input:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(14, 159, 110, 0.14);
}

/* 带图标输入框左内边距（登录/注册/找回密码页）：
   与上方统一控件规则同为 (0,2,1) 特异性，但声明在其后，故 padding-left:44px
   稳定生效（图标 left:14 + 宽18，文字从 44px 起排，不再与图标重叠）。
   对齐 aiums 原版 .input-wrapper input[type=...] 左内边距 48px 的处理方式。 */
.auth-form .input-wrapper input,
.reset-steps .input-wrapper input {
    padding-left: 44px;
}
.auth-form input:disabled,
.ac-form input:disabled {
    background: var(--c-bg-muted);
    color: var(--c-muted);
    cursor: not-allowed;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.help-text { font-size: 12.5px; color: var(--c-caption); margin-top: 6px; }

/* 通用工具类（替代模板内联样式） */
.btn-block { display: block; width: 100%; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 16px; }
.mb-3 { margin-bottom: 16px; }
.modal-footer.stack { flex-direction: column; }
.btn-inline-icon { display: inline-flex; align-items: center; gap: 6px; }

/* 认证按钮（继承站点 .btn，补高度与加载态） */
.auth-form .btn { padding: 13px 20px; font-size: 15px; }
.btn .btn-loading { display: none; }
.btn.is-loading .btn-text { display: none; }
.btn.is-loading .btn-loading { display: inline; }
.btn:disabled { opacity: .65; cursor: not-allowed; transform: none; }

/* 行内消息（表单顶部提示） */
.message {
    display: none;
    padding: 11px 14px;
    border-radius: var(--r-sm);
    font-size: 13.5px;
    line-height: 1.6;
    margin-bottom: 16px;
}
.message.success { display: block; background: var(--c-primary-50); color: var(--c-primary-active); border: 1px solid var(--c-primary-100); }
.message.error   { display: block; background: #fdecec; color: #b42318; border: 1px solid #f6c9c8; }

/* 警告条（登录锁定 / 剩余次数） */
.alert {
    padding: 12px 14px;
    border-radius: var(--r-sm);
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.6;
    border-left: 4px solid transparent;
}
.alert p { margin: 0; }
.alert-error { background: #fdecec; border: 1px solid #f6c9c8; border-left-color: var(--c-red); color: #b42318; }
.alert-warning { background: var(--c-gold-soft); border: 1px solid #fbe2b4; border-left-color: var(--c-gold); color: #96630a; }
.alert-title { font-weight: 700; margin-bottom: 2px; }

/* 验证码行 */
.captcha-wrapper { display: flex; align-items: stretch; gap: 10px; }
.captcha-wrapper .captcha-input-wrapper { flex: 1; }
.captcha-img {
    width: 120px;
    height: 46px;
    min-height: 46px;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--r-sm);
    background: #fff;
    object-fit: cover;
    cursor: pointer;
    flex-shrink: 0;
}
.captcha-refresh-btn {
    width: 120px;
    min-height: 46px;
    padding: 0 10px;
    border: 1px solid var(--c-primary);
    border-radius: var(--r-sm);
    background: #fff;
    color: var(--c-primary);
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    transition: all .18s ease;
}
.captcha-refresh-btn:hover:not(:disabled) { background: var(--c-primary); color: #fff; }
.captcha-refresh-btn:disabled { opacity: .6; cursor: not-allowed; }

/* 2FA */
.twofactor-header { text-align: center; margin-bottom: 20px; }
.twofactor-icon {
    width: 56px; height: 56px; margin: 0 auto 12px;
    border-radius: 16px; background: var(--c-primary-50); color: var(--c-primary);
    display: flex; align-items: center; justify-content: center;
}
.twofactor-icon .icon { width: 28px; height: 28px; }
.twofactor-header h2 { font-size: 20px; color: var(--c-heading); margin-bottom: 6px; }
.twofactor-tip { font-size: 13.5px; color: var(--c-muted); }
.twofactor-account { font-size: 13px; color: var(--c-caption); margin-top: 4px; }
.twofactor-code-input {
    text-align: center !important;
    font-size: 24px !important;
    letter-spacing: 8px;
    font-weight: 600;
}
.backup-code-input { letter-spacing: 2px; }
.backup-code-toggle {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--c-body); margin-bottom: 14px; cursor: pointer;
}
.backup-code-toggle input { width: auto; }

/* 分隔线与页脚链接 */
.auth-footer {
    text-align: center;
    font-size: 14px;
    color: var(--c-muted);
    padding: 6px 0;
}
.auth-footer a { color: var(--c-primary); font-weight: 600; }
.auth-footer a:hover { color: var(--c-primary-hover); text-decoration: underline; }
.auth-footer-sep { margin: 0 8px; color: var(--c-line-strong); }
.forgot-password-link { padding-bottom: 4px; }

.auth-divider {
    position: relative;
    text-align: center;
    margin: 18px 0;
}
.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 1px; background: var(--c-line);
}
.auth-divider span {
    position: relative;
    background: #fff;
    padding: 0 14px;
    font-size: 12.5px;
    color: var(--c-caption);
}

/* 社交登录 */
.social-login { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.btn-social {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 11px 16px;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--r-sm);
    background: #fff;
    font-size: 14px; font-weight: 500;
    transition: background .18s ease, border-color .18s ease;
}
.btn-social:hover { background: var(--c-bg-soft); border-color: var(--c-caption); }
.btn-social svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-facebook { background: #1877F2; border-color: #1877F2; color: #fff; }
.btn-facebook:hover { background: #1463d8; }
.btn-apple { background: #000; border-color: #000; color: #fff; }
.btn-apple:hover { background: #2a2a2a; }

.back-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 6px;
    font-size: 13.5px;
    color: var(--c-muted);
}
.back-home .icon { width: 16px; height: 16px; }
.back-home:hover { color: var(--c-primary); }

/* 忘记密码步骤 */
.reset-steps .btn { margin-top: 4px; }

/* =========================================================
 * 二、会员中心整体布局（侧边导航 + 主内容）
 * ========================================================= */
.account-shell {
    max-width: var(--container);
    margin: 0 auto;
    padding: 28px 20px 72px;
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

/* 移动端顶部条（窄屏显示） */
.account-topbar {
    display: none;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    padding: 12px 16px;
    box-shadow: var(--sh-xs);
}
.account-topbar .account-topbar-user {
    display: flex; align-items: center; gap: 10px;
    font-size: 14px; font-weight: 600; color: var(--c-heading);
    min-width: 0;
}
.account-topbar .account-avatar { width: 34px; height: 34px; font-size: 14px; }
.account-menu-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--c-line-strong);
    background: #fff;
    border-radius: var(--r-pill);
    padding: 8px 16px;
    font-size: 13.5px; font-weight: 600; color: var(--c-heading);
    flex-shrink: 0;
}
.account-menu-toggle .icon { width: 16px; height: 16px; }

/* 侧边栏 */
.account-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 16px);
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-xs);
    overflow: hidden;
}
.account-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 18px 16px;
}
.account-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--c-primary-50);
    color: var(--c-primary);
    font-size: 18px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-user-meta { min-width: 0; }
.account-user-name {
    font-size: 15px; font-weight: 700; color: var(--c-heading);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.account-user-sub {
    font-size: 12.5px; color: var(--c-caption);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.account-console-link {
    margin: 0 18px 14px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px;
    border-radius: var(--r-sm);
    background: var(--c-primary-50);
    color: var(--c-primary-active);
    font-size: 13.5px; font-weight: 600;
}
.account-console-link .icon { width: 16px; height: 16px; }
.account-console-link:hover { background: var(--c-primary-100); }

.account-nav { padding: 0 10px 12px; }
.account-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    font-size: 14px;
    color: var(--c-body);
    margin-bottom: 2px;
}
.account-nav a .icon { width: 18px; height: 18px; color: var(--c-caption); flex-shrink: 0; }
.account-nav a:hover { background: var(--c-bg-soft); color: var(--c-heading); }
.account-nav a.active {
    background: var(--c-primary-50);
    color: var(--c-primary-active);
    font-weight: 600;
}
.account-nav a.active .icon { color: var(--c-primary); }
.account-nav .nav-sep { height: 1px; background: var(--c-line); margin: 8px 12px; }
.account-nav .nav-logout { color: var(--c-muted); }
.account-nav .nav-logout .icon { color: var(--c-caption); }
.account-nav .nav-logout:hover { background: #fdecec; color: var(--c-red); }
.account-nav .nav-logout:hover .icon { color: var(--c-red); }

/* 主内容区 */
.account-main { min-width: 0; }
.account-main > h2 {
    font-size: 22px; font-weight: 700; color: var(--c-heading);
    margin-bottom: 18px;
}

/* =========================================================
 * 三、仪表盘
 * ========================================================= */
.ac-welcome {
    background: linear-gradient(135deg, var(--c-primary) 0%, #0c8a61 100%);
    color: #fff;
    border-radius: var(--r-lg);
    padding: 26px 28px;
    margin-bottom: 20px;
}
.ac-welcome h1 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.ac-welcome p { font-size: 14px; opacity: .9; }

.ac-stat-card {
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-xs);
    padding: 22px 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.ac-stat-main { display: flex; align-items: center; gap: 16px; }
.ac-stat-icon {
    width: 52px; height: 52px; border-radius: 14px;
    background: var(--c-gold-soft); color: var(--c-gold);
    display: flex; align-items: center; justify-content: center;
}
.ac-stat-icon .icon { width: 26px; height: 26px; }
.ac-stat-label { font-size: 13px; color: var(--c-muted); }
.ac-stat-value { font-size: 30px; font-weight: 700; color: var(--c-heading); line-height: 1.2; }
.ac-stat-meta { display: flex; gap: 28px; flex-wrap: wrap; }
.ac-stat-meta .meta-item { display: flex; flex-direction: column; gap: 2px; }
.ac-stat-meta .meta-label { font-size: 12.5px; color: var(--c-caption); }
.ac-stat-meta .meta-value { font-size: 15px; font-weight: 600; color: var(--c-heading); }
.ac-stat-link {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13.5px; font-weight: 600; color: var(--c-primary);
}
.ac-stat-link .icon { width: 15px; height: 15px; }
.ac-stat-link:hover { color: var(--c-primary-hover); }

.ac-section-title {
    font-size: 16px; font-weight: 700; color: var(--c-heading);
    margin: 4px 0 14px;
}

.ac-shortcut-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}
.ac-shortcut {
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.ac-shortcut:hover { box-shadow: var(--sh-sm); transform: translateY(-2px); border-color: var(--c-primary-100); }
.ac-shortcut .sc-icon {
    width: 42px; height: 42px; border-radius: 12px;
    background: var(--c-primary-50); color: var(--c-primary);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.ac-shortcut .sc-icon .icon { width: 21px; height: 21px; }
.ac-shortcut .sc-label { font-size: 13.5px; color: var(--c-body); }
.ac-shortcut .sc-count { font-size: 20px; font-weight: 700; color: var(--c-heading); line-height: 1.2; }

.ac-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.ac-quick {
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--c-heading);
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.ac-quick .icon { width: 26px; height: 26px; color: var(--c-primary); }
.ac-quick:hover { box-shadow: var(--sh-sm); transform: translateY(-2px); border-color: var(--c-primary-100); }

/* =========================================================
 * 四、通用内容卡片 / 表单（资料、安全）
 * ========================================================= */
.ac-card {
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-xs);
    padding: 26px 28px;
}
.ac-card + .ac-card { margin-top: 18px; }
.ac-card-title { font-size: 16px; font-weight: 700; color: var(--c-heading); margin-bottom: 18px; }
.ac-form { max-width: 560px; }
.ac-form .form-group { margin-bottom: 18px; }
.ac-form .btn { min-width: 120px; }

/* 头像行 */
.avatar-row { display: flex; align-items: center; gap: 16px; }
.avatar-preview {
    width: 64px; height: 64px; border-radius: 50%;
    border: 1px solid var(--c-line);
    background: var(--c-bg-muted);
    overflow: hidden; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--c-caption); font-size: 22px; font-weight: 600;
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-actions { display: flex; flex-direction: column; gap: 4px; }
.avatar-change-btn {
    color: var(--c-primary); font-size: 13.5px; font-weight: 600;
    cursor: pointer; background: none; border: 0; padding: 0;
}
.avatar-change-btn:hover { color: var(--c-primary-hover); }
.avatar-hint { font-size: 12px; color: var(--c-caption); }

/* 安全设置行 */
.security-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 4px;
    border-bottom: 1px solid var(--c-line);
}
.security-item:last-child { border-bottom: 0; }
.security-item .si-title { font-size: 15px; font-weight: 600; color: var(--c-heading); }
.security-item .si-desc { font-size: 13px; color: var(--c-muted); margin-top: 2px; word-break: break-all; }

/* 次级按钮 */
.btn-secondary {
    border: 1px solid var(--c-line-strong);
    background: #fff;
    color: var(--c-heading);
    padding: 9px 20px;
    border-radius: var(--r-pill);
    font-size: 14px; font-weight: 600;
    transition: all .18s ease;
}
.btn-secondary:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn-danger {
    border: 1px solid #f3b6b4;
    background: #fff;
    color: var(--c-red);
    padding: 9px 20px;
    border-radius: var(--r-pill);
    font-size: 14px; font-weight: 600;
}
.btn-danger:hover { background: var(--c-red); border-color: var(--c-red); color: #fff; }

/* =========================================================
 * 五、弹窗（通用模态）
 * ========================================================= */
.ac-modal {
    display: none;
    position: fixed; inset: 0;
    z-index: 9999;
    background: rgba(11, 31, 38, 0.5);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.ac-modal.show { display: flex; }
.ac-modal-box {
    background: #fff;
    border-radius: var(--r-lg);
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--sh-lg);
}
.ac-modal-box.modal-lg { max-width: 540px; }
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px 14px;
}
.modal-header h3 { font-size: 17px; font-weight: 700; color: var(--c-heading); }
.modal-close {
    width: 32px; height: 32px; border: 0; background: none;
    color: var(--c-caption); font-size: 22px; line-height: 1;
    border-radius: 8px;
}
.modal-close:hover { background: var(--c-bg-muted); color: var(--c-ink); }
.modal-body { padding: 4px 24px 24px; }
.modal-body .form-group { margin-bottom: 16px; }
.modal-footer { display: flex; gap: 12px; padding-top: 4px; }
.modal-footer > * { flex: 1; }

/* 验证码 + 按钮组合 */
.code-input-group { display: flex; gap: 10px; }
.code-input-group input { flex: 1; }
.code-input-group .btn-secondary { white-space: nowrap; padding: 10px 16px; }
.code-input-group .btn-secondary:disabled { opacity: .6; cursor: not-allowed; }

/* 弹窗内警告/提示块 */
.modal-note {
    background: var(--c-gold-soft);
    border: 1px solid #fbe2b4;
    color: #96630a;
    border-radius: var(--r-sm);
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 16px;
}
.modal-note strong { color: #8a5a08; }

/* 2FA 扫码弹窗 */
.twofa-setup-qr { text-align: center; margin-bottom: 16px; }
.twofa-setup-qr img {
    width: 190px; height: 190px;
    border: 1px solid var(--c-line);
    border-radius: var(--r-sm);
    margin-bottom: 10px;
}
.twofa-secret {
    display: block;
    padding: 10px 12px;
    background: var(--c-bg-muted);
    border-radius: var(--r-sm);
    font-size: 13.5px;
    word-break: break-all;
    text-align: center;
    color: var(--c-heading);
}
.twofa-manual-label { font-size: 12.5px; color: var(--c-muted); margin: 10px 0 6px; }

/* 备份码网格 */
.backup-codes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}
.backup-code {
    border: 1px dashed var(--c-line-strong);
    border-radius: var(--r-sm);
    padding: 9px;
    text-align: center;
    font-size: 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: var(--c-heading);
    background: var(--c-bg-soft);
}

/* 头像裁切弹窗 */
.crop-container {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
    border: 1px solid var(--c-line);
    border-radius: var(--r-sm);
    background: var(--c-bg-muted);
}
.crop-container img {
    position: absolute;
    /* 覆盖全局 img{max-width:100%}：裁切图宽高由 JS 按像素精确控制，
       被 max-width 压缩会导致渲染尺寸与位置计算不一致、图片跑出裁切框 */
    max-width: none;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}
.crop-box {
    position: absolute;
    border: 2px solid #fff;
    box-shadow: 0 0 0 9999px rgba(11, 31, 38, 0.45);
    cursor: move;
    box-sizing: border-box;
}
.crop-zoom-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.crop-zoom-row input[type="range"] { flex: 1; }
.zoom-btn {
    width: 38px; height: 38px;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--r-sm);
    background: #fff;
    font-size: 18px;
    color: var(--c-body);
}
.zoom-btn:hover { border-color: var(--c-primary); color: var(--c-primary); }

/* =========================================================
 * 六、收货地址
 * ========================================================= */
.address-toolbar { margin-bottom: 18px; }
.address-list { display: flex; flex-direction: column; gap: 14px; }
.address-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    padding: 18px 20px;
    transition: box-shadow .2s ease, border-color .2s ease;
}
.address-card:hover { box-shadow: var(--sh-sm); }
.address-card.is-default { border-color: var(--c-primary-100); background: linear-gradient(180deg, var(--c-primary-50) 0%, #fff 42%); }
.address-tags { display: flex; gap: 8px; margin-bottom: 8px; }
.address-tag {
    display: inline-flex; align-items: center;
    font-size: 11.5px; font-weight: 600;
    padding: 2px 10px; border-radius: var(--r-pill);
}
.address-tag.tag-default { background: var(--c-primary); color: #fff; }
.address-tag.tag-overseas { background: var(--c-gold-soft); color: #96630a; }
.address-name { font-size: 15px; font-weight: 700; color: var(--c-heading); }
.address-phone { font-size: 13.5px; color: var(--c-muted); margin-left: 10px; font-weight: 400; }
.address-detail { font-size: 14px; color: var(--c-body); margin: 6px 0 12px; line-height: 1.6; }
.address-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.address-actions .btn-secondary,
.address-actions .btn-danger { padding: 6px 16px; font-size: 13px; }
.address-empty {
    text-align: center;
    padding: 56px 20px;
    color: var(--c-caption);
    font-size: 14px;
    background: #fff;
    border: 1px dashed var(--c-line-strong);
    border-radius: var(--r-md);
}

/* 地址表单里的类型单选卡 */
.address-type-selector { display: flex; gap: 10px; }
.address-type-option { flex: 1; }
.address-type-option input { position: absolute; opacity: 0; pointer-events: none; }
.address-type-option .radio-label {
    display: block;
    text-align: center;
    padding: 10px;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--r-sm);
    font-size: 14px;
    cursor: pointer;
    transition: all .18s ease;
}
.address-type-option input:checked + .radio-label {
    border-color: var(--c-primary);
    background: var(--c-primary-50);
    color: var(--c-primary-active);
    font-weight: 600;
}
.form-checkbox { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.form-checkbox input { width: auto; }

/* =========================================================
 * 七、订单列表
 * ========================================================= */
.orders-page { min-width: 0; }
.orders-header { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.orders-header .icon { width: 24px; height: 24px; color: var(--c-primary); }
.orders-header h1 { font-size: 21px; font-weight: 700; color: var(--c-heading); }

.orders-filter-bar {
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    padding: 16px 20px;
    margin-bottom: 18px;
    box-shadow: var(--sh-xs);
}
.filter-group + .filter-group { margin-top: 14px; }
.filter-label { display: block; font-size: 13px; font-weight: 600; color: var(--c-muted); margin-bottom: 9px; }
.status-tabs, .time-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.status-tab, .time-tab {
    padding: 7px 15px;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--r-pill);
    background: #fff;
    color: var(--c-body);
    font-size: 13px;
    transition: all .18s ease;
}
.status-tab:hover, .time-tab:hover { border-color: var(--c-primary); color: var(--c-primary); }
.status-tab.active, .time-tab.active {
    background: var(--c-primary);
    border-color: var(--c-primary);
    color: #fff;
    font-weight: 600;
}

/* 游客查询表单 */
.guest-query-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 10px;
}
.guest-query-grid input {
    width: 100%; padding: 11px 14px;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--r-sm);
    font-size: 14px;
}
.guest-query-grid input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(14,159,110,.14); }
.guest-query-actions { display: flex; gap: 8px; }
.guest-query-actions .btn { flex: 1; white-space: nowrap; }
.guest-query-hint { font-size: 12.5px; color: var(--c-caption); line-height: 1.7; }

/* 订单卡片 */
.order-card {
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    box-shadow: var(--sh-xs);
    margin-bottom: 16px;
    overflow: hidden;
    transition: box-shadow .2s ease;
}
.order-card:hover { box-shadow: var(--sh-sm); }
.order-card-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px;
    padding: 12px 20px;
    background: var(--c-bg-soft);
    border-bottom: 1px solid var(--c-line);
    font-size: 13px; color: var(--c-muted);
}
.order-items { padding: 4px 20px; }
.order-item-row {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--c-line);
}
.order-item-row:last-child { border-bottom: 0; }
.order-item-row img, .order-item-row .no-image {
    width: 60px; height: 60px;
    border-radius: var(--r-sm);
    object-fit: cover;
    background: var(--c-bg-muted);
    border: 1px solid var(--c-line);
    flex-shrink: 0;
}
.order-item-row .no-image { display: flex; align-items: center; justify-content: center; }
.order-item-row .no-image .icon { width: 24px; height: 24px; color: var(--c-caption); }
.item-info { flex: 1; min-width: 0; }
.item-name {
    font-size: 14px; font-weight: 600; color: var(--c-heading);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 4px;
}
.item-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--c-muted); flex-wrap: wrap; }
.item-subtotal { font-weight: 700; color: var(--c-heading); }
.item-sku {
    font-size: 11.5px; color: var(--c-muted);
    background: var(--c-bg-muted);
    border-radius: 4px; padding: 1px 7px;
    display: inline-block;
    margin-top: 3px;
}
.item-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn-item {
    padding: 7px 14px;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--r-sm);
    background: #fff;
    font-size: 13px;
    color: var(--c-body);
    white-space: nowrap;
}
.btn-item:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn-item-primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.btn-item-primary:hover { background: var(--c-primary-hover); color: #fff; }
.item-reviewed {
    padding: 7px 14px; font-size: 13px;
    color: var(--c-primary); background: var(--c-primary-50);
    border-radius: var(--r-sm); white-space: nowrap;
}
.price-type-tag {
    font-size: 10.5px; color: #fff;
    background: var(--c-gold);
    border-radius: 3px; padding: 1px 6px;
    margin-left: 6px;
    vertical-align: 1px;
}

.order-card-foot {
    display: flex; align-items: center; justify-content: flex-end;
    gap: 16px; flex-wrap: wrap;
    padding: 13px 20px;
    background: var(--c-bg-soft);
    border-top: 1px solid var(--c-line);
}
.order-time { font-size: 12.5px; color: var(--c-caption); }
.order-total { font-size: 15px; font-weight: 700; color: var(--c-heading); }
.order-footer-actions { display: flex; gap: 8px; }
.btn-order {
    padding: 8px 18px;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--r-pill);
    background: #fff;
    font-size: 13.5px; font-weight: 600;
    color: var(--c-body);
}
.btn-order:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn-order-primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.btn-order-primary:hover { background: var(--c-primary-hover); color: #fff; }
.btn-order-danger:hover { border-color: var(--c-red); color: var(--c-red); }

/* 状态徽章 */
.status-badge {
    display: inline-flex; align-items: center;
    padding: 4px 12px; border-radius: var(--r-pill);
    font-size: 12px; font-weight: 700;
}
.status-badge.pending, .status-badge.processing { background: var(--c-gold-soft); color: #b06d05; }
.status-badge.paid, .status-badge.shipped { background: #e8f1fd; color: #1d63c4; }
.status-badge.completed { background: var(--c-primary-50); color: var(--c-primary-active); }
.status-badge.cancelled, .status-badge.refunded, .status-badge.groupbuying { background: var(--c-bg-muted); color: var(--c-muted); }
.payment-badge {
    display: inline-flex; align-items: center;
    padding: 4px 12px; border-radius: var(--r-pill);
    font-size: 12px; font-weight: 700;
}
.payment-badge.unpaid { background: #fdecec; color: #b42318; }
.payment-badge.paying { background: var(--c-gold-soft); color: #b06d05; }
.payment-badge.paid { background: var(--c-primary-50); color: var(--c-primary-active); }
.payment-badge.refunded { background: var(--c-bg-muted); color: var(--c-muted); }

/* 空态 / 加载 / 错误 */
.empty-state {
    text-align: center;
    padding: 64px 20px;
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
}
.empty-state .icon { width: 52px; height: 52px; color: var(--c-caption); margin-bottom: 12px; }
.empty-state p { color: var(--c-muted); font-size: 14px; }
.empty-state .empty-hint { color: var(--c-caption); font-size: 13px; margin-top: 8px; max-width: 480px; margin-left: auto; margin-right: auto; }
.loading-spinner {
    text-align: center;
    padding: 48px;
    color: var(--c-caption);
    font-size: 14px;
}
.loading-spinner::before {
    content: '';
    display: block;
    width: 30px; height: 30px;
    margin: 0 auto 12px;
    border: 3px solid var(--c-line);
    border-top-color: var(--c-primary);
    border-radius: 50%;
    animation: ac-spin .8s linear infinite;
}
@keyframes ac-spin { to { transform: rotate(360deg); } }
.error-msg {
    text-align: center;
    padding: 40px 20px;
    color: #b42318;
    font-size: 14px;
    background: #fdecec;
    border: 1px solid #f6c9c8;
    border-radius: var(--r-md);
}

/* 订单分页（JS 渲染） */
.pagination-container { display: flex; justify-content: center; gap: 6px; margin-top: 22px; flex-wrap: wrap; }
.pagination-container.hidden { display: none; }
.pagination-btn {
    min-width: 38px;
    padding: 8px 13px;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--r-sm);
    background: #fff;
    font-size: 13.5px;
    color: var(--c-body);
}
.pagination-btn:hover:not(.disabled):not(.active) { border-color: var(--c-primary); color: var(--c-primary); }
.pagination-btn.active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; font-weight: 600; }
.pagination-btn.disabled { opacity: .4; cursor: not-allowed; }
.pagination-ellipsis { padding: 8px 4px; color: var(--c-caption); }

/* =========================================================
 * 八、订单详情
 * ========================================================= */
.order-detail-header { margin-bottom: 18px; }
.back-link {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--c-primary);
    font-size: 13.5px; font-weight: 600;
    padding: 5px 10px;
    border-radius: var(--r-sm);
    margin-bottom: 8px;
}
.back-link .icon { width: 16px; height: 16px; }
.back-link:hover { background: var(--c-primary-50); }
.order-detail-title { font-size: 20px; font-weight: 700; color: var(--c-heading); }

.detail-status-bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    box-shadow: var(--sh-xs);
    padding: 15px 20px;
    margin-bottom: 14px;
}
.detail-status-bar .order-no-text { font-size: 13px; color: var(--c-caption); }
.pay-action-bar {
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    box-shadow: var(--sh-xs);
    padding: 14px 20px;
    margin-bottom: 14px;
    text-align: right;
}
.btn-pay-now {
    background: var(--c-primary);
    color: #fff;
    border: 0;
    padding: 11px 36px;
    border-radius: var(--r-pill);
    font-size: 14.5px; font-weight: 700;
    box-shadow: var(--sh-green);
}
.btn-pay-now:hover { background: var(--c-primary-hover); }

/* 进度条 */
.progress-card {
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    box-shadow: var(--sh-xs);
    padding: 22px 20px;
    margin-bottom: 14px;
}
.progress-card h3 { font-size: 15px; font-weight: 700; color: var(--c-heading); margin-bottom: 22px; padding-bottom: 10px; border-bottom: 1px solid var(--c-line); }
.progress-steps { display: flex; align-items: flex-start; padding: 0 8px; }
.progress-step {
    flex: 1;
    display: flex; flex-direction: column; align-items: center;
    position: relative; z-index: 1;
}
.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 17px; left: 50%; width: 100%; height: 3px;
    background: var(--c-line);
    z-index: -1;
}
.progress-step.active:not(:last-child)::after { background: var(--c-primary); }
.progress-icon {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--c-bg-muted); color: var(--c-caption);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 8px;
}
.progress-icon .icon { width: 18px; height: 18px; }
.progress-step.active .progress-icon,
.progress-step.current .progress-icon { background: var(--c-primary); color: #fff; }
.progress-step.current .progress-icon { animation: ac-pulse 2s infinite; }
@keyframes ac-pulse {
    0% { box-shadow: 0 0 0 0 rgba(14, 159, 110, 0.35); }
    70% { box-shadow: 0 0 0 9px rgba(14, 159, 110, 0); }
    100% { box-shadow: 0 0 0 0 rgba(14, 159, 110, 0); }
}
.progress-step.cancelled .progress-icon { background: var(--c-bg-muted); color: var(--c-caption); }
.progress-step.cancelled:not(:last-child)::after { background: var(--c-line); }
.progress-label { font-size: 12.5px; color: var(--c-caption); text-align: center; white-space: nowrap; }
.progress-step.active .progress-label,
.progress-step.current .progress-label { color: var(--c-primary-active); font-weight: 600; }
.progress-time { font-size: 11px; color: var(--c-caption); text-align: center; margin-top: 2px; white-space: nowrap; }

/* 详情信息卡 */
.detail-card {
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    box-shadow: var(--sh-xs);
    padding: 20px 22px;
    margin-bottom: 14px;
}
.detail-card h3 { font-size: 15px; font-weight: 700; color: var(--c-heading); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--c-line); }
.detail-info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px 16px; }
.detail-info-item { font-size: 13.5px; color: var(--c-body); min-width: 0; }
.detail-info-item.full { grid-column: 1 / -1; }
.detail-info-item .label { color: var(--c-caption); margin-right: 2px; }
.detail-info-item.highlight .value { color: var(--c-primary); font-size: 19px; font-weight: 700; }
.detail-info-item .discount { color: var(--c-red); }

.detail-item-row {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--c-line);
}
.detail-item-row:last-child { border-bottom: 0; }
.detail-item-row img, .detail-item-row .no-image {
    width: 52px; height: 52px;
    border-radius: var(--r-sm);
    object-fit: cover;
    background: var(--c-bg-muted);
}
.detail-item-row .no-image { display: flex; align-items: center; justify-content: center; }
.detail-item-row .no-image .icon { width: 20px; height: 20px; color: var(--c-caption); }
.detail-item-row .item-price-row { display: flex; gap: 12px; font-size: 13px; color: var(--c-muted); margin-top: 3px; flex-wrap: wrap; }
.detail-item-row .item-subtotal { font-weight: 700; color: var(--c-heading); }

/* 售后/评价记录 */
.after-sale-group, .review-item {
    border: 1px solid var(--c-line);
    border-radius: var(--r-sm);
    padding: 14px 16px;
    margin-bottom: 12px;
    background: var(--c-bg-soft);
}
.after-sale-group:last-child, .review-item:last-child { margin-bottom: 0; }
.after-sale-item { padding: 10px 0; border-bottom: 1px dashed var(--c-line); }
.after-sale-item:last-child { border-bottom: 0; }
.after-sale-header { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.after-sale-type { font-size: 14px; font-weight: 700; color: var(--c-heading); }
.after-sale-status { font-size: 13px; font-weight: 600; }
.after-sale-reason { font-size: 13.5px; color: var(--c-body); }
.after-sale-desc { font-size: 13px; color: var(--c-muted); }
.after-sale-time { font-size: 12px; color: var(--c-caption); margin-top: 4px; }
.after-sale-item-header, .review-product-info {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 10px; padding-bottom: 10px;
    border-bottom: 1px solid var(--c-line);
}
.after-sale-item-header img, .after-sale-item-header .no-image,
.review-product-info img, .review-product-info .no-image {
    width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--c-bg-muted);
}
.after-sale-item-header .no-image, .review-product-info .no-image { display: flex; align-items: center; justify-content: center; }
.after-sale-item-header .no-image .icon, .review-product-info .no-image .icon { width: 18px; height: 18px; color: var(--c-caption); }
.after-sale-product-name, .review-product-name { font-size: 13.5px; font-weight: 600; color: var(--c-heading); }
.review-stars { color: var(--c-gold); letter-spacing: 2px; margin-bottom: 6px; }
.rating-line { font-size: 13px; color: var(--c-gold); margin-bottom: 3px; letter-spacing: 1px; }
.rating-label { display: inline-block; width: 78px; color: var(--c-muted); letter-spacing: normal; }
.review-content { font-size: 13.5px; color: var(--c-body); line-height: 1.7; margin: 6px 0; }
.review-media { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.review-thumb, .review-thumb-video {
    width: 68px; height: 68px; object-fit: cover;
    border-radius: var(--r-sm); border: 1px solid var(--c-line);
}
.review-thumb-video { background: #000; }
.review-time { font-size: 12px; color: var(--c-caption); }

/* 评价弹窗星级 */
.rating-row { display: flex; gap: 4px; }
.review-star { font-size: 26px; cursor: pointer; color: #d7dde1; transition: color .15s ease; line-height: 1; }
.review-star:hover, .review-star.hover { color: #fbbf24; }
.review-star.active { color: var(--c-gold); }
.rating-field-label { font-size: 13px; color: var(--c-muted); margin-bottom: 4px; }
.file-preview-container { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.upload-hint { font-size: 12px; color: var(--c-caption); margin-top: 4px; }

/* =========================================================
 * 九、响应式
 * ========================================================= */
@media (max-width: 1024px) {
    .account-shell { grid-template-columns: 1fr; padding: 18px 16px 56px; }
    .account-topbar { display: flex; }
    .account-sidebar {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: 300px; max-width: 84vw;
        border-radius: 0;
        z-index: 10001;
        transform: translateX(-105%);
        transition: transform .25s ease;
        overflow-y: auto;
    }
    .account-sidebar.is-open { transform: translateX(0); box-shadow: var(--sh-lg); }
    .sidebar-mask {
        display: none;
        position: fixed; inset: 0;
        background: rgba(11, 31, 38, 0.45);
        z-index: 10000;
    }
    .sidebar-mask.show { display: block; }

    .ac-shortcut-grid { grid-template-columns: repeat(2, 1fr); }
    .ac-quick-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .auth-card { padding: 30px 22px 22px; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .ac-card { padding: 20px; }
    .ac-stat-card { flex-direction: column; align-items: flex-start; }
    .ac-stat-meta { gap: 18px; }
    .ac-shortcut-grid, .ac-quick-grid { grid-template-columns: 1fr; }
    .security-item { flex-direction: column; align-items: flex-start; gap: 10px; }
    .detail-info-grid { grid-template-columns: 1fr; }
    .detail-item-row { grid-template-columns: 44px 1fr; }
    .detail-item-row .item-actions { grid-column: 1 / -1; }
    .order-card-head, .order-card-foot { flex-direction: column; align-items: flex-start; padding: 12px 16px; }
    .order-items { padding: 2px 16px; }
    .order-item-row { flex-wrap: wrap; }
    .item-actions { width: 100%; }
    .order-footer-actions { width: 100%; }
    .order-footer-actions .btn-order { flex: 1; }
    .progress-steps { flex-wrap: wrap; gap: 14px 6px; }
    .progress-step { flex: 0 0 auto; width: 30%; }
    .progress-step:not(:last-child)::after { display: none; }
    .detail-status-bar { flex-direction: column; align-items: flex-start; }
    .captcha-img, .captcha-refresh-btn { width: 104px; }
}
