/* =========================================
   现代 3D 玻璃拟态风格 - 全局变量
   ========================================= */
:root {
    /* 核心色彩：高对比度、更鲜艳的现代调色板 */
    --primary: #4F46E5;       /* 靛蓝 */
    --primary-hover: #4338CA;
    --secondary: #8B5CF6;     /* 紫色 */
    --success: #10B981;       /* 翡翠绿 */
    --danger: #EF4444;        /* 珊瑚红 */
    --warning: #F59E0B;       /* 琥珀色 */
    --info: #3B82F6;          /* 亮蓝 */

    /* 文字色彩：高对比度，提升可读性 */
    --text-main: #0F172A;     /* 极深蓝灰 */
    --text-muted: #475569;    /* 中灰 */
    --text-light: #94A3B8;

    /* 玻璃拟态与微质感背景 */
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-bg-hover: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-highlight: rgba(255, 255, 255, 1);

    /* 极致圆角 */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-pill: 999px;

    /* 3D 阴影系统：组合多层阴影营造物理厚度 */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05), inset 0 1px 1px var(--glass-highlight);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04), inset 0 1px 1px var(--glass-highlight);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.15), inset 0 1px 1px var(--glass-highlight);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* =========================================
   全局样式重置
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', Arial, sans-serif;
    background-color: #F8FAFC;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 动态网格流体背景 - 提升通透感 */
.background-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background:
        radial-gradient(circle at 15% 50%, rgba(79, 70, 229, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%),
        radial-gradient(circle at 50% 80%, rgba(16, 185, 129, 0.1), transparent 25%);
    background-color: #F8FAFC;
    z-index: -1;
    animation: bgFloat 20s ease-in-out infinite alternate;
}

@keyframes bgFloat {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

/* =========================================
   悬浮式毛玻璃导航栏 (Floating Header)
   ========================================= */
.glass-header {
    position: sticky;
    top: 1rem;
    margin: 1rem 2rem;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: var(--glass-bg);
    backdrop-filter: saturate(200%) blur(30px);
    -webkit-backdrop-filter: saturate(200%) blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

/* 搜索栏：药丸形 3D 凹陷设计 */
.search-bar {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.5);
    padding: 0.3rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-inner);
}

.search-bar input {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--radius-pill);
    width: 320px;
    font-size: 1rem;
    background: transparent;
    color: var(--text-main);
    font-weight: 500;
    outline: none;
    transition: width 0.3s ease;
}

.search-bar input::placeholder {
    color: var(--text-light);
}

.search-bar button {
    padding: 0.6rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3), inset 0 1px 1px rgba(255,255,255,0.4);
    transition: all 0.2s;
    white-space: nowrap;
}

.search-bar button:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.search-bar button:active {
    transform: scale(0.95);
}

/* 用户操作区 */
.user-action {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.ai-helper-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 48px;
    padding: 0.45rem 1rem 0.45rem 0.55rem;
    border: 1px solid rgba(16, 185, 129, 0.36);
    border-radius: var(--radius-pill);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(236, 253, 245, 0.92)),
        var(--glass-bg);
    color: #064e3b;
    box-shadow: 0 14px 30px rgba(16, 185, 129, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.72);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    white-space: nowrap;
    isolation: isolate;
}

.ai-helper-cta::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 1px solid rgba(16, 185, 129, 0.22);
    opacity: 0.75;
    animation: aiHelperBeacon 2.8s ease-in-out infinite;
    z-index: -1;
}

.ai-helper-cta:hover {
    transform: translateY(-3px);
    border-color: rgba(16, 185, 129, 0.58);
    box-shadow: 0 18px 38px rgba(16, 185, 129, 0.28), inset 0 1px 1px rgba(255, 255, 255, 0.82);
}

.ai-helper-cta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #10b981;
    color: #fff;
    font-size: 1.15rem;
    box-shadow: 0 8px 18px rgba(16, 185, 129, 0.3);
}

.ai-helper-cta-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.05;
}

.ai-helper-cta-copy strong {
    font-size: 0.96rem;
    font-weight: 900;
    letter-spacing: 0;
}

.ai-helper-cta-copy small {
    margin-top: 0.18rem;
    color: rgba(6, 78, 59, 0.72);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0;
}

@keyframes aiHelperBeacon {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.06);
        opacity: 0.18;
    }
}

/* =========================================
   Standalone Auth Page
   ========================================= */
.auth-body {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        linear-gradient(180deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        #f7fafc;
    background-size: 34px 34px;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(340px, 520px);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: stretch;
    padding: clamp(1rem, 3vw, 2.5rem);
}

.auth-visual,
.auth-panel {
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(26px);
    -webkit-backdrop-filter: blur(26px);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

.auth-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: calc(100vh - clamp(2rem, 6vw, 5rem));
    padding: clamp(1.25rem, 3vw, 2.25rem);
    border-radius: 8px;
    overflow: hidden;
}

.auth-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(79, 70, 229, 0.16), transparent 44%),
        linear-gradient(315deg, rgba(16, 185, 129, 0.18), transparent 48%);
    pointer-events: none;
}

.auth-back,
.auth-brand,
.auth-board {
    position: relative;
    z-index: 1;
}

.auth-back {
    align-self: flex-start;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 800;
    padding: 0.55rem 0.8rem;
    border: 1px solid rgba(71, 85, 105, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auth-brand-mark {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 8px;
    background: #0f172a;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 900;
}

.auth-brand strong {
    display: block;
    font-size: clamp(1.8rem, 4vw, 3.4rem);
    line-height: 1.05;
    letter-spacing: 0;
}

.auth-brand span:not(.auth-brand-mark) {
    display: block;
    margin-top: 0.45rem;
    color: var(--text-muted);
    font-weight: 700;
}

.auth-board {
    display: grid;
    gap: 0.85rem;
    max-width: 440px;
}

.auth-board-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: rgba(255, 255, 255, 0.74);
}

.auth-board-row span {
    color: var(--text-muted);
    font-weight: 800;
}

.auth-board-row strong {
    color: var(--text-main);
}

.auth-panel {
    align-self: center;
    border-radius: 8px;
    padding: clamp(1.25rem, 4vw, 2rem);
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    padding: 0.35rem;
    margin-bottom: 1.4rem;
    border-radius: 8px;
    background: rgba(241, 245, 249, 0.95);
}

.auth-tabs button {
    border: 0;
    border-radius: 6px;
    padding: 0.78rem 1rem;
    background: transparent;
    color: var(--text-muted);
    font-weight: 900;
    cursor: pointer;
}

.auth-tabs button.active {
    color: #fff;
    background: #0f172a;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.auth-pane {
    display: none;
}

.auth-pane.active {
    display: block;
}

.auth-heading {
    margin-bottom: 1.2rem;
}

.auth-heading span {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--success);
    font-weight: 900;
}

.auth-heading h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    line-height: 1.1;
}

.auth-field {
    display: block;
    margin-bottom: 0.9rem;
}

.auth-field span {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.42rem;
    color: var(--text-main);
    font-weight: 850;
}

.auth-field em {
    color: var(--text-light);
    font-style: normal;
    font-weight: 700;
}

.auth-field input {
    width: 100%;
    min-height: 48px;
    padding: 0.78rem 0.9rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.42);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
}

.auth-field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.auth-field input.field-invalid,
.auth-privacy.field-invalid {
    border-color: var(--danger);
}

.auth-privacy {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    margin: 0.9rem 0 1rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    flex-wrap: wrap;
}

.auth-privacy input {
    width: 18px;
    height: 18px;
}

.auth-privacy button,
.auth-switch button {
    border: 0;
    background: transparent;
    color: var(--primary);
    font-weight: 900;
    cursor: pointer;
}

.auth-submit {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 8px;
    background: #4f46e5;
    color: #fff;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(79, 70, 229, 0.24);
}

.auth-submit:hover {
    background: #4338ca;
}

.auth-switch {
    margin-top: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-weight: 700;
}

.auth-panel .field-error {
    width: 100%;
    margin-top: 0.35rem;
    color: var(--danger);
    font-size: 0.86rem;
    font-weight: 700;
}

/* Standalone buyer orders page */
.orders-body {
    min-height: 100vh;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(180deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        #f6f8fb;
    background-size: 34px 34px;
}

.orders-page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.orders-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.orders-header h1 {
    margin-top: 10px;
    font-size: 2.1rem;
    line-height: 1.15;
}

.orders-header p {
    margin-top: 8px;
    color: var(--text-muted);
    font-weight: 600;
}

.orders-back,
.orders-refresh,
.orders-empty a,
.orders-card-actions button,
.orders-confirm-actions button {
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 8px;
    background: #fff;
    color: var(--primary);
    cursor: pointer;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.orders-back {
    display: inline-flex;
    padding: 8px 12px;
}

.orders-refresh {
    min-width: 86px;
    padding: 11px 16px;
}

.orders-back:hover,
.orders-refresh:hover,
.orders-empty a:hover,
.orders-card-actions button:hover,
.orders-confirm-actions button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.orders-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.orders-summary-item {
    min-height: 92px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow-sm);
}

.orders-summary-item span {
    display: block;
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.orders-summary-item strong {
    display: block;
    margin-top: 8px;
    font-size: 1.9rem;
    line-height: 1;
}

.orders-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.orders-tabs button {
    flex: 0 0 auto;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 800;
    padding: 10px 14px;
}

.orders-tabs button.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.orders-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.orders-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 16px;
    min-height: 210px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-md);
}

.orders-card-media {
    min-height: 182px;
    overflow: hidden;
    border-radius: 8px;
    background: #e2e8f0;
}

.orders-card-media img,
.orders-card-placeholder {
    width: 100%;
    height: 100%;
    min-height: 182px;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orders-card-placeholder {
    color: var(--primary);
    font-size: 2rem;
    font-weight: 900;
    background: repeating-linear-gradient(135deg, #eef2ff 0, #eef2ff 12px, #f8fafc 12px, #f8fafc 24px);
}

.orders-card-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.orders-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--text-light);
    font-size: 0.82rem;
    font-weight: 700;
}

.orders-state {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.12);
    color: var(--info);
    white-space: nowrap;
}

.orders-state.pending_pay {
    background: rgba(245, 158, 11, 0.14);
    color: var(--warning);
}

.orders-state.trading {
    background: rgba(79, 70, 229, 0.13);
    color: var(--primary);
}

.orders-state.pending_ship {
    background: rgba(79, 70, 229, 0.13);
    color: var(--primary);
}

.orders-state.shipped {
    background: rgba(59, 130, 246, 0.14);
    color: var(--info);
}

.orders-state.completed {
    background: rgba(16, 185, 129, 0.14);
    color: var(--success);
}

.orders-state.closed {
    background: rgba(100, 116, 139, 0.14);
    color: var(--text-muted);
}

.orders-card h2 {
    font-size: 1.08rem;
    line-height: 1.35;
}

.orders-card p {
    display: -webkit-box;
    min-height: 43px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.orders-meta {
    display: grid;
    gap: 6px;
    margin-top: auto;
}

.orders-meta div {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 8px;
    align-items: baseline;
}

.orders-meta dt {
    color: var(--text-light);
    font-size: 0.78rem;
    font-weight: 800;
}

.orders-meta dd {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.orders-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.orders-card-actions button {
    min-height: 36px;
    padding: 8px 12px;
}

.orders-card-actions button:disabled {
    cursor: default;
    opacity: 0.72;
    transform: none;
    box-shadow: none;
}

.orders-primary-action {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}

.orders-secondary-action.danger,
.orders-confirm-actions .danger {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.28);
}

.orders-empty {
    margin-top: 20px;
    padding: 52px 20px;
    border: 1px dashed rgba(148, 163, 184, 0.5);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.74);
    text-align: center;
}

.orders-empty h2 {
    margin-bottom: 8px;
}

.orders-empty p {
    color: var(--text-muted);
    font-weight: 600;
}

.orders-empty a {
    display: inline-flex;
    margin-top: 18px;
    padding: 10px 14px;
}

.orders-confirm {
    max-width: 430px;
}

.orders-confirm p {
    color: var(--text-muted);
    margin: 12px 0 20px;
}

.orders-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.orders-confirm-actions button {
    min-width: 82px;
    padding: 10px 14px;
}

.orders-toolbar {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(190px, 230px) auto auto;
    align-items: center;
    gap: 10px;
    margin: -4px 0 18px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-sm);
}

.orders-search-field,
.orders-category-field {
    display: flex;
    align-items: center;
    min-height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.36);
    border-radius: 8px;
    background: #fff;
}

.orders-search-field:focus-within,
.orders-category-field:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.orders-search-field > span {
    padding-left: 13px;
    color: var(--text-light);
    font-size: 1.25rem;
}

.orders-search-field input,
.orders-category-field select {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-main);
    font: inherit;
}

.orders-search-field input {
    padding: 10px 12px 10px 8px;
}

.orders-category-field > span {
    padding-left: 12px;
    color: var(--text-light);
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.orders-category-field select {
    padding: 10px 30px 10px 8px;
    cursor: pointer;
}

.orders-filter-clear {
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(148, 163, 184, 0.36);
    border-radius: 8px;
    background: #fff;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 800;
}

.orders-filter-clear:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.orders-result-count {
    min-width: 84px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

.orders-card-top > div {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.orders-category-badge {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 3px 9px;
    border-radius: 8px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.75rem;
    white-space: nowrap;
}

.orders-card-actions .reviewed {
    color: #8a6a16;
    border-color: rgba(202, 154, 34, 0.28);
    background: #fff8dd;
}

.trade-review-modal {
    position: relative;
    max-width: 500px;
    padding: 2rem;
}

.trade-review-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.72);
    color: var(--text-main);
    font-size: 1.4rem;
    cursor: pointer;
}

.trade-review-eyebrow {
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.trade-review-modal h2 {
    margin: 0.45rem 0 0.35rem;
}

.trade-review-modal > p {
    margin: 0 0 1.25rem;
    color: var(--text-muted);
}

.trade-review-stars {
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 0.5rem;
}

.trade-review-stars button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #d6d3cb;
    font-size: clamp(2rem, 8vw, 2.8rem);
    line-height: 1;
    cursor: pointer;
    transition: color 0.16s ease, transform 0.16s ease;
}

.trade-review-stars button:hover,
.trade-review-stars button.active {
    color: #e4a91b;
    transform: translateY(-2px);
}

.trade-review-score-text {
    min-height: 1.5rem;
    margin: 0.65rem 0 1rem;
    color: #8a6a16;
    font-weight: 700;
    text-align: center;
}

.trade-review-content span {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.trade-review-content small {
    color: var(--text-muted);
    font-weight: 500;
}

.trade-review-content textarea {
    width: 100%;
    padding: 0.85rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.74);
    color: var(--text-main);
    font: inherit;
    resize: vertical;
}

.trade-review-content textarea:focus {
    outline: 2px solid rgba(79, 70, 229, 0.2);
    border-color: var(--primary);
}

.trade-review-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    margin-top: 1.25rem;
}

.trade-review-actions button {
    min-width: 96px;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.trade-review-actions .orders-primary-action {
    border-color: transparent;
    background: var(--primary);
    color: #fff;
}

.trade-review-actions button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

#confirmBtn {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

#confirmBtn.danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.orders-card-loading .orders-card-media,
.orders-card-loading h2,
.orders-card-loading p,
.orders-card-loading span {
    border-radius: 8px;
    background: linear-gradient(90deg, #e2e8f0, #f8fafc, #e2e8f0);
    background-size: 200% 100%;
    animation: ordersLoading 1.2s infinite linear;
}

.orders-card-loading h2 {
    height: 22px;
}

.orders-card-loading p {
    height: 48px;
}

.orders-card-loading span {
    width: 90px;
    height: 24px;
}

@keyframes ordersLoading {
    to { background-position: -200% 0; }
}

@media (max-width: 860px) {
    .orders-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .orders-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .orders-grid {
        grid-template-columns: 1fr;
    }

    .orders-toolbar {
        grid-template-columns: minmax(0, 1fr) minmax(180px, 0.65fr) auto;
    }

    .orders-result-count {
        grid-column: 1 / -1;
        text-align: left;
    }
}

@media (max-width: 560px) {
    .orders-page {
        width: min(100% - 20px, 1180px);
        padding-top: 18px;
    }

    .orders-card {
        grid-template-columns: 1fr;
    }

    .orders-card-media,
    .orders-card-media img,
    .orders-card-placeholder {
        min-height: 180px;
    }

    .orders-toolbar {
        grid-template-columns: 1fr auto;
    }

    .orders-search-field {
        grid-column: 1 / -1;
    }

    .orders-category-field {
        min-width: 0;
    }
}

@media (max-width: 860px) {
    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-visual {
        min-height: 260px;
    }
}

.header-icon-group {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.header-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: var(--radius-pill);
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.header-icon:hover {
    background: rgba(15, 23, 42, 0.06);
    transform: translateY(-2px);
}

.header-icon.ai-cs-icon {
    color: #4f46e5;
}

.header-icon.ai-cs-icon:hover {
    background: rgba(79, 70, 229, 0.1);
}

.account-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.account-menu::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    height: 0.8rem;
}

.btn-publish {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3), inset 0 1px 1px rgba(255,255,255,0.4);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
}

.btn-publish:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 25px rgba(79, 70, 229, 0.4), inset 0 1px 1px rgba(255,255,255,0.5);
}

.btn-wishlist-publish {
    background: linear-gradient(135deg, var(--success), var(--info));
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.24), inset 0 1px 1px rgba(255,255,255,0.4);
}

.btn-user-center {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.6rem 1rem;
    background: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.account-avatar {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(135deg, #14b8a6, #2563eb);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.38);
}

.account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar-img,
.seller-avatar-img,
.conversation-avatar-img,
.chat-header-avatar,
.message-avatar-img,
.user-center-avatar {
    display: inline-flex;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 50%;
    object-fit: cover;
    background: #e2e8f0;
}

.user-avatar-img,
.seller-avatar-img {
    width: 40px;
    height: 40px;
}

.conversation-avatar-img {
    width: 100%;
    height: 100%;
}

.chat-header-avatar {
    width: 42px;
    height: 42px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.message-avatar-img {
    width: 24px;
    height: 24px;
}

.chat-header-user {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.account-menu.logged-in .btn-user-center {
    padding: 0.42rem 0.55rem 0.42rem 0.42rem;
}

.account-menu.logged-in #userText {
    display: none;
}

.btn-user-center:hover {
    background: #111827;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.account-chevron {
    font-size: 0.9rem;
    opacity: 0.72;
    transition: transform 0.24s ease;
}

.account-menu:hover .account-chevron,
.account-menu:focus-within .account-chevron {
    transform: rotate(180deg);
}

.account-dropdown.show {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.account-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.7rem);
    right: 0;
    width: 320px;
    padding: 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 22px 52px rgba(15, 23, 42, 0.18);
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
    z-index: 1500;
    overflow-y: auto;
}

.account-menu:hover .account-dropdown,
.account-menu:focus-within .account-dropdown {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}




.account-menu .account-dropdown-auth,
.account-menu .account-dropdown-guest {
    display: flex;
}

.account-menu.logged-in .account-dropdown-guest,
.account-menu:not(.logged-in) .account-dropdown-auth {
    display: none;
}

.account-dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1rem;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--text-main);
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
    font-weight: 600;
}

.account-dropdown-item:hover {
    background: rgba(15, 23, 42, 0.06);
    transform: translateX(2px);
}





.account-dropdown-item > span:first-child {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.1);
}

.account-dropdown-item strong,
.account-dropdown-item small {
    display: block;
    font-size: 0.95rem;
    letter-spacing: 0;
}

.account-dropdown-item strong {
    font-size: 0.92rem;
    font-weight: 900;
}

.account-dropdown-item small {
    margin-top: 0.12rem;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 650;
}

.account-dropdown-item.danger {
    color: var(--danger);
}

.account-dropdown-item.danger > span:first-child {
    background: rgba(239, 68, 68, 0.1);
}

/* =========================================
   主容器与过滤器 (Pill Filters)
   ========================================= */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
}

.filters {
    display: grid;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.76));
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    width: min(100%, 1180px);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    overflow: visible;
}

.category-filter-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.2rem 0.25rem 0.9rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.category-filter-kicker {
    display: block;
    margin-bottom: 0.18rem;
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.category-filter-heading h2 {
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    line-height: 1.25;
    letter-spacing: -0.03em;
}

.category-filter-heading p {
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.category-filter-summary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.45rem 0.85rem;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.category-filter-summary strong {
    color: var(--text-main);
}

.category-clear-btn {
    padding: 0.42rem 0.75rem;
    border: 1px solid rgba(79, 70, 229, 0.24);
    border-radius: var(--radius-pill);
    background: rgba(79, 70, 229, 0.06);
    color: var(--primary);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.category-clear-btn:disabled {
    border-color: rgba(148, 163, 184, 0.2);
    color: var(--text-light);
    cursor: default;
    opacity: 0.72;
}

.filter-btn,
.category-group-btn {
    min-height: 40px;
    padding: 0.65rem 1.2rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 800;
    color: var(--text-muted);
    transition: all 0.3s;
    white-space: nowrap;
    font: inherit;
}

.category-primary-row,
.category-secondary-row {
    display: grid;
    gap: 0.65rem;
}

.category-primary-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.category-group-btn,
.category-all-btn {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    min-height: 72px;
    padding: 0.75rem;
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.68);
    text-align: left;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.035);
}

.category-group-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    background: rgba(79, 70, 229, 0.08);
    font-size: 1.1rem;
}

.category-group-copy {
    display: grid;
    min-width: 0;
    line-height: 1.25;
}

.category-group-copy strong {
    overflow: hidden;
    color: #273449;
    font-size: 0.88rem;
    text-overflow: ellipsis;
}

.category-group-copy small {
    margin-top: 0.18rem;
    overflow: hidden;
    color: var(--text-light);
    font-size: 0.7rem;
    font-weight: 600;
    text-overflow: ellipsis;
}

.category-count {
    min-width: 25px;
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-pill);
    background: #eef2ff;
    color: var(--primary);
    font-size: 0.7rem;
    text-align: center;
}

.category-group-btn:hover,
.category-all-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(79, 70, 229, 0.3);
    background: white;
    color: var(--primary);
}

.category-group-btn.active,
.category-all-btn.active {
    border-color: rgba(79, 70, 229, 0.5);
    background: linear-gradient(145deg, #ffffff, #f1f3ff);
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.13);
}

.category-group-btn.active::after,
.category-all-btn.active::after {
    position: absolute;
    right: 10px;
    bottom: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary);
    content: '';
}

.category-group-btn.is-empty,
.category-sub-btn.is-empty {
    opacity: 0.55;
}

.category-secondary-panel {
    padding: 0.85rem;
    border: 1px solid rgba(79, 70, 229, 0.14);
    border-radius: calc(var(--radius-lg) - 7px);
    background: linear-gradient(135deg, rgba(238, 242, 255, 0.82), rgba(255, 255, 255, 0.72));
    animation: categoryPanelIn 0.2s ease-out;
}

.category-secondary-panel[hidden] {
    display: none;
}

@keyframes categoryPanelIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.category-secondary-heading {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-bottom: 0.65rem;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 900;
}

.category-secondary-heading small {
    color: var(--text-light);
    font-size: 0.72rem;
    font-weight: 600;
}

.category-secondary-row {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.category-sub-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(255, 255, 255, 0.82);
    color: #475569;
    font-size: 0.8rem;
    font-weight: 750;
    box-shadow: none;
}

.category-sub-btn small {
    min-width: 22px;
    padding: 0.12rem 0.35rem;
    border-radius: var(--radius-pill);
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.66rem;
    text-align: center;
}

.category-sub-btn:hover,
.category-sub-btn.active {
    border-color: rgba(79, 70, 229, 0.4);
    background: white;
    color: var(--primary);
}

.category-sub-btn.active {
    box-shadow: 0 7px 16px rgba(79, 70, 229, 0.11);
}

/* =========================================
   核心：3D 视差倾斜玻璃卡片 (Parallax Glass Cards)
   ========================================= */
.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 3.25rem;
    align-items: stretch;
}

.glass-card.item {
    background: var(--glass-bg);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);

    /* 3D 核心设置 */
    transform-style: preserve-3d;
    perspective: 1200px;
    transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale3d(1, 1, 1);
    transition: transform 0.1s ease-out, box-shadow 0.4s ease, background 0.4s ease;

    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

.glass-card.item:not(.wishlist-card) {
    min-height: 560px;
    height: 100%;
    overflow: hidden;
}

.glass-card.item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 50%);
    pointer-events: none;
    z-index: 10;
    transform: translateZ(1px);
}

.glass-card.item:hover {
    background: var(--glass-bg-hover);
    transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale3d(1.03, 1.03, 1.03);
    box-shadow: var(--shadow-lg), 0 30px 60px rgba(79, 70, 229, 0.15);
    z-index: 2;
}

.card-img, .glass-card.item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transform: translateZ(20px);
    transition: transform 0.4s ease;
}

.glass-card.item:hover .card-img {
    transform: translateZ(30px) scale(1.02);
}

.card-content {
    padding: 1.65rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    transform: translateZ(30px);
    transition: transform 0.4s ease;
}

.glass-card.item:hover .card-content {
    transform: translateZ(40px);
}

.title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    word-break: break-word;
    line-height: 1.35;
}

.glass-card.item:not(.wishlist-card) .title {
    min-height: 3.38rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.glass-card.item:not(.wishlist-card) .desc {
    min-height: 3.04rem;
}

.card-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed rgba(0,0,0,0.1);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.glass-card.item:not(.wishlist-card) .card-info {
    min-height: 64px;
}

.price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--danger);
    background: linear-gradient(135deg, #EF4444, #F43F5E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.time {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    background: rgba(0,0,0,0.04);
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-pill);
}

.seller-trust-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.2rem 0 0.9rem;
}

.glass-card.item:not(.wishlist-card) .seller-trust-row {
    min-height: 24px;
}

.seller-trust-score,
.seller-trust-tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0.25rem 0.55rem;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.seller-trust-score {
    color: #0F766E;
    background: rgba(20, 184, 166, 0.12);
    border: 1px solid rgba(15, 118, 110, 0.16);
}

.seller-trust-tag.trusted {
    color: #166534;
    background: rgba(34, 197, 94, 0.14);
}

.seller-trust-tag.fast {
    color: #075985;
    background: rgba(14, 165, 233, 0.14);
}

.seller-trust-tag.new-user {
    color: #92400E;
    background: rgba(245, 158, 11, 0.16);
}

.seller-trust-tag.neutral {
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.05);
}

.seller-trust-detail {
    margin-top: 1rem;
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-md);
}

.seller-trust-detail .seller-trust-row {
    margin-bottom: 0.75rem;
}

.seller-trust-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.6rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.seller-trust-detail-head strong {
    color: #0F766E;
    font-size: 1.4rem;
}

.seller-trust-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: 0.5rem;
}

.seller-trust-metrics span {
    padding: 0.45rem 0.55rem;
    background: rgba(0, 0, 0, 0.035);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.card-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: 0.85rem;
    margin-top: auto;
}

.card-actions button {
    min-width: 0;
    min-height: 46px;
    padding: 0.72rem 0.6rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.btn-favorite {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-favorite:hover {
    background: #FFF1F2;
    color: var(--danger);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.15);
}

.btn-favorite.favorited {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.btn-detail, .btn-message {
    background: var(--primary);
    color: white;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.3), 0 4px 12px rgba(79, 70, 229, 0.2);
}

.btn-detail:hover, .btn-message:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.3), 0 8px 16px rgba(79, 70, 229, 0.3);
}

.btn-edit {
    background: var(--info);
    color: white;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.3), 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-edit:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.3), 0 8px 16px rgba(59, 130, 246, 0.3);
}

.btn-edit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-edit:disabled:hover {
    transform: none;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.3), 0 4px 12px rgba(59, 130, 246, 0.2);
}

.wishlist-card .card-content {
    min-height: 280px;
}

.wishlist-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.wishlist-status {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 800;
}

.wishlist-status.active {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
}

.wishlist-status.paused {
    background: rgba(148, 163, 184, 0.18);
    color: var(--text-muted);
}

.wishlist-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.2rem;
}

.wishlist-keywords span {
    padding: 0.28rem 0.65rem;
    border-radius: var(--radius-pill);
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
    font-size: 0.82rem;
    font-weight: 800;
}

.wishlist-match-count {
    color: var(--success);
    font-weight: 900;
}

.wishlist-toolbar {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-start;
}

.wishlist-toolbar button {
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.72rem 1rem;
    background: var(--glass-bg-hover);
    color: var(--primary);
    font-weight: 900;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

/* =========================================
   模态框 (Modals)
   ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 10001; /* 提高z-index以确保置顶显示 */
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
}

.modal-content.glass-card {
    background: var(--glass-bg-hover);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg), 0 0 0 1px inset rgba(255,255,255,0.8);
    transform: scale(0.95);
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.glass-card::-webkit-scrollbar {
    width: 8px;
}

.modal-content.glass-card::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.modal-content.glass-card::-webkit-scrollbar-thumb {
    background: rgba(79, 70, 229, 0.3);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.modal-content.glass-card::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 70, 229, 0.5);
}

@keyframes popIn {
    to { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    text-align: center;
}

.new-user-tutorial-modal {
    background: rgba(15, 23, 42, 0.5);
}

.new-user-tutorial-card {
    max-width: 820px !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.new-user-tutorial-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-main);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    z-index: 1;
}

.new-user-tutorial-hero {
    padding: 2.2rem 2.4rem 1.4rem;
    background:
        linear-gradient(135deg, rgba(79, 70, 229, 0.14), rgba(8, 145, 178, 0.08)),
        var(--glass-bg-hover);
    border-bottom: 1px solid var(--glass-border);
}

.new-user-tutorial-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 0.75rem;
    border-radius: var(--radius-pill);
    background: rgba(34, 197, 94, 0.13);
    color: #047857;
    font-size: 0.82rem;
    font-weight: 900;
}

.new-user-tutorial-hero h2 {
    margin: 0.85rem 0 0.5rem;
    text-align: left;
    font-size: 2rem;
}

.new-user-tutorial-hero p {
    max-width: 560px;
    color: var(--text-muted);
    font-weight: 650;
    line-height: 1.7;
}

.new-user-tutorial-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--glass-border);
}

.new-user-tutorial-grid article {
    min-height: 168px;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.84);
}

.new-user-tutorial-grid article span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-weight: 900;
    margin-bottom: 0.85rem;
}

.new-user-tutorial-grid article strong {
    display: block;
    color: var(--text-main);
    font-size: 1rem;
    margin-bottom: 0.45rem;
}

.new-user-tutorial-grid article p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.65;
}

.new-user-tutorial-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 1.25rem 2.4rem 2rem;
    background: rgba(255, 255, 255, 0.92);
}

.new-user-tutorial-actions button {
    min-height: 42px;
    padding: 0 1rem;
    border: 1px solid rgba(79, 70, 229, 0.22);
    border-radius: var(--radius-pill);
    background: white;
    color: var(--primary);
    font-weight: 850;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.new-user-tutorial-actions button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    background: rgba(79, 70, 229, 0.06);
}

.new-user-tutorial-actions .new-user-tutorial-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.24);
}

.detail-item-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.detail-item-image:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.image-preview-modal {
    z-index: 10002;
    padding: 2rem;
    background: rgba(15, 23, 42, 0.82);
    flex-direction: column;
    gap: 1rem;
}

.image-preview-stage {
    position: relative;
    width: 100%;
    height: calc(100vh - 7.5rem);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.image-preview-stage img {
    max-width: min(92vw, 1100px);
    max-height: 82vh;
    border-radius: var(--radius-lg);
    object-fit: contain;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    transform: scale(var(--preview-zoom, 1));
    transform-origin: center center;
    transition: transform 0.18s ease;
}

.image-preview-close {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-main);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.image-preview-toolbar {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-md);
}

.image-preview-toolbar button {
    min-width: 40px;
    height: 36px;
    padding: 0 0.75rem;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--primary);
    color: white;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
}

.image-preview-toolbar span {
    min-width: 56px;
    text-align: center;
    color: var(--text-main);
    font-weight: 800;
}

.multi-image-preview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.multi-image-preview-grid.is-active {
    display: grid !important;
}

.multi-image-preview-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow-sm);
}

.multi-image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.multi-image-preview-remove {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 0;
    background: rgba(15, 23, 42, 0.78);
    color: white;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.multi-image-preview-count {
    grid-column: 1 / -1;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.image-preview-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(15, 23, 42, 0.72);
    color: white;
    font-size: 1.7rem;
    cursor: pointer;
    display: none;
    place-items: center;
}

.image-preview-nav.show {
    display: grid;
}

.image-preview-nav.prev {
    left: 1.25rem;
}

.image-preview-nav.next {
    right: 1.25rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-inner);
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-main);
    transition: all 0.3s;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    outline: none;
}

.privacy-agreement {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 0.25rem;
    margin-bottom: 0;
}

.privacy-agreement label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-muted);
    cursor: pointer;
}

.privacy-link {
    padding: 0;
    border: none;
    background: transparent;
    color: var(--primary);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
}

.privacy-link:hover {
    text-decoration: underline;
}

.privacy-agreement .field-error {
    flex-basis: 100%;
}

.privacy-agreement input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    margin: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

.privacy-modal-content {
    max-width: 760px;
}

.privacy-policy-content {
    max-height: 60vh;
    overflow-y: auto;
    padding: 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.65);
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.8;
    white-space: pre-wrap;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3), inset 0 1px 1px rgba(255,255,255,0.3);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(79, 70, 229, 0.4), inset 0 1px 1px rgba(255,255,255,0.4);
}

.btn-appointment-trigger {
    width: 76px;
    flex: 0 0 76px;
    border: none;
    border-radius: var(--radius-md);
    background: rgba(16, 185, 129, 0.13);
    color: #047857;
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--shadow-inner);
}

.btn-appointment-trigger:hover {
    background: rgba(16, 185, 129, 0.22);
}

.trade-appointment-panel {
    padding: 1rem 1.5rem;
    background: rgba(236, 253, 245, 0.78);
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

.trade-appointment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.trade-appointment-head strong {
    display: block;
    color: var(--text-main);
}

.trade-appointment-head span {
    display: block;
    margin-top: 0.15rem;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.trade-appointment-head button,
.trade-location-chips button,
.trade-appointment-send {
    border: none;
    border-radius: var(--radius-pill);
    font-weight: 800;
    cursor: pointer;
}

.trade-appointment-head button {
    padding: 0.4rem 0.75rem;
    background: white;
    color: var(--text-muted);
}

.trade-location-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}

.trade-location-chips button {
    padding: 0.42rem 0.72rem;
    background: white;
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.24);
}

.trade-location-chips button:hover {
    background: #d1fae5;
}

.trade-appointment-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.trade-appointment-fields input,
.trade-appointment-panel textarea {
    width: 100%;
    border: 1px solid rgba(16, 185, 129, 0.18);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.82);
    color: var(--text-main);
    font: inherit;
    outline: none;
}

.trade-appointment-fields input {
    padding: 0.68rem 0.8rem;
}

.trade-appointment-panel textarea {
    min-height: 58px;
    padding: 0.7rem 0.8rem;
    resize: vertical;
}

.trade-appointment-send {
    width: 100%;
    margin-top: 0.7rem;
    padding: 0.75rem 1rem;
    background: #10b981;
    color: white;
    box-shadow: 0 8px 18px rgba(16, 185, 129, 0.22);
}

.chat-message-wrap {
    max-width: min(78%, 420px);
}

.chat-message-wrap.mine {
    align-self: flex-end;
}

.chat-message-wrap.other {
    align-self: flex-start;
}

.chat-bubble {
    padding: 0.8rem 1.2rem;
    box-shadow: var(--shadow-sm);
    line-height: 1.5;
    word-break: break-word;
}

.chat-bubble.mine {
    background: var(--primary);
    color: white;
    border-radius: 20px 20px 0 20px;
}

.chat-bubble.other {
    background: white;
    color: var(--text-main);
    border-radius: 20px 20px 20px 0;
}

.chat-message-time {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.chat-message-time.mine {
    text-align: right;
}

.chat-message-time.other {
    text-align: left;
}

.trade-appointment-card {
    min-width: 250px;
    padding: 1rem;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #ecfdf5);
    border: 1px solid rgba(16, 185, 129, 0.22);
    color: var(--text-main);
    box-shadow: var(--shadow-md);
}

.trade-appointment-card.mine {
    border-top-right-radius: 4px;
}

.trade-appointment-card.other {
    border-top-left-radius: 4px;
}

.trade-card-title {
    margin-bottom: 0.35rem;
    color: #047857;
    font-size: 0.88rem;
    font-weight: 900;
}

.trade-card-item {
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    font-size: 0.86rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trade-card-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.45rem 0;
    border-top: 1px dashed rgba(16, 185, 129, 0.25);
}

.trade-card-row span {
    color: var(--text-muted);
    font-size: 0.84rem;
}

.trade-card-row strong {
    text-align: right;
}

.trade-card-note {
    margin-top: 0.7rem;
    padding: 0.7rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.72);
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

/* =========================================
   AI 审核标准展示样式
   ========================================= */
.ai-review-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.ai-review-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.ai-badge-excellent {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.25));
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.ai-badge-good {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.25));
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.ai-badge-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.25));
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.ai-badge-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.25));
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.ai-review-panel {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.5));
    backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    animation: slideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px dashed rgba(0, 0, 0, 0.08);
}

.ai-review-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
}

.ai-score-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 900;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.ai-score-circle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: conic-gradient(from 0deg, currentColor var(--score-percent, 0%), transparent 0%);
    opacity: 0.2;
}

.ai-score-excellent { background: linear-gradient(135deg, #10b981, #059669); color: white; }
.ai-score-good { background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; }
.ai-score-warning { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
.ai-score-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }

.ai-standards-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.ai-standard-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
    transition: all 0.3s ease;
}

.ai-standard-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.ai-standard-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.ai-standard-content { flex: 1; }
.ai-standard-name { font-weight: 700; font-size: 0.95rem; color: var(--text-main); margin-bottom: 0.2rem; }
.ai-standard-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }

.ai-suggestions {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
}

.ai-suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.6rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.ai-suggestion-item:not(:last-child) { border-bottom: 1px dashed rgba(0, 0, 0, 0.06); }
.ai-suggestion-icon { font-size: 1rem; flex-shrink: 0; }
.ai-warning-item { color: var(--danger); font-weight: 600; }
.ai-review-time { font-size: 0.8rem; color: var(--text-light); margin-top: 0.8rem; text-align: right; font-style: italic; }

.ai-publish-tip {
    padding: 1rem;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.ai-publish-tip-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.ai-publish-tip-content { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }
.ai-publish-tip-content ul { margin: 0.5rem 0 0 1.2rem; padding: 0; }
.ai-publish-tip-content li { margin-bottom: 0.3rem; }

.price-reference-panel {
    margin: 0 0 1rem;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-left: 4px solid var(--info);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-sm);
}

.price-reference-panel.detail {
    margin-bottom: 1.5rem;
}

.price-reference-panel.high {
    border-color: rgba(239, 68, 68, 0.24);
    border-left-color: var(--danger);
    background: rgba(254, 242, 242, 0.78);
}

.price-reference-panel.fair,
.price-reference-panel.reference {
    border-color: rgba(59, 130, 246, 0.24);
    border-left-color: var(--info);
    background: rgba(239, 246, 255, 0.78);
}

.price-reference-panel.deal {
    border-color: rgba(16, 185, 129, 0.24);
    border-left-color: var(--success);
    background: rgba(236, 253, 245, 0.78);
}

.price-reference-panel.insufficient {
    border-color: rgba(100, 116, 139, 0.2);
    border-left-color: var(--text-light);
    background: rgba(248, 250, 252, 0.78);
}

.price-reference-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
}

.price-reference-title span {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.price-reference-title strong {
    flex-shrink: 0;
    padding: 0.22rem 0.65rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.72);
    color: var(--text-main);
    font-size: 0.8rem;
}

.price-reference-message {
    color: var(--text-main);
    font-size: 0.9rem;
    line-height: 1.55;
}

.price-reference-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.65rem;
}

.price-reference-stats span {
    padding: 0.24rem 0.58rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.78);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.price-reference-footnote {
    margin-top: 0.55rem;
    color: var(--text-light);
    font-size: 0.76rem;
}

/* 发布模态框滚动优化 */
#publishModal .modal-content.glass-card {
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    scroll-behavior: smooth;
}

#publishModal .modal-content.glass-card::-webkit-scrollbar {
    width: 10px;
}

#publishModal .modal-content.glass-card::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 5px;
    margin: 10px 0;
}

#publishModal .modal-content.glass-card::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: content-box;
}

#publishModal .modal-content.glass-card::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--secondary));
    border: 2px solid transparent;
    background-clip: content-box;
}

/* 移动端模态框滚动优化 */
@media (max-width: 768px) {
    .modal-content.glass-card {
        max-height: 95vh;
        padding: 1.5rem;
        width: 95%;
    }

    #publishModal .modal-content.glass-card {
        max-height: 90vh;
    }

    /* 确保表单在滚动时不会溢出 */
    #publishForm {
        overflow-x: hidden;
    }
}

/* =========================================
   移动端与多设备响应式适配 (Responsive Design)
   ========================================= */

/* 平板端及中型屏幕适配 (Tablet & Laptop) */
@media (max-width: 1024px) {
    .container {
        padding: 1.5rem;
    }

    .item-grid {
        gap: 1.5rem;
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }

    .glass-header {
        margin: 1rem;
        padding: 1rem 1.5rem;
    }

    .search-bar input {
        width: 250px;
    }

    .category-primary-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* 移动端主适配 (Mobile & Small Tablet) */
@media (max-width: 768px) {
    .glass-header {
        margin: 0.5rem;
        flex-direction: column;
        border-radius: var(--radius-lg);
        gap: 1rem;
        padding: 1rem;
    }

    .search-bar {
        width: 100%;
        flex-direction: row;
        box-sizing: border-box;
    }

    .search-bar input {
        width: 100%;
        flex: 1;
    }

    .user-action {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .ai-helper-cta {
        order: -1;
        width: 100%;
        justify-content: center;
    }

    .account-menu {
        margin-left: auto;
    }

    .account-dropdown {
        right: 0;
        width: min(280px, calc(100vw - 2rem));
    }

    .btn-publish {
        flex: 1;
        justify-content: center;
    }

    .filters {
        width: 100%;
        border-radius: var(--radius-md);
        padding: 0.85rem;
    }

    .category-filter-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.75rem;
    }

    .category-filter-summary {
        justify-content: flex-start;
        width: 100%;
    }

    .category-primary-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-group-btn,
    .category-all-btn {
        min-height: 66px;
        padding: 0.62rem;
    }

    .category-secondary-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .item-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }

    .card-content {
        padding: 1.2rem;
    }

    .modal-content.glass-card {
        padding: 1.5rem;
        width: 95%;
    }

    .new-user-tutorial-card {
        width: min(95vw, 520px) !important;
        max-height: 92vh !important;
    }

    .new-user-tutorial-hero {
        padding: 1.5rem 1.25rem 1rem;
    }

    .new-user-tutorial-hero h2 {
        font-size: 1.45rem;
        padding-right: 2rem;
    }

    .new-user-tutorial-grid {
        grid-template-columns: minmax(0, 1fr);
        max-height: 48vh;
        overflow-y: auto;
    }

    .new-user-tutorial-grid article {
        min-height: auto;
        padding: 1rem 1.25rem;
    }

    .new-user-tutorial-actions {
        padding: 1rem 1.25rem 1.25rem;
    }

    .new-user-tutorial-actions button {
        flex: 1 1 42%;
    }

    /* ======== 核心修复：强制表单内联布局在手机端垂直排列 ======== */
    form .form-group[style*="display: flex"] {
        flex-direction: column !important;
        gap: 1rem !important;
    }

    form .form-group[style*="display: flex"] > div {
        width: 100% !important;
        flex: none !important;
    }

    /* ======== 优化 1：全屏沉浸式聊天窗口 (dvh适配) ======== */
    .chat-modal {
        padding: 0 !important;
    }
    .chat-modal .chat-container {
        height: 100dvh !important;
        width: 100vw !important;
        max-width: 100% !important;
        border-radius: 0 !important;
        border: none !important;
    }

    /* ======== 优化 2：Toast 提示位置防遮挡 (居中顶部) ======== */
    .toast {
        top: max(20px, env(safe-area-inset-top));
        right: 50%;
        transform: translate(50%, -150%);
        width: max-content;
        max-width: 90vw;
    }
    .toast.show {
        transform: translate(50%, 0);
    }

    /* ======== 优化 3：扩大触控热区 (44px防误触标准) ======== */
    .card-actions button,
    .btn-submit,
    .btn-publish,
    .filter-btn,
    .search-bar button {
        min-height: 44px;
    }
    input[type="checkbox"],
    .notification-checkbox {
        width: 24px !important;
        height: 24px !important;
    }

    /* ======== 优化 4：图片预览关闭按钮的安全区适配 ======== */
    .image-preview-close {
        top: max(1.5rem, env(safe-area-inset-top));
        right: max(1.5rem, env(safe-area-inset-right));
    }

    .ai-review-panel {
        padding: 1rem;
    }

    .ai-score-circle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .ai-standard-item {
        padding: 0.6rem;
    }

    .trade-appointment-fields {
        grid-template-columns: 1fr;
    }

    .trade-appointment-head {
        align-items: flex-start;
    }

    .chat-message-wrap {
        max-width: 92%;
    }

    .breadcrumb-container {
        overflow-x: auto;
        white-space: nowrap;
        padding: 0 1rem;
        -webkit-overflow-scrolling: touch;
    }
    .breadcrumb-container::-webkit-scrollbar {
        display: none;
    }
}

/* 极小屏幕手机微调 (Small Phone) */
@media (max-width: 480px) {
    .user-action {
        gap: 0.5rem;
    }

    .ai-helper-cta {
        min-height: 46px;
        padding: 0.4rem 0.75rem 0.4rem 0.5rem;
    }

    .ai-helper-cta-copy small {
        font-size: 0.68rem;
    }

    .btn-publish {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .btn-user-center {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    .card-img, .glass-card.item img {
        height: 180px;
    }

    .card-actions button {
        padding: 0.6rem 0.4rem;
        font-size: 0.85rem;
    }

    .modal h2 {
        font-size: 1.4rem;
    }

    .ai-review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .ai-score-circle {
        align-self: flex-end;
        margin-top: -35px;
    }

    .search-bar button {
        padding: 0.5rem 1rem;
    }
}

/* =========================================
   面包屑导航及杂项兼容 (Breadcrumbs & Toast)
   ========================================= */
.breadcrumb-nav {
    background: transparent;
    padding: 1rem 0;
}
.breadcrumb-container { display: flex; gap: 0.5rem; align-items: center; max-width: 1280px; margin: 0 auto; padding: 0 2rem;}
.breadcrumb-item { font-weight: 700; color: var(--text-muted); cursor: pointer; padding: 0.4rem 1rem; border-radius: var(--radius-pill); transition: 0.3s; }
.breadcrumb-item.active { background: var(--glass-bg); color: var(--primary); box-shadow: var(--shadow-sm); }
.breadcrumb-item.ai-cs-nav {
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    border: 1px solid rgba(79, 70, 229, 0.18);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.12);
    animation: aiCsPulse 2.6s ease-in-out infinite;
}
.breadcrumb-item.ai-cs-nav:hover {
    background: #4f46e5;
    color: #fff;
    transform: translateY(-2px);
}

.breadcrumb-item.user-center-nav-item {
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-main);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.breadcrumb-item.user-center-nav-item:hover {
    background: #0f172a;
    color: #fff;
    transform: translateY(-2px);
}

@keyframes aiCsPulse {
    0%, 100% {
        box-shadow: 0 8px 20px rgba(79, 70, 229, 0.12);
    }
    50% {
        box-shadow: 0 10px 26px rgba(79, 70, 229, 0.24);
    }
}

.seller-order-alert {
    max-width: 1280px;
    margin: 0 auto 1rem;
    padding: 0.85rem 1rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-radius: var(--radius-md);
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.18);
    color: var(--text-main);
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.12);
}

.seller-order-alert div {
    display: grid;
    gap: 0.2rem;
}

.seller-order-alert strong {
    color: #4f46e5;
}

.seller-order-alert span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.seller-order-alert button {
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.55rem 1rem;
    background: #4f46e5;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

/* =========================================
   Profile Page
   ========================================= */
.profile-body {
    min-height: 100vh;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        linear-gradient(180deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        #f8fafc;
    background-size: 36px 36px;
}

.profile-page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 48px;
}

.profile-topbar,
.profile-card {
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(20px);
}

.profile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 18px;
    padding: 1rem 1.2rem;
}

.profile-topbar p,
.profile-topbar h1 {
    margin: 0;
}

.profile-topbar p {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.profile-topbar h1 {
    color: var(--text-main);
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    letter-spacing: 0;
}

.profile-back,
.profile-topbar button,
.profile-primary-btn,
.profile-secondary-btn {
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.65rem 1rem;
    font-weight: 900;
    cursor: pointer;
}

.profile-back {
    background: #0f172a;
    color: #fff;
    text-decoration: none;
}

.profile-topbar button,
.profile-primary-btn {
    background: var(--primary);
    color: #fff;
}

.profile-secondary-btn {
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-main);
}

.profile-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.profile-left {
    position: sticky;
    top: 20px;
    display: grid;
    gap: 18px;
}

.profile-main {
    display: grid;
    gap: 18px;
}

.profile-card {
    padding: 1.2rem;
}

.profile-identity-card {
    text-align: center;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    margin: 0 auto 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #2563eb);
    color: #fff;
    font-size: 2.45rem;
    font-weight: 900;
    box-shadow: 0 18px 36px rgba(16, 185, 129, 0.24);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.profile-avatar:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 42px rgba(16, 185, 129, 0.3);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar em {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.28rem 0;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 800;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.profile-avatar:hover em {
    opacity: 1;
}

.profile-identity-card h2 {
    margin: 0 0 0.65rem;
    color: var(--text-main);
    font-size: 1.45rem;
}

.profile-meta-row,
.trust-tags {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.profile-meta-row span,
.trust-tags span,
.profile-verify {
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-pill);
    padding: 0.25rem 0.62rem;
    font-size: 0.78rem;
    font-weight: 800;
}

.profile-role {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
}

.profile-meta-row span:last-child {
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-muted);
}

.profile-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.profile-card-head h2,
.profile-card-head p {
    margin: 0;
}

.profile-card-head h2 {
    color: var(--text-main);
    font-size: 1.08rem;
}

.profile-card-head p {
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.84rem;
}

.trust-ring-wrap {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0.5rem auto 0.9rem;
}

.trust-ring {
    width: 150px;
    height: 150px;
    transform: rotate(-90deg);
}

.trust-ring-track,
.trust-ring-value {
    fill: none;
    stroke-width: 13;
}

.trust-ring-track {
    stroke: rgba(15, 23, 42, 0.08);
}

.trust-ring-value {
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s ease, stroke 0.3s ease;
}

.trust-ring-value.low { stroke: #ef4444; }
.trust-ring-value.mid { stroke: #f59e0b; }
.trust-ring-value.high { stroke: #10b981; }

.trust-ring-score {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.trust-ring-score strong {
    color: var(--text-main);
    font-size: 2.2rem;
    line-height: 1;
}

.trust-ring-score span {
    margin-top: 0.18rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 800;
}

.trust-tags {
    margin-bottom: 1rem;
}

.trust-tags span {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
}

.trust-details,
.profile-info-list {
    display: grid;
    gap: 0.6rem;
}

.trust-details div,
.profile-info-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.045);
}

.trust-details span,
.profile-info-list span {
    color: var(--text-muted);
    font-size: 0.86rem;
}

.trust-details strong,
.profile-info-list strong {
    color: var(--text-main);
    font-size: 0.92rem;
}

.profile-stat-grid,
.profile-quick-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.profile-stat-grid button,
.profile-quick-grid button {
    position: relative;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: #fff;
    color: var(--text-main);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.profile-stat-grid button {
    padding: 1rem;
}

.profile-stat-grid button:hover,
.profile-quick-grid button:hover {
    transform: translateY(-3px);
    border-color: rgba(79, 70, 229, 0.26);
    box-shadow: 0 14px 30px rgba(79, 70, 229, 0.12);
}

.profile-stat-grid strong {
    display: block;
    font-size: 1.55rem;
    color: var(--primary);
}

.profile-stat-grid span {
    margin-top: 0.25rem;
    display: block;
    color: var(--text-muted);
    font-weight: 800;
}

.profile-form {
    display: grid;
    gap: 0.85rem;
}

.profile-form label {
    display: grid;
    gap: 0.38rem;
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.profile-form input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.42);
    border-radius: 8px;
    padding: 0.72rem 0.82rem;
    outline: none;
    background: #fff;
    color: var(--text-main);
    font: inherit;
}

.profile-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.profile-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.profile-verify.ok {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.profile-verify.warn {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.profile-quick-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-quick-grid button {
    min-height: 96px;
    padding: 1rem;
    display: grid;
    place-items: center;
    gap: 0.25rem;
}

.profile-quick-grid button > span {
    font-size: 1.55rem;
}

.profile-quick-grid strong {
    font-size: 0.92rem;
}

.profile-quick-grid em {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    min-width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-pill);
    background: #0f172a;
    color: #fff;
    font-size: 0.76rem;
    font-style: normal;
    font-weight: 900;
}

.profile-danger-zone {
    margin-top: 1rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid rgba(239, 68, 68, 0.22);
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.08);
}

.profile-danger-zone strong,
.profile-danger-zone p {
    margin: 0;
}

.profile-danger-zone p {
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.84rem;
}

.profile-danger-zone button {
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.65rem 1rem;
    background: var(--danger);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }

    .profile-left {
        position: static;
    }

    .profile-stat-grid,
    .profile-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .profile-page {
        width: min(100% - 20px, 1180px);
        padding-top: 14px;
    }

    .profile-topbar,
    .profile-danger-zone {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-stat-grid,
    .profile-quick-grid {
        grid-template-columns: 1fr;
    }
}

.chat-page-body {
    min-height: 100vh;
    overflow: hidden;
}

.chat-full-page {
    width: min(1280px, calc(100vw - 32px));
    height: calc(100vh - 32px);
    margin: 16px auto;
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 16px;
}

#chat-sidebar,
#chat-main {
    min-height: 0;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: var(--shadow-md);
}

#chat-sidebar {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.chat-sidebar-head {
    padding: 1.2rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--glass-border);
}

.chat-sidebar-head h2 {
    font-size: 1.15rem;
    line-height: 1.2;
}

.chat-sidebar-head button,
.chat-page-header button {
    border: none;
    border-radius: var(--radius-pill);
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    font-weight: 900;
    cursor: pointer;
}

.chat-sidebar-head button {
    width: 36px;
    height: 36px;
}

#conversation-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0.8rem;
}

.conversation-item {
    padding: 0.85rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.conversation-item:hover {
    background: rgba(255, 255, 255, 0.72);
    transform: translateY(-1px);
}

.conversation-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.05rem;
    font-weight: 900;
    position: relative;
}

.conversation-info {
    min-width: 0;
    flex: 1;
}

.conversation-name {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-main);
    font-weight: 900;
}

.conversation-preview {
    color: var(--text-muted);
    font-size: 0.86rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-meta {
    display: grid;
    justify-items: end;
    gap: 0.35rem;
    color: var(--text-muted);
    font-size: 0.74rem;
}

.conversation-unread-container {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.conversation-unread {
    min-width: 20px;
    height: 20px;
    padding: 0 0.35rem;
    border-radius: var(--radius-pill);
    background: var(--danger);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 900;
}

.btn-clear-unread {
    border: none;
    border-radius: var(--radius-pill);
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    padding: 0.25rem 0.45rem;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.72rem;
}

.online-status-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
}

.online-status-indicator.online {
    background: var(--success);
}

.online-status-indicator.offline {
    background: var(--text-light);
}

.online-status-text {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 800;
}

.online-status-text.online {
    color: var(--success);
}

.online-status-text.offline {
    color: var(--text-light);
}

#chat-main {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.chat-page-header {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.55);
}

.chat-page-header div {
    min-width: 0;
}

.chat-page-header strong {
    display: block;
    font-size: 1.05rem;
}

.chat-page-header span {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.chat-page-header button {
    padding: 0.5rem 0.85rem;
    white-space: nowrap;
}

.chat-page-item-info {
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.38);
}

@media (max-width: 480px) {
    .category-primary-row,
    .category-secondary-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .category-filter-heading p {
        font-size: 0.8rem;
    }
}

.chat-item-detail-link {
    align-items: center;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.chat-item-detail-link:hover {
    background: rgba(255, 255, 255, 0.62) !important;
}

.chat-item-detail-link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

.chat-item-detail-hint {
    flex: 0 0 auto;
    margin-left: auto;
    color: var(--primary) !important;
    font-size: 0.8rem !important;
    font-weight: 700;
    white-space: nowrap;
}

.chat-page-item-info img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
}

.chat-page-item-info span {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.chat-page-item-info strong {
    display: block;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-page-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-page-input-bar {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-top: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.62);
}

.chat-page-input-bar input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    border-radius: var(--radius-md);
    background: white;
    color: var(--text-main);
    padding: 0.85rem 1rem;
    font: inherit;
    box-shadow: var(--shadow-inner);
}

.chat-page-input-bar .btn-submit {
    flex: 0 0 96px;
    width: 96px;
    margin: 0;
    padding: 0.85rem 1rem;
}

.chat-page-plus {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    border: 1px solid #bbb;
    background: white;
    color: var(--text-main);
    font-size: 1.35rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.chat-media-button {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border: 1px solid #bbb;
    border-radius: 50%;
    background: white;
    color: var(--text-main);
    font: inherit;
    font-size: 1.3rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.chat-media-button:hover,
.chat-page-plus:hover {
    background: rgba(79, 70, 229, 0.1);
    transform: translateY(-1px);
}

.chat-media-button.is-uploading,
.chat-media-button:disabled {
    cursor: wait;
    opacity: 0.62;
}

.chat-composer-bar textarea {
    min-width: 0;
}

.chat-emoji-panel {
    grid-template-columns: repeat(8, minmax(34px, 1fr));
    gap: 0.35rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.05);
}

.chat-emoji-panel button {
    width: 100%;
    aspect-ratio: 1;
    border: 0;
    border-radius: 10px;
    background: transparent;
    font-size: 1.35rem;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.chat-emoji-panel button:hover,
.chat-emoji-panel button:focus-visible {
    background: rgba(79, 70, 229, 0.1);
    transform: scale(1.08);
    outline: none;
}

.chat-image-message {
    display: block;
    max-width: min(320px, 72vw);
    padding: 4px;
    border-radius: 16px;
    background: white;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.chat-image-message.mine {
    background: var(--primary);
}

.chat-image-message img {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 12px;
}

@media (max-width: 560px) {
    .chat-page-input-bar,
    .chat-composer-bar {
        gap: 0.4rem !important;
        padding: 0.75rem !important;
    }

    .chat-page-input-bar .btn-submit {
        flex-basis: 70px;
        width: 70px;
    }

    .chat-emoji-panel {
        grid-template-columns: repeat(6, minmax(34px, 1fr));
    }
}

.purchase-quantity-modal {
    z-index: 16000;
    padding: 1rem;
}

.purchase-quantity-card {
    position: relative;
    width: min(440px, calc(100vw - 2rem));
    padding: 2rem;
    text-align: left;
}

.purchase-quantity-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-muted);
    font-size: 1.45rem;
    cursor: pointer;
}

.purchase-quantity-kicker {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.purchase-quantity-card h2 {
    margin: 0 0 0.45rem;
}

.purchase-quantity-item {
    margin: 0;
    color: var(--text-muted);
}

.purchase-quantity-stock {
    margin: 1.35rem 0 0.8rem;
    color: var(--text-main);
}

.purchase-quantity-stepper {
    display: grid;
    grid-template-columns: 48px minmax(90px, 1fr) 48px;
    gap: 0.55rem;
    align-items: center;
}

.purchase-quantity-stepper button,
.purchase-quantity-stepper input {
    height: 48px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-main);
    font: inherit;
    font-weight: 800;
    text-align: center;
}

.purchase-quantity-stepper button {
    font-size: 1.35rem;
    cursor: pointer;
}

.purchase-quantity-summary {
    margin-top: 1rem;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 14px;
    background: rgba(239, 68, 68, 0.08);
}

.purchase-quantity-summary strong {
    color: var(--danger);
    font-size: 1.4rem;
}

.purchase-quantity-actions {
    margin-top: 1.25rem;
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 0.75rem;
}

.purchase-quantity-actions button {
    min-height: 46px;
    border-radius: 12px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.purchase-quantity-cancel {
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.78);
    color: var(--text-muted);
}

.purchase-quantity-confirm {
    border: 0;
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 22px rgba(79, 70, 229, 0.22);
}

.chat-page-action-menu {
    padding: 0.55rem 1rem;
    flex-direction: column;
    gap: 0.5rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.55);
}

.chat-page-action-menu button {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.74);
    color: var(--text-main);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    padding: 0.75rem 0.9rem;
}

.chat-page-action-menu button:hover {
    background: rgba(255, 255, 255, 0.95);
}

.chat-page-empty,
.chat-page-empty-messages {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.chat-page-empty {
    min-height: 72px;
    border-bottom: 1px solid var(--glass-border);
    font-weight: 800;
}

.chat-page-empty-messages {
    flex: 1;
}

.empty-conversations button {
    margin-top: 1rem;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    padding: 0.65rem 1rem;
    cursor: pointer;
}

@media (max-width: 760px) {
    .chat-page-body {
        overflow: auto;
    }

    .chat-full-page {
        width: 100vw;
        height: 100dvh;
        margin: 0;
        grid-template-columns: 1fr;
        grid-template-rows: minmax(180px, 34dvh) minmax(0, 1fr);
        gap: 0;
    }

    #chat-sidebar,
    #chat-main {
        border-radius: 0;
    }
}

/* 原桌面端 Toast 样式（已在上方针对移动端做了 Override） */
.toast { position: fixed; top: 120px; right: 20px; padding: 1rem 2rem; border-radius: var(--radius-pill); background: var(--glass-bg-hover); backdrop-filter: blur(10px); box-shadow: var(--shadow-lg); font-weight: 700; z-index: 99999; transform: translateX(150%); transition: 0.3s; }
.toast.show { transform: translateX(0); }
.toast.success { color: var(--success); border-left: 4px solid var(--success); }
.toast.error { color: var(--danger); border-left: 4px solid var(--danger); }
.toast.warning { color: var(--warning); border-left: 4px solid var(--warning); }
.toast.info { color: var(--info); border-left: 4px solid var(--info); }

.lineage-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
    font-size: 0.78rem;
    font-weight: 800;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.lineage-chip.muted {
    background: rgba(99, 102, 241, 0.1);
    color: #4338ca;
    border-color: rgba(99, 102, 241, 0.22);
}

.lineage-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.55rem;
}

.lineage-story-preview {
    margin-top: 0.55rem;
    padding: 0.65rem;
    border-left: 3px solid rgba(16, 185, 129, 0.45);
    border-radius: 6px;
    background: rgba(236, 253, 245, 0.78);
    color: var(--text-main);
    font-size: 0.88rem;
    line-height: 1.45;
}

.lineage-source-summary {
    margin: 1rem 0 1.25rem;
}

.lineage-source-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 0.9rem;
    align-items: center;
    padding: 0.85rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid var(--glass-border);
}

.lineage-source-card img,
.lineage-source-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(79, 70, 229, 0.18));
}

.lineage-source-card strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-main);
}

.lineage-source-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.lineage-timeline-panel {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(16, 185, 129, 0.22);
}

.lineage-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.9rem;
    font-weight: 800;
}

.lineage-panel-head span {
    color: var(--text-main);
}

.lineage-panel-head strong {
    color: #047857;
    font-size: 0.9rem;
}

.lineage-timeline {
    position: relative;
    display: grid;
    gap: 0.85rem;
}

.lineage-node {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 0.75rem;
    align-items: start;
}

.lineage-node-marker {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #10b981;
    color: #fff;
    font-weight: 900;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.25);
}

.lineage-node-card {
    padding: 0.85rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--glass-border);
}

.lineage-node-top {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.84rem;
}

.lineage-node-top strong {
    color: var(--text-main);
}

.lineage-node-title {
    margin-top: 0.45rem;
    font-weight: 800;
    color: var(--text-main);
}

.lineage-node-card p,
.lineage-empty-copy {
    margin: 0.55rem 0 0;
    color: var(--text-muted);
    line-height: 1.5;
}

.lineage-detail-only h2 {
    margin-bottom: 1rem;
    text-align: center;
}

.buyer-info-pill {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.55rem 0;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.2);
    color: var(--text-main);
    font-size: 0.86rem;
}

.buyer-info-pill span {
    color: #0369a1;
    font-weight: 800;
}

.buyer-info-pill strong {
    color: var(--text-main);
}

.buyer-info-pill small {
    color: var(--text-muted);
}

.order-status-panel {
    padding: 0.5rem;
}

.order-status-panel h2 {
    margin-bottom: 1rem;
    text-align: center;
}

.order-status-grid {
    display: grid;
    grid-template-columns: minmax(88px, 0.35fr) 1fr;
    gap: 0.75rem 1rem;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--glass-border);
}

.order-status-grid span {
    color: var(--text-muted);
    font-weight: 700;
}

.order-status-grid strong {
    color: var(--text-main);
    word-break: break-all;
}

.order-status-note {
    margin-top: 1rem;
    padding: 0.85rem;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--text-main);
    line-height: 1.55;
}

/* Top navigation simplification */
#navMyItems,
#navFavorites,
#navWishlists,
#navLineage,
#navSales {
    display: none !important;
}

/* Standalone user center */
.user-center-body {
    min-height: 100vh;
    overflow-x: hidden;
}

.user-center-page {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
    padding: 1rem;
    gap: 1rem;
}

.user-center-sidebar {
    position: sticky;
    top: 1rem;
    height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(24px);
    box-shadow: var(--shadow-md);
}

.user-center-logo {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0;
    margin-bottom: 1rem;
}

.user-center-profile {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    background: rgba(79, 70, 229, 0.08);
    border: 1px solid rgba(79, 70, 229, 0.12);
    margin-bottom: 1rem;
}

.user-center-avatar,
.user-center-profile > span {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.user-center-profile p {
    margin: 0.15rem 0 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.user-center-nav {
    display: grid;
    gap: 0.5rem;
}

.user-center-nav button,
.user-center-sidebar-actions button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-main);
    padding: 0.85rem 0.9rem;
    font-weight: 800;
    cursor: pointer;
    text-align: left;
    transition: 0.2s ease;
}

.user-center-nav button:hover,
.user-center-nav button.active {
    background: #fff;
    border-color: rgba(79, 70, 229, 0.16);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.user-center-sidebar-actions {
    margin-top: auto;
    display: grid;
    gap: 0.45rem;
    padding-top: 1rem;
}

.user-center-sidebar-actions button {
    justify-content: center;
    background: rgba(255, 255, 255, 0.6);
}

.user-center-sidebar-actions button.danger {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.08);
}

.user-center-main {
    min-width: 0;
    padding: 1.25rem;
}

.user-center-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.user-center-header h1 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    color: var(--text-main);
}

.user-center-header p {
    margin: 0.5rem 0 0;
    color: var(--text-muted);
}

.user-center-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.user-center-search {
    min-width: min(420px, 100%);
    margin: 0;
}

.user-center-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}

.user-center-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.user-center-ai-score {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-weight: 700;
}

.user-order-hub {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    max-width: 920px;
}

.user-order-hub-card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 1rem;
    min-height: 260px;
    padding: 1.5rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow-sm);
}

.user-order-hub-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.1);
    font-size: 1.4rem;
}

.user-order-hub-card h2 {
    margin: 0 0 0.5rem;
    color: var(--text-main);
}

.user-order-hub-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.user-order-hub-card button {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.user-order-hub-card button:hover {
    background: #4338ca;
}

@media (max-width: 980px) {
    .user-center-page {
        grid-template-columns: 1fr;
    }

    .user-center-sidebar {
        position: relative;
        top: 0;
        height: auto;
    }

    .user-center-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .user-order-hub {
        grid-template-columns: 1fr;
    }

    .user-center-header {
        flex-direction: column;
    }

    .user-center-tools,
    .user-center-search {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .user-center-page {
        padding: 0.5rem;
    }

    .user-center-nav,
    .user-center-form-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   商品详情独立页
   ========================================= */
.item-detail-body {
    min-height: 100vh;
    margin: 0;
    color: #182033;
    background:
        radial-gradient(circle at 7% 10%, rgba(245, 158, 11, 0.13), transparent 28rem),
        radial-gradient(circle at 91% 18%, rgba(14, 165, 233, 0.12), transparent 30rem),
        #f5f2ea;
}

.item-detail-page {
    min-height: 100vh;
}

.item-detail-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: auto auto minmax(280px, 520px);
    align-items: center;
    gap: 1.25rem;
    min-height: 76px;
    padding: 0.8rem max(1.5rem, calc((100vw - 1320px) / 2));
    border-bottom: 1px solid rgba(15, 23, 42, 0.09);
    background: rgba(250, 248, 242, 0.9);
    backdrop-filter: blur(18px);
}

.item-detail-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: #172033;
    text-decoration: none;
}

.item-detail-logo {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px 13px 13px 4px;
    background: #172033;
    color: #fff7e8;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
}

.item-detail-brand strong,
.item-detail-brand small {
    display: block;
}

.item-detail-brand strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.05rem;
    letter-spacing: 0.08em;
}

.item-detail-brand small {
    margin-top: 0.1rem;
    color: #7c8493;
    font-size: 0.72rem;
}

.item-detail-home {
    color: #4b5563;
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
}

.item-detail-home:hover {
    color: #c2410c;
}

.item-detail-search {
    display: grid;
    grid-template-columns: 1fr auto;
    justify-self: end;
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.item-detail-search input {
    min-width: 0;
    padding: 0.75rem 1rem;
    border: 0;
    outline: 0;
    background: transparent;
    color: #172033;
}

.item-detail-search button {
    margin: 4px;
    padding: 0 1.1rem;
    border: 0;
    border-radius: 999px;
    background: #172033;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.item-detail-shell {
    width: min(1320px, calc(100% - 3rem));
    margin: 0 auto;
    padding: 2.25rem 0 4rem;
}

.item-detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 55fr) minmax(360px, 45fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: start;
}

.item-detail-gallery {
    position: sticky;
    top: 106px;
    min-width: 0;
}

.item-detail-image-button {
    position: relative;
    display: grid;
    width: 100%;
    min-height: min(68vh, 680px);
    padding: 0;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 30px 30px 30px 8px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(232, 228, 216, 0.82)),
        #e9e4d8;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.13);
    cursor: zoom-in;
}

.item-detail-image-button img {
    width: 100%;
    height: 100%;
    max-height: min(68vh, 680px);
    object-fit: contain;
    transition: transform 0.35s ease;
}

.item-detail-image-button:hover img {
    transform: scale(1.018);
}

.item-detail-image-placeholder {
    max-width: 18rem;
    color: #7c8493;
    font-weight: 700;
    line-height: 1.7;
    text-align: center;
}

.item-detail-zoom-hint {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    color: white;
    font-size: 0.78rem;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.item-detail-thumbnails {
    display: flex;
    gap: 0.7rem;
    margin-top: 1rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
}

.item-detail-thumbnails:empty {
    display: none;
}

.item-detail-thumbnails button {
    width: 74px;
    height: 74px;
    flex: 0 0 auto;
    padding: 3px;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.78);
    cursor: pointer;
}

.item-detail-thumbnails button.active {
    border-color: #ea580c;
}

.item-detail-thumbnails img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
}

.item-detail-summary {
    min-width: 0;
    padding: 0.7rem 0;
}

.item-detail-eyebrow,
.item-detail-section-head span,
.item-detail-error > span {
    color: #c2410c;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.item-detail-summary h1 {
    margin: 0.65rem 0 1rem;
    color: #111827;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.item-detail-badges,
.item-detail-seller-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.item-detail-badge,
.item-detail-seller-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.item-detail-badge.category {
    background: #172033;
    color: #fff;
}

.item-detail-badge.status {
    background: #e2e8f0;
    color: #475569;
}

.item-detail-badge.status[data-status="1"] {
    background: #dcfce7;
    color: #047857;
}

.item-detail-badge.status[data-status="0"],
.item-detail-badge.status[data-status="3"] {
    background: #fef3c7;
    color: #b45309;
}

.item-detail-badge.status[data-status="2"],
.item-detail-badge.status[data-status="5"] {
    background: #fee2e2;
    color: #b91c1c;
}

.item-detail-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.35rem 0;
    border-top: 1px solid rgba(15, 23, 42, 0.12);
    border-bottom: 1px solid rgba(15, 23, 42, 0.12);
}

.item-detail-price-row strong {
    color: #dc2626;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    line-height: 1;
}

.item-detail-price-row span {
    color: #596273;
    font-weight: 800;
}

.item-detail-publish-time {
    margin: 0.8rem 0 1.25rem;
    color: #7c8493;
    font-size: 0.88rem;
}

.item-detail-actions {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 0.7rem;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.12);
}

.item-detail-action {
    min-height: 48px;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    color: #172033;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.item-detail-action:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1);
}

.item-detail-action.primary {
    border-color: #ea580c;
    background: #ea580c;
    color: white;
}

.item-detail-action.secondary {
    border-color: #172033;
    background: #172033;
    color: white;
}

.item-detail-action.favorited {
    border-color: #fca5a5;
    background: #fff1f2;
    color: #be123c;
}

.item-detail-action:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

.item-detail-seller-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.9rem;
    margin-top: 1.4rem;
    padding: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
}

.item-detail-seller-avatar {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    overflow: hidden;
    border-radius: 17px;
    background: #f59e0b;
    color: #172033;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.2rem;
    font-weight: 900;
}

.item-detail-seller-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-detail-seller-copy > span,
.item-detail-credit span {
    display: block;
    color: #7c8493;
    font-size: 0.72rem;
    font-weight: 800;
}

.item-detail-seller-copy > strong {
    display: block;
    margin: 0.12rem 0 0.42rem;
    color: #172033;
}

.item-detail-seller-tags span {
    min-height: 23px;
    padding: 0.18rem 0.5rem;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.68rem;
}

.item-detail-credit {
    min-width: 62px;
    text-align: right;
}

.item-detail-credit strong {
    color: #047857;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.65rem;
}

.item-detail-description {
    margin-top: 1.4rem;
}

.item-detail-description h2 {
    margin: 0 0 0.65rem;
    color: #172033;
    font-size: 1rem;
}

.item-detail-description p {
    margin: 0;
    color: #596273;
    line-height: 1.85;
    white-space: pre-wrap;
}

.item-detail-lower {
    display: grid;
    gap: 1.25rem;
    margin-top: 3rem;
}

.item-detail-section-card {
    display: grid;
    grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    padding: clamp(1.3rem, 3vw, 2.2rem);
    border: 1px solid rgba(15, 23, 42, 0.09);
    border-radius: 26px 26px 26px 8px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.07);
}

.item-detail-section-head h2 {
    margin: 0.35rem 0 0.6rem;
    color: #172033;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.item-detail-section-head p {
    margin: 0;
    color: #7c8493;
    font-size: 0.86rem;
    line-height: 1.6;
}

.item-detail-section-content {
    min-width: 0;
}

.item-detail-section-content .price-reference-panel.detail,
.item-detail-section-content .lineage-timeline-panel,
.item-detail-section-content .ai-review-panel {
    margin: 0;
}

.item-detail-loading-line,
.item-detail-empty {
    margin: 0;
    padding: 1rem;
    border-radius: 14px;
    background: rgba(241, 245, 249, 0.82);
    color: #7c8493;
    line-height: 1.65;
}

.item-detail-confirm {
    max-width: 430px;
    padding: 2rem;
    text-align: center;
}

.item-detail-confirm #confirmMessage {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    line-height: 1.6;
    white-space: pre-line;
}

.item-detail-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.item-detail-confirm-actions button {
    min-height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: transparent;
    color: #64748b;
    font-weight: 800;
    cursor: pointer;
}

.item-detail-confirm-actions #confirmBtn {
    border-color: #ea580c;
    background: #ea580c;
    color: #fff;
}

.item-detail-error {
    max-width: 720px;
    margin: 8vh auto;
    padding: clamp(2rem, 6vw, 5rem);
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 32px 32px 32px 8px;
    background: rgba(255, 255, 255, 0.76);
    text-align: center;
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.1);
}

.item-detail-error h1 {
    margin: 0.7rem 0;
    color: #172033;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 5vw, 3.4rem);
}

.item-detail-error p {
    color: #64748b;
    line-height: 1.7;
}

.item-detail-error a {
    display: inline-flex;
    margin-top: 1rem;
    padding: 0.8rem 1.2rem;
    border-radius: 999px;
    background: #172033;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 960px) {
    .item-detail-topbar {
        grid-template-columns: auto 1fr;
    }

    .item-detail-home {
        justify-self: end;
    }

    .item-detail-search {
        grid-column: 1 / -1;
        justify-self: stretch;
        max-width: none;
    }

    .item-detail-hero {
        grid-template-columns: 1fr;
    }

    .item-detail-gallery {
        position: static;
    }

    .item-detail-image-button {
        min-height: min(62vh, 580px);
    }

    .item-detail-section-card {
        grid-template-columns: 1fr;
        gap: 1.1rem;
    }
}

@media (max-width: 640px) {
    .item-detail-topbar {
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }

    .item-detail-brand small {
        display: none;
    }

    .item-detail-shell {
        width: min(100% - 1.25rem, 1320px);
        padding-top: 0.8rem;
    }

    .item-detail-image-button {
        min-height: 58vw;
        border-radius: 22px 22px 22px 7px;
    }

    .item-detail-summary h1 {
        font-size: 2.15rem;
    }

    .item-detail-actions {
        grid-template-columns: 1fr 1fr;
    }

    .item-detail-action.primary {
        grid-column: 1 / -1;
    }

    .item-detail-seller-card {
        grid-template-columns: auto 1fr;
    }

    .item-detail-credit {
        grid-column: 2;
        text-align: left;
    }

    .item-detail-section-card {
        padding: 1.15rem;
        border-radius: 20px 20px 20px 7px;
    }
}
.publish-review-flow {
    margin: 0.75rem 0 0;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.55;
    text-align: center;
}

.btn-submit:disabled {
    cursor: wait;
    opacity: 0.72;
}

/* =========================================
   Unified Campus Market Theme
   ========================================= */
:root {
    --primary: #057a8d;
    --primary-hover: #046678;
    --secondary: #d58a00;
    --success: #198754;
    --danger: #cf3f4f;
    --warning: #d58a00;
    --info: #3867d6;
    --text-main: #172033;
    --text-muted: #697386;
    --text-light: #98a2b3;
    --campus-canvas: #f4f6f2;
    --campus-paper: #fffdf8;
    --campus-surface: rgba(255, 255, 255, 0.94);
    --campus-line: #dfe5dc;
    --campus-ink: #172033;
    --campus-green-soft: #e9f6ef;
    --campus-blue-soft: #e8f4f6;
    --campus-amber-soft: #fff2d8;
    --glass-bg: rgba(255, 255, 255, 0.86);
    --glass-bg-hover: rgba(255, 255, 255, 0.96);
    --glass-border: rgba(156, 171, 159, 0.35);
    --glass-highlight: rgba(255, 255, 255, 0.95);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 8px;
    --radius-xl: 8px;
    --radius-pill: 999px;
    --shadow-sm: 0 2px 8px rgba(23, 32, 51, 0.05);
    --shadow-md: 0 10px 28px rgba(23, 32, 51, 0.08);
    --shadow-lg: 0 22px 54px rgba(23, 32, 51, 0.12);
    --shadow-inner: inset 0 0 0 1px rgba(23, 32, 51, 0.04);
}

body,
.auth-body,
.orders-body,
.profile-body,
.user-center-body,
.item-detail-body {
    color: var(--campus-ink);
    background:
        linear-gradient(90deg, rgba(23, 32, 51, 0.035) 1px, transparent 1px),
        linear-gradient(180deg, rgba(23, 32, 51, 0.03) 1px, transparent 1px),
        var(--campus-canvas);
    background-size: 32px 32px;
    font-family: "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
    letter-spacing: 0;
}

.background-wrapper {
    background:
        linear-gradient(90deg, rgba(23, 32, 51, 0.035) 1px, transparent 1px),
        linear-gradient(180deg, rgba(23, 32, 51, 0.03) 1px, transparent 1px),
        var(--campus-canvas);
    background-size: 32px 32px;
    animation: none;
}

.glass-header,
.item-detail-topbar,
.profile-topbar,
.chat-sidebar-head,
.orders-header,
.user-center-sidebar {
    border: 1px solid var(--campus-line);
    border-radius: var(--radius-lg);
    background: rgba(255, 253, 248, 0.94);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.glass-header {
    top: 0.75rem;
    margin: 0.75rem auto 1rem;
    width: min(1280px, calc(100% - 2rem));
    padding: 0.85rem 1rem;
}

.logo,
.admin-header .logo,
.item-detail-brand strong {
    color: var(--campus-ink);
    background: none;
    -webkit-text-fill-color: currentColor;
    letter-spacing: 0;
}

.search-bar,
.item-detail-search,
.user-center-search,
.orders-search-field,
.orders-category-field,
.auth-tabs,
.orders-tabs,
.category-secondary-panel,
.filter-section {
    border: 1px solid var(--campus-line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-inner);
}

.search-bar button,
.btn-submit,
.btn-login,
.btn-publish,
.auth-submit,
.orders-primary-action,
.item-detail-action.primary,
.profile-primary-btn,
.user-order-hub-card button,
.category-group-btn.active,
.category-all-btn.active,
.category-sub-btn.active {
    border-color: var(--primary);
    background: var(--primary) !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(5, 122, 141, 0.18);
}

.search-bar button:hover,
.btn-submit:hover,
.btn-login:hover,
.btn-publish:hover,
.auth-submit:hover,
.orders-primary-action:hover,
.item-detail-action.primary:hover,
.profile-primary-btn:hover {
    background: var(--primary-hover) !important;
    box-shadow: 0 10px 24px rgba(5, 122, 141, 0.22);
}

.btn-wishlist-publish,
.item-detail-action.secondary,
.profile-secondary-btn,
.orders-refresh,
.orders-back,
.category-clear-btn,
.orders-filter-clear {
    border: 1px solid rgba(5, 122, 141, 0.22);
    background: #fff !important;
    color: var(--primary) !important;
    box-shadow: var(--shadow-sm);
}

.glass-card,
.glass-card.item,
.modal-content.glass-card,
.auth-visual,
.auth-panel,
.orders-summary-item,
.orders-card,
.orders-empty,
.profile-card,
.user-order-hub-card,
.item-detail-section-card,
.item-detail-seller-card,
.price-reference-panel,
.lineage-timeline-panel,
.ai-review-panel,
#chat-sidebar,
#chat-main,
.chat-full-page,
.category-filter-panel {
    border: 1px solid var(--campus-line);
    border-radius: var(--radius-lg);
    background: var(--campus-surface);
    box-shadow: var(--shadow-sm);
}

.glass-card.item:hover,
.orders-card:hover,
.profile-stat-grid button:hover,
.profile-quick-grid button:hover,
.user-order-hub-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.glass-card.item::before,
.auth-visual::before {
    display: none;
}

.card-img,
.orders-card-media,
.item-detail-image-button,
.profile-avatar,
.item-detail-thumbnails button {
    border-radius: var(--radius-lg);
    background: #edf2ee;
}

.price,
.item-detail-price-row strong {
    color: #c2410c;
    font-family: "STZhongsong", "SimSun", serif;
    letter-spacing: 0;
}

.category-filter-kicker,
.item-detail-eyebrow,
.item-detail-section-head span,
.auth-heading span,
.trade-review-eyebrow {
    color: var(--primary);
    letter-spacing: 0.08em;
}

.category-group-btn,
.category-all-btn,
.category-sub-btn,
.orders-tabs button,
.breadcrumb-item,
.auth-tabs button,
.profile-quick-grid button,
.profile-stat-grid button {
    border-radius: var(--radius-lg);
}

.category-group-btn.active::after,
.category-all-btn.active::after {
    background: var(--secondary);
}

.item-detail-body {
    background:
        linear-gradient(90deg, rgba(23, 32, 51, 0.035) 1px, transparent 1px),
        linear-gradient(180deg, rgba(23, 32, 51, 0.03) 1px, transparent 1px),
        var(--campus-canvas);
    background-size: 32px 32px;
}

.item-detail-logo,
.auth-brand-mark,
.brand-mark {
    border-radius: var(--radius-lg);
    background: var(--campus-ink);
    color: #fffdf8;
    font-family: "STZhongsong", "SimSun", serif;
}

.item-detail-action,
.orders-card-actions button,
.orders-confirm-actions button,
.trade-review-actions button,
.profile-back,
.profile-topbar button {
    border-radius: var(--radius-lg);
}

.item-detail-action.secondary,
.item-detail-search button,
.item-detail-error a {
    background: var(--campus-ink) !important;
    border-color: var(--campus-ink);
    color: #fff !important;
}

.item-detail-badge.category,
.orders-state.completed,
.profile-verify.ok,
.wishlist-status.active {
    background: var(--campus-green-soft);
    color: var(--success);
}

.item-detail-badge.status,
.orders-state,
.wishlist-status,
.profile-role,
.buyer-info-pill {
    background: var(--campus-blue-soft);
    color: var(--primary);
}

.seller-order-alert,
.profile-verify.warn,
.orders-state.pending_pay,
.orders-state.pending_ship {
    background: var(--campus-amber-soft);
    color: #9a5b00;
}

.toast {
    border: 1px solid var(--campus-line);
    border-radius: var(--radius-lg);
    background: rgba(255, 253, 248, 0.98);
    box-shadow: var(--shadow-md);
}

input,
textarea,
select,
.auth-field input,
.profile-form input,
.orders-search-field input,
.orders-category-field select {
    border-color: var(--campus-line);
    border-radius: var(--radius-lg);
    background: #fff;
}

input:focus,
textarea:focus,
select:focus,
.auth-field input:focus,
.profile-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(5, 122, 141, 0.12);
}

@media (max-width: 760px) {
    .glass-header {
        width: min(100% - 1rem, 1280px);
        border-radius: var(--radius-lg);
    }

    .search-bar,
    .item-detail-search {
        width: 100%;
    }
}
