/* ==========================================================================
   Aurora 卡密 · 苹果风毛玻璃设计系统
   ========================================================================== */

:root {
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
        "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --font-mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --brand-1: #0071e3;
    --brand-2: #7c5cff;
    --brand-3: #38bdf8;
    --accent-gradient: linear-gradient(135deg, #0071e3 0%, #7c5cff 100%);
    --accent-gradient-soft: linear-gradient(135deg, rgba(0, 113, 227, .12), rgba(124, 92, 255, .12));

    --bg: #f2f3f7;
    --bg-2: #e9ebf2;
    --surface: rgba(255, 255, 255, .58);
    --surface-strong: rgba(255, 255, 255, .76);
    --surface-solid: #ffffff;
    --surface-sub: rgba(255, 255, 255, .42);
    --hairline: rgba(9, 30, 66, .08);
    --stroke-glass: rgba(255, 255, 255, .72);
    --text: #1d1d1f;
    --text-2: #6e6e73;
    --text-3: #9098a5;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 12px rgba(16, 24, 40, .05);
    --shadow-md: 0 2px 6px rgba(16, 24, 40, .05), 0 14px 36px rgba(16, 24, 40, .08);
    --shadow-lg: 0 8px 24px rgba(16, 24, 40, .10), 0 34px 80px rgba(16, 24, 40, .16);
    --radius-xl: 26px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --blur: saturate(180%) blur(22px);
    --blur-strong: saturate(200%) blur(34px);
    --ok: #12956b;
    --ok-soft: rgba(18, 149, 107, .12);
    --warn: #b16a00;
    --warn-soft: rgba(214, 138, 0, .14);
    --danger: #d92c3c;
    --danger-soft: rgba(217, 44, 60, .12);
    --info: #0a6fd0;
    --info-soft: rgba(10, 111, 208, .11);
    --sidebar-w: 268px;
    --ease: cubic-bezier(.22, .68, .32, 1);
}

[data-theme="dark"] {
    --bg: #08080c;
    --bg-2: #0d0d13;
    --surface: rgba(28, 28, 34, .58);
    --surface-strong: rgba(30, 30, 38, .78);
    --surface-solid: #17171d;
    --surface-sub: rgba(255, 255, 255, .04);
    --hairline: rgba(255, 255, 255, .09);
    --stroke-glass: rgba(255, 255, 255, .10);
    --text: #f5f5f7;
    --text-2: #a1a1aa;
    --text-3: #74747e;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 14px rgba(0, 0, 0, .32);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, .44), 0 18px 44px rgba(0, 0, 0, .38);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, .52), 0 40px 90px rgba(0, 0, 0, .5);
    --ok: #34d399;
    --ok-soft: rgba(52, 211, 153, .14);
    --warn: #fbbf24;
    --warn-soft: rgba(251, 191, 36, .14);
    --danger: #ff6b7a;
    --danger-soft: rgba(255, 107, 122, .14);
    --info: #5ab0ff;
    --info-soft: rgba(90, 176, 255, .14);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -.01em;
    min-height: 100vh;
    transition: background .4s var(--ease), color .4s var(--ease);
}

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.022em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
code, pre, .mono { font-family: var(--font-mono); }
img { max-width: 100%; }
::selection { background: rgba(0, 113, 227, .22); }

.muted { color: var(--text-2); }
.small { font-size: 12.5px; }
.grow { flex: 1; min-width: 0; }
.dot { color: var(--text-3); }
.hide-sm { display: inline-flex; }
.text-success { color: var(--ok); font-weight: 600; }
.text-danger { color: var(--danger); font-weight: 600; }

/* ---------- 背景光斑 ---------- */
.bg-scene {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(900px 620px at 8% -6%, rgba(0, 113, 227, .14), transparent 62%),
        radial-gradient(780px 560px at 96% 4%, rgba(124, 92, 255, .16), transparent 64%),
        radial-gradient(720px 520px at 60% 108%, rgba(56, 189, 248, .13), transparent 62%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

[data-theme="dark"] .bg-scene {
    background:
        radial-gradient(900px 620px at 8% -6%, rgba(0, 113, 227, .26), transparent 62%),
        radial-gradient(780px 560px at 96% 4%, rgba(124, 92, 255, .26), transparent 64%),
        radial-gradient(720px 520px at 60% 108%, rgba(56, 189, 248, .16), transparent 62%),
        linear-gradient(180deg, #06060a 0%, #0b0b11 100%);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .55;
    animation: orbFloat 22s var(--ease) infinite alternate;
}
.orb-a { width: 520px; height: 520px; top: -160px; left: -110px; background: radial-gradient(circle at 30% 30%, #7fb7ff, transparent 68%); }
.orb-b { width: 480px; height: 480px; top: 8%; right: -140px; background: radial-gradient(circle at 60% 40%, #c0a8ff, transparent 68%); animation-delay: -7s; }
.orb-c { width: 620px; height: 620px; bottom: -260px; left: 42%; background: radial-gradient(circle at 50% 50%, #9be6ff, transparent 68%); animation-delay: -13s; }

[data-theme="dark"] .orb { opacity: .38; }

@keyframes orbFloat {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(28px, 42px, 0) scale(1.08); }
}

.grain {
    position: absolute;
    inset: 0;
    opacity: .028;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: multiply;
}
[data-theme="dark"] .grain { mix-blend-mode: screen; opacity: .04; }

/* ---------- 骨架布局 ---------- */
.app-shell { display: flex; align-items: flex-start; min-height: 100vh; }

.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-shell {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 26px 34px 10px;
    flex: 1;
}

/* ---------- 侧边栏 ---------- */
.sidebar {
    position: sticky;
    top: 0;
    flex: 0 0 var(--sidebar-w);
    width: var(--sidebar-w);
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 18px 14px 14px;
    background: var(--surface);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    border-right: 1px solid var(--hairline);
    z-index: 40;
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 6px 16px;
}

.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }

.brand-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: var(--accent-gradient);
    box-shadow: 0 8px 18px rgba(0, 113, 227, .28), inset 0 1px 0 rgba(255, 255, 255, .35);
}

.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.brand-text strong { font-size: 14.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { font-size: 11.5px; color: var(--text-3); letter-spacing: .04em; }

.sidebar-close { display: none !important; }

.nav-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2px 2px 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--hairline) transparent;
}
.nav-scroll::-webkit-scrollbar { width: 5px; }
.nav-scroll::-webkit-scrollbar-thumb { background: rgba(120, 130, 150, .22); border-radius: 4px; }

.nav-group-label {
    padding: 14px 12px 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-3);
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    height: 42px;
    padding: 0 12px;
    margin-bottom: 3px;
    border-radius: 12px;
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 550;
    transition: background .22s var(--ease), color .22s var(--ease), transform .22s var(--ease);
}
.nav-item:hover { background: var(--surface-sub); color: var(--text); }
.nav-item:hover .nav-icon { transform: translateY(-1px); }

.nav-item.is-active {
    color: #fff;
    background: var(--accent-gradient);
    box-shadow: 0 10px 24px rgba(0, 113, 227, .26), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.nav-item.is-active .nav-icon { opacity: 1; }

.nav-icon { display: inline-flex; opacity: .78; transition: transform .22s var(--ease); }
.nav-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 650;
    background: var(--danger);
    color: #fff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .28);
}
.nav-item.is-active .nav-badge { background: rgba(255, 255, 255, .92); color: var(--brand-1); box-shadow: none; }

.sidebar-foot {
    padding: 12px 8px 4px;
    border-top: 1px solid var(--hairline);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.theme-row { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.theme-label { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); }

.seg-toggle {
    position: relative;
    width: 46px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid var(--hairline);
    background: rgba(120, 130, 150, .18);
    cursor: pointer;
    transition: background .3s var(--ease);
    padding: 0;
}
.seg-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(16, 24, 40, .24);
    transition: transform .3s var(--ease);
}
[data-theme="dark"] .seg-toggle { background: rgba(0, 113, 227, .55); }
[data-theme="dark"] .seg-thumb { transform: translateX(20px); }

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius-md);
    background: var(--surface-sub);
    border: 1px solid transparent;
    transition: border-color .2s var(--ease), background .2s var(--ease);
}
.user-chip:hover { border-color: var(--hairline); background: var(--surface); }
.user-chip.is-guest { color: var(--text-2); }

.avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 650;
    color: #fff;
    letter-spacing: .02em;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}
.avatar.small { width: 30px; height: 30px; flex-basis: 30px; font-size: 11.5px; }
.avatar-guest { background: rgba(120, 130, 150, .18); color: var(--text-2); }

.user-meta { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.user-meta strong { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta small { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-mask {
    position: fixed;
    inset: 0;
    background: rgba(8, 10, 16, .42);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s var(--ease), visibility .3s;
    z-index: 39;
}

/* ---------- 顶栏 ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 66px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 34px;
    background: linear-gradient(180deg, rgba(245, 246, 250, .82), rgba(245, 246, 250, .52));
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--hairline);
}
[data-theme="dark"] .topbar { background: linear-gradient(180deg, rgba(12, 12, 18, .86), rgba(12, 12, 18, .56)); }

.menu-btn { display: none !important; }

.topbar-crumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    min-width: 0;
    flex: 1;
}
.crumb-root { color: var(--text-3); }
.crumb-sep { color: var(--text-3); opacity: .5; }
.crumb-now { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.topbar-actions { display: flex; align-items: center; gap: 9px; }

.balance-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12.5px;
    color: var(--text-2);
    background: var(--surface-sub);
    border: 1px solid var(--hairline);
}
.balance-pill b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }

.ghost-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12.5px;
    color: var(--text-2);
    background: var(--surface-sub);
    border: 1px solid var(--hairline);
    transition: color .2s, background .2s;
}
.ghost-chip:hover { color: var(--text); background: var(--surface); }

.theme-toggle { position: relative; overflow: hidden; }
.theme-icon-light, .theme-icon-dark { display: inline-flex; transition: transform .35s var(--ease), opacity .3s; }
.theme-icon-dark { position: absolute; opacity: 0; transform: rotate(-40deg) scale(.6); }
[data-theme="dark"] .theme-icon-light { opacity: 0; transform: rotate(40deg) scale(.6); }
[data-theme="dark"] .theme-icon-dark { opacity: 1; transform: none; position: static; }

.avatar-mini {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    font-weight: 650;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24), var(--shadow-sm);
    transition: transform .2s var(--ease);
}
.avatar-mini:hover { transform: scale(1.06); }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 42px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: -.01em;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .18s var(--ease), box-shadow .22s var(--ease), background .2s, opacity .2s;
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.975); }

.btn-primary {
    color: #fff;
    background: var(--accent-gradient);
    box-shadow: 0 8px 20px rgba(0, 113, 227, .26), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.btn-primary:hover { box-shadow: 0 12px 26px rgba(0, 113, 227, .34), inset 0 1px 0 rgba(255, 255, 255, .28); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

.btn-ghost {
    color: var(--text);
    background: var(--surface-strong);
    border-color: var(--hairline);
    box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { background: var(--surface-solid); }

.btn-sm { height: 34px; padding: 0 14px; font-size: 12.5px; border-radius: 11px; }
.btn-xs { height: 29px; padding: 0 11px; font-size: 12px; border-radius: 9px; }
.btn-block { width: 100%; }

.icon-btn {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
    transition: background .2s, color .2s, transform .18s var(--ease);
    padding: 0;
}
.icon-btn:hover { background: var(--surface-sub); color: var(--text); border-color: var(--hairline); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.danger:hover { color: var(--danger); background: var(--danger-soft); border-color: transparent; }

.text-btn {
    border: 0;
    background: none;
    color: var(--brand-1);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 2px;
    border-radius: 6px;
}
.text-btn:hover { text-decoration: underline; }

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--brand-1);
}
.text-link:hover { text-decoration: underline; }

/* ---------- 玻璃卡片 ---------- */
.glass {
    background: var(--surface);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    border: 1px solid var(--stroke-glass);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.glass-strong {
    background: var(--surface-strong);
    -webkit-backdrop-filter: var(--blur-strong);
    backdrop-filter: var(--blur-strong);
    border: 1px solid var(--stroke-glass);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, .6);
}
[data-theme="dark"] .glass,
[data-theme="dark"] .glass-strong { box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, .06); }

.card {
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}

.card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}
.card-head h2 { font-size: 16.5px; font-weight: 650; }
.card-head p { margin-top: 2px; font-size: 12.5px; color: var(--text-3); }
.card-head > svg { color: var(--text-3); }

/* ---------- 页头 ---------- */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin: 6px 0 22px;
    flex-wrap: wrap;
}
.page-title { font-size: 28px; font-weight: 700; letter-spacing: -.035em; }
.page-desc { margin-top: 5px; font-size: 13px; color: var(--text-3); }
.page-head-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

.section { margin-top: 30px; }
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.section-title { font-size: 24px; font-weight: 700; letter-spacing: -.032em; }
.section-sub { margin-top: 4px; font-size: 12.5px; color: var(--text-3); }
.section-tools { display: flex; align-items: center; gap: 9px; }

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.field > label,
.field-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); letter-spacing: -.005em; }

.field input,
.field select,
.field textarea,
.select,
.textarea,
.inline-form input,
.qty-input {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--hairline);
    background: var(--surface-strong);
    color: var(--text);
    font-family: inherit;
    font-size: 13.5px;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
    -webkit-appearance: none;
    appearance: none;
}
.field textarea, .textarea {
    height: auto;
    padding: 11px 14px;
    line-height: 1.6;
    resize: vertical;
    min-height: 84px;
}
.field input::placeholder,
.field textarea::placeholder,
.select::placeholder { color: var(--text-3); }

.field input:focus,
.field select:focus,
.field textarea:focus,
.select:focus,
.textarea:focus,
.inline-form input:focus {
    border-color: rgba(0, 113, 227, .5);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, .13);
    background: var(--surface-solid);
}

.select {
    padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    cursor: pointer;
}
.select.small { height: 32px; font-size: 12px; padding: 0 28px 0 10px; border-radius: 9px; }

.input-wrap { position: relative; }
.input-wrap > svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    pointer-events: none;
}
.input-wrap input { padding-left: 44px; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px 16px;
}
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: span 3; }

.form-actions { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }

.inline-form { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.inline-form input { width: auto; min-width: 160px; height: 38px; }

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 13px;
    border-radius: 999px;
    background: var(--surface-strong);
    border: 1px solid var(--hairline);
    box-shadow: var(--shadow-sm);
    color: var(--text-3);
}
.search-box input {
    border: 0;
    background: none;
    outline: none;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    width: 170px;
}
.search-box.small { height: 34px; padding: 0 11px; }
.search-box.small input { width: 140px; font-size: 12.5px; }

.copy-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 5px 5px 12px;
    border-radius: var(--radius-md);
    background: var(--surface-sub);
    border: 1px solid var(--hairline);
}
.copy-box input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: none;
    outline: none;
    color: var(--text-2);
    font-family: var(--font-mono);
    font-size: 12px;
}
.copy-btn { flex: 0 0 auto; }

.qty-stepper {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 42px;
    padding: 4px;
    border-radius: var(--radius-md);
    background: var(--surface-sub);
    border: 1px solid var(--hairline);
}
.qty-stepper button {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
    transition: background .18s, color .18s;
}
.qty-stepper button:hover { background: var(--surface-solid); color: var(--text); }
.qty-stepper span {
    min-width: 34px;
    text-align: center;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.check-row { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-2); }
.check-row input { width: 17px; height: 17px; accent-color: var(--brand-1); }

.gradient-swatches { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.swatch {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    border: 2px solid rgba(255, 255, 255, .7);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform .18s var(--ease), box-shadow .18s;
    padding: 0;
}
.swatch:hover { transform: translateY(-2px) scale(1.06); box-shadow: var(--shadow-md); }

/* ---------- 胶囊 / 标签 ---------- */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding: 0 9px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    background: var(--surface-sub);
    color: var(--text-2);
}
.pill.is-small { height: 20px; font-size: 10.5px; padding: 0 7px; border-radius: 6px; }
.pill.success { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.muted { background: rgba(120, 130, 150, .13); color: var(--text-2); }
.pill.accent { background: var(--accent-gradient-soft); color: var(--brand-1); }

.pill-mini {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 650;
    background: var(--surface-sub);
    color: var(--text-2);
}
.pill-mini.success { background: var(--ok-soft); color: var(--ok); }

.mini-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 24px;
    padding: 0 9px;
    border-radius: 7px;
    font-size: 11px;
    color: var(--text-2);
    background: var(--surface-sub);
    border: 1px solid var(--hairline);
}

.chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 33px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--hairline);
    background: var(--surface-strong);
    color: var(--text-2);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 550;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all .2s var(--ease);
}
.chip small { font-size: 10.5px; color: var(--text-3); font-weight: 600; }
.chip:hover { color: var(--text); transform: translateY(-1px); }
.chip.is-active {
    color: #fff;
    background: var(--accent-gradient);
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(0, 113, 227, .26);
}
.chip.is-active small { color: rgba(255, 255, 255, .75); }

.tabs {
    display: inline-flex;
    gap: 3px;
    padding: 4px;
    border-radius: 13px;
    background: var(--surface-sub);
    border: 1px solid var(--hairline);
    margin-bottom: 16px;
}
.tab {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 15px;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 550;
    color: var(--text-2);
    transition: all .2s var(--ease);
}
.tab:hover { color: var(--text); }
.tab.is-active {
    color: var(--text);
    background: var(--surface-solid);
    box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .tab.is-active { background: rgba(255, 255, 255, .12); }

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.filter-bar .muted { font-size: 12.5px; }

/* ---------- 提示条 ---------- */
.notice {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    font-size: 12.5px;
    line-height: 1.55;
    background: var(--surface-sub);
    border: 1px solid var(--hairline);
    color: var(--text-2);
    margin-bottom: 14px;
}
.notice svg { flex: 0 0 auto; margin-top: 2px; }
.notice.info { background: var(--info-soft); border-color: rgba(10, 111, 208, .16); color: var(--info); }
.notice.warn { background: var(--warn-soft); border-color: rgba(214, 138, 0, .18); color: var(--warn); }
.notice.success { background: var(--ok-soft); border-color: rgba(18, 149, 107, .16); color: var(--ok); }
.notice.danger { background: var(--danger-soft); border-color: rgba(217, 44, 60, .16); color: var(--danger); }
.notice a { font-weight: 650; text-decoration: underline; }
.notice strong { display: block; margin-bottom: 2px; font-size: 13px; }

/* ---------- 空状态 ---------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 52px 22px;
    border-radius: var(--radius-lg);
    text-align: center;
    color: var(--text-3);
}
.empty-state svg { opacity: .5; margin-bottom: 4px; }
.empty-state h3 { font-size: 15.5px; color: var(--text); }
.empty-state p { font-size: 12.5px; color: var(--text-3); max-width: 320px; }
.empty-state .btn { margin-top: 12px; }

.empty-inline {
    padding: 30px 10px;
    text-align: center;
    font-size: 12.5px;
    color: var(--text-3);
}

/* ---------- 表格 ---------- */
.table-card { padding: 8px 8px 8px; overflow: hidden; }
.table-card > .card-head { padding: 14px 14px 0; }
.table-wrap { width: 100%; overflow-x: auto; }
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}
.table thead th {
    position: sticky;
    top: 0;
    padding: 12px 14px;
    text-align: left;
    font-size: 11.5px;
    font-weight: 650;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--text-3);
    white-space: nowrap;
    background: transparent;
    border-bottom: 1px solid var(--hairline);
}
.table tbody td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--hairline);
    color: var(--text);
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .16s; }
.table tbody tr:hover td { background: var(--surface-sub); }
.table th.col-check, .table td.col-check { width: 40px; padding-right: 0; text-align: center; }
.row-check {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--brand-1);
    cursor: pointer;
    vertical-align: middle;
}
.table td.muted { color: var(--text-2); font-size: 12.5px; }

.table-product { display: flex; align-items: center; gap: 11px; min-width: 0; }
.table-product > div { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.table-product strong { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-product small { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.table-thumb {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}
.table-thumb.small { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; }

.stacked { display: flex; flex-direction: column; gap: 2px; line-height: 1.35; min-width: 0; }
.stacked strong { font-size: 13px; font-weight: 600; }
.stacked span { font-size: 12.5px; color: var(--text-2); }
.stacked small { font-size: 11.5px; color: var(--text-3); }

.row-actions { display: flex; align-items: center; gap: 3px; }
.row-action-form { display: inline-flex; }

/* ---------- 统计卡 ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.stat-grid.stat-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.stat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 18px 20px 16px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.stat-card::after {
    content: "";
    position: absolute;
    top: -60px;
    right: -50px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 113, 227, .16), transparent 68%);
    pointer-events: none;
}
.stat-card.accent::after { background: radial-gradient(circle, rgba(124, 92, 255, .22), transparent 68%); }
.stat-card.is-alert::after { background: radial-gradient(circle, rgba(217, 44, 60, .22), transparent 68%); }
.stat-card.is-alert .stat-value { color: var(--danger); }

.stat-label { font-size: 12px; font-weight: 600; color: var(--text-3); letter-spacing: .01em; }
.stat-value {
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -.035em;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}
.stat-value i { font-size: 14px; font-style: normal; font-weight: 600; color: var(--text-3); margin-right: 2px; }
.stat-foot { font-size: 11.5px; color: var(--text-3); }
.stat-foot a { color: var(--brand-1); font-weight: 600; }

/* ---------- 柱状图 ---------- */
.chart-card { display: flex; flex-direction: column; }
.bar-chart {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 190px;
    padding-top: 18px;
}
.bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    height: 100%;
    min-width: 0;
}
.bar-value { font-size: 10.5px; color: var(--text-3); font-weight: 600; height: 14px; white-space: nowrap; }
.bar {
    width: 100%;
    max-width: 34px;
    min-height: 4px;
    border-radius: 8px 8px 5px 5px;
    background: var(--accent-gradient);
    box-shadow: 0 6px 14px rgba(0, 113, 227, .22);
    transition: height .5s var(--ease), filter .2s;
}
.bar-col:hover .bar { filter: brightness(1.12); }
.bar-label { font-size: 10.5px; color: var(--text-3); white-space: nowrap; }
.bar-sub { font-size: 10px; color: var(--text-3); }

/* ---------- 列表行 ---------- */
.list-rows { display: flex; flex-direction: column; }
.list-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 2px;
    border-bottom: 1px solid var(--hairline);
}
.list-row:last-child { border-bottom: 0; }
.row-avatar {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 11.5px;
    font-weight: 650;
}
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.row-main strong { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-main small { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-amount { font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text-2); }
.row-amount.success { color: var(--ok); }
.row-badge {
    height: 24px;
    padding: 0 9px;
    display: inline-grid;
    place-items: center;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-2);
    background: var(--surface-sub);
    border: 1px solid var(--hairline);
    white-space: nowrap;
}
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }

/* ---------- Toast ---------- */
.toast-stack {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 240px;
    max-width: 380px;
    padding: 13px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text);
    background: var(--surface-strong);
    -webkit-backdrop-filter: var(--blur-strong);
    backdrop-filter: var(--blur-strong);
    border: 1px solid var(--stroke-glass);
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    animation: toastIn .42s var(--ease) both;
}
.toast svg { flex: 0 0 auto; }
.toast.success svg { color: var(--ok); }
.toast.error svg { color: var(--danger); }
.toast.info svg { color: var(--info); }
.toast.is-out { animation: toastOut .32s var(--ease) forwards; }

@keyframes toastIn {
    from { opacity: 0; transform: translate3d(18px, -8px, 0) scale(.96); }
    to { opacity: 1; transform: none; }
}
@keyframes toastOut {
    to { opacity: 0; transform: translate3d(10px, -8px, 0) scale(.96); }
}

/* ---------- 页脚 ---------- */
.site-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 34px 26px;
    font-size: 11.5px;
    color: var(--text-3);
    flex-wrap: wrap;
}
.foot-links { display: flex; align-items: center; gap: 16px; }
.foot-links a { color: var(--text-2); transition: color .2s; }
.foot-links a:hover { color: var(--brand-1); }

/* ---------- 公告跑马灯 ---------- */
.marquee-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 38px;
    padding: 0 14px;
    margin-bottom: 14px;
    border-radius: 11px;
    background: var(--surface);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    border: 1px solid var(--hairline);
    overflow: hidden;
}
.marquee-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    height: 23px;
    padding: 0 9px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 650;
    color: var(--brand-1);
    background: var(--accent-gradient-soft);
}
.marquee-track {
    flex: 1;
    display: flex;
    gap: 34px;
    overflow: hidden;
    white-space: nowrap;
    font-size: 12.5px;
    color: var(--text-2);
    mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 30px), transparent);
}
.marquee-item { flex: 0 0 auto; animation: marquee 26s linear infinite; }
@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-140%); }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    gap: 26px;
    align-items: center;
    padding: 40px 42px;
    border-radius: var(--radius-xl);
    overflow: hidden;
}
.hero-glow {
    position: absolute;
    top: -180px;
    right: -120px;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 92, 255, .28), transparent 66%);
    filter: blur(20px);
    pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 650;
    letter-spacing: .02em;
    color: var(--brand-1);
    background: var(--accent-gradient-soft);
    border: 1px solid rgba(0, 113, 227, .14);
}
.hero-title {
    margin: 16px 0 12px;
    font-size: 42px;
    line-height: 1.12;
    font-weight: 750;
    letter-spacing: -.045em;
    background: linear-gradient(160deg, var(--text) 26%, rgba(0, 113, 227, .86) 74%, rgba(124, 92, 255, .9));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-text {
    max-width: 430px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-2);
}
.hero-actions { display: flex; align-items: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.hero-stats {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--hairline);
    flex-wrap: wrap;
}
.hero-stat { display: flex; flex-direction: column; line-height: 1.25; }
.hero-stat strong { font-size: 22px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.hero-stat strong small { font-size: 12px; font-weight: 600; color: var(--text-3); }
.hero-stat span { font-size: 11.5px; color: var(--text-3); }

.hero-visual { position: relative; z-index: 1; }
.hero-card-stack { display: flex; flex-direction: column; gap: 12px; }

.float-card {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    animation: floatY 6s var(--ease) infinite alternate;
}
.float-card.is-offset { margin-left: 26px; animation-delay: -2s; }
.float-card.is-offset-2 { margin-left: 12px; animation-delay: -4s; }
.float-card > div { flex: 1; min-width: 0; line-height: 1.35; }
.float-card strong { display: block; font-size: 13.5px; font-weight: 650; }
.float-card small { font-size: 11.5px; color: var(--text-3); }
.float-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 18px rgba(0, 113, 227, .2);
}
@keyframes floatY {
    from { transform: translateY(0); }
    to { transform: translateY(-9px); }
}

.signal { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.signal i { width: 3px; border-radius: 2px; background: var(--ok); opacity: .75; }
.signal i:nth-child(1) { height: 5px; }
.signal i:nth-child(2) { height: 9px; }
.signal i:nth-child(3) { height: 13px; }

.live-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 4px rgba(18, 149, 107, .18);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(18, 149, 107, .18); }
    50% { box-shadow: 0 0 0 7px rgba(18, 149, 107, .04); }
}

/* ---------- 特性条 ---------- */
.features-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    border-radius: var(--radius-lg);
}
.feature > div { line-height: 1.35; }
.feature strong { display: block; font-size: 13px; font-weight: 650; }
.feature small { font-size: 11.5px; color: var(--text-3); }
.feature-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--brand-1);
    background: var(--accent-gradient-soft);
}

/* ---------- 商品网格 ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
    gap: 18px;
}
.product-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: transform .32s var(--ease), box-shadow .32s var(--ease);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.product-cover {
    position: relative;
    height: 132px;
    display: grid;
    place-items: center;
    overflow: hidden;
}
.cover-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120px 80px at 22% 18%, rgba(255, 255, 255, .5), transparent 70%),
        linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(0, 0, 0, .04));
}
.cover-icon {
    position: relative;
    width: 66px;
    height: 66px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    color: #fff;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .34);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .4);
    transition: transform .32s var(--ease);
}
.product-card:hover .cover-icon { transform: scale(1.06) rotate(-3deg); }

.cover-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    height: 22px;
    padding: 0 9px;
    display: inline-grid;
    place-items: center;
    border-radius: 7px;
    font-size: 10.5px;
    font-weight: 650;
    color: #fff;
    background: rgba(16, 18, 24, .34);
    border: 1px solid rgba(255, 255, 255, .28);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.cover-stock {
    position: absolute;
    right: 12px;
    bottom: 12px;
    height: 22px;
    padding: 0 9px;
    display: inline-grid;
    place-items: center;
    border-radius: 7px;
    font-size: 10.5px;
    font-weight: 600;
    color: #fff;
    background: rgba(16, 18, 24, .3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.cover-stock.is-out { background: rgba(217, 44, 60, .82); }

.product-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.product-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.product-title-row h3 { font-size: 15px; font-weight: 650; line-height: 1.35; }
.product-cat {
    flex: 0 0 auto;
    height: 20px;
    padding: 0 7px;
    display: inline-grid;
    place-items: center;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-3);
    background: var(--surface-sub);
}
.product-sub {
    font-size: 12px;
    color: var(--text-3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
}
.product-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 8px; }
.price { display: flex; align-items: baseline; gap: 2px; }
.price .cur { font-size: 12px; font-weight: 600; color: var(--brand-1); }
.price strong { font-size: 24px; font-weight: 700; letter-spacing: -.03em; color: var(--brand-1); font-variant-numeric: tabular-nums; }
.price small { font-size: 10.5px; color: var(--text-3); margin-left: 2px; }
.product-tip {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text-3);
    padding-top: 9px;
    border-top: 1px solid var(--hairline);
    margin-top: 4px;
}

/* ---------- 最新成交 ---------- */
.live-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 4px 18px;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
}
.live-item { display: flex; align-items: center; gap: 9px; padding: 7px 0; min-width: 0; }
.live-avatar {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 650;
    color: #fff;
}
.live-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.live-meta strong { font-size: 12.5px; font-weight: 600; }
.live-meta small { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-time { font-size: 10.5px; color: var(--text-3); white-space: nowrap; }

/* ---------- 个人资料卡 ---------- */
.profile-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    padding: 26px 28px;
    border-radius: var(--radius-xl);
    flex-wrap: wrap;
}
.profile-main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.profile-avatar {
    width: 66px;
    height: 66px;
    flex: 0 0 66px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 21px;
    font-weight: 700;
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .26), var(--shadow-md);
}
.profile-info { min-width: 0; }
.profile-name { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.profile-name h2 { font-size: 22px; font-weight: 700; letter-spacing: -.03em; }
.profile-meta { margin-top: 3px; font-size: 12px; color: var(--text-3); }
.profile-tags { display: flex; align-items: center; gap: 7px; margin-top: 9px; flex-wrap: wrap; }

.profile-stats { display: flex; align-items: center; gap: 8px; }
.profile-stat {
    min-width: 92px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: var(--surface-sub);
    border: 1px solid var(--hairline);
    text-align: center;
}
.profile-stat strong { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.3; }
.profile-stat strong i { font-size: 11px; font-style: normal; color: var(--text-3); font-weight: 600; }
.profile-stat span { font-size: 11px; color: var(--text-3); }

/* ---------- 提示卡 ---------- */
.callout {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 17px 20px;
    border-radius: var(--radius-lg);
    margin-top: 16px;
}
.callout.is-pending { border-color: rgba(214, 138, 0, .26); }
.callout-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--brand-1);
    background: var(--accent-gradient-soft);
}
.callout.is-pending .callout-icon { color: var(--warn); background: var(--warn-soft); }
.callout-text { flex: 1; min-width: 0; line-height: 1.45; }
.callout-text strong { display: block; font-size: 13.5px; font-weight: 650; }
.callout-text p { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.support-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    border-radius: var(--radius-lg);
    margin-top: 22px;
    flex-wrap: wrap;
}
.support-strip strong { font-size: 13.5px; font-weight: 650; }
.support-strip p { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.support-contact {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--brand-1);
    background: var(--accent-gradient-soft);
}

/* ---------- 订单卡 ---------- */
.order-list { display: flex; flex-direction: column; gap: 12px; }
.order-card {
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    transition: box-shadow .28s var(--ease), transform .28s var(--ease);
}
.order-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.order-card.is-pending { border-color: rgba(214, 138, 0, .3); }

.order-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.order-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.order-thumb {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}
.order-id > div { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.order-id strong { font-size: 14px; font-weight: 650; }
.order-no { font-size: 11px; color: var(--text-3); font-family: var(--font-mono); }
.order-side { display: flex; align-items: center; gap: 10px; }
.order-amount { font-size: 16px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.order-info {
    display: flex;
    align-items: center;
    gap: 8px 18px;
    margin-top: 11px;
    padding-top: 11px;
    border-top: 1px solid var(--hairline);
    font-size: 11.5px;
    color: var(--text-3);
    flex-wrap: wrap;
}
.order-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.order-hint { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--warn); }

/* ---------- 卡密面板 ---------- */
.cards-panel {
    margin-top: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    background: var(--surface-sub);
    border: 1px solid var(--hairline);
    animation: fadeSlide .34s var(--ease) both;
}
.cards-panel[hidden] { display: none; }
.cards-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 2px 9px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
}
.cards-panel-head > span { display: inline-flex; align-items: center; gap: 6px; }
.card-line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 9px;
    background: var(--surface-solid);
    border: 1px solid var(--hairline);
    margin-bottom: 6px;
}
.card-line:last-child { margin-bottom: 0; }
.card-index {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 650;
    color: var(--brand-1);
    background: var(--accent-gradient-soft);
}
.card-code {
    flex: 1;
    min-width: 0;
    font-size: 12.5px;
    color: var(--text);
    word-break: break-all;
    line-height: 1.5;
}
.copy-btn { width: 28px; height: 28px; border-radius: 8px; }

@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}

/* ---------- 退款 / 申请 ---------- */
.refund-list { display: flex; flex-direction: column; gap: 14px; }
.refund-card { border-radius: var(--radius-lg); padding: 18px 20px; }
.refund-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.refund-user { display: flex; align-items: center; gap: 11px; min-width: 0; }
.refund-user > div { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.refund-user strong { font-size: 13.5px; font-weight: 650; }
.refund-user small { font-size: 11px; color: var(--text-3); }
.refund-side { display: flex; align-items: center; gap: 9px; }
.refund-amount { font-size: 17px; font-weight: 700; letter-spacing: -.025em; color: var(--danger); font-variant-numeric: tabular-nums; }
.refund-body { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hairline); }
.refund-info { display: flex; gap: 8px 20px; font-size: 11.5px; color: var(--text-3); flex-wrap: wrap; }
.refund-info b { color: var(--text-2); font-weight: 600; }
.refund-reason {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 13px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    color: var(--text-2);
    background: var(--warn-soft);
}
.refund-reason svg { flex: 0 0 auto; margin-top: 2px; color: var(--warn); }
.refund-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.refund-form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.refund-form-row .field { min-width: 150px; margin-bottom: 10px; }
.refund-form-row .field.grow { flex: 1; }
.refund-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.refund-result { display: flex; gap: 8px 20px; margin-top: 12px; font-size: 11.5px; color: var(--text-3); flex-wrap: wrap; }

.application-list { display: flex; flex-direction: column; gap: 10px; }
.application-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 15px;
    border-radius: var(--radius-md);
    background: var(--surface-sub);
    border: 1px solid var(--hairline);
    flex-wrap: wrap;
}
.application-info { min-width: 0; flex: 1; }
.application-info strong { font-size: 13px; font-weight: 650; }
.application-info small { display: block; font-size: 11px; color: var(--text-3); }
.application-detail { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; font-size: 11.5px; color: var(--text-3); }
.application-detail b { color: var(--text-2); }
.application-form { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.application-form input[type="text"] {
    width: 130px;
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
    border-radius: 9px;
    border: 1px solid var(--hairline);
    background: var(--surface-strong);
    color: var(--text);
    outline: none;
}

.edit-agent-card .grid-2 { margin-bottom: 0; }

.balance-summary { display: flex; gap: 10px; margin-bottom: 14px; }
.balance-summary > div {
    flex: 1;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    background: var(--surface-sub);
    border: 1px solid var(--hairline);
}
.balance-summary span { display: block; font-size: 11px; color: var(--text-3); }
.balance-summary strong { font-size: 17px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ---------- 推广卡 ---------- */
.promo-card { display: flex; flex-direction: column; }
.promo-steps { display: flex; gap: 8px; margin-top: 14px; }
.promo-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 11px 12px;
    border-radius: var(--radius-md);
    background: var(--surface-sub);
    border: 1px solid var(--hairline);
}
.promo-step span {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 10.5px;
    font-weight: 700;
    color: #fff;
    background: var(--accent-gradient);
}
.promo-step p { font-size: 11px; color: var(--text-3); line-height: 1.45; }

.commission-rates {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--hairline);
}
.commission-rates > div { flex: 1; text-align: center; }
.commission-rates span { display: block; font-size: 10.5px; color: var(--text-3); }
.commission-rates strong { font-size: 15px; font-weight: 700; color: var(--brand-1); letter-spacing: -.02em; }

/* ---------- API 文档 ---------- */
.credential-row { margin-bottom: 13px; }
.credential-row > label { display: block; font-size: 11.5px; font-weight: 600; color: var(--text-3); margin-bottom: 6px; }
.doc-text { font-size: 12.5px; color: var(--text-2); line-height: 1.7; margin-bottom: 10px; }
.doc-text code, .card-head code {
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 11.5px;
    background: var(--surface-sub);
    border: 1px solid var(--hairline);
    color: var(--brand-1);
}
.code-block {
    margin: 0 0 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: rgba(16, 20, 30, .92);
    color: #d6e2f0;
    font-size: 12px;
    line-height: 1.7;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, .08);
}
[data-theme="dark"] .code-block { background: rgba(0, 0, 0, .48); }

.info-list, .rule-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.rule-list li,
.info-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-2);
    line-height: 1.55;
}
.rule-list li svg, .info-list li svg { flex: 0 0 auto; margin-top: 3px; color: var(--ok); }

/* ---------- 弹窗 ---------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s var(--ease), visibility .28s;
}
.modal.is-open { opacity: 1; visibility: visible; }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 12, 20, .38);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    backdrop-filter: blur(10px) saturate(140%);
}

.modal-card {
    position: relative;
    width: 100%;
    max-width: 540px;
    max-height: calc(100vh - 44px);
    overflow-y: auto;
    padding: 26px 26px 22px;
    border-radius: var(--radius-xl);
    transform: translateY(14px) scale(.97);
    transition: transform .34s var(--ease);
}
.modal.is-open .modal-card { transform: none; }
.modal-card.modal-sm { max-width: 430px; }

.modal-x {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid var(--hairline);
    border-radius: 50%;
    background: var(--surface-strong);
    color: var(--text-2);
    cursor: pointer;
    transition: background .2s, color .2s, transform .18s var(--ease);
}
.modal-x:hover { color: var(--text); transform: rotate(90deg); }

.modal-title { font-size: 20px; font-weight: 700; letter-spacing: -.028em; }
.modal-subtitle { margin-top: 5px; font-size: 12.5px; color: var(--text-3); line-height: 1.6; }
.modal-subtitle b { color: var(--text); font-weight: 650; }

.modal-hero {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    margin: -6px -4px 14px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--accent-gradient);
    color: #fff;
}
.modal-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(180px 120px at 88% 0%, rgba(255, 255, 255, .4), transparent 70%);
}
.modal-hero-icon {
    position: relative;
    z-index: 1;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, .2);
    border: 1px solid rgba(255, 255, 255, .3);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.modal-hero-meta { position: relative; z-index: 1; min-width: 0; }
.modal-hero-eyebrow { font-size: 10.5px; font-weight: 650; letter-spacing: .06em; opacity: .78; text-transform: uppercase; }
.modal-hero-meta h2 { font-size: 19px; font-weight: 700; letter-spacing: -.02em; margin: 2px 0; }
.modal-hero-meta p { font-size: 12px; opacity: .82; }

.modal-desc {
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--text-2);
    margin-bottom: 12px;
    white-space: pre-line;
    max-height: 120px;
    overflow-y: auto;
}
.modal-tip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    font-size: 11.5px;
    color: var(--brand-1);
    background: var(--accent-gradient-soft);
    margin-bottom: 16px;
}

.buy-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.buy-field { display: flex; flex-direction: column; gap: 7px; }
.buy-field.align-right { text-align: right; align-items: flex-end; }
.stock-text { font-size: 13.5px; font-weight: 650; font-variant-numeric: tabular-nums; }

.buy-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    margin: 4px 0 14px;
    border-radius: var(--radius-md);
    background: var(--surface-sub);
    border: 1px solid var(--hairline);
}
.buy-total span { font-size: 12.5px; color: var(--text-2); }
.buy-total strong { display: inline-flex; align-items: baseline; gap: 1px; font-size: 22px; font-weight: 700; letter-spacing: -.03em; color: var(--text); font-variant-numeric: tabular-nums; }
.buy-total strong i { font-size: 13px; font-style: normal; font-weight: 600; color: var(--brand-1); }
.modal-fine { margin-top: 10px; font-size: 10.5px; line-height: 1.6; color: var(--text-3); text-align: center; }

.pay-methods { display: flex; gap: 9px; flex-wrap: wrap; }
.pay-method { position: relative; cursor: pointer; }
.pay-method input { position: absolute; opacity: 0; pointer-events: none; }
.pay-method-body {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 15px;
    border-radius: var(--radius-md);
    border: 1px solid var(--hairline);
    background: var(--surface-strong);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-2);
    transition: all .2s var(--ease);
}
.pay-method:hover .pay-method-body { color: var(--text); }
.pay-method input:checked + .pay-method-body {
    color: var(--brand-1);
    border-color: rgba(0, 113, 227, .5);
    background: rgba(0, 113, 227, .07);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, .1);
}
.pay-icon { display: inline-flex; }

/* ---------- 登录 ---------- */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 40px 20px;
}
.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 32px 30px 26px;
    border-radius: var(--radius-xl);
}
.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; }
.auth-brand strong { display: block; font-size: 14.5px; font-weight: 650; line-height: 1.3; }
.auth-brand small { font-size: 11.5px; color: var(--text-3); }
.auth-title { font-size: 25px; font-weight: 700; letter-spacing: -.032em; }
.auth-desc { margin-top: 6px; font-size: 12.5px; color: var(--text-3); }
.auth-form { margin-top: 22px; }

.auth-tabs {
    display: flex;
    gap: 3px;
    padding: 4px;
    margin-bottom: 20px;
    border-radius: 12px;
    background: var(--surface-sub);
    border: 1px solid var(--hairline);
}
.auth-tabs a {
    flex: 1;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-2);
    transition: all .2s var(--ease);
}
.auth-tabs a.is-active { color: var(--text); background: var(--surface-solid); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .auth-tabs a.is-active { background: rgba(255, 255, 255, .12); }

.auth-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 11.5px;
    color: var(--text-3);
    justify-content: center;
}
.auth-switch { margin-top: 14px; text-align: center; font-size: 12.5px; color: var(--text-3); }
.auth-switch a { color: var(--brand-1); font-weight: 650; }
.auth-foot-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; font-size: 10.5px; color: var(--text-3); }
.auth-copyright { font-size: 11px; color: var(--text-3); text-align: center; }
.auth-back a { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); }
.auth-back a:hover { color: var(--brand-1); }

.invite-hint {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    margin-bottom: 14px;
    border-radius: var(--radius-sm);
    font-size: 11.5px;
    color: var(--ok);
    background: var(--ok-soft);
}

/* ---------- 支付页 ---------- */
.pay-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 30px 0 10px; }
.pay-card {
    width: 100%;
    max-width: 480px;
    padding: 30px 28px 26px;
    border-radius: var(--radius-xl);
    text-align: center;
}
.pay-status-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: var(--brand-1);
    background: var(--accent-gradient-soft);
}
.pay-status-icon.success { color: var(--ok); background: var(--ok-soft); }
.pay-status-icon.muted { color: var(--text-3); background: var(--surface-sub); }
.pay-title { font-size: 23px; font-weight: 700; letter-spacing: -.03em; }
.pay-subtitle { margin-top: 5px; font-size: 12.5px; color: var(--text-3); }

.pay-amount {
    margin: 18px 0;
    font-size: 40px;
    font-weight: 750;
    letter-spacing: -.045em;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.pay-amount i { font-size: 18px; font-style: normal; font-weight: 650; color: var(--brand-1); margin-right: 3px; }

.pay-meta { display: flex; flex-direction: column; gap: 1px; text-align: left; }
.pay-meta > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 0;
    border-bottom: 1px solid var(--hairline);
    font-size: 12.5px;
}
.pay-meta > div:last-child { border-bottom: 0; }
.pay-meta span { color: var(--text-3); flex: 0 0 auto; }
.pay-meta strong { font-weight: 600; text-align: right; word-break: break-all; }
.pay-meta.compact { margin-top: 16px; padding-top: 6px; border-top: 1px solid var(--hairline); }

.pay-gateway { margin-top: 18px; }
.pay-hint { margin-top: 10px; font-size: 11.5px; color: var(--text-3); line-height: 1.6; }
.pay-actions { display: flex; flex-direction: column; gap: 9px; margin-top: 18px; }
.pay-foot { font-size: 11px; color: var(--text-3); }

.manual-note { text-align: left; margin-top: 16px; }
.manual-note > div { line-height: 1.6; }
.manual-note strong { font-size: 13px; }
.manual-note p { margin-top: 2px; }
.manual-note b { font-weight: 650; }

/* ---------- 支付方式预览 ---------- */
.payment-methods-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.pay-method-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-2);
    background: var(--surface-sub);
    border: 1px solid var(--hairline);
}

/* ---------- 分页 ---------- */
.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 18px 10px 14px;
}
.pager-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 11px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-2);
    background: var(--surface-strong);
    border: 1px solid var(--hairline);
    box-shadow: var(--shadow-sm);
    transition: all .2s var(--ease);
}
.pager-btn:hover { color: var(--text); transform: translateY(-1px); }
.pager-btn.is-active {
    color: #fff;
    background: var(--accent-gradient);
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(0, 113, 227, .26);
}
.pager-btn.is-disabled { opacity: .42; pointer-events: none; box-shadow: none; }
.pager-dots { color: var(--text-3); font-size: 12px; padding: 0 2px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
    .page-shell { padding: 24px 26px 8px; }
    .topbar { padding: 0 26px; }
    .site-foot { padding: 20px 26px 24px; }
    .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid .span-3 { grid-column: span 2; }
    .hero { padding: 34px 32px; }
    .hero-title { font-size: 36px; }
}

@media (max-width: 980px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 45;
        transform: translateX(-102%);
        transition: transform .34s var(--ease);
        background: var(--surface-strong);
        box-shadow: var(--shadow-lg);
    }
    body.sidebar-open .sidebar { transform: none; }
    body.sidebar-open .sidebar-mask { opacity: 1; visibility: visible; }
    .sidebar-close, .menu-btn { display: inline-grid !important; }
    .hero { grid-template-columns: 1fr; padding: 30px 26px; }
    .hero-visual { display: none; }
    .hero-title { font-size: 32px; }
    .stat-grid-3 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
}

@media (max-width: 860px) {
    .page-shell { padding: 20px 18px 6px; }
    .topbar { padding: 0 18px; height: 60px; }
    .site-foot { padding: 18px 18px 22px; }
    .grid-2 { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .span-2, .form-grid .span-3 { grid-column: span 1; }
    .features-row { grid-template-columns: 1fr; }
    .profile-card { padding: 20px; }
    .profile-stats { width: 100%; }
    .profile-stat { flex: 1; min-width: 0; }
    .page-title { font-size: 24px; }
    .section-title { font-size: 21px; }
    .hero-stats { gap: 22px; }
    .toast-stack { left: 14px; right: 14px; top: 14px; }
    .toast { min-width: 0; max-width: none; }
}

@media (max-width: 640px) {
    .hide-sm { display: none !important; }
    .hero { padding: 24px 20px; }
    .hero-title { font-size: 27px; }
    .hero-stats { gap: 18px; margin-top: 24px; }
    .hero-stat strong { font-size: 19px; }
    .product-grid { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 14px 15px 12px; }
    .stat-value { font-size: 21px; }
    .page-head { align-items: flex-start; }
    .page-head-actions { width: 100%; }
    .modal-card { padding: 22px 18px 18px; border-radius: var(--radius-lg); }
    .modal-hero { margin: -4px -2px 12px; padding: 15px; }
    .card { padding: 16px 16px; }
    .order-side { width: 100%; justify-content: space-between; }
    .refund-side { width: 100%; justify-content: space-between; }
    .table thead th, .table tbody td { padding: 11px 10px; }
    .auth-card { padding: 26px 22px 22px; }
    .promo-steps { flex-direction: column; }
    .commission-rates { flex-direction: column; gap: 10px; }
    .pay-card { padding: 24px 20px 22px; }
    .pay-amount { font-size: 33px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

/* ==========================================================================
   商品规格（天卡 / 月卡等多卖法）
   ========================================================================== */
.field-hint {
    font-size: 12.5px;
    color: var(--text-2);
    line-height: 1.7;
    margin-top: 2px;
}

.variant-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.variant-head,
.variant-row {
    display: grid;
    grid-template-columns: 1.5fr repeat(5, minmax(70px, .85fr)) 62px 62px 40px;
    gap: 8px;
    align-items: center;
    min-width: 700px;
}

.variant-head {
    font-size: 12px;
    color: var(--text-3);
    padding: 0 10px;
}

.variant-row {
    padding: 9px 10px;
    border-radius: var(--radius-md);
    background: var(--surface-sub);
    border: 1px solid var(--hairline);
}

.variant-row input[type="text"],
.variant-row input[type="number"] {
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--hairline);
    background: var(--surface-solid);
    color: var(--text);
    font-size: 13px;
}

.variant-row input:focus {
    outline: none;
    border-color: rgba(0, 113, 227, .5);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, .12);
}

.variant-row .variant-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-3);
    white-space: nowrap;
}

.variant-row .variant-status > span {
    display: none;
}

.variant-row .icon-btn {
    justify-self: center;
}

.variant-empty {
    padding: 14px;
    text-align: center;
    font-size: 13px;
    color: var(--text-3);
    border: 1px dashed var(--hairline);
    border-radius: var(--radius-md);
}

@media (max-width: 900px) {
    .variant-head { display: none; }
    .variant-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-width: 0;
        gap: 10px;
    }
    .variant-row .variant-status {
        justify-content: flex-start;
    }
    .variant-row .variant-status > span {
        display: inline;
    }
    .variant-row .icon-btn {
        justify-self: end;
    }
}

/* 购买弹窗规格选择 */
.variant-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.variant-chip {
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--hairline);
    background: var(--surface-solid);
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s var(--ease);
    text-align: left;
}

.variant-chip small {
    display: block;
    margin-top: 2px;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-3);
}

.variant-chip:hover {
    border-color: rgba(0, 113, 227, .4);
}

.variant-chip.is-active {
    color: var(--brand-1);
    border-color: var(--brand-1);
    background: rgba(0, 113, 227, .08);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, .1);
}

.variant-chip[disabled] {
    opacity: .45;
    cursor: not-allowed;
}

/* ===== 排版与间距修正 ===== */
/* 版心加宽 + 统一垂直节奏（解决区块之间紧贴） */
.page-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 1360px;
    padding: 30px 40px 24px;
}
.page-shell > .page-head { margin: 0; }
.page-shell > .section { margin-top: 0; }
.site-foot { max-width: 1360px; padding: 22px 40px 30px; }

/* 首页分类筛选（间距由父容器 gap 控制） */
#categoryChips { margin: 0; }

/* 商品网格间距 */
.product-grid { gap: 20px; }

/* 表单区块之间留白 */
.form-grid { gap: 4px 18px; }

/* 表格卡片内边距 */
.table-card { padding: 10px; }
.table-card > .card-head { padding: 14px 12px 4px; }

/* 筛选栏间距交给父容器 gap */
.filter-bar { margin-bottom: 0; }

@media (max-width: 860px) {
    .page-shell { gap: 14px; padding: 20px 16px 16px; }
    .site-foot { padding: 18px 16px 22px; }
}

/* ===== 卡片与卡片之间的呼吸间距 ===== */
.stat-grid { gap: 18px; margin-bottom: 0; }
.grid-2 { gap: 18px; margin-bottom: 0; }
.order-list { gap: 16px; }
.refund-list { gap: 16px; }
.product-grid { gap: 22px; }
.list-rows { display: flex; flex-direction: column; gap: 10px; }

@media (max-width: 860px) {
    .stat-grid { gap: 12px; }
    .grid-2 { gap: 14px; }
    .product-grid { gap: 14px; }
}

/* ==========================================================================
   视觉升级 v2 · Apple Liquid Glass
   —— 更深的材质层次、更克制的配色、更舒展的呼吸间距
   ========================================================================== */

:root {
    --brand-1: #0a84ff;
    --brand-2: #8a6bff;
    --brand-3: #34d3ff;
    --accent-gradient: linear-gradient(135deg, #0a84ff 0%, #6f7bff 50%, #a06bff 100%);
    --accent-gradient-soft: linear-gradient(135deg, rgba(10, 132, 255, .13), rgba(138, 107, 255, .13));

    --bg: #eceef5;
    --bg-2: #e2e5ef;
    --surface: rgba(255, 255, 255, .62);
    --surface-strong: rgba(255, 255, 255, .84);
    --surface-solid: #ffffff;
    --surface-sub: rgba(255, 255, 255, .46);
    --hairline: rgba(17, 24, 39, .08);
    --stroke-glass: rgba(255, 255, 255, .72);
    --row-hover: rgba(10, 132, 255, .055);
    --text: #15171d;
    --text-2: #5c6270;
    --text-3: #8b919e;
    --shadow-sm: 0 1px 2px rgba(17, 24, 39, .03), 0 8px 22px -12px rgba(17, 24, 39, .14);
    --shadow-md: 0 2px 8px rgba(17, 24, 39, .04), 0 26px 56px -22px rgba(17, 24, 39, .24);
    --shadow-lg: 0 14px 40px rgba(17, 24, 39, .10), 0 64px 120px -44px rgba(17, 24, 39, .34);
    --shadow-hover: 0 4px 14px rgba(17, 24, 39, .05), 0 36px 72px -26px rgba(17, 24, 39, .28);

    --ok: #0f9d6b;
    --ok-soft: rgba(15, 157, 107, .12);
    --warn: #b26a00;
    --warn-soft: rgba(220, 145, 0, .13);
    --danger: #e02437;
    --danger-soft: rgba(224, 36, 55, .11);
    --info: #0a7bd0;
    --info-soft: rgba(10, 123, 208, .11);

    --radius-xl: 30px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --blur: saturate(175%) blur(28px);
    --blur-strong: saturate(200%) blur(44px);
    --sidebar-w: 272px;
    --gap-block: 26px;
    --ease: cubic-bezier(.2, .8, .2, 1);
}

[data-theme="dark"] {
    --bg: #07070b;
    --bg-2: #0b0c12;
    --surface: rgba(26, 27, 34, .64);
    --surface-strong: rgba(32, 33, 42, .86);
    --surface-solid: #1a1b22;
    --surface-sub: rgba(255, 255, 255, .05);
    --hairline: rgba(255, 255, 255, .085);
    --stroke-glass: rgba(255, 255, 255, .10);
    --row-hover: rgba(120, 170, 255, .09);
    --text: #f5f6f8;
    --text-2: #a6a9b4;
    --text-3: #7a7e8a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .42), 0 10px 26px -14px rgba(0, 0, 0, .5);
    --shadow-md: 0 2px 10px rgba(0, 0, 0, .46), 0 30px 64px -26px rgba(0, 0, 0, .62);
    --shadow-lg: 0 16px 44px rgba(0, 0, 0, .56), 0 70px 130px -50px rgba(0, 0, 0, .8);
    --shadow-hover: 0 6px 18px rgba(0, 0, 0, .42), 0 44px 84px -30px rgba(0, 0, 0, .7);
}

html { scroll-behavior: smooth; }

body { letter-spacing: -.012em; }

:focus-visible { outline: 2px solid rgba(10, 132, 255, .55); outline-offset: 2px; }

* { scrollbar-width: thin; scrollbar-color: rgba(120, 130, 150, .26) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(120, 130, 150, .26); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(120, 130, 150, .42); }

/* ---------- 背景：柔和光场 ---------- */
.bg-scene {
    background:
        radial-gradient(1100px 700px at 4% -10%, rgba(10, 132, 255, .16), transparent 60%),
        radial-gradient(940px 660px at 98% 0%, rgba(138, 107, 255, .19), transparent 62%),
        radial-gradient(820px 580px at 54% 110%, rgba(52, 211, 255, .14), transparent 60%),
        radial-gradient(620px 420px at 16% 94%, rgba(255, 150, 200, .10), transparent 66%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
[data-theme="dark"] .bg-scene {
    background:
        radial-gradient(1100px 700px at 4% -10%, rgba(10, 132, 255, .28), transparent 60%),
        radial-gradient(940px 660px at 98% 0%, rgba(138, 107, 255, .30), transparent 62%),
        radial-gradient(820px 580px at 54% 110%, rgba(52, 211, 255, .18), transparent 60%),
        linear-gradient(180deg, #06060a 0%, #0b0c12 100%);
}
.orb { filter: blur(90px); opacity: .46; }
[data-theme="dark"] .orb { opacity: .32; }

/* ---------- 浮动导航 + 浮动顶栏 ---------- */
.sidebar {
    position: sticky;
    top: 14px;
    height: calc(100vh - 28px);
    margin: 14px 0 14px 14px;
    border: 1px solid var(--stroke-glass);
    border-radius: 26px;
    background: var(--surface);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, .5);
    padding: 18px 14px 14px;
}
[data-theme="dark"] .sidebar { box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, .06); }

.topbar {
    top: 14px;
    width: calc(100% - 48px);
    max-width: 1360px;
    margin: 14px auto 0;
    height: 62px;
    padding: 0 20px;
    border: 1px solid var(--stroke-glass);
    border-radius: 20px;
    background: var(--surface-strong);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .5);
}
[data-theme="dark"] .topbar {
    background: var(--surface-strong);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.topbar-crumb { font-size: 13.5px; }
.ghost-chip, .balance-pill { height: 34px; padding: 0 13px; }

.page-shell {
    max-width: 1360px;
    padding: 22px 34px 30px;
    gap: var(--gap-block);
}

.site-foot {
    max-width: 1360px;
    padding: 20px 34px 28px;
    font-size: 11.5px;
}

/* 页面直系区块的间距统一交给 gap 控制，避免叠加 */
.page-shell > .page-head,
.page-shell > .section,
.page-shell > .stat-grid,
.page-shell > .grid-2,
.page-shell > .filter-bar,
.page-shell > .tabs,
.page-shell > .marquee-bar,
.page-shell > .notice,
.page-shell > .card,
.page-shell > .table-card,
.page-shell > .empty-state,
.page-shell > .order-list,
.page-shell > .refund-list,
.page-shell > .application-list,
.page-shell > .callout,
.page-shell > .support-strip,
.page-shell > .pay-wrap {
    margin-top: 0;
    margin-bottom: 0;
}

/* ---------- 玻璃材质 ---------- */
.glass {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .20), rgba(255, 255, 255, 0) 46%),
        var(--surface);
    border: 1px solid var(--stroke-glass);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .55);
    transition: box-shadow .34s var(--ease), transform .34s var(--ease), background .34s var(--ease);
}
.glass-strong {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 48%),
        var(--surface-strong);
    border: 1px solid var(--stroke-glass);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, .6);
}
[data-theme="dark"] .glass,
[data-theme="dark"] .glass-strong {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0) 48%),
        var(--surface);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, .06);
}

.card { border-radius: var(--radius-lg); padding: 26px 28px; }
.card-head { margin-bottom: 18px; }
.card-head h2 { font-size: 17px; letter-spacing: -.026em; }

.page-title { font-size: 32px; letter-spacing: -.042em; }
.page-desc { font-size: 13.5px; }
.section-title { font-size: 26px; letter-spacing: -.038em; }
.section-head { margin-bottom: 18px; }

/* ---------- 按钮 / 输入 ---------- */
.btn {
    height: 44px;
    padding: 0 20px;
    border-radius: 14px;
    transition: transform .2s var(--ease), box-shadow .26s var(--ease), background .2s var(--ease);
}
.btn-primary { box-shadow: 0 10px 24px -10px rgba(10, 132, 255, .6), inset 0 1px 0 rgba(255, 255, 255, .32); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 34px -12px rgba(10, 132, 255, .7), inset 0 1px 0 rgba(255, 255, 255, .32); }
.btn-primary:active { transform: translateY(0) scale(.985); }
.btn-ghost { background: var(--surface-strong); border-color: var(--hairline); }
.btn-ghost:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-sm { height: 36px; padding: 0 15px; border-radius: 12px; }
.btn-xs { height: 30px; padding: 0 12px; border-radius: 10px; }

.icon-btn { width: 36px; height: 36px; border-radius: 12px; }

.field input,
.field select,
.field textarea,
.select,
.textarea,
.inline-form input,
.qty-input {
    height: 46px;
    padding: 0 15px;
    border-radius: 14px;
    background: var(--surface-strong);
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.select:focus,
.textarea:focus,
.inline-form input:focus {
    border-color: rgba(10, 132, 255, .55);
    box-shadow: 0 0 0 4px rgba(10, 132, 255, .12), var(--shadow-sm);
}

.search-box { height: 42px; padding: 0 15px; }
.search-box.small { height: 36px; }
.qty-stepper { height: 46px; border-radius: 14px; }

.chip { height: 36px; padding: 0 16px; }
.chips { gap: 10px; }

.tabs { padding: 5px; border-radius: 16px; }
.tab { height: 34px; border-radius: 11px; padding: 0 16px; }
.filter-bar { padding: 14px 18px; border-radius: 22px; }

/* ---------- 导航条目 ---------- */
.brand-mark { width: 42px; height: 42px; flex-basis: 42px; border-radius: 14px; }
.nav-item {
    height: 44px;
    border-radius: 14px;
    margin-bottom: 2px;
    transition: background .22s var(--ease), color .22s var(--ease), transform .22s var(--ease);
}
.nav-item:hover { transform: translateX(2px); }
.nav-item.is-active {
    box-shadow: 0 12px 26px -12px rgba(10, 132, 255, .7), inset 0 1px 0 rgba(255, 255, 255, .32);
}
.user-chip { padding: 10px; border-radius: 16px; }

/* ---------- 统计卡 ---------- */
.stat-grid { gap: 22px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stat-card { padding: 22px 24px 20px; border-radius: 24px; }
.stat-label { font-size: 12.5px; }
.stat-value { font-size: 30px; letter-spacing: -.042em; }
.stat-foot { font-size: 12px; }

/* ---------- 列表 ---------- */
.list-rows { gap: 2px; }
.list-row {
    padding: 12px;
    border-bottom: 0;
    border-radius: 14px;
    transition: background .2s var(--ease);
}
.list-row:hover { background: var(--surface-sub); }
.list-row:last-child { border-bottom: 0; }

/* ---------- 表格 ---------- */
.table thead th { padding: 14px 16px; background: transparent; border-bottom: 1px solid var(--hairline); }
.table tbody td { padding: 15px 16px; border-bottom: 1px solid var(--hairline); }
.table tbody tr:hover td { background: var(--row-hover); }
.table-card { padding: 10px 10px 12px; }
.table-card > .card-head { padding: 16px 14px 2px; }

/* ---------- Hero ---------- */
.hero { padding: 48px 46px; border-radius: var(--radius-xl); }
.hero-title { font-size: 46px; line-height: 1.08; letter-spacing: -.05em; }
.hero-text { font-size: 14.5px; }
.hero-actions { margin-top: 26px; gap: 12px; }
.hero-stats { gap: 36px; margin-top: 34px; padding-top: 22px; }
.hero-stat strong { font-size: 24px; }
.eyebrow { height: 30px; padding: 0 13px; }
.float-card { border-radius: 20px; padding: 16px 18px; }

.features-row { gap: 22px; margin-top: 22px; }
.feature { padding: 18px 20px; border-radius: 22px; }

/* ---------- 商品卡 ---------- */
.product-grid { gap: 24px; grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); }
.product-card { border-radius: 26px; }
.product-cover { height: 150px; }
.cover-icon { width: 70px; height: 70px; border-radius: 22px; }
.product-body { padding: 18px 20px 20px; gap: 8px; }
.product-title-row h3 { font-size: 15.5px; }
.product-foot { margin-top: 12px; }
.price strong { font-size: 26px; }
.product-tip { padding-top: 11px; margin-top: 6px; }

.live-strip { padding: 18px 20px; border-radius: 22px; gap: 6px 20px; }
.live-item { padding: 8px 0; }

/* ---------- 订单 / 退款 / 申请 ---------- */
.order-list { gap: 16px; }
.order-card { padding: 20px 22px; border-radius: 24px; }
.refund-list { gap: 16px; }
.refund-card { padding: 22px 24px; border-radius: 24px; }
.application-list { gap: 12px; }
.application-card { padding: 16px 18px; border-radius: 18px; }
.cards-panel { padding: 14px; border-radius: 16px; }
.callout { padding: 20px 24px; border-radius: 22px; }
.support-strip { padding: 22px 26px; border-radius: 22px; }
.profile-card { padding: 30px 32px; border-radius: var(--radius-xl); }

/* ---------- 弹窗 / Toast ---------- */
.modal-backdrop { background: rgba(8, 10, 18, .42); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); }
.modal-card { max-width: 560px; padding: 30px 30px 26px; border-radius: var(--radius-xl); }
.modal-card.modal-sm { max-width: 448px; }
.modal-hero { padding: 20px; border-radius: 22px; }
.modal-title { font-size: 22px; }
.toast { border-radius: 18px; padding: 14px 18px; }

/* ---------- 登录 / 支付 ---------- */
.auth-card { max-width: 412px; padding: 36px 32px 28px; border-radius: var(--radius-xl); }
.pay-card { max-width: 500px; padding: 34px 32px 28px; border-radius: var(--radius-xl); }
.pager-btn { min-width: 36px; height: 36px; border-radius: 12px; }

/* ---------- 悬停层次（仅在支持悬停的设备上） ---------- */
@media (hover: hover) {
    .stat-card:hover,
    .feature:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
    }
    .product-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-hover);
    }
    .order-card:hover,
    .refund-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
    }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
    .page-shell { padding: 20px 26px 26px; }
    .site-foot { padding: 18px 26px 24px; }
    .topbar { width: calc(100% - 40px); padding: 0 18px; }
    .hero { padding: 38px 34px; }
    .hero-title { font-size: 38px; }
}

@media (max-width: 980px) {
    .sidebar {
        position: fixed;
        top: 10px;
        left: 10px;
        height: calc(100vh - 20px);
        margin: 0;
        border-radius: 26px;
        transform: translateX(-108%);
        box-shadow: var(--shadow-lg);
    }
    body.sidebar-open .sidebar { transform: none; }

    .topbar { width: calc(100% - 32px); margin-top: 10px; height: 60px; }
    .page-shell { padding: 18px 20px 24px; gap: 22px; }
    .hero { padding: 32px 26px; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
}

@media (max-width: 860px) {
    .page-shell { gap: 20px; }
    .stat-grid { gap: 14px; }
    .grid-2 { gap: 16px; }
    .features-row { gap: 14px; }
    .card { padding: 22px 20px; }
    .product-grid { gap: 16px; }
}

@media (max-width: 640px) {
    .sidebar { top: 6px; left: 6px; height: calc(100vh - 12px); border-radius: 22px; }
    .topbar {
        width: calc(100% - 24px);
        margin-top: 8px;
        height: 56px;
        border-radius: 16px;
        padding: 0 14px;
    }
    .page-shell { padding: 14px 14px 20px; gap: 18px; }
    .site-foot { padding: 16px 14px 22px; }
    .page-title { font-size: 26px; }
    .section-title { font-size: 21px; }
    .hero { padding: 26px 20px; border-radius: 24px; }
    .hero-title { font-size: 29px; }
    .hero-stats { gap: 20px; margin-top: 24px; }
    .stat-grid { gap: 12px; }
    .stat-card { padding: 16px 16px 14px; border-radius: 20px; }
    .stat-value { font-size: 24px; }
    .product-card { border-radius: 22px; }
    .product-cover { height: 132px; }
    .product-body { padding: 16px; }
    .card { padding: 18px 16px; border-radius: 20px; }
    .table thead th, .table tbody td { padding: 12px 10px; }
    .modal-card { padding: 24px 20px 20px; border-radius: 24px; }
    .order-card { padding: 16px; border-radius: 20px; }
    .refund-card { padding: 18px; border-radius: 20px; }
    .profile-card { padding: 22px 20px; }
}

/* ==========================================================================
   视觉升级 v3 · 弹窗头图与关闭按钮
   ========================================================================== */

.modal-card {
    --modal-pad-x: 30px;
    --modal-pad-y: 30px;
    --modal-radius: 30px;
    padding: var(--modal-pad-y) var(--modal-pad-x) 26px;
    border-radius: var(--modal-radius);
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .55);
}
[data-theme="dark"] .modal-card { box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .07); }

/* 商品头图改为整版通栏，成为弹窗的“封面” */
.modal-hero {
    margin: calc(var(--modal-pad-y) * -1) calc(var(--modal-pad-x) * -1) 22px;
    padding: 24px 58px 24px var(--modal-pad-x);
    min-height: 108px;
    border-radius: calc(var(--modal-radius) - 2px) calc(var(--modal-radius) - 2px) 0 0;
}
.modal-hero::after {
    background:
        radial-gradient(220px 140px at 86% -10%, rgba(255, 255, 255, .45), transparent 72%),
        linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(0, 0, 0, .06));
}
.modal-hero-icon { width: 58px; height: 58px; flex-basis: 58px; border-radius: 18px; }
.modal-hero-meta h2 { font-size: 21px; }
.modal-hero-eyebrow { opacity: .85; }

/* 关闭按钮：融入玻璃质感的圆钮 */
.modal-x {
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    z-index: 6;
    border: 1px solid var(--stroke-glass);
    background: var(--surface-strong);
    color: var(--text-2);
    box-shadow: var(--shadow-sm);
    -webkit-backdrop-filter: blur(16px) saturate(170%);
    backdrop-filter: blur(16px) saturate(170%);
    transition: background .2s var(--ease), color .2s var(--ease), transform .24s var(--ease), box-shadow .2s var(--ease);
}
.modal-x:hover {
    background: var(--surface-solid);
    color: var(--text);
    transform: rotate(90deg) scale(1.04);
    box-shadow: var(--shadow-md);
}

/* 有封面的弹窗：关闭按钮浮在渐变上，使用白色高光 */
.modal-card:has(.modal-hero) .modal-x {
    border-color: rgba(255, 255, 255, .42);
    background: rgba(255, 255, 255, .22);
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .38);
}
.modal-card:has(.modal-hero) .modal-x:hover {
    background: rgba(255, 255, 255, .34);
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .42);
}

/* 无封面弹窗的标题避让关闭按钮 */
.modal-card .modal-title { padding-right: 46px; }

@media (max-width: 640px) {
    .modal-card {
        --modal-pad-x: 20px;
        --modal-pad-y: 24px;
        --modal-radius: 22px;
        padding-bottom: 22px;
    }
    .modal-hero { padding: 20px 54px 20px var(--modal-pad-x); min-height: 96px; margin-bottom: 18px; }
    .modal-hero-icon { width: 50px; height: 50px; flex-basis: 50px; border-radius: 16px; }
    .modal-hero-meta h2 { font-size: 19px; }
    .modal-x { top: 12px; right: 12px; width: 32px; height: 32px; }
}

/* ---------- v4：表单右侧辅助链接（忘记密码等） ---------- */
.field { position: relative; }
.field-link-right {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-1);
    transition: opacity .2s var(--ease);
    text-decoration: none;
    z-index: 2;
}
.field-link-right:hover {
    opacity: .78;
    text-decoration: underline;
}

/* 账号/密码卡密链接样式 */
.card-link {
    display: block;
    flex: 1;
    min-width: 0;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--brand-1);
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-all;
    line-height: 1.5;
}
.card-link:hover { opacity: .78; }

/* ---------- v6：优惠码输入 ---------- */
.coupon-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.coupon-input-row .input-wrap {
    flex: 1 1 auto;
    min-width: 0;
}
.coupon-input-row .btn {
    flex: 0 0 auto;
    height: 46px;
    border-radius: 14px;
}
.coupon-hint {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}
.coupon-hint.is-success { color: #1f9d55; }
.coupon-hint.is-error { color: #e5484d; }
.coupon-saved {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin: -6px 0 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: #1f9d55;
}
.coupon-saved strong {
    display: inline-flex;
    align-items: baseline;
    gap: 1px;
    color: #1f9d55;
    font-variant-numeric: tabular-nums;
}
.coupon-saved i { font-style: normal; font-size: 12px; }

/* 后台优惠码列表 */
.coupon-cell strong.coupon-code {
    display: block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    letter-spacing: .03em;
    color: var(--text);
}
.coupon-cell small { display: block; margin-top: 3px; font-size: 12px; color: var(--text-3); }
.coupon-valid { font-size: 12px; white-space: nowrap; }

/* ---------- v7：后台用户管理 ---------- */
.user-cell { display: flex; align-items: center; gap: 12px; }
.user-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(10,132,255,.16), rgba(125,92,255,.14));
    color: var(--brand-1);
    font-size: 13px;
    font-weight: 700;
}
.user-cell strong { display: block; font-size: 13px; color: var(--text-1); }
.user-cell small { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 500; color: var(--text-3); }
.cell-two-line strong { display: block; font-size: 13px; }
.cell-two-line small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--text-3); }
.pill.danger { color: #e5484d; background: rgba(229,72,77,.10); }

.user-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
    padding: 18px 20px;
    border-radius: 16px;
    background: rgba(255,255,255,.42);
    border: 1px solid rgba(0,0,0,.04);
}
.user-summary > div { display: flex; flex-direction: column; gap: 3px; }
.user-summary span { font-size: 11.5px; color: var(--text-3); }
.user-summary strong { font-size: 13px; color: var(--text-1); font-variant-numeric: tabular-nums; }
.balance-form { margin-top: 18px; }
.balance-form .field + .field { margin-top: 12px; }

.user-records { margin-top: 22px; }
.record-block {
    padding: 18px 20px;
    border-radius: 16px;
    background: rgba(255,255,255,.42);
    border: 1px solid rgba(0,0,0,.04);
}
.record-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.record-head strong { font-size: 13px; }
.record-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--hairline);
}
.record-row:last-child { border-bottom: 0; padding-bottom: 0; }
.record-main { min-width: 0; }
.record-main strong { display: block; font-size: 12.5px; color: var(--text-1); }
.record-main small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--text-3); }
.record-side { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.record-side strong { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.record-side strong.is-negative { color: #e5484d; }
.record-empty { padding: 16px 0; text-align: center; font-size: 12px; color: var(--text-3); }

/* ---------- v5：登录设备（会话）管理 ---------- */
.session-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--hairline);
}
.session-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.session-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255,255,255,.42);
    border: 1px solid rgba(0,0,0,.04);
    transition: background .2s var(--ease), transform .2s var(--ease);
}
.session-row.is-current {
    background: linear-gradient(135deg, rgba(10,132,255,.10), rgba(125,92,255,.08));
    border-color: rgba(10,132,255,.22);
}
.session-row:hover {
    background: rgba(255,255,255,.62);
}
.session-row.is-current:hover {
    background: linear-gradient(135deg, rgba(10,132,255,.14), rgba(125,92,255,.12));
}
.session-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(0,0,0,.04);
    color: var(--text-2);
}
.session-row.is-current .session-icon {
    background: rgba(10,132,255,.14);
    color: var(--brand-1);
}
.session-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.session-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
}
.session-sub {
    font-size: 12px;
    color: var(--text-3);
    display: flex;
    gap: 6px;
    align-items: center;
}
.session-revoke {
    display: inline-block;
    flex-shrink: 0;
}
.session-empty {
    padding: 22px 16px;
    text-align: center;
    font-size: 12.5px;
    color: var(--text-3);
    border-radius: 14px;
    background: rgba(0,0,0,.025);
}

/* 小组尺寸按钮 */
.btn.btn-xs {
    height: 28px;
    padding: 0 12px;
    font-size: 12px;
    border-radius: 9px;
}
/* 危险按钮（用于下线） */
.btn.danger,
.btn.btn-danger {
    color: #fff;
    background: linear-gradient(135deg, #ff4d4f, #ff7875);
    border-color: rgba(255,77,79,.2);
}
.btn.danger:hover {
    filter: brightness(1.05);
}
.btn.btn-ghost.danger,
.btn.ghost.danger {
    color: #ff4d4f;
    background: rgba(255,77,79,.08);
    border-color: rgba(255,77,79,.18);
}
.btn.btn-ghost.danger:hover,
.btn.ghost.danger:hover {
    background: rgba(255,77,79,.14);
}

