:root {
    --primary: #5b5bf7;
    --primary-2: #8b5cf6;
    --primary-dark: #4338ca;
    --bg: #0f1020;
    --text: #1e2233;
    --muted: #8b90a5;
    --line: #eceef5;
    --card: #ffffff;
    --green: #16a34a;
    --red: #e11d48;
    --amber: #d97706;
    --radius: 18px;
    --shadow: 0 18px 50px -18px rgba(46, 39, 109, .35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: #f4f5fb;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

/* 背景装饰 */
.bg-decoration { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.blob-1 { width: 520px; height: 520px; background: #c7d2fe; top: -160px; left: -120px; }
.blob-2 { width: 460px; height: 460px; background: #ddd6fe; bottom: -180px; right: -120px; }
.blob-3 { width: 360px; height: 360px; background: #bae6fd; top: 40%; left: 55%; opacity: .35; }

/* 顶栏 */
.topbar {
    position: relative; z-index: 2;
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 26px; max-width: 1080px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.logo {
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff; display: grid; place-items: center; font-size: 18px;
    box-shadow: 0 6px 16px -4px rgba(91,91,247,.6);
}
.ghost-btn {
    border: 1px solid var(--line); background: #fff; color: var(--muted);
    padding: 8px 16px; border-radius: 10px; cursor: pointer; font-size: 13px;
    transition: .2s;
}
.ghost-btn:hover { color: var(--primary); border-color: var(--primary); }

/* 容器 */
.container { position: relative; z-index: 2; max-width: 1080px; margin: 0 auto; padding: 14px 22px 60px; }

/* 公告条 */
.announce {
    display: flex; align-items: flex-start; gap: 12px; margin: 8px 0 18px;
    padding: 14px 18px; border-radius: 14px; font-size: 13.5px; line-height: 1.6;
    border: 1px solid; animation: rise .4s ease;
}
.announce-icon { font-size: 18px; line-height: 1.4; flex-shrink: 0; }
.announce-body b { display: block; margin-bottom: 2px; }
.announce-info    { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.announce-warning { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.announce-success { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }

/* 卡片 */
.card {
    background: var(--card); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 30px; border: 1px solid rgba(255,255,255,.6);
}

/* 登录卡片 */
.login-card { max-width: 440px; margin: 24px auto; animation: rise .5s ease; }
.card-head { margin-bottom: 22px; text-align: center; }
.card-head h1 { font-size: 23px; letter-spacing: .5px; }
.subtitle { color: var(--muted); font-size: 13.5px; margin-top: 8px; line-height: 1.6; }

.form-group { margin-bottom: 18px; }
.form-group > label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: #4b5066; }
.muted { color: var(--muted); font-weight: 400; }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-icon {
    position: absolute; left: 14px; color: var(--muted); font-size: 15px; font-weight: 700;
    pointer-events: none;
}
.input-wrap input {
    width: 100%; padding: 13px 14px 13px 38px; font-size: 15px;
    border: 1.5px solid var(--line); border-radius: 12px; outline: none;
    transition: .2s; background: #fbfbfe;
}
.input-wrap input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(91,91,247,.12); }

textarea {
    width: 100%; padding: 12px 14px; font-size: 14px; font-family: inherit;
    border: 1.5px solid var(--line); border-radius: 12px; outline: none; resize: vertical;
    background: #fbfbfe; transition: .2s;
}
textarea:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(91,91,247,.12); }

.captcha-box { min-height: 46px; display: flex; align-items: center; }
.captcha-tip { color: var(--muted); font-size: 13px; }

.code-row { display: flex; gap: 10px; }
.code-row .input-wrap { flex: 1; }
.resend-btn {
    white-space: nowrap; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--primary);
    background: #fff; color: var(--primary); font-size: 13px; cursor: pointer; font-weight: 600;
    transition: .2s;
}
.resend-btn:disabled { border-color: var(--line); color: var(--muted); cursor: not-allowed; }

/* 主按钮 */
.primary-btn {
    width: 100%; padding: 14px; border: none; border-radius: 12px; cursor: pointer;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff; font-size: 15.5px; font-weight: 600; letter-spacing: 1px;
    margin-top: 4px; transition: .25s; position: relative;
    box-shadow: 0 12px 26px -10px rgba(91,91,247,.7);
}
.primary-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 30px -10px rgba(91,91,247,.8); }
.primary-btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.primary-btn .spinner { display: none; }
.primary-btn.loading .btn-text { visibility: hidden; }
.primary-btn.loading .spinner {
    display: block; position: absolute; top: 50%; left: 50%;
    width: 18px; height: 18px; margin: -9px 0 0 -9px;
    border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%;
    animation: spin .7s linear infinite;
}

.hint { font-size: 12px; color: var(--muted); text-align: center; margin-top: 14px; }
.msg { margin-top: 14px; font-size: 13.5px; text-align: center; min-height: 18px; }
.msg.error { color: var(--red); }
.msg.success { color: var(--green); }

/* 仪表盘 */
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-bottom: 20px; animation: rise .5s ease; }
.account-card { display: flex; flex-direction: column; gap: 18px; }
.acc-head { display: flex; justify-content: space-between; align-items: flex-start; }
.acc-label { font-size: 12px; color: var(--muted); }
.acc-id { font-size: 26px; font-weight: 700; margin-top: 2px; }
.acc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.acc-meta > div { display: flex; flex-direction: column; gap: 3px; }
.acc-meta span { font-size: 11.5px; color: var(--muted); }
.acc-meta b { font-size: 14px; font-weight: 600; word-break: break-all; }

.badge { padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-green { background: #dcfce7; color: var(--green); }
.badge-gray { background: #eef0f5; color: var(--muted); }
.badge-amber { background: #fef3c7; color: var(--amber); }
.badge-red { background: #ffe4e6; color: var(--red); }
.badge-blue { background: #dbeafe; color: #2563eb; }

/* 退款余额卡 */
.refund-card {
    background: linear-gradient(140deg, #4f46e5, #7c3aed 70%, #9333ea);
    color: #fff; display: flex; flex-direction: column; justify-content: center; gap: 6px;
    position: relative; overflow: hidden;
}
.refund-card::after {
    content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px;
    background: rgba(255,255,255,.12); border-radius: 50%;
}
.refund-label { font-size: 13.5px; opacity: .9; }
.refund-amount { font-size: 40px; font-weight: 800; line-height: 1.1; }
.refund-amount .cny { font-size: 22px; vertical-align: top; opacity: .9; margin-right: 2px; }
.refund-sub { display: flex; gap: 22px; margin-top: 10px; font-size: 12.5px; opacity: .92; }
.refund-sub > div { display: flex; flex-direction: column; gap: 2px; }
.refund-sub span { opacity: .75; }

/* 表格 */
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-title h2 { font-size: 17px; }
.count-pill { background: #eef0fb; color: var(--primary); font-size: 12.5px; padding: 4px 12px; border-radius: 999px; font-weight: 600; }
.products-card { margin-bottom: 20px; animation: rise .55s ease; }
.table-scroll { overflow-x: auto; }
.prod-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 520px; }
.prod-table th {
    text-align: left; padding: 11px 12px; color: var(--muted); font-weight: 600; font-size: 12px;
    border-bottom: 1.5px solid var(--line); white-space: nowrap;
}
.prod-table td { padding: 13px 12px; border-bottom: 1px solid #f3f4f9; }
.prod-table tr:last-child td { border-bottom: none; }
.prod-table tbody tr { transition: .15s; }
.prod-table tbody tr:hover { background: #fafaff; }
.ip-cell { font-family: ui-monospace, Menlo, Consolas, monospace; color: #475069; }
.empty-row td { text-align: center; color: var(--muted); padding: 30px; }

/* 确认卡 */
.confirm-card { animation: rise .6s ease; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: #4b5066; margin: 8px 0 18px; line-height: 1.6; cursor: pointer; }
.check-row input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--primary); flex-shrink: 0; }

/* 成功卡 */
.success-card { text-align: center; padding: 44px 30px; animation: rise .5s ease; }
.success-icon {
    width: 70px; height: 70px; margin: 0 auto 18px; border-radius: 50%;
    background: #dcfce7; color: var(--green); font-size: 38px; display: grid; place-items: center;
    animation: pop .5s cubic-bezier(.2,1.3,.4,1);
}
.success-card h2 { font-size: 21px; margin-bottom: 14px; }
.success-card p { color: #4b5066; font-size: 14px; margin: 6px 0; }
.green { color: var(--green); }

.footer { position: relative; z-index: 2; text-align: center; color: var(--muted); font-size: 12.5px; padding: 22px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

@media (max-width: 760px) {
    .dash-grid { grid-template-columns: 1fr; }
    .card { padding: 22px; }
    .acc-id { font-size: 22px; }
    .refund-amount { font-size: 34px; }
}
