/* ==========================================================
   空间秒赞秒评系统 - 设计系统
   支持浅色 / 深色自动切换，PC 与移动端同套样式
   ========================================================== */

:root {
    --brand: #2f6bff;
    --brand-dark: #1f4fd6;
    --brand-soft: rgba(47, 107, 255, .1);
    --accent: #12b886;
    --warn: #f08c00;
    --danger: #e03131;

    --bg: #f4f6fb;
    --bg-soft: #eef1f8;
    --surface: #ffffff;
    --surface-2: #fafbfe;
    --border: #e3e8f0;
    --border-strong: #ccd4e3;

    --text: #1c2333;
    --text-2: #5b6478;
    --text-3: #8b94a7;

    --shadow-sm: 0 1px 2px rgba(20, 30, 60, .06);
    --shadow: 0 6px 20px rgba(20, 30, 60, .08);
    --shadow-lg: 0 18px 48px rgba(20, 30, 60, .16);

    --radius: 14px;
    --radius-sm: 9px;
    --radius-lg: 20px;

    --sidebar-w: 236px;
    --topbar-h: 60px;
    --bottom-h: 58px;

    --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, "Hiragino Sans GB", sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

[data-theme="dark"] {
    --brand: #5b8cff;
    --brand-dark: #3f74f5;
    --brand-soft: rgba(91, 140, 255, .16);
    --accent: #2dd4a7;
    --warn: #ffc078;
    --danger: #ff6b6b;

    --bg: #0e1219;
    --bg-soft: #141a24;
    --surface: #171d28;
    --surface-2: #1c2331;
    --border: #262f3f;
    --border-strong: #344053;

    --text: #e8ecf4;
    --text-2: #a4b0c4;
    --text-3: #75839a;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 6px 20px rgba(0, 0, 0, .35);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }

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

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}

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

img { max-width: 100%; }

h1, h2, h3, h4 { margin: 0 0 12px; font-weight: 600; line-height: 1.35; }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
p { margin: 0 0 12px; }

.ico { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico-lg { width: 24px; height: 24px; }
.ico-xl { width: 30px; height: 30px; }

/* ---------------- 布局 ---------------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    flex: none;
    background: var(--surface);
    border-right: 1px solid var(--border);
    position: fixed;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    z-index: 40;
}

.sidebar-brand {
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    overflow: hidden;
}
.sidebar-brand .brand-mark {
    width: 30px; height: 30px; border-radius: 9px;
    background: linear-gradient(135deg, var(--brand), #7d4bff);
    display: grid; place-items: center;
    color: #fff; font-size: 13px; font-weight: 700; flex: none;
}
.sidebar-brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 10px 20px; }
.nav-group-title {
    font-size: 11px; color: var(--text-3); letter-spacing: .08em;
    padding: 12px 10px 6px; text-transform: uppercase;
}
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: var(--radius-sm);
    color: var(--text-2); font-size: 13.5px; margin-bottom: 2px;
    transition: background .16s ease, color .16s ease;
}
.nav-item:hover { background: var(--bg-soft); color: var(--text); }
.nav-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-item .nav-badge {
    margin-left: auto; font-size: 11px; background: var(--bg-soft);
    color: var(--text-2); border-radius: 20px; padding: 0 7px; min-width: 20px; text-align: center;
}

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }

.topbar {
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 12px;
    padding: 0 20px;
    position: sticky; top: 0; z-index: 30;
}
.topbar h1 { margin: 0; font-size: 17px; font-weight: 600; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
    width: 36px; height: 36px; border-radius: 10px;
    display: grid; place-items: center;
    border: 1px solid var(--border); background: var(--surface);
    color: var(--text-2); cursor: pointer; transition: .16s ease;
}
.icon-btn:hover { border-color: var(--border-strong); color: var(--text); }
.icon-btn.ghost { border-color: transparent; background: transparent; }

.user-chip {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 10px 5px 5px; border-radius: 30px;
    border: 1px solid var(--border); background: var(--surface);
    cursor: pointer; color: var(--text); font-size: 13px;
}
.avatar {
    width: 26px; height: 26px; border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), #7d4bff);
    color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600;
}

.content { padding: 20px; flex: 1; }
.content-narrow { max-width: 1180px; margin: 0 auto; }

/* ---------------- 移动端底部导航 ---------------- */
.bottom-nav {
    display: none;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    height: var(--bottom-h);
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; font-size: 11px; color: var(--text-3);
}
.bottom-nav a.active { color: var(--brand); }
.bottom-nav .ico { width: 20px; height: 20px; }

.mobile-only { display: none; }

/* ---------------- 卡片 ---------------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
    overflow: hidden;
}
.card-head {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px; border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}
.card-head h2, .card-head h3 { margin: 0; font-size: 15px; }
.card-head .card-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 18px; }
.card-body.tight { padding: 12px 18px; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface-2); }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-sidebar { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }

/* ---------------- 统计块 ---------------- */
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    display: flex; align-items: center; gap: 14px;
    box-shadow: var(--shadow-sm);
}
.stat-icon {
    width: 42px; height: 42px; border-radius: 12px;
    display: grid; place-items: center; flex: none;
    background: var(--brand-soft); color: var(--brand);
}
.stat-icon.green { background: rgba(18, 184, 134, .12); color: var(--accent); }
.stat-icon.orange { background: rgba(240, 140, 0, .12); color: var(--warn); }
.stat-icon.red { background: rgba(224, 49, 49, .12); color: var(--danger); }
.stat-value { font-size: 22px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 12.5px; color: var(--text-3); }

/* ---------------- 按钮 ---------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 38px; padding: 0 16px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--surface);
    color: var(--text); font-size: 13.5px; font-family: inherit;
    cursor: pointer; transition: .16s ease; white-space: nowrap;
}
.btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-success { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-success:hover { opacity: .9; color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { opacity: .9; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------- 表单 ---------------- */
.form-row { margin-bottom: 16px; }
.form-label {
    display: block; font-size: 13px; color: var(--text-2);
    margin-bottom: 6px; font-weight: 500;
}
.form-label .req { color: var(--danger); margin-left: 3px; }
.input, .select, .textarea {
    width: 100%; height: 40px; padding: 0 12px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text);
    font-size: 14px; font-family: inherit; transition: .16s ease;
    -webkit-appearance: none; appearance: none;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.6; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
    outline: none; border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b94a7' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px;
}
.form-hint { font-size: 12px; color: var(--text-3); margin-top: 5px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.checkbox, .radio { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.checkbox input, .radio input { width: 15px; height: 15px; accent-color: var(--brand); }

.switch-group { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-weight: 600; color: var(--text-2); background: var(--surface-2); font-size: 12.5px; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--surface-2); }
.table .nowrap { white-space: nowrap; }
.table .actions { white-space: nowrap; text-align: right; }
.table .actions .btn { margin-left: 6px; }

/* ---------------- 标签 ---------------- */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 9px; border-radius: 20px;
    font-size: 12px; line-height: 1.7; font-weight: 500;
    background: var(--bg-soft); color: var(--text-2);
}
.badge-success { background: rgba(18, 184, 134, .14); color: var(--accent); }
.badge-warn { background: rgba(240, 140, 0, .14); color: var(--warn); }
.badge-danger { background: rgba(224, 49, 49, .13); color: var(--danger); }
.badge-info { background: var(--brand-soft); color: var(--brand); }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------------- 提示 ---------------- */
.alert {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 12px 14px; border-radius: var(--radius-sm);
    font-size: 13.5px; margin-bottom: 16px;
    border: 1px solid var(--border); background: var(--surface-2);
}
.alert .ico { margin-top: 2px; }
.alert-success { border-color: rgba(18, 184, 134, .35); background: rgba(18, 184, 134, .1); color: var(--accent); }
.alert-error { border-color: rgba(224, 49, 49, .3); background: rgba(224, 49, 49, .09); color: var(--danger); }
.alert-warning { border-color: rgba(240, 140, 0, .3); background: rgba(240, 140, 0, .1); color: var(--warn); }
.alert-info { border-color: var(--brand-soft); background: var(--brand-soft); color: var(--brand); }

.notice-stack { position: fixed; top: 14px; right: 14px; z-index: 999; width: min(360px, calc(100vw - 28px)); }
.notice-item {
    background: var(--surface); border: 1px solid var(--border);
    border-left: 3px solid var(--brand);
    border-radius: var(--radius-sm); padding: 11px 14px; margin-bottom: 10px;
    box-shadow: var(--shadow); font-size: 13.5px;
    display: flex; gap: 9px; align-items: flex-start;
    animation: slideIn .22s ease;
}
.notice-item.success { border-left-color: var(--accent); }
.notice-item.error { border-left-color: var(--danger); }
.notice-item.warning { border-left-color: var(--warn); }
@keyframes slideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------------- 空状态 ---------------- */
.empty { text-align: center; padding: 44px 20px; color: var(--text-3); }
.empty .ico { width: 40px; height: 40px; opacity: .45; margin-bottom: 10px; }
.empty p { margin: 0; font-size: 13.5px; }

/* ---------------- 列表条目 ---------------- */
.list-item {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 18px; border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: none; }
.list-item .li-main { flex: 1; min-width: 0; }
.list-item .li-title { font-weight: 500; font-size: 13.8px; }
.list-item .li-sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.list-item .li-right { margin-left: auto; text-align: right; flex: none; }

/* ---------------- 图表 ---------------- */
.chart {
    display: flex; align-items: flex-end; gap: 10px;
    height: 160px; padding: 12px 4px 0;
}
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart-bar {
    width: 100%; max-width: 26px; border-radius: 5px 5px 2px 2px;
    background: linear-gradient(180deg, var(--brand), #7d4bff);
    min-height: 3px; position: relative;
}
.chart-bar.alt { background: linear-gradient(180deg, var(--accent), #0ca678); }
.chart-label { font-size: 11px; color: var(--text-3); }
.chart-legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-2); margin-top: 10px; }
.chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }

/* ---------------- 进度条 ---------------- */
.progress { height: 7px; border-radius: 6px; background: var(--bg-soft); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #7d4bff); border-radius: 6px; }

/* ---------------- 模态框 ---------------- */
.modal-mask {
    position: fixed; inset: 0; background: rgba(15, 20, 32, .48);
    display: none; align-items: center; justify-content: center;
    z-index: 200; padding: 18px; backdrop-filter: blur(2px);
}
.modal-mask.show { display: flex; }
.modal {
    background: var(--surface); border-radius: var(--radius-lg);
    width: min(520px, 100%); max-height: 88vh; overflow: auto;
    box-shadow: var(--shadow-lg);
    animation: popIn .18s ease;
}
.modal.wide { width: min(760px, 100%); }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.modal-head h3 { margin: 0; font-size: 15.5px; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
@keyframes popIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

/* ---------------- 选项卡 ---------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tab {
    padding: 9px 14px; font-size: 13.5px; color: var(--text-2);
    border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer;
}
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------------- 首页 ---------------- */
.hero {
    background:
        radial-gradient(900px 340px at 12% -10%, rgba(125, 75, 255, .18), transparent 62%),
        radial-gradient(760px 320px at 88% 0%, rgba(47, 107, 255, .16), transparent 60%),
        var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 56px 20px 52px;
    text-align: center;
}
.hero-inner { max-width: 940px; margin: 0 auto; }
.hero h1 { font-size: 34px; letter-spacing: -.5px; margin-bottom: 14px; }
.hero p.lead { font-size: 15.5px; color: var(--text-2); max-width: 680px; margin: 0 auto 26px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 14px; border-radius: 30px;
    background: var(--brand-soft); color: var(--brand);
    font-size: 12.5px; margin-bottom: 18px;
}
.section { max-width: 1180px; margin: 0 auto; padding: 44px 20px; }
.section-title { text-align: center; margin-bottom: 30px; }
.section-title h2 { font-size: 24px; }
.section-title p { color: var(--text-2); font-size: 14px; }

.feature-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
    transition: transform .18s ease, box-shadow .18s ease;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-icon {
    width: 42px; height: 42px; border-radius: 12px;
    background: var(--brand-soft); color: var(--brand);
    display: grid; place-items: center; margin-bottom: 13px;
}
.feature-card h3 { font-size: 15px; margin-bottom: 6px; }
.feature-card p { font-size: 13px; color: var(--text-2); margin: 0; }

.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 18px; }
.page-head .spacer { flex: 1; }

.kv { display: grid; grid-template-columns: 116px 1fr; gap: 8px 14px; font-size: 13.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; }

.auth-wrap { max-width: 940px; margin: 0 auto; padding: 42px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: center; }
.auth-side h2 { font-size: 25px; margin-bottom: 12px; }
.auth-side p { color: var(--text-2); font-size: 14px; }
.auth-points { list-style: none; padding: 0; margin: 18px 0 0; }
.auth-points li { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 9px; font-size: 13.5px; color: var(--text-2); }
.auth-points .ico { color: var(--accent); margin-top: 3px; }

.qr-box { text-align: center; padding: 8px 0; }
.qr-box img { width: 210px; height: 210px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: #fff; }
.qr-status { margin-top: 12px; font-size: 13.5px; color: var(--text-2); }

.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.price-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px; text-align: center;
    position: relative; transition: .18s ease;
}
.price-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.price-card .price { font-size: 27px; font-weight: 700; margin: 6px 0; }
.price-card .price small { font-size: 13px; font-weight: 500; color: var(--text-3); }
.price-card .desc { font-size: 12.5px; color: var(--text-2); min-height: 34px; }
.price-card .tag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); font-size: 11.5px; padding: 2px 10px; border-radius: 20px; background: var(--brand); color: #fff; }

/* ---------------- 错误页 ---------------- */
.error-page { text-align: center; padding: 80px 20px; }
.error-page .code { font-size: 62px; font-weight: 700; color: var(--brand); line-height: 1; }
.error-page p { color: var(--text-2); margin: 14px 0 22px; }

/* ---------------- 代码块 ---------------- */
.code-block {
    background: var(--bg-soft); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 12px 14px;
    font-family: var(--mono); font-size: 12.5px; line-height: 1.75;
    overflow-x: auto; white-space: pre-wrap; word-break: break-all;
    color: var(--text);
}
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row .code-block { flex: 1; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-sidebar { grid-template-columns: minmax(0, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .sidebar { display: none; }
    .main { margin-left: 0; }
    .bottom-nav { display: flex; }
    .content { padding: 14px 12px calc(var(--bottom-h) + 18px); }
    .mobile-only { display: block; }
    .desktop-only { display: none !important; }
    .hero { padding: 38px 16px 36px; }
    .hero h1 { font-size: 25px; }
    .grid-2, .grid-3, .grid-4, .form-grid, .form-grid-3 { grid-template-columns: minmax(0, 1fr); }
    .auth-wrap { grid-template-columns: minmax(0, 1fr); padding: 26px 16px; }
    .topbar { padding: 0 12px; }
    .topbar h1 { font-size: 15.5px; }
    .kv { grid-template-columns: 92px 1fr; }

    /* 表格转卡片 */
    .table.responsive thead { display: none; }
    .table.responsive tbody tr {
        display: block; border: 1px solid var(--border);
        border-radius: var(--radius-sm); margin-bottom: 10px; padding: 6px 0;
        background: var(--surface);
    }
    .table.responsive tbody td {
        display: flex; justify-content: space-between; gap: 14px;
        border: none; padding: 6px 12px; text-align: right;
    }
    .table.responsive tbody td::before {
        content: attr(data-label); font-size: 12.5px; color: var(--text-3);
        text-align: left; font-weight: 500; flex: none;
    }
    .table.responsive tbody td.actions { justify-content: flex-end; }
    .table.responsive tbody td.actions::before { content: ""; }
    .table.responsive tbody td:empty { display: none; }
}

@media (max-width: 520px) {
    .card-body { padding: 14px; }
    .card-head { padding: 12px 14px; }
    .stat-card { padding: 13px 14px; }
    .stat-value { font-size: 19px; }
    .btn { height: 36px; padding: 0 13px; }
    .section { padding: 30px 14px; }
}

/* 打印 */
@media print {
    .sidebar, .topbar, .bottom-nav, .btn { display: none !important; }
    .main { margin-left: 0; }
}
