:root {
    color-scheme: dark;
    --bg: #071017;
    --panel: rgba(15, 29, 39, .92);
    --panel-strong: #10222d;
    --line: rgba(105, 219, 242, .16);
    --line-strong: rgba(105, 219, 242, .42);
    --text: #edf9fc;
    --muted: #8ca3ad;
    --cyan: #5de1f4;
    --cyan-dark: #163f49;
    --green: #63e6ad;
    --orange: #f7b267;
    --red: #ff7885;
    --violet: #9d8cff;
    --shadow: 0 24px 70px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 8%, rgba(28, 112, 130, .22), transparent 31rem),
        radial-gradient(circle at 88% 92%, rgba(67, 55, 139, .16), transparent 34rem),
        var(--bg);
    font: 14px/1.55 "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}

button, input, select { font: inherit; }
button, .button-link { transition: transform .16s ease, border-color .16s ease, filter .16s ease; }
button:hover:not(:disabled), .button-link:hover { transform: translateY(-1px); filter: brightness(1.07); }
button:disabled { cursor: not-allowed; opacity: .48; }
a { color: inherit; text-decoration: none; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: 28px; letter-spacing: -.6px; }
h2 { margin-bottom: 5px; font-size: 17px; }
p { margin-bottom: 0; color: var(--muted); }

.ambient {
    position: fixed;
    z-index: -1;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
}
.ambient-one { left: -160px; top: 20%; background: rgba(61, 216, 235, .14); }
.ambient-two { right: -180px; bottom: 0; background: rgba(116, 91, 226, .13); }
.page { min-height: 100vh; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 1.2px; }
.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    color: var(--cyan);
    background: rgba(93, 225, 244, .08);
    box-shadow: inset 0 0 18px rgba(93, 225, 244, .07);
    font: 800 13px/1 Consolas, monospace;
}
.eyebrow { color: var(--cyan); font: 700 11px/1.2 Consolas, monospace; letter-spacing: 1.8px; }

.message {
    position: fixed;
    z-index: 20;
    top: 18px;
    left: 50%;
    min-width: 280px;
    max-width: min(620px, calc(100% - 32px));
    padding: 11px 16px;
    transform: translateX(-50%);
    border: 1px solid;
    border-radius: 9px;
    box-shadow: var(--shadow);
    text-align: center;
}
.message.success { border-color: rgba(99, 230, 173, .35); background: #102f27; color: #a1f5ce; }
.message.error { border-color: rgba(255, 120, 133, .38); background: #3b1b22; color: #ffc0c7; }

/* 登录页 */
.login-shell {
    display: grid;
    grid-template-columns: minmax(340px, 1.05fr) minmax(390px, .95fr);
    width: min(980px, calc(100% - 40px));
    min-height: 570px;
    margin: 0 auto;
    padding-top: max(48px, calc((100vh - 570px) / 2));
}
.login-intro {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px 52px;
    border: 1px solid var(--line);
    border-right: 0;
    border-radius: 22px 0 0 22px;
    background:
        linear-gradient(150deg, rgba(21, 61, 73, .88), rgba(9, 21, 29, .96)),
        var(--panel);
    box-shadow: var(--shadow);
}
.login-intro h1 { margin: 14px 0 18px; font-size: 42px; line-height: 1.2; }
.login-intro p { max-width: 380px; font-size: 15px; }
.security-note { display: flex; align-items: center; gap: 9px; color: #b5c8cf; font-size: 12px; }
.security-note span, .server-state i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 14px var(--green);
}
.login-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 52px;
    border: 1px solid var(--line);
    border-radius: 0 22px 22px 0;
    background: rgba(13, 26, 35, .95);
    box-shadow: var(--shadow);
}
.login-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.login-heading h2 { margin: 0; font-size: 22px; }
.login-heading p { font-size: 12px; }
.login-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 13px;
    background: rgba(93, 225, 244, .09);
    color: var(--cyan);
    font-size: 22px;
}
.login-form { display: grid; gap: 17px; }
label { display: grid; gap: 7px; color: #b6c6cd; font-size: 12px; }
input, select {
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: none;
    background: #09151d;
    color: var(--text);
}
input:focus, select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(93, 225, 244, .09); }
.login-form button { margin-top: 5px; min-height: 44px; }
.login-footer { margin-top: 24px; color: #708992; text-align: center; font-size: 11px; }

/* 管理后台 */
.admin-layout { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 25px 18px;
    border-right: 1px solid var(--line);
    background: rgba(7, 17, 24, .92);
    backdrop-filter: blur(18px);
}
.sidebar .brand { margin: 0 7px 34px; }
.sidebar nav { display: grid; gap: 7px; }
.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--muted);
}
.sidebar nav a.active, .sidebar nav a:hover {
    border-color: var(--line);
    background: rgba(93, 225, 244, .08);
    color: var(--text);
}
.sidebar nav span { width: 20px; color: var(--cyan); text-align: center; }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 15px 8px; border-top: 1px solid var(--line); }
.sidebar-user .avatar {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: var(--cyan-dark);
    color: var(--cyan);
    font-weight: 700;
}
.sidebar-user strong, .sidebar-user small { display: block; }
.sidebar-user small { color: var(--muted); font-size: 10px; }
.full { width: 100%; }
.workspace { min-width: 0; padding: 30px clamp(20px, 3vw, 46px) 50px; }
.workspace-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.server-state { display: flex; align-items: center; gap: 9px; color: #b6c8ce; font-size: 12px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card {
    position: relative;
    overflow: hidden;
    padding: 17px 18px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--panel);
}
.stat-card::after { content: ""; position: absolute; inset: auto -30px -45px auto; width: 90px; height: 90px; border-radius: 50%; background: rgba(93, 225, 244, .1); }
.stat-card.cyan::after { background: rgba(99, 230, 173, .12); }
.stat-card.violet::after { background: rgba(157, 140, 255, .13); }
.stat-card.orange::after { background: rgba(247, 178, 103, .13); }
.stat-card span, .stat-card small { display: block; color: var(--muted); }
.stat-card strong { display: block; margin: 5px 0 2px; font: 700 29px/1.2 Consolas, monospace; }
.stat-card small { font-size: 10px; }
.panel {
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--panel);
    box-shadow: 0 12px 36px rgba(0, 0, 0, .12);
}
.panel-title { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.panel-title p { font-size: 12px; }
.panel-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 8px; background: var(--cyan-dark); color: var(--cyan); font-size: 20px; }
.create-form { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.create-form label { min-width: 190px; }
.create-form .note-field { flex: 1; min-width: 260px; }
button, .button-link {
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: var(--cyan);
    color: #062029;
    font-weight: 700;
    cursor: pointer;
}
button.secondary { background: #263b46; color: var(--text); }
button.warning { background: #614b2c; color: #ffd498; }
button.danger { background: #592d36; color: #ffc1c8; }
button.ghost, .button-link.ghost { border-color: var(--line); background: transparent; color: var(--muted); }
.button-link { display: inline-flex; align-items: center; justify-content: center; }
.codes { display: grid; gap: 8px; margin-top: 16px; padding: 14px; border: 1px solid rgba(93, 225, 244, .12); border-radius: 8px; background: #08151c; }
.codes code { user-select: all; color: #8debf7; font-size: 15px; }
.codes-title, .generated-code, .code-cell { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.generated-code { padding: 9px 11px; border: 1px solid rgba(93, 225, 244, .09); border-radius: 7px; background: rgba(93, 225, 244, .035); }
.copy-button, .mini-copy, .copy-all { min-height: 28px; padding: 4px 9px; font-size: 11px; white-space: nowrap; }
.mini-copy { border: 1px solid var(--line); background: transparent; color: var(--cyan); }
.legacy-code { color: #8f9aa0; font-size: 11px; }
.filters { display: grid; grid-template-columns: minmax(200px, 1fr) 150px auto auto; gap: 9px; margin-bottom: 14px; }
.logs-filter { grid-template-columns: minmax(280px, 1fr) auto auto; }
.table-wrap { overflow-x: auto; border: 1px solid rgba(255, 255, 255, .04); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; background: rgba(5, 14, 20, .35); }
th, td { padding: 10px; border-bottom: 1px solid rgba(118, 172, 187, .1); text-align: left; font-size: 12px; }
th { background: rgba(28, 48, 59, .62); color: #9db0b8; font-weight: 500; }
tbody tr:hover { background: rgba(93, 225, 244, .035); }
tr.muted { opacity: .58; }
code { color: #b4c8cf; font-family: Consolas, monospace; }
.code-chip { color: #89e8f5; }
.badge { display: inline-block; min-width: 42px; padding: 2px 7px; border-radius: 99px; text-align: center; font-size: 11px; }
.badge.ok { background: rgba(64, 183, 127, .15); color: #8ff0bd; }
.badge.off { background: rgba(176, 91, 104, .16); color: #d9a7ae; }
.actions { display: flex; gap: 6px; }
.actions form { margin: 0; }
.actions button { min-height: 30px; padding: 5px 8px; font-size: 11px; }
.note-form { display: flex; align-items: center; gap: 5px; min-width: 260px; }
.note-form input { min-height: 32px; min-width: 185px; }
.note-form button { min-height: 32px; padding: 5px 9px; }
.empty { padding: 34px; color: var(--muted); text-align: center; }
.table-footer { padding-top: 10px; color: var(--muted); text-align: right; font-size: 11px; }
.device-code { display: inline-block; max-width: 480px; white-space: normal; overflow-wrap: anywhere; line-height: 1.55; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding-top: 14px; }
.pagination a, .pagination span {
    min-width: 34px; height: 34px; padding: 0 10px; border: 1px solid var(--line);
    border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
    color: var(--muted); background: rgba(255, 255, 255, .035); text-decoration: none; font-size: 12px;
}
.pagination a:hover { border-color: var(--cyan); color: var(--text); }
.pagination a.active { color: #081018; background: var(--cyan); border-color: var(--cyan); }
.pagination a.disabled { opacity: .35; pointer-events: none; }
.audit-table { max-height: 360px; overflow: auto; }
.event-type { display: inline-block; padding: 2px 7px; border-radius: 5px; background: rgba(93, 225, 244, .09); color: #91eaf5; font: 11px Consolas, monospace; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(330px, .7fr); gap: 18px; }
.text-link { color: var(--cyan); font-size: 12px; }
.activity-list { display: grid; }
.activity-item { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid rgba(118, 172, 187, .1); }
.activity-item:last-child { border-bottom: 0; }
.activity-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px rgba(93, 225, 244, .6); }
.activity-item strong { font-size: 12px; }
.activity-item p, .activity-item time { margin: 0; color: var(--muted); font-size: 10px; }

@media (max-width: 980px) {
    .admin-layout { grid-template-columns: 74px minmax(0, 1fr); }
    .sidebar { padding-inline: 10px; }
    .sidebar .brand span:last-child, .sidebar nav a:not(.active) > :not(span), .sidebar nav a { font-size: 0; }
    .sidebar nav a { justify-content: center; }
    .sidebar nav span { font-size: 18px; }
    .sidebar-user div, .sidebar form { display: none; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .login-shell { grid-template-columns: 1fr; padding: 24px 0; }
    .login-intro { min-height: 260px; padding: 30px; border-right: 1px solid var(--line); border-radius: 18px 18px 0 0; }
    .login-intro h1 { font-size: 32px; }
    .login-card { padding: 32px 28px; border-radius: 0 0 18px 18px; }
    .workspace { padding: 22px 14px 40px; }
    .workspace-header { align-items: flex-start; gap: 14px; }
    .server-state { display: none; }
    .filters { grid-template-columns: 1fr 1fr; }
}

/* 简约浅色管理后台 */
:root {
    color-scheme: light;
    --bg: #f4f6f8;
    --panel: #ffffff;
    --panel-strong: #ffffff;
    --line: #e4e8ee;
    --line-strong: #cfd6df;
    --text: #18202c;
    --muted: #77808e;
    --cyan: #356ae6;
    --cyan-dark: #edf3ff;
    --green: #21875b;
    --orange: #b7791f;
    --red: #c94755;
    --violet: #7058c9;
    --shadow: 0 18px 46px rgba(26, 37, 51, .08);
}
body { background: var(--bg); }
.ambient { display: none; }
.brand-mark { color: #356ae6; background: #edf3ff; box-shadow: none; }
.eyebrow { color: #356ae6; }
.message.success { border-color: #bfe5d1; background: #effaf4; color: #176b46; }
.message.error { border-color: #f1c9ce; background: #fff3f4; color: #a93643; }
.login-intro {
    border-color: #1d2738;
    background: #172033;
    color: #fff;
    box-shadow: var(--shadow);
}
.login-intro p, .login-intro .security-note { color: #b8c1cf; }
.login-card { border-color: var(--line); background: #fff; box-shadow: var(--shadow); }
.login-icon { color: #356ae6; background: #edf3ff; border-color: #d8e4ff; }
label { color: #5f6876; }
input, select { border-color: var(--line); background: #fff; color: var(--text); }
input:focus, select:focus { border-color: #7ba0f4; box-shadow: 0 0 0 3px rgba(53, 106, 230, .10); }
.sidebar { border-color: var(--line); background: #fff; backdrop-filter: none; }
.sidebar nav a.active, .sidebar nav a:hover { border-color: transparent; background: #f0f4fb; color: #18202c; }
.sidebar nav span { color: #356ae6; }
.sidebar-user .avatar { background: #edf3ff; color: #356ae6; }
.server-state { color: #647080; }
.server-state i { box-shadow: none; }
.stat-card, .panel { border-color: var(--line); background: #fff; box-shadow: 0 8px 26px rgba(26, 37, 51, .045); }
.stat-card::after { display: none; }
.panel-icon { background: #edf3ff; color: #356ae6; }
button, .button-link { background: #1c2536; color: #fff; }
button.secondary { background: #eef1f5; color: #27303d; }
button.warning { background: #fff3df; color: #926015; }
button.danger { background: #fff0f2; color: #b63b49; }
button.ghost, .button-link.ghost { background: transparent; color: #697483; }
.codes { border-color: #e2e7ef; background: #f8fafc; }
.codes code, .code-chip { color: #2259cc; }
.generated-code { border-color: #e6eaf0; background: #fff; }
.mini-copy { border-color: #dce3ee; background: #fff; color: #356ae6; }
.table-wrap { border-color: #e7eaf0; }
table { background: #fff; }
th, td { border-color: #edf0f4; }
th { background: #f7f8fa; color: #697483; }
tbody tr:hover { background: #fafbfd; }
code { color: #4f5b69; }
.badge.ok { background: #eaf7f0; color: #18734b; }
.badge.off { background: #f4f0f1; color: #8d6369; }
.event-type { background: #edf3ff; color: #356ae6; }
.activity-item { border-color: #edf0f4; }
.activity-dot { background: #356ae6; box-shadow: none; }
.pagination a, .pagination span { background: #fff; }
.pagination a:hover { border-color: #9bb4ef; }
.pagination a.active { color: #fff; background: #1c2536; border-color: #1c2536; }
/* 官网账户体系：与管理菜单共用冷白、深蓝和靛青强调色。 */
.public-body { min-height:100vh; margin:0; background:#f4f7fb; color:#172033; font-family:"Microsoft YaHei UI","Segoe UI",sans-serif; }
.public-messages { position:fixed; z-index:20; top:18px; left:50%; width:min(520px,calc(100% - 32px)); transform:translateX(-50%); }
.auth-shell { min-height:100vh; display:grid; grid-template-columns:minmax(360px,1.05fr) minmax(430px,.95fr); position:relative; z-index:1; }
.auth-hero { padding:56px clamp(38px,7vw,108px); color:#fff; background:linear-gradient(145deg,#13233f 0%,#243f79 58%,#566be9 100%); display:flex; flex-direction:column; justify-content:space-between; }
.auth-hero h1 { margin:18px 0; font-size:clamp(40px,5vw,72px); line-height:1.08; letter-spacing:-3px; }
.auth-hero p { max-width:560px; color:#dce5ff; line-height:1.8; font-size:16px; }
.auth-hero small { color:#b9c8ef; }
.public-brand { display:flex; align-items:center; gap:12px; color:inherit; text-decoration:none; font-weight:800; letter-spacing:1.5px; }
.brand-mark { display:inline-grid; place-items:center; width:40px; height:40px; border-radius:13px; color:#fff; background:#6376ee; box-shadow:0 8px 24px #0b153744; }
.eyebrow { color:#6675df; font-weight:800; font-size:12px; letter-spacing:1.7px; }
.auth-hero .eyebrow { color:#bfcaff; }
.auth-panel { display:grid; place-items:center; padding:40px; }
.auth-card { width:min(410px,100%); padding:42px; border:1px solid #e2e8f3; border-radius:24px; background:#fff; box-shadow:0 24px 70px #33486b1a; }
.auth-heading { margin-bottom:26px; }
.auth-heading span,.auth-heading p { color:#7c879d; font-size:13px; }
.auth-heading h2 { margin:7px 0; font-size:28px; }
.auth-card label { display:grid; gap:8px; margin:16px 0; color:#536076; font-size:13px; font-weight:700; }
.auth-card input,.redeem-card input { box-sizing:border-box; width:100%; border:1px solid #dfe5ef; border-radius:11px; padding:13px 14px; outline:none; background:#f8faff; font-size:14px; }
.auth-card input:focus,.redeem-card input:focus { border-color:#6675df; box-shadow:0 0 0 3px #6675df1d; }
.auth-card button { border:0; border-radius:11px; padding:13px; }
.auth-card .compact { padding:10px; margin-top:-7px; }
.auth-switch { text-align:center; color:#8791a4; font-size:13px; }
.auth-switch a { color:#5365dc; font-weight:700; text-decoration:none; }
.auth-options { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:4px 0 18px; font-size:12px; }
.auth-options a { color:#5365dc; text-decoration:none; font-weight:700; }
.auth-options .check-row { display:flex; grid-template-columns:none; align-items:center; gap:7px; margin:0; color:#68758a; font-weight:500; cursor:pointer; }
.auth-options input[type="checkbox"] { width:15px; min-height:15px; margin:0; accent-color:#5d6fe4; }
.form-status { min-height:18px; margin:2px 0 5px; color:#6675df; font-size:12px; }
.email-input { display:grid; grid-template-columns:1fr auto; align-items:center; overflow:hidden; border:1px solid #dfe5ef; border-radius:11px; background:#f8faff; }
.email-input:focus-within { border-color:#6675df; box-shadow:0 0 0 3px #6675df1d; }
.email-input input { border:0; border-radius:0; box-shadow:none !important; }
.email-input > span { align-self:stretch; display:flex; align-items:center; padding:0 14px; border-left:1px solid #dfe5ef; color:#66758a; background:#eef2f8; font-size:13px; user-select:none; }
.auth-card button:disabled { cursor:not-allowed; opacity:.65; }
.primary { display:inline-flex; justify-content:center; align-items:center; border:0; border-radius:10px; padding:12px 18px; color:#fff; background:#5d6fe4; text-decoration:none; cursor:pointer; font-weight:700; }
.primary:hover { background:#4e60d3; }
.full { width:100%; box-sizing:border-box; }
.console-shell { position:relative; z-index:1; min-height:100vh; display:grid; grid-template-columns:270px 1fr; }
.console-sidebar { box-sizing:border-box; position:sticky; top:0; height:100vh; display:flex; flex-direction:column; padding:30px 22px; color:#fff; background:#182641; }
.console-sidebar nav { display:grid; gap:8px; margin-top:42px; }
.console-sidebar nav a { display:flex; gap:13px; padding:13px 14px; border-radius:11px; color:#aebbd2; text-decoration:none; }
.console-sidebar nav a span { color:#7585a3; font-size:11px; }
.console-sidebar nav a.active,.console-sidebar nav a:hover { color:#fff; background:#6376ee; }
.account-summary { display:grid; justify-items:center; gap:5px; margin-top:auto; padding:20px 10px; border-top:1px solid #ffffff15; }
.account-summary small { margin-top:6px; color:#8e9db7; }
.account-summary time { color:#cdd6eb; font-size:12px; }
.profile-avatar { display:grid; place-items:center; width:48px; height:48px; border-radius:16px; color:#fff; background:linear-gradient(145deg,#7789f3,#4f60cf); font-size:19px; font-weight:800; }
.profile-avatar.large { width:76px; height:76px; border-radius:24px; font-size:30px; }
.console-sidebar form { margin-top:14px; }
.console-content { padding:54px clamp(28px,5vw,76px); overflow:hidden; }
.console-header { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:30px; }
.console-header h1 { margin:7px 0; font-size:34px; }
.console-header p { margin:0; color:#778196; }
.timezone-pill { border:1px solid #dfe5ef; border-radius:99px; padding:9px 13px; color:#657188; background:#fff; font-size:12px; }
.manual-grid { display:grid; gap:18px; max-width:1050px; }
.manual-step { display:grid; grid-template-columns:74px 1fr; gap:20px; padding:28px; border:1px solid #e1e7f0; border-radius:18px; background:#fff; box-shadow:0 10px 35px #2b416b0a; }
.step-index { color:#8b98b1; font:700 13px/1 "Consolas"; }
.manual-step h2,.redeem-card h2 { margin:0 0 9px; }
.manual-step p,.redeem-card p { color:#69758a; line-height:1.75; }
.manual-step ol { color:#647086; line-height:1.9; }
.tip { margin-top:14px; border-left:3px solid #6274e7; padding:10px 14px; border-radius:0 8px 8px 0; color:#536176; background:#f3f5ff; }
.step-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:17px; }
.ghost { display:inline-flex; justify-content:center; align-items:center; border:1px solid #dce2ec; border-radius:10px; padding:11px 17px; color:#5d697d; background:#fff; text-decoration:none; cursor:pointer; font-weight:700; }
.disabled-link { cursor:not-allowed; opacity:.62; }
.account-grid { display:grid; grid-template-columns:minmax(280px,400px) minmax(330px,560px); gap:20px; }
.account-grid:has(> :only-child) { grid-template-columns:minmax(330px,620px); }
.profile-card,.redeem-card { border:1px solid #e1e7f0; border-radius:20px; padding:30px; background:#fff; box-shadow:0 10px 35px #2b416b0a; }
.profile-card > p { color:#7d889c; }
.expiry-card { display:grid; gap:8px; margin-top:28px; padding:18px; border-radius:13px; color:#647087; background:#f3f5ff; }
.expiry-card strong { color:#384b9a; font-size:19px; }
.redeem-card form { display:grid; gap:12px; margin-top:24px; }
@media(max-width:820px) {
  .auth-shell { grid-template-columns:1fr; }
  .auth-hero { min-height:250px; padding:34px 28px; }
  .auth-hero h1 { font-size:40px; }
  .auth-panel { padding:24px 16px; }
  .console-shell { grid-template-columns:1fr; }
  .console-sidebar { position:relative; height:auto; }
  .console-sidebar nav { margin-top:24px; }
  .account-summary { margin-top:20px; }
  .account-grid { grid-template-columns:1fr; }
}

/* 新账户后台使用与旧后台一致的两栏骨架。 */
.dashboard-shell { display:grid; grid-template-columns:228px minmax(0,1fr); min-height:100vh; }
.dashboard-shell .content { min-width:0; padding:30px clamp(20px,3vw,46px) 50px; }
.content-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:25px; }
.content-header h1 { margin:5px 0; }
.stats-grid { display:grid; grid-template-columns:repeat(4,minmax(150px,1fr)); gap:14px; margin-bottom:18px; }
.stats-grid article { padding:17px 18px; border:1px solid var(--line); border-radius:11px; background:var(--panel); }
.stats-grid span,.stats-grid strong { display:block; }
.stats-grid span { color:var(--muted); font-size:12px; }
.stats-grid strong { margin-top:7px; font:700 29px/1.2 Consolas,monospace; }
.table-card { overflow-x:auto; padding:18px; border:1px solid var(--line); border-radius:11px; background:var(--panel); }
.toolbar { display:flex; gap:10px; margin-bottom:16px; }
.toolbar input { flex:1; }
.toolbar select { min-width:130px; }
.form-grid { display:flex; align-items:end; flex-wrap:wrap; gap:12px; }
.form-grid label { min-width:170px; }
.inline-form { display:inline-flex; align-items:center; gap:6px; margin:3px; }
.inline-form input { min-width:180px; }
.password-view { display:flex; align-items:center; gap:6px; min-width:260px; }
.password-view input { min-width:165px; font-family:Consolas,monospace; }
.password-view button { white-space:nowrap; }
td small { display:block; margin-top:4px; color:var(--muted); }
.danger { color:#d64c61; }
textarea { box-sizing:border-box; width:100%; padding:12px; border:1px solid var(--line); border-radius:8px; background:#f7f9fc; color:#182538; }
.stats-grid.five { grid-template-columns:repeat(5,minmax(120px,1fr)); }
.icon-label { gap:7px; white-space:nowrap; }
.icon-label span { font-size:19px; line-height:1; }
.icon-button { width:44px; min-width:44px; padding:0; font-size:18px; }
.user-table { overflow:visible; padding:0; }
.user-table table { width:100%; border-collapse:separate; border-spacing:0; }
.user-table th:first-child,.user-table td:first-child { padding-left:20px; }
.user-table th:last-child,.user-table td:last-child { padding-right:14px; }
.user-table td { vertical-align:middle; }
.status-dot { display:inline-block; width:8px; height:8px; margin-right:7px; border-radius:50%; background:#b7bec9; }
.status-dot.online { background:#2ab878; box-shadow:0 0 0 3px #2ab8781c; }
.row-actions { position:relative; width:46px; text-align:right; }
.kebab-button { width:34px; height:34px; padding:0; border:1px solid transparent; border-radius:9px; color:#667184; background:transparent; font-size:18px; letter-spacing:1px; }
.kebab-button:hover,.kebab-button[aria-expanded="true"] { border-color:#dce3ee; color:#356ae6; background:#f2f6ff; }
.action-menu { display:none; position:absolute; z-index:30; top:calc(50% + 18px); right:14px; width:174px; padding:6px; border:1px solid #dfe5ee; border-radius:11px; background:#fff; box-shadow:0 14px 38px #293a581f; text-align:left; }
.action-menu.open { display:block; }
.action-menu form { margin:0; }
.action-menu button { display:flex; align-items:center; gap:10px; width:100%; padding:9px 10px; border:0; border-radius:7px; color:#3c4656; background:transparent; font-size:13px; text-align:left; }
.action-menu button:hover { color:#245aca; background:#f1f5fd; }
.action-menu button span { display:inline-grid; place-items:center; width:17px; color:#71809a; }
.action-menu .menu-danger { color:#bd3f50; }
.action-menu .menu-danger:hover { color:#ad2f41; background:#fff0f2; }
.admin-dialog { width:min(520px,calc(100vw - 36px)); padding:0; border:1px solid #dfe5ee; border-radius:16px; color:#202a39; background:#fff; box-shadow:0 28px 90px #192a4740; }
.admin-dialog.wide { width:min(760px,calc(100vw - 36px)); }
.admin-dialog.compact { width:min(440px,calc(100vw - 36px)); }
.admin-dialog::backdrop { background:#15203966; backdrop-filter:blur(2px); }
.admin-dialog > form,.admin-dialog > div { padding:24px; }
.admin-dialog header { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:21px; }
.admin-dialog h2 { margin:5px 0 0; font-size:21px; }
.dialog-close { width:32px; height:32px; padding:0; border-radius:9px; color:#6b7585; background:#f1f3f7; font-size:18px; }
.dialog-close:hover { color:#253044; background:#e8ebf1; }
.admin-dialog label { display:grid; gap:7px; margin:13px 0; color:#596579; font-size:13px; font-weight:700; }
.admin-dialog input { box-sizing:border-box; width:100%; min-height:42px; border:1px solid #dce3ec; border-radius:9px; padding:10px 12px; color:#202a39; background:#f8fafc; outline:none; }
.admin-dialog input:focus { border-color:#789aed; box-shadow:0 0 0 3px #4a7ff71a; }
.admin-dialog footer { display:flex; justify-content:flex-end; gap:9px; margin-top:22px; }
.dialog-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 15px; }
.dialog-grid .full { grid-column:1/-1; }
.detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:0; }
.detail-grid > div { min-width:0; padding:13px; border:1px solid #e7ebf1; border-radius:10px; background:#f8fafc; }
.detail-grid .full { grid-column:1/-1; }
.detail-grid dt { margin-bottom:5px; color:#7a8596; font-size:11px; font-weight:700; }
.detail-grid dd { margin:0; overflow-wrap:anywhere; color:#2c3749; font-size:13px; line-height:1.55; }
.dialog-note { padding:13px 15px; border-radius:10px; color:#6d7788; background:#f5f7fa; line-height:1.65; }
.secret-field { display:flex; gap:7px; }
.secret-field input { font-family:Consolas,monospace; }
.eye-button { flex:0 0 42px; width:42px; padding:9px; border:1px solid #dce3ec; color:#617088; background:#f8fafc; }
.eye-button:hover { color:#356ae6; border-color:#b9caf0; background:#eef4ff; }
.eye-button svg { display:block; width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; }
.log-filter { display:grid; grid-template-columns:155px 190px 190px minmax(220px,1fr) 44px auto; align-items:end; gap:10px; margin-bottom:16px; }
.log-filter label { display:grid; gap:6px; color:#697588; font-size:11px; font-weight:700; }
.log-filter input,.log-filter select,.admin-dialog select { box-sizing:border-box; width:100%; min-height:42px; border:1px solid #dce3ec; border-radius:9px; padding:9px 11px; color:#263145; background:#fff; outline:none; }
.log-filter input:focus,.log-filter select:focus,.admin-dialog select:focus { border-color:#789aed; box-shadow:0 0 0 3px #4a7ff71a; }
.log-reset { min-height:42px; box-sizing:border-box; }
.audit-table { overflow-x:auto; padding:0; }
.audit-table table { min-width:1120px; }
.audit-table td { vertical-align:top; }
.nowrap { white-space:nowrap; }
.log-category { display:inline-flex; padding:4px 7px; border-radius:7px; color:#536176; background:#eef1f5; font-size:11px; font-weight:700; white-space:nowrap; }
.category-web_login { color:#315fc3; background:#edf3ff; }
.category-web_request { color:#4f647f; background:#edf1f5; }
.category-client_login { color:#6b50ba; background:#f2efff; }
.category-redemption { color:#9a6818; background:#fff4df; }
.category-user_operation { color:#18734b; background:#eaf7f0; }
.category-admin_operation { color:#a84555; background:#fff0f2; }
.log-details summary { cursor:pointer; color:#356ae6; font-size:12px; font-weight:700; list-style:none; }
.log-details summary::-webkit-details-marker { display:none; }
.log-details dl { width:320px; margin:9px 0 0; padding:10px; border:1px solid #e3e8f0; border-radius:9px; background:#f8fafc; }
.log-details dl div { margin:7px 0; }
.log-details dt { color:#818b9b; font-size:10px; }
.log-details dd { margin:2px 0 0; overflow-wrap:anywhere; color:#374256; font:12px/1.5 Consolas,"Microsoft YaHei UI",sans-serif; }
.table-hint { color:#7a8596; font-size:11px; }
.detail-button { width:34px; height:34px; padding:0; border:1px solid #dce3ee; border-radius:9px; color:#356ae6; background:#f3f6fc; font-size:16px; }
.detail-button:hover { border-color:#adc1ed; background:#eaf0ff; }
.log-modal-grid pre { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; color:#374256; font:12px/1.65 Consolas,"Microsoft YaHei UI",sans-serif; }
.pager { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin:15px 0; color:#717d8f; font-size:12px; }
.pager nav { display:flex; gap:5px; }
.pager nav a { display:grid; place-items:center; min-width:32px; height:32px; box-sizing:border-box; border:1px solid #dfe5ee; border-radius:8px; color:#526075; background:#fff; text-decoration:none; }
.pager nav a:hover { border-color:#b7c8ef; color:#356ae6; }
.pager nav a.active { border-color:#4a7ff7; color:#fff; background:#4a7ff7; }
.pager nav a.disabled { pointer-events:none; opacity:.38; }
.pager-controls { display:flex; align-items:center; gap:9px; }
.pager-controls label { display:flex; align-items:center; gap:5px; white-space:nowrap; }
.pager-controls select,.pager-controls input { box-sizing:border-box; height:34px; border:1px solid #dce3ec; border-radius:8px; padding:4px 7px; color:#334056; background:#fff; }
.pager-controls input { width:64px; }
.pager-controls button { min-height:34px; padding:6px 11px; }
@media(max-width:760px) {
  .dashboard-shell { grid-template-columns:76px minmax(0,1fr); }
  .stats-grid { grid-template-columns:repeat(2,minmax(120px,1fr)); }
  .stats-grid.five { grid-template-columns:repeat(2,minmax(120px,1fr)); }
  .content-header { align-items:flex-start; gap:14px; }
  .dialog-grid,.detail-grid { grid-template-columns:1fr; }
  .dialog-grid .full,
  .detail-grid .full { grid-column:auto; }
  .log-filter { grid-template-columns:1fr 1fr; }
  .log-keyword { grid-column:1/-1; }
  .pager { align-items:flex-start; flex-direction:column; }
}
