/* =========================================================
   PHP 账号管理系统 · 全站样式（深色玻璃拟态 / 支持浅色主题）
   本文件为纯手写 CSS，无任何外部依赖，可离线使用。
   ========================================================= */

:root {
    --bg: #070a12;
    --bg-deep: #05070d;
    --panel: rgba(20, 27, 46, 0.62);
    --panel-solid: #111827;
    --panel-soft: rgba(30, 39, 64, 0.48);
    --stroke: rgba(255, 255, 255, 0.10);
    --stroke-strong: rgba(255, 255, 255, 0.20);
    --text: #e9edf8;
    --muted: #96a2bd;
    --brand: #7b6bff;
    --brand-2: #35d2ff;
    --brand-3: #ff7ac6;
    --accent: #ffbd6b;
    --ok: #34d399;
    --bad: #ff6b81;
    --warn: #ffc861;
    --radius: 18px;
    --radius-sm: 12px;
    --radius-xs: 9px;
    --shadow: 0 28px 60px -32px rgba(0, 0, 0, 0.9);
    --shadow-sm: 0 10px 30px -18px rgba(0, 0, 0, 0.8);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

[data-theme="light"] {
    --bg: #eef1f9;
    --bg-deep: #e4e8f4;
    --panel: rgba(255, 255, 255, 0.78);
    --panel-solid: #ffffff;
    --panel-soft: rgba(243, 246, 255, 0.9);
    --stroke: rgba(22, 32, 58, 0.12);
    --stroke-strong: rgba(22, 32, 58, 0.22);
    --text: #141c32;
    --muted: #5d6885;
    --brand: #6455f0;
    --brand-2: #0aa6cf;
    --brand-3: #d94fa5;
    --accent: #b9741a;
    --ok: #128a63;
    --bad: #cf3a52;
    --warn: #a8740c;
    --shadow: 0 26px 50px -30px rgba(35, 47, 84, 0.35);
    --shadow-sm: 0 10px 24px -16px rgba(35, 47, 84, 0.35);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--brand-2); text-decoration: none; }
a:hover { color: var(--brand); }

h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code { font-family: var(--mono); font-size: 0.88em; padding: 1px 6px; border-radius: 6px; background: rgba(125, 140, 255, 0.14); }
img { max-width: 100%; }

.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.92em; }
.sm-text { font-size: 0.8em; }
.right { text-align: right; }
.center { justify-content: center; }
.hidden { display: none !important; }
.only-mobile { display: none; }

.ico { width: 18px; height: 18px; flex: 0 0 auto; }
.ico-sm { width: 15px; height: 15px; }
.input-ico { width: 18px; height: 18px; flex: 0 0 auto; opacity: 0.85; }

/* ---------------- 背景光斑 ---------------- */
.bg-glow {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(1200px 700px at 12% -10%, rgba(123, 107, 255, 0.16), transparent 60%),
        radial-gradient(900px 600px at 92% 4%, rgba(53, 210, 255, 0.12), transparent 65%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}
.bg-glow i {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    animation: drift 18s ease-in-out infinite alternate;
}
.bg-glow .g1 { width: 420px; height: 420px; left: -120px; top: 6%; background: rgba(110, 90, 255, 0.30); }
.bg-glow .g2 { width: 360px; height: 360px; right: -110px; top: 30%; background: rgba(40, 190, 255, 0.22); animation-delay: -6s; }
.bg-glow .g3 { width: 300px; height: 300px; left: 38%; bottom: -140px; background: rgba(255, 110, 190, 0.20); animation-delay: -11s; }

@keyframes drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(30px, -26px, 0) scale(1.08); }
}

/* ---------------- 通用容器 ---------------- */
.page {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 30px 20px 40px;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.page-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 6px; }
.page-head p { margin-top: 6px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.76rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-2);
    font-weight: 600;
}

/* ---------------- 顶栏 ---------------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    background: linear-gradient(180deg, rgba(10, 14, 24, 0.72), rgba(10, 14, 24, 0.42));
    border-bottom: 1px solid var(--stroke);
}
[data-theme="light"] .topbar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.6));
}
.topbar-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 22px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.02em;
}
.brand:hover { color: var(--text); }
.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    box-shadow: 0 10px 24px -12px rgba(123, 107, 255, 0.9);
}
.brand-mark .ico { width: 18px; height: 18px; }
.brand-text { font-size: 1.02rem; }

.main-nav { display: flex; gap: 4px; flex: 1; }
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.9rem;
    transition: color .18s, background .18s;
}
.nav-link:hover { color: var(--text); background: var(--panel-soft); }
.nav-link.active { color: var(--text); background: rgba(123, 107, 255, 0.16); border: 1px solid rgba(123, 107, 255, 0.32); }

.topbar-right { display: flex; align-items: center; gap: 10px; }
.points-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: var(--panel-soft);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.points-pill .ico { color: var(--accent); }
.points-pill em { font-style: normal; color: var(--muted); font-size: 0.78em; }

.icon-btn {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid var(--stroke);
    background: var(--panel-soft);
    color: var(--text);
    cursor: pointer;
    transition: border-color .18s, transform .18s, background .18s;
}
.icon-btn:hover { border-color: var(--stroke-strong); transform: translateY(-1px); }

.user-menu { position: relative; }
.user-menu summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 9px 5px 5px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: var(--panel-soft);
    cursor: pointer;
    list-style: none;
}
.user-menu summary::-webkit-details-marker { display: none; }
.avatar {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-3));
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
}
.user-name { font-size: 0.88rem; color: var(--text); }
.menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 190px;
    padding: 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--stroke);
    background: var(--panel-solid);
    box-shadow: var(--shadow);
    display: grid;
    gap: 2px;
    z-index: 50;
}
.menu-panel a,
.menu-panel button {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 8px;
    border: 0;
    background: none;
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
    width: 100%;
}
.menu-panel a:hover,
.menu-panel button:hover { background: var(--panel-soft); }
.menu-danger { color: var(--bad) !important; }
.role-chip {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(123, 107, 255, 0.16);
    border: 1px solid rgba(123, 107, 255, 0.3);
    font-size: 0.72rem;
    color: var(--brand-2);
    white-space: nowrap;
}

/* ---------------- 按钮 ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 11px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform .16s, box-shadow .16s, background .16s, border-color .16s, opacity .16s;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    box-shadow: 0 16px 34px -18px rgba(89, 118, 255, 0.85);
}
.btn-primary:hover { color: #fff; box-shadow: 0 20px 40px -18px rgba(89, 118, 255, 0.95); }

.btn-ghost {
    background: var(--panel-soft);
    border-color: var(--stroke);
    color: var(--text);
}
.btn-ghost:hover { border-color: var(--stroke-strong); color: var(--text); }

.btn-danger {
    background: rgba(255, 107, 129, 0.14);
    border-color: rgba(255, 107, 129, 0.4);
    color: var(--bad);
}
.btn-danger:hover { background: rgba(255, 107, 129, 0.2); color: var(--bad); }

.btn-lg { padding: 13px 22px; font-size: 1rem; border-radius: 13px; }
.btn-sm { padding: 7px 12px; font-size: 0.84rem; border-radius: 9px; }
.btn-xs { padding: 4px 9px; font-size: 0.78rem; border-radius: 7px; }
.btn-block { width: 100%; }

/* ---------------- 卡片 ---------------- */
.card {
    border-radius: var(--radius);
    border: 1px solid var(--stroke);
    background: var(--panel);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    animation: fadeUp .5s ease both;
}
.card.narrow { max-width: 620px; }
.card-soft { background: var(--panel-soft); }
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--stroke);
    flex-wrap: wrap;
}
.card-head h3 { display: inline-flex; align-items: center; gap: 8px; font-size: 1rem; }
.card-head .link, .link { font-size: 0.86rem; }
.card-body { padding: 18px; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------------- 统计卡 ---------------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.stat-card {
    position: relative;
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--stroke);
    background: var(--panel);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    animation: fadeUp .55s ease both;
}
.stat-card.accent {
    background: linear-gradient(140deg, rgba(123, 107, 255, 0.22), rgba(53, 210, 255, 0.10) 60%, var(--panel));
    border-color: rgba(123, 107, 255, 0.34);
}
.stat-card::after {
    content: "";
    position: absolute;
    inset: auto -30% -60% auto;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(123, 107, 255, 0.22), transparent 70%);
    pointer-events: none;
}
.stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.84rem;
}
.stat-top .ico { color: var(--brand-2); }
.stat-value {
    display: block;
    margin: 10px 0 4px;
    font-size: clamp(1.5rem, 2.6vw, 1.9rem);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.stat-value small { font-size: 0.8rem; color: var(--muted); font-weight: 500; }
.stat-sub { font-size: 0.8rem; color: var(--muted); }

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

/* ---------------- 表单 ---------------- */
.form-grid { display: grid; gap: 16px; }
.form-grid.compact { gap: 12px; margin-top: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.form-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.between { justify-content: space-between; }

.field { display: grid; gap: 6px; }
.field > span { font-size: 0.84rem; color: var(--muted); font-weight: 500; }
.input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    min-height: 44px;
    border-radius: 11px;
    border: 1px solid var(--stroke);
    background: var(--panel-soft);
    transition: border-color .18s, box-shadow .18s, background .18s;
}
.input-wrap:focus-within {
    border-color: rgba(123, 107, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(123, 107, 255, 0.16);
}
.input-wrap.sm { min-height: 38px; padding: 0 10px; }
.input-wrap textarea { min-height: 80px; padding: 10px 0; resize: vertical; }
.input-wrap input,
.input-wrap select,
.input-wrap textarea {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.92rem;
    padding: 11px 0;
    min-width: 0;
}
.input-wrap input::placeholder,
.input-wrap textarea::placeholder { color: var(--muted); opacity: 0.75; }
.input-wrap select { cursor: pointer; }
.input-wrap select option { background: var(--panel-solid); color: var(--text); }
.input-ico { color: var(--brand-2); }
.input-prefix { color: var(--muted); font-weight: 600; }

select:not(.input-wrap select),
input[type="text"]:not(.input-wrap input),
input[type="number"]:not(.input-wrap input) {
    font: inherit;
}

/* 独立 select（筛选条内） */
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; }
.filter-bar select,
.filter-bar > select {
    min-height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--stroke);
    background: var(--panel-soft);
    color: var(--text);
    font: inherit;
    font-size: 0.86rem;
    cursor: pointer;
}

.reveal-btn {
    border: 0;
    background: none;
    color: var(--muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: inline-grid;
    place-items: center;
}
.reveal-btn:hover { color: var(--text); }

.check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--muted);
    cursor: pointer;
}
.check input { width: 16px; height: 16px; accent-color: var(--brand); }

.switch { position: relative; display: inline-flex; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i {
    width: 44px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: var(--panel-soft);
    position: relative;
    transition: background .2s, border-color .2s;
}
.switch i::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--muted);
    transition: transform .2s, background .2s;
}
.switch input:checked + i { background: rgba(123, 107, 255, 0.30); border-color: rgba(123, 107, 255, 0.6); }
.switch input:checked + i::after { transform: translateX(20px); background: var(--brand-2); }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px rgba(123, 107, 255, 0.25); }

.switch-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
}
.switch-field > span { font-size: 0.88rem; color: var(--muted); }
.switch-field strong { font-size: 0.94rem; }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 4px 0 10px;
}
.form-foot { text-align: center; font-size: 0.87rem; color: var(--muted); }
.hint { font-size: 0.8rem; color: var(--muted); line-height: 1.55; }

/* ---------------- 提示 / Toast ---------------- */
.notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 15px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--stroke);
    background: var(--panel-soft);
    font-size: 0.88rem;
    margin-bottom: 16px;
}
.notice.compact { margin: 12px 0 0; padding: 10px 12px; }
.notice .ico { margin-top: 2px; }
.notice-success { border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.10); }
.notice-success .ico { color: var(--ok); }
.notice-error { border-color: rgba(255, 107, 129, 0.4); background: rgba(255, 107, 129, 0.10); }
.notice-error .ico { color: var(--bad); }
.notice-warning { border-color: rgba(255, 200, 97, 0.4); background: rgba(255, 200, 97, 0.10); }
.notice-warning .ico { color: var(--warn); }
.notice-info { border-color: rgba(53, 210, 255, 0.35); background: rgba(53, 210, 255, 0.08); }
.notice-info .ico { color: var(--brand-2); }

.toast-stack {
    position: fixed;
    top: 76px;
    right: 22px;
    z-index: 80;
    display: grid;
    gap: 10px;
    max-width: min(380px, calc(100vw - 44px));
}
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--stroke);
    background: var(--panel-solid);
    box-shadow: var(--shadow);
    font-size: 0.88rem;
    animation: toastIn .35s ease both;
}
.toast-success { border-left: 3px solid var(--ok); }
.toast-success .ico { color: var(--ok); }
.toast-error { border-left: 3px solid var(--bad); }
.toast-error .ico { color: var(--bad); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(18px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ---------------- 表格 ---------------- */
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 640px; }
.data-table thead th {
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: var(--muted);
    border-bottom: 1px solid var(--stroke);
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.02);
}
.data-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--stroke);
    vertical-align: middle;
}
.data-table tbody tr { transition: background .16s; }
.data-table tbody tr:hover { background: rgba(123, 107, 255, 0.07); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table td.right, .data-table th.right { text-align: right; }
.row-actions { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.row-actions form { display: inline-flex; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
}
.badge-ok { color: var(--ok); background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.32); }
.badge-bad { color: var(--bad); background: rgba(255, 107, 129, 0.12); border-color: rgba(255, 107, 129, 0.32); }
.badge-warn { color: var(--warn); background: rgba(255, 200, 97, 0.12); border-color: rgba(255, 200, 97, 0.32); }
.badge-muted { color: var(--muted); background: var(--panel-soft); border-color: var(--stroke); }

.empty {
    display: grid;
    place-items: center;
    gap: 8px;
    padding: 40px 20px;
    color: var(--muted);
    text-align: center;
}
.empty-ico {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px dashed var(--stroke-strong);
}
.empty p { font-size: 0.9rem; }

/* ---------------- 分页 ---------------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-top: 1px solid var(--stroke);
    flex-wrap: wrap;
}
.page-info { font-size: 0.82rem; color: var(--muted); }
.page-links { display: flex; gap: 5px; flex-wrap: wrap; }
.page-btn {
    min-width: 34px;
    height: 32px;
    padding: 0 10px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    border: 1px solid var(--stroke);
    background: var(--panel-soft);
    color: var(--muted);
    font-size: 0.82rem;
    transition: .16s;
}
.page-btn:hover { color: var(--text); border-color: var(--stroke-strong); }
.page-btn.current { background: rgba(123, 107, 255, 0.22); border-color: rgba(123, 107, 255, 0.5); color: var(--text); font-weight: 700; }
.page-btn.disabled { opacity: 0.45; pointer-events: none; }

/* ---------------- 列表组件 ---------------- */
.zone-mini-list { display: grid; gap: 10px; }
.zone-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--stroke);
    background: var(--panel-soft);
}
.zone-mini-ico {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(123, 107, 255, 0.16);
    color: var(--brand-2);
}
.zone-mini-main { flex: 1; min-width: 0; display: grid; }
.zone-mini-main span { font-size: 0.8rem; }

.check-list { display: grid; gap: 10px; margin-bottom: 14px; }
.check-list li {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    border-radius: 10px;
    border: 1px solid var(--stroke);
    background: var(--panel-soft);
    font-size: 0.88rem;
}
.check-list li span { flex: 1; }
.check-list li em { font-style: normal; font-size: 0.78rem; color: var(--muted); }
.check-list li.ok .ico { color: var(--ok); }
.check-list li.warn .ico { color: var(--warn); }

.ledger-list { display: grid; gap: 2px; }
.ledger-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 4px;
    border-bottom: 1px solid var(--stroke);
}
.ledger-list li:last-child { border-bottom: 0; }
.ledger-delta {
    min-width: 58px;
    text-align: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.ledger-delta.plus { color: var(--ok); background: rgba(52, 211, 153, 0.12); }
.ledger-delta.minus { color: var(--bad); background: rgba(255, 107, 129, 0.12); }
.ledger-list li > div { flex: 1; display: grid; min-width: 0; }
.ledger-list li > div span { font-size: 0.78rem; }
.ledger-list li em { font-style: normal; font-size: 0.78rem; color: var(--muted); white-space: nowrap; }

.timeline { display: grid; gap: 12px; }
.timeline li { display: flex; align-items: center; gap: 10px; }
.timeline.dense li { gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--stroke); }
.timeline li > div { flex: 1; display: grid; min-width: 0; }
.timeline li > div span { font-size: 0.78rem; }
.timeline-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--muted);
    flex: 0 0 auto;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04);
}
.timeline-dot.ok { background: var(--ok); }
.timeline-dot.bad { background: var(--bad); }

.kv-list { display: grid; gap: 0; }
.kv-list li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 0;
    border-bottom: 1px solid var(--stroke);
    font-size: 0.88rem;
}
.kv-list li:last-child { border-bottom: 0; }
.kv-list li span { color: var(--muted); }
.stack-actions { display: grid; gap: 10px; }

.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.body-details summary { cursor: pointer; font-size: 0.8rem; color: var(--brand-2); }
.body-pre {
    max-width: 480px;
    max-height: 220px;
    overflow: auto;
    margin: 8px 0 0;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--stroke);
    background: var(--panel-soft);
    font-family: var(--mono);
    font-size: 0.76rem;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ---------------- 玩家分区 ---------------- */
.zone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 16px;
}
.zone-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--stroke);
    background: var(--panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-sm);
    animation: fadeUp .5s ease both;
}
.zone-card-head { display: flex; align-items: center; gap: 11px; }
.zone-ico {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(123, 107, 255, 0.3), rgba(53, 210, 255, 0.18));
    border: 1px solid rgba(123, 107, 255, 0.3);
    color: #fff;
}
.zone-title { flex: 1; min-width: 0; }
.zone-title h3 { font-size: 1.02rem; }
.zone-title span { font-size: 0.76rem; }
.zone-desc { font-size: 0.87rem; color: var(--muted); min-height: 40px; }
.zone-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--stroke);
    background: var(--panel-soft);
}
.zone-meta > div { display: grid; gap: 2px; min-width: 0; }
.zone-meta span { font-size: 0.72rem; }
.zone-meta strong { font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; }
.zone-tip { display: inline-flex; align-items: center; gap: 6px; font-size: 0.76rem; color: var(--ok); }
.inline-form summary { list-style: none; display: inline-flex; cursor: pointer; }
.inline-form summary::-webkit-details-marker { display: none; }

/* ---------------- 充值 ---------------- */
.recharge-balance {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 20px 22px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.balance-main { display: grid; gap: 2px; }
.balance-main strong { font-size: 2rem; letter-spacing: -0.02em; color: var(--brand-2); font-variant-numeric: tabular-nums; }
.balance-side { display: grid; gap: 2px; padding-left: 22px; border-left: 1px solid var(--stroke); }
.balance-side strong { font-size: 1.1rem; }

.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.preset {
    display: grid;
    gap: 2px;
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--stroke);
    background: var(--panel-soft);
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .16s, transform .16s, background .16s;
}
.preset:hover { border-color: var(--stroke-strong); transform: translateY(-2px); }
.preset.selected { border-color: rgba(123, 107, 255, 0.65); background: rgba(123, 107, 255, 0.14); box-shadow: 0 0 0 3px rgba(123, 107, 255, 0.12); }
.preset strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.preset span { font-size: 0.82rem; color: var(--muted); }
.preset .bonus { font-style: normal; font-size: 0.74rem; color: var(--accent); }
.preset[disabled] { opacity: 0.5; cursor: not-allowed; }

.tier-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 14px;
    border-radius: 10px;
    border: 1px dashed rgba(255, 200, 97, 0.36);
    background: rgba(255, 200, 97, 0.06);
    font-size: 0.82rem;
    color: var(--muted);
}
.tier-note .ico { color: var(--accent); }

.amount-row { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-bottom: 12px; }
.amount-preview {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    color: var(--muted);
    padding: 10px 2px 14px;
}
.amount-preview strong { color: var(--brand-2); font-size: 1.05rem; }

.pay-panel { margin-bottom: 18px; }
.pay-body { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.qr-box {
    width: 210px;
    height: 210px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, 0.04);
    padding: 12px;
}
.qr-box canvas, .qr-box img { width: 100%; height: 100%; border-radius: 8px; background: #fff; }
.qr-placeholder {
    display: grid;
    place-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.84rem;
}
.qr-placeholder .ico { width: 34px; height: 34px; }
.pay-info { flex: 1; min-width: 250px; display: grid; gap: 6px; }
.pay-info h3 { font-size: 1.15rem; }
.pay-tip { font-size: 0.84rem; color: var(--muted); }

/* ---------------- 认证页 ---------------- */
.auth-body { min-height: 100vh; display: grid; place-items: center; }
.auth-shell {
    width: min(1120px, calc(100% - 36px));
    min-height: 640px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    border-radius: 26px;
    border: 1px solid var(--stroke);
    background: var(--panel);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin: 28px 0;
}

.auth-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 36px;
    background:
        radial-gradient(500px 300px at 85% 10%, rgba(53, 210, 255, 0.16), transparent 65%),
        radial-gradient(460px 320px at 10% 90%, rgba(255, 122, 198, 0.14), transparent 62%),
        linear-gradient(150deg, rgba(123, 107, 255, 0.16), transparent 55%);
    border-right: 1px solid var(--stroke);
    overflow: hidden;
}
.hero-copy { margin: auto 0; padding: 40px 0; max-width: 430px; }
.hero-copy .eyebrow { margin-bottom: 14px; }
.hero-copy h1 {
    font-size: clamp(2rem, 4vw, 2.9rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
}
.grad-text {
    background: linear-gradient(100deg, var(--brand-2), var(--brand), var(--brand-3));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-copy p { color: var(--muted); font-size: 0.95rem; margin-bottom: 22px; }
.hero-points { display: grid; gap: 10px; }
.hero-points li {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.86rem;
    color: var(--text);
}
.hero-points .ico { color: var(--ok); }

.hero-orbit {
    position: absolute;
    right: -40px;
    top: 10%;
    width: 260px;
    height: 260px;
    display: grid;
    place-items: center;
    opacity: 0.6;
    pointer-events: none;
}
.orbit-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(123, 107, 255, 0.4);
    animation: spin 20s linear infinite;
}
.orbit-ring.r1 { width: 190px; height: 190px; }
.orbit-ring.r2 { width: 250px; height: 250px; border-style: dashed; animation-duration: 32s; animation-direction: reverse; }
.orbit-core {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    box-shadow: 0 0 50px rgba(123, 107, 255, 0.55);
    animation: pulse 3.5s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(123, 107, 255, 0.45); }
    50% { transform: scale(1.06); box-shadow: 0 0 70px rgba(53, 210, 255, 0.55); }
}

.auth-hero-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--muted);
    flex-wrap: wrap;
}
.auth-hero-foot a { color: var(--muted); }
.auth-hero-foot a:hover { color: var(--text); }

.auth-panel { position: relative; display: flex; align-items: center; padding: 40px 44px; }
.auth-panel-inner { width: 100%; max-width: 420px; margin: 0 auto; }
.auth-theme { position: absolute; top: 18px; right: 18px; }
.auth-head { margin-bottom: 22px; }
.auth-head h2 { font-size: 1.7rem; margin-bottom: 8px; }
.auth-head p { font-size: 0.9rem; }
.step-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    margin-bottom: 10px;
    border-radius: 999px;
    border: 1px solid rgba(123, 107, 255, 0.35);
    background: rgba(123, 107, 255, 0.12);
    font-size: 0.76rem;
    color: var(--brand-2);
}

.steps {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
}
.steps li {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    color: var(--muted);
    flex: 1;
}
.steps li i {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--stroke);
    background: var(--panel-soft);
    font-style: normal;
    font-size: 0.76rem;
    flex: 0 0 auto;
}
.steps li.done i { border-color: rgba(52, 211, 153, 0.45); color: var(--ok); }
.steps li.active i { border-color: rgba(123, 107, 255, 0.6); background: rgba(123, 107, 255, 0.2); color: var(--text); }
.steps li.active { color: var(--text); }
.steps li:not(:last-child)::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--stroke);
}

.mini-panel {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--stroke);
}
.mini-panel summary { cursor: pointer; font-size: 0.84rem; color: var(--muted); }
.mini-panel[open] summary { margin-bottom: 12px; color: var(--text); }

/* ---------------- 管理端 ---------------- */
.admin-body { padding-left: 236px; }
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 236px;
    z-index: 60;
    display: flex;
    flex-direction: column;
    padding: 18px 14px;
    border-right: 1px solid var(--stroke);
    background: linear-gradient(180deg, rgba(12, 17, 30, 0.92), rgba(9, 13, 24, 0.78));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow-y: auto;
}
[data-theme="light"] .sidebar { background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 248, 255, 0.86)); }
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 18px;
    border-bottom: 1px solid var(--stroke);
}
.sidebar-brand strong { display: block; font-size: 0.95rem; }
.sidebar-brand small { color: var(--muted); font-size: 0.74rem; }
.side-nav { display: grid; gap: 2px; padding-top: 14px; flex: 1; }
.nav-group {
    margin: 12px 8px 4px;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}
.side-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 9px;
    color: var(--muted);
    font-size: 0.88rem;
    border: 1px solid transparent;
    transition: .16s;
}
.side-link:hover { color: var(--text); background: var(--panel-soft); }
.side-link.active {
    color: var(--text);
    background: rgba(123, 107, 255, 0.16);
    border-color: rgba(123, 107, 255, 0.34);
}
.sidebar-foot { padding-top: 14px; border-top: 1px solid var(--stroke); }
.sidebar-foot a { display: flex; align-items: center; gap: 8px; padding: 8px; font-size: 0.82rem; color: var(--muted); }
.sidebar-foot a:hover { color: var(--text); }

.admin-main { min-height: 100vh; display: flex; flex-direction: column; }
.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 24px;
    border-bottom: 1px solid var(--stroke);
    background: rgba(9, 13, 24, 0.66);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
[data-theme="light"] .admin-topbar { background: rgba(255, 255, 255, 0.8); }
.admin-topbar-left { display: flex; align-items: center; gap: 10px; }
.admin-topbar-right { display: flex; align-items: center; gap: 10px; }
.page-title { font-size: 1.05rem; font-weight: 600; }
.admin-content { padding: 24px; max-width: 1320px; width: 100%; }
.admin-user-menu .role-chip { font-size: 0.68rem; }

/* ---------------- 图表 ---------------- */
.legend { display: flex; gap: 14px; font-size: 0.8rem; color: var(--muted); flex-wrap: wrap; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.sw-bar { background: linear-gradient(135deg, rgba(123, 107, 255, 0.55), rgba(53, 210, 255, 0.55)); }
.sw-line { width: 16px; height: 2px; border-radius: 2px; background: var(--accent); }
.chart-body { padding-bottom: 10px; }
.trend-chart { width: 100%; height: auto; }
.chart-axis { stroke: var(--stroke-strong); stroke-width: 1; }
.chart-grid { stroke: var(--stroke); stroke-width: 1; stroke-dasharray: 4 5; }
.chart-bar { fill: rgba(123, 107, 255, 0.35); stroke: rgba(123, 107, 255, 0.55); stroke-width: 1; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.chart-dot { fill: var(--accent); stroke: var(--panel-solid); stroke-width: 1.5; }
.chart-label { fill: var(--muted); font-size: 12px; }
.chart-value { fill: var(--text); font-size: 11px; opacity: 0.75; }
.chart-note { font-size: 0.78rem; padding: 0 4px; }

/* ---------------- 错误页 ---------------- */
.error-page { display: grid; place-items: center; min-height: 60vh; }
.error-card {
    text-align: center;
    padding: 48px 40px;
    border-radius: var(--radius);
    border: 1px solid var(--stroke);
    background: var(--panel);
    box-shadow: var(--shadow);
    max-width: 460px;
}
.error-code {
    font-size: 3.4rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(120deg, var(--brand-2), var(--brand-3));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}
.error-card h2 { margin: 12px 0 8px; }
.error-card p { margin-bottom: 22px; }

/* ---------------- 页脚 ---------------- */
.app-footer { border-top: 1px solid var(--stroke); margin-top: 20px; }
.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 20px 26px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--muted);
    flex-wrap: wrap;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1024px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .auth-shell { grid-template-columns: 1fr; min-height: 0; }
    .auth-hero { display: none; }
    .auth-panel { padding: 34px 26px; }
    .admin-body { padding-left: 0; }
    .sidebar {
        transform: translateX(-100%);
        transition: transform .24s ease;
        width: 250px;
        box-shadow: var(--shadow);
    }
    .sidebar.open { transform: translateX(0); }
    .only-mobile { display: inline-grid; }
    .admin-content { padding: 18px 16px; }
    .zone-meta { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .topbar-inner { flex-wrap: wrap; gap: 10px; }
    .main-nav { order: 3; width: 100%; overflow-x: auto; padding-bottom: 2px; }
    .nav-link span { display: none; }
    .nav-link { padding: 9px 11px; }
    .topbar-right { margin-left: auto; }
    .user-name { display: none; }
    .stat-grid, .two-col, .grid-2, .grid-3, .amount-row { grid-template-columns: 1fr; }
    .preset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page { padding: 22px 14px 32px; }
    .page-head { align-items: flex-start; }
    .pay-body { flex-direction: column; align-items: stretch; }
    .qr-box { margin: 0 auto; }
    .recharge-balance { gap: 16px; }
    .balance-side { padding-left: 16px; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; }
    .toast-stack { left: 14px; right: 14px; max-width: none; top: auto; bottom: 18px; }
    .data-table { min-width: 560px; }
}

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

/* ---------------- 公告富文本编辑器 ---------------- */
.rich-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.rich-tool {
    min-width: 34px;
    height: 30px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--stroke);
    background: var(--panel-soft);
    color: var(--text);
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.rich-tool:hover {
    background: var(--panel-soft);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.rich-preview {
    margin-top: 10px;
    padding: 12px 14px;
    border: 1px dashed var(--stroke);
    border-radius: 10px;
    background: var(--panel-soft);
    font-size: 0.88rem;
    line-height: 1.7;
    min-height: 40px;
    word-break: break-word;
}

.rich-preview:empty::before {
    content: '预览区：输入内容后在此实时预览';
    color: var(--muted);
}

.notice span p,
.notice span div {
    margin: 0 0 6px;
}

.notice span p:last-child,
.notice span div:last-child {
    margin-bottom: 0;
}

/* ---------------- 充值支付方式 ---------------- */
.pay-field { margin-top: 14px; }

.pay-methods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pay-method {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--stroke);
    border-radius: 12px;
    background: var(--panel-soft);
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.pay-method input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pay-brand {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid var(--stroke);
    color: var(--muted);
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.pay-brand svg { width: 24px; height: 24px; }

.pay-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.pay-meta strong { font-size: 0.92rem; color: var(--text); }
.pay-meta em { font-style: normal; font-size: 0.72rem; color: var(--muted); }

.pay-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid var(--stroke);
    flex: 0 0 auto;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.pay-method.is-active {
    border-color: rgba(123, 107, 255, 0.55);
    background: rgba(123, 107, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(123, 107, 255, 0.12);
}

.pay-method.is-active .pay-dot {
    border-color: transparent;
    background: var(--brand, #7b6bff);
}

.pay-method.is-active .pay-brand.wechat {
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.45);
    background: rgba(34, 197, 94, 0.12);
}

.pay-method.is-active .pay-brand.alipay {
    color: #1677ff;
    border-color: rgba(22, 119, 255, 0.45);
    background: rgba(22, 119, 255, 0.12);
}

@media (max-width: 560px) {
    .pay-methods { grid-template-columns: 1fr; }
}
