/* ============================================================
   全局样式 · 卡密验证系统
   · 深色 / 浅色主题（data-theme 切换，选择持久化到 localStorage）
   · 磨砂质感：半透明面板 + 背景模糊 + 细颗粒纹理
   · --glass-opacity / --glass-blur 由管理员网页设置下发
   ============================================================ */

:root {
    --glass-opacity: 0.90;
    --glass-blur: 14px;
    --surface-alpha: 0.95;
    --wallpaper: none;

    --radius: 18px;
    --radius-sm: calc(var(--radius) - 6px);
    --accent: #6f8dff;
    --accent-2: #9b6cff;
    --ok: #41d18b;
    --warn: #f2b84b;
    --danger: #ff6b6b;
    --font: "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    /* 字体层级：辅助信息 / 正文 / 标题 / 大数字 */
    --fs-aux: 12px;
    --fw-aux: 500;
    --ls-aux: .02em;
    --op-aux: .90;
    --fs-body: 14px;
    --fw-body: 400;
    --ls-body: .01em;
    --op-body: 1;
    --fs-title: 16px;
    --fw-title: 650;
    --ls-title: .01em;
    --op-title: 1;
    --fs-display: 26px;
    --fw-display: 750;
    --ls-display: -.02em;
    --op-display: 1;
    --text-shadow: 0 1px 2px rgba(0, 0, 0, .42);

    --frost-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.20'/%3E%3C/svg%3E");
}

html[data-theme="dark"] {
    --bg: #0a0d13;
    --bg-grad: radial-gradient(1200px 650px at 12% -12%, #1c2942 0%, #0a0d13 62%);
    --panel-rgb: 26, 33, 46;
    --panel: rgba(var(--panel-rgb), var(--surface-alpha));
    --panel-solid: #141c29;
    --line: rgba(170, 190, 225, .18);
    --text: #f0f4ff;
    --muted: #aab6cc;
    --input-bg: #111826;
    --hover: rgba(120, 145, 190, .16);
    --shadow: 0 22px 55px rgba(0, 0, 0, .45);
    --glass-border: rgba(190, 210, 245, .16);
    --glass-sheen: linear-gradient(145deg, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, .025) 42%, rgba(255, 255, 255, 0) 72%);
    --glass-inner: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 -1px 0 rgba(0, 0, 0, .16);
    --bg-scrim: linear-gradient(180deg, rgba(7, 10, 16, .50) 0%, rgba(7, 10, 16, .78) 58%, rgba(7, 10, 16, .92) 100%);
    --text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
    color-scheme: dark;
}

html[data-theme="light"] {
    --bg: #e8edf5;
    --bg-grad: radial-gradient(1200px 650px at 12% -12%, #d9e6ff 0%, #e8edf5 62%);
    --panel-rgb: 255, 255, 255;
    --panel: rgba(var(--panel-rgb), var(--surface-alpha));
    --panel-solid: #ffffff;
    --line: rgba(70, 90, 130, .18);
    --text: #151d2e;
    --muted: #56647c;
    --input-bg: #f8fafd;
    --hover: rgba(90, 120, 175, .10);
    --shadow: 0 20px 50px rgba(30, 50, 90, .15);
    --glass-border: rgba(120, 140, 180, .22);
    --glass-sheen: linear-gradient(145deg, rgba(255, 255, 255, .72) 0%, rgba(255, 255, 255, .28) 44%, rgba(255, 255, 255, .08) 74%);
    --glass-inner: inset 0 1px 0 rgba(255, 255, 255, .92), inset 0 -1px 0 rgba(95, 115, 155, .10);
    --bg-scrim: linear-gradient(180deg, rgba(235, 241, 250, .54) 0%, rgba(235, 241, 250, .82) 58%, rgba(235, 241, 250, .94) 100%);
    --text-shadow: 0 1px 1px rgba(255, 255, 255, .55);
    color-scheme: light;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
    margin: 0;
    position: relative;
    isolation: isolate;
    background-color: var(--bg);
    background-image: var(--bg-scrim), var(--bg-grad);
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    background-attachment: fixed, fixed;
    color: var(--text);
    font-family: var(--font);
    font-size: var(--fs-body);
    font-weight: var(--fw-body);
    letter-spacing: var(--ls-body);
    line-height: 1.65;
    text-shadow: var(--text-shadow);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* 壁纸层：单独模糊，不与 UI 面板模糊混在一起 */
body::before {
    content: '';
    position: fixed;
    inset: -48px;
    z-index: 0;
    background-image: var(--wallpaper);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.04);
    pointer-events: none;
}

/* 噪点层：磨砂颗粒质感 */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image: var(--frost-grain);
    background-size: 180px 180px;
    opacity: .14;
    mix-blend-mode: soft-light;
    pointer-events: none;
}

::selection { background: rgba(111, 141, 255, .35); color: var(--text); }

a { color: var(--accent); text-decoration: none; }
a:hover { filter: brightness(1.12); }
h1, h2, h3, h4 { margin: 0; font-weight: var(--fw-title); letter-spacing: var(--ls-title); opacity: var(--op-title); }
code, pre { font-family: var(--mono); }

/* 磨砂面板：细颗粒 + 低光泽 + 背景模糊 */
.glass, .card, .sidebar, .modal, .auth-card, .toast {
    background-color: rgba(var(--panel-rgb), var(--surface-alpha));
    background-image: var(--frost-grain), var(--glass-sheen);
    background-blend-mode: soft-light, normal;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow), var(--glass-inner);
    backdrop-filter: blur(var(--glass-blur)) saturate(125%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(125%);
}

.hidden { display: none !important; }
.muted { color: var(--muted); font-size: var(--fs-aux); font-weight: var(--fw-aux); letter-spacing: var(--ls-aux); opacity: var(--op-aux); }
.small { font-size: var(--fs-aux); font-weight: var(--fw-aux); letter-spacing: var(--ls-aux); opacity: var(--op-aux); }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.break { word-break: break-all; }
.row-flex { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.summary-pill {
    display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px;
    border: 1px solid var(--line); background: rgba(var(--panel-rgb), .36);
    color: var(--muted); opacity: 1; white-space: nowrap;
}
.action-bar { align-items: center; gap: 8px; }
.action-bar .btn { flex: 0 0 auto; }
.spacer { flex: 1 1 auto; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }

/* ---------------------------------------------------- 按钮 / 表单 */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 15px; border-radius: 11px;
    border: 1px solid var(--line); background: var(--input-bg); color: var(--text);
    font-size: 13px; font-family: inherit; font-weight: 500; cursor: pointer;
    text-shadow: none;
    transition: background .16s, border-color .16s, transform .08s, box-shadow .16s;
}
.btn:hover { background: var(--hover); border-color: rgba(140, 165, 215, .35); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent; color: #fff; font-weight: 650;
    box-shadow: 0 8px 22px rgba(111, 141, 255, .22);
}
.btn-primary:hover { filter: brightness(1.07); background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.btn-danger { border-color: var(--line); color: var(--danger); background: var(--input-bg); }
.btn-danger:hover { background: rgba(255, 107, 107, .10); border-color: rgba(255, 107, 107, .32); }
.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 9px; }
.btn-block { width: 100%; }
.icon-btn {
    width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px; border: 1px solid var(--line); background: var(--input-bg); color: var(--text);
    cursor: pointer; font-size: 15px;
}
.icon-btn:hover { background: var(--hover); }

label.field { display: block; font-size: var(--fs-aux); font-weight: var(--fw-aux); letter-spacing: var(--ls-aux); opacity: var(--op-aux); color: var(--muted); margin: 12px 0 6px; }
label.field.inline { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--text); }

input[type=text], input[type=password], input[type=number], input[type=search], input[type=date],
input[type=file], select, textarea {
    width: 100%; padding: 9px 12px; border-radius: 11px;
    border: 1px solid var(--line); background: var(--input-bg); color: var(--text);
    font-size: var(--fs-body); font-weight: var(--fw-body); font-family: inherit; outline: none;
    text-shadow: none;
    transition: border-color .16s, box-shadow .16s, background .16s;
}
input:focus, select:focus, textarea:focus {
    border-color: rgba(111, 141, 255, .7);
    box-shadow: 0 0 0 3px rgba(111, 141, 255, .12);
}
textarea { resize: vertical; min-height: 84px; }
input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
input[type=date] { color-scheme: dark; }
input[type=color] { height: 40px; padding: 4px; cursor: pointer; }
html[data-theme="light"] input[type=date] { color-scheme: light; }

.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.form-grid { align-items: start; }
.form-grid > div { display: flex; flex-direction: column; min-width: 0; }
.form-grid > div > label.field { display: flex; align-items: flex-end; min-height: 36px; margin: 0 0 6px; line-height: 1.35; }
.form-grid .range-field { justify-content: flex-start; }

/* ---------------------------------------------------- 布局 */

.layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; position: relative; z-index: 1; }

.sidebar {
    position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
    border: 0; border-right: 1px solid var(--glass-border); border-radius: 0;
    box-shadow: 10px 0 38px rgba(0, 0, 0, .16), var(--glass-inner);
    padding: 20px 14px; gap: 6px; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; }
.brand .name { font-size: 14.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand .sub { font-size: 11.5px; color: var(--muted); }

.nav-item {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px;
    border-radius: 11px; color: var(--muted); cursor: pointer; font-size: 13.5px;
    border: 1px solid transparent; user-select: none;
    transition: background .16s, color .16s, border-color .16s;
}
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.active {
    background: linear-gradient(90deg, rgba(111, 141, 255, .20), rgba(155, 108, 255, .08));
    color: var(--text); border-color: rgba(111, 141, 255, .28); font-weight: 650;
}
.nav-sep { height: 1px; background: var(--line); margin: 8px 6px; }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

.main { padding: 22px clamp(16px, 2.4vw, 34px) 64px; min-width: 0; width: 100%; max-width: 1560px; margin: 0 auto; }
.topbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.topbar h1 { font-size: calc(var(--fs-title) + 4px); font-weight: var(--fw-title); letter-spacing: var(--ls-title); }
.topbar .app-select { min-width: 220px; }
.user-chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
    border: 1px solid var(--line); background: var(--input-bg); font-size: 13px;
}

.section { display: none; }
.section.active { display: block; animation: sectionIn .2s ease-out; }
@keyframes sectionIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.card { padding: 18px 20px; margin-bottom: 18px; }
.card-head {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin: -2px 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.card-head h2 { font-size: var(--fs-title); }
.card-head .muted { font-size: 12.5px; }

/* ---------------------------------------------------- 统计卡片 */

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat {
    border: 1px solid var(--glass-border); border-radius: var(--radius-sm); padding: 14px 15px;
    background: rgba(var(--panel-rgb), .35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10);
}
.stat .k { font-size: var(--fs-aux); font-weight: var(--fw-aux); letter-spacing: var(--ls-aux); opacity: var(--op-aux); color: var(--muted); }
.stat .v { font-size: var(--fs-display); font-weight: var(--fw-display); letter-spacing: var(--ls-display); opacity: var(--op-display); margin-top: 2px; }
.stat .v.small-v { font-size: calc(var(--fs-display) - 7px); }

.bar-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 13px; }
.bar-row .label { width: 96px; color: var(--muted); flex: none; }
.bar-row .track { flex: 1; height: 8px; border-radius: 999px; background: var(--input-bg); overflow: hidden; }
.bar-row .fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.bar-row .num { width: 54px; text-align: right; }

/* ---------------------------------------------------- 表格 */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(var(--panel-rgb), .26); }
.card-scroll { max-height: calc(100vh - 330px); overflow: auto; }
.card-scroll table.data { min-width: 760px; }
.card-scroll table.data thead th { position: sticky; top: 0; z-index: 2; }
table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-body); font-weight: var(--fw-body); letter-spacing: var(--ls-body); min-width: 720px; }
table.data th, table.data td { padding: 10px 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.data th { color: var(--muted); font-size: var(--fs-aux); font-weight: var(--fw-aux); letter-spacing: var(--ls-aux); opacity: var(--op-aux); background: rgba(var(--panel-rgb), .88); position: sticky; top: 0; white-space: nowrap; backdrop-filter: blur(8px); }
table.data tbody tr { transition: background .14s; }
table.data tbody tr:hover { background: var(--hover); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.actions { white-space: nowrap; }

.badge {
    display: inline-block; padding: 2px 9px; border-radius: 999px;
    font-size: var(--fs-aux); font-weight: var(--fw-aux); letter-spacing: var(--ls-aux);
    background: rgba(139, 147, 167, .16); color: var(--muted);
}
.badge.ok { background: rgba(65, 209, 139, .15); color: var(--ok); }
.badge.warn { background: rgba(242, 184, 75, .15); color: var(--warn); }
.badge.danger { background: rgba(255, 107, 107, .15); color: var(--danger); }
.badge.info { background: rgba(111, 141, 255, .15); color: var(--accent); }

.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 14px; font-size: 13px; }
.empty { padding: 38px 12px; text-align: center; color: var(--muted); font-size: var(--fs-aux); opacity: var(--op-aux); }

/* ---------------------------------------------------- 模态框 */

.modal-mask {
    position: fixed; inset: 0; background: rgba(5, 8, 14, .58);
    backdrop-filter: blur(8px) saturate(110%);
    -webkit-backdrop-filter: blur(8px) saturate(110%);
    display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 60;
}
.modal { width: min(680px, 100%); max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; }
.modal.wide { width: min(980px, 100%); }
.modal-head { display: flex; align-items: center; padding: 15px 19px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: var(--fs-title); flex: 1; }
.modal-body { padding: 18px 19px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 13px 19px; border-top: 1px solid var(--line); }
.modal-error { color: var(--danger); font-size: 13px; margin-top: 10px; min-height: 18px; }

/* ---------------------------------------------------- 提示 */

#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 90; }
.toast {
    padding: 11px 15px; border-radius: 13px; color: var(--text); font-size: 13.5px;
    box-shadow: var(--shadow); animation: slideIn .18s ease-out; max-width: 340px;
}
.toast.error { border-color: rgba(255, 107, 107, .5); }
.toast.ok { border-color: rgba(65, 209, 139, .5); }
@keyframes slideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------- 登录页 / 首页 */

.page-center { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; position: relative; z-index: 1; }
.auth-card { width: min(400px, 100%); padding: 30px 28px; }
.auth-card h1 { font-size: calc(var(--fs-title) + 5px); margin-bottom: 4px; }
.auth-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.auth-card .btn { margin-top: 18px; }
.auth-foot { margin-top: 16px; font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; }
.alert { padding: 10px 12px; border-radius: 11px; font-size: 13px; margin-bottom: 12px; }
.alert.error { background: rgba(255, 107, 107, .12); border: 1px solid rgba(255, 107, 107, .4); color: #ffb8b8; }
.alert.ok { background: rgba(65, 209, 139, .12); border: 1px solid rgba(65, 209, 139, .4); color: #a8f0ca; }

.page-landing { display: flex; align-items: center; justify-content: center; padding: 24px; position: relative; z-index: 1; }
.landing { width: min(680px, 100%); }
.landing-card { padding: 38px 34px; text-align: center; }
.landing-title { font-size: var(--fs-display); font-weight: var(--fw-display); letter-spacing: var(--ls-display); margin-bottom: 10px; }
.landing-desc { color: var(--muted); font-size: 13.5px; margin: 0 0 24px; }
.landing-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.landing-tip { margin-top: 22px; font-size: 12.5px; color: var(--muted); }

.theme-toggle {
    border: 1px solid var(--line); background: var(--input-bg); color: var(--text);
    border-radius: 10px; width: 34px; height: 34px; cursor: pointer; font-size: 15px;
}
.theme-toggle:hover { background: var(--hover); }

/* ---------------------------------------------------- 代码块 / API 示例 */

pre.code {
    background: var(--input-bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 13px 15px; overflow-x: auto; font-size: 12.5px; line-height: 1.6; color: var(--text);
}
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.api-request { margin-top: 14px; }
.api-request h3 { font-size: 13.5px; margin-bottom: 6px; color: var(--text); }
.api-request .muted { font-size: 12px; margin-bottom: 6px; }
.audit-detail summary { cursor: pointer; color: var(--accent); }
.audit-detail pre {
    margin: 6px 0 0; padding: 8px 10px; max-height: 220px; overflow: auto;
    white-space: pre-wrap; word-break: break-all; font-size: 11.5px;
    background: var(--input-bg); border: 1px solid var(--line); border-radius: 8px;
}

/* 代理管理：按应用分组的配置卡片 */
.app-config-grid { display: grid; gap: 12px; }
.app-config-card {
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 13px 14px; background: rgba(var(--panel-rgb), .30);
}
.app-config-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.app-config-head .name { font-weight: 650; }
.app-config-body { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.app-config-body.disabled { opacity: .48; pointer-events: none; }
.config-types { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.config-types label { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text); }
.config-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.config-prices label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.config-note { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* 代理表格中的紧凑应用摘要 */
.app-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.app-chip {
    display: inline-flex; align-items: center; gap: 4px; max-width: 220px;
    padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px;
    background: rgba(var(--panel-rgb), .36); font-size: 12px; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.app-chip b { color: var(--accent); font-weight: 650; }

/* 带滑块的实时外观参数 */
.range-field { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(var(--panel-rgb), .28); }
.range-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: var(--fs-aux); font-weight: var(--fw-aux); letter-spacing: var(--ls-aux); color: var(--muted); }
.range-head span { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
input[type=range] {
    width: 100%; margin: 10px 0 2px; accent-color: var(--accent); cursor: pointer;
    height: 4px; border-radius: 999px; appearance: none; -webkit-appearance: none;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
    background: #fff; border: 2px solid var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
input[type=range]::-moz-range-thumb {
    width: 14px; height: 14px; border-radius: 50%; background: #fff;
    border: 2px solid var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,.35);
}

/* 标题与数据卡片保持居中；表格/表单保持左对齐可读 */
.card-head h2, .card-head .muted, .stat, .empty, .auth-card, .landing-card { text-align: center; }
table.data th { text-align: center; }
table.data td { text-align: center; }
table.data td.actions { text-align: center; }

/* ---------------------------------------------------- 响应式 */

/* 统一视觉细节：更清晰的层级、可读的磨砂表面 */
.layout { grid-template-columns: 256px minmax(0, 1fr); }
.sidebar { padding: 22px 16px; }
.topbar { padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.topbar h1 { line-height: 1.2; }
.card { padding: 20px 22px; }
.card-head { padding-bottom: 13px; }
.nav-item.active { box-shadow: inset 3px 0 0 var(--accent); }
.stat { background: linear-gradient(145deg, rgba(255, 255, 255, .075), transparent 55%), rgba(var(--panel-rgb), .36); }
.table-wrap { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
.btn { border-radius: 10px; }
.btn-primary { box-shadow: 0 8px 24px rgba(111, 141, 255, .24); }
.modal { box-shadow: 0 32px 80px rgba(0, 0, 0, .38), var(--glass-inner); }
.auth-card, .landing-card { padding: 34px 30px; }

/* ---------------------------------------------------- 响应式 */

@media (max-width: 980px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar {
        position: static; height: auto; flex-direction: row; flex-wrap: wrap;
        border-right: 0; border-bottom: 1px solid var(--line); padding: 12px;
    }
    .brand { padding: 0 8px; }
    .sidebar-foot { display: none; }
    .nav-sep { display: none; }
    .main { padding: 16px; }
}

@media (max-width: 560px) {
    .topbar h1 { font-size: 18px; }
    .topbar .app-select { min-width: 100%; order: 5; }
    .card { padding: 15px 14px; }
    .modal-mask { padding: 10px; }
}