/* ============ 续费管理系统 深色主题全局样式 ============ */
:root {
    --bg: #0b1120;
    --surface: #151b2b;
    --surface-hover: #1e293b;
    --border: #273148;
    --text: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    --accent-soft: rgba(56, 189, 248, .15);
    --success: #22c55e;
    --success-soft: rgba(34, 197, 94, .15);
    --warn: #f59e0b;
    --warn-soft: rgba(245, 158, 11, .15);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, .15);
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--surface-hover); padding: 1px 5px; border-radius: 4px; font-size: 12px; color: var(--accent); }

/* ---- 布局 ---- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 220px; background: #0f172a; color: #cbd5e1; flex-shrink: 0;
    display: flex; flex-direction: column; padding: 16px 0; border-right: 1px solid var(--border);
}
.sidebar .brand { color: var(--accent); font-weight: 700; font-size: 17px; padding: 8px 20px 18px; }
.nav { display: flex; flex-direction: column; }
.nav-item {
    display: flex; align-items: center; gap: 8px; padding: 11px 20px; color: #cbd5e1; font-size: 14px;
}
.nav-item:hover { background: var(--surface-hover); text-decoration: none; color: #fff; }
.nav-item.active { background: var(--accent-soft); color: var(--accent); border-right: 3px solid var(--accent); }
.nav-ico { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; color: currentColor; }
.badge { margin-left: auto; background: var(--danger); color: #fff; border-radius: 10px; padding: 1px 7px; font-size: 11px; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
    height: 56px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex;
    align-items: center; justify-content: space-between; padding: 0 18px; position: sticky; top: 0; z-index: 20;
}
.topbar-title { font-weight: 600; font-size: 16px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.points-pill { background: var(--warn-soft); color: var(--warn); padding: 4px 10px; border-radius: 20px; font-size: 13px; text-decoration: none; cursor: pointer; transition: background .15s, box-shadow .15s; }
.points-pill:hover { background: var(--warn); color: #0b1120; text-decoration: none; box-shadow: 0 0 0 3px var(--warn-soft); }
.points-change { font-weight: 700; font-family: var(--font-mono); }
.points-change.positive { color: var(--success); }
.points-change.negative { color: var(--danger); }
.user-chip { color: var(--text-secondary); font-size: 13px; text-decoration: none; transition: color .15s; display: inline-flex; align-items: center; }
.user-chip:hover { color: var(--accent); text-decoration: none; }
.menu-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text); }

.content { padding: 18px; flex: 1; }

/* ---- 按钮 ---- */
.btn {
    display: inline-block; padding: 8px 16px; border-radius: 8px; border: 1px solid transparent;
    font-size: 14px; cursor: pointer; text-align: center; line-height: 1.2;
    transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #0f172a; font-weight: 600; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: var(--surface-hover); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface); }
.btn-block { width: 100%; }
.mini {
    border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 6px;
    padding: 3px 8px; font-size: 12px; cursor: pointer; margin: 1px; transition: .15s;
}
.mini:hover { background: var(--surface-hover); border-color: var(--accent); color: var(--accent); }
.mini.danger { color: var(--danger); border-color: rgba(239,68,68,.4); }
.mini.danger:hover { background: var(--danger-soft); }

/* ---- 卡片 / 面板 ---- */
/* ===== Hero 概览 ===== */
.dash-hero {
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
    background: linear-gradient(120deg, #0e1a33 0%, #152747 45%, #0b2540 100%);
    border: 1px solid var(--border); border-radius: 18px; padding: 26px 30px; margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.dash-hero::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(600px 200px at 12% 20%, rgba(56,189,248,.18), transparent 60%),
                radial-gradient(500px 220px at 90% 80%, rgba(168,85,247,.16), transparent 60%);
    pointer-events: none;
}
.hero-glow {
    position: absolute; width: 360px; height: 360px; right: -120px; top: -160px; border-radius: 50%;
    background: radial-gradient(circle, rgba(56,189,248,.30), transparent 65%);
    filter: blur(10px); animation: heroFloat 9s ease-in-out infinite; pointer-events: none;
}
@keyframes heroFloat {
    0%,100% { transform: translate(0,0) scale(1); opacity: .55; }
    50% { transform: translate(-30px, 26px) scale(1.12); opacity: .85; }
}
.hero-left { position: relative; z-index: 1; }
.hero-kicker { font-size: 12px; letter-spacing: 2px; color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.hero-title { margin: 0 0 8px; font-size: 30px; font-weight: 800; letter-spacing: 1px;
    background: linear-gradient(90deg, #fff, #bae6fd); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-desc { margin: 0; color: var(--text-secondary); font-size: 14px; }
.hero-right { position: relative; z-index: 1; text-align: right; }
.hero-clock { font-size: 34px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: 2px; text-shadow: 0 0 18px rgba(56,189,248,.4); }
.hero-date { color: var(--text-secondary); font-size: 13px; margin-top: 2px; }

/* ===== 卡片 / 面板 基础（含入场动画） ===== */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card {
    position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 14px;
    background: linear-gradient(135deg, var(--surface), var(--surface-hover));
    border-radius: 14px; padding: 18px 20px; color: var(--text);
    box-shadow: var(--shadow); border: 1px solid var(--border);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.stat-card::after {
    content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.10), transparent);
    transform: skewX(-20deg); transition: left .6s ease;
}
.stat-card:hover { text-decoration: none; transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 12px 28px rgba(0,0,0,.32); }
.stat-card:hover::after { left: 120%; }
.stat-ico { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 13px; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(0,0,0,.3); }
.stat-ico svg { width: 25px; height: 25px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico-blue { background: linear-gradient(135deg, #2563eb, #38bdf8); }
.ico-green { background: linear-gradient(135deg, #10b981, #34d399); }
.ico-amber { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.ico-red { background: linear-gradient(135deg, #ef4444, #fb7185); }
.stat-body { min-width: 0; }
.stat-num { font-size: 32px; font-weight: 800; color: #fff; line-height: 1.05; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--text-secondary); font-size: 13px; margin-top: 4px; }
.stat-sub { color: var(--text-muted); font-size: 12px; margin-top: 3px; }
.stat-sub b { color: var(--accent); font-weight: 700; }

.panel { background: var(--surface); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.panel:has(> .panel-head) { padding: 0; }
.panel:has(> .panel-head) > .panel-body { padding: 18px 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.panel-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: #fff; }
.panel-head h3::before { content: ''; display: inline-block; width: 4px; height: 14px; background: var(--accent); border-radius: 2px; margin-right: 8px; vertical-align: -2px; }
.panel-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel-tag { font-size: 12px; color: var(--text-secondary); background: var(--surface-hover); border: 1px solid var(--border); border-radius: 20px; padding: 2px 10px; }
.chart-wrap { position: relative; width: 100%; height: 240px; }

/* ===== 系统信息 / 服务器信息面板 ===== */
.sysinfo-panel { grid-column: 1 / -1; }
.sysinfo-panel .panel-body,
.sysinfo-panel .sysinfo-body { padding: 0; }
.sysinfo-panel .panel-head h3 { display: inline-flex; align-items: center; gap: 8px; }
.sysinfo-panel .panel-head h3::before { display: none; }
.panel-ico { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.sysinfo-body { display: block; }
.sysinfo-row {
    display: grid;
    grid-template-columns: 110px 1fr 110px 1fr;
    gap: 0;
    align-items: center;
    padding: 13px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    transition: background .15s;
}
.sysinfo-row:last-child { border-bottom: none; }
.sysinfo-row:hover { background: rgba(56,189,248,.06); }
.sysinfo-label {
    color: var(--text-secondary);
    text-align: right;
    white-space: nowrap;
    padding-right: 12px;
    border-right: 1px solid var(--border);
    min-height: 18px;
}
.sysinfo-value {
    color: var(--text);
    font-weight: 500;
    word-break: break-word;
    padding-left: 12px;
    border-right: 1px solid var(--border);
    min-height: 18px;
}
/* 第二组 label 左边距，与第一组 value 分隔 */
.sysinfo-label:nth-of-type(2) { padding-left: 20px; border-left: 1px solid var(--border); border-right: none; text-align: right; padding-right: 12px; }
.sysinfo-value:nth-of-type(2) { border-right: none; padding-left: 12px; }

@media (max-width: 1100px) {
    .sysinfo-row { grid-template-columns: 100px 1fr 100px 1fr; padding: 12px 16px; }
    .sysinfo-label { padding-right: 10px; }
    .sysinfo-value { padding-left: 10px; }
    .sysinfo-label:nth-of-type(2) { padding-left: 16px; padding-right: 10px; }
    .sysinfo-value:nth-of-type(2) { padding-left: 10px; }
}
@media (max-width: 768px) {
    .sysinfo-row { grid-template-columns: 90px 1fr; }
    .sysinfo-label:nth-of-type(2),
    .sysinfo-value:nth-of-type(2) { display: none; }
    .sysinfo-row::after { content: ''; }
}

/* ===== 供应商排行进度条 ===== */
.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.rank-no { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: var(--surface-hover); color: var(--text-secondary); }
.rank-no.n1 { background: linear-gradient(135deg,#f59e0b,#fde68a); color: #3b2a00; }
.rank-no.n2 { background: linear-gradient(135deg,#94a3b8,#e2e8f0); color: #1f2937; }
.rank-no.n3 { background: linear-gradient(135deg,#b45309,#fdba74); color: #2b1500; }
.rank-main { flex: 1; min-width: 0; }
.rank-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.rank-name { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-val { font-size: 14px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.rank-bar { height: 6px; border-radius: 4px; background: var(--surface-hover); overflow: hidden; }
.rank-bar span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), #818cf8); transition: width 1s cubic-bezier(.22,1,.36,1); }

/* ===== 入场动画 ===== */
.reveal { opacity: 0; transform: translateY(16px); animation: fadeUp .6s cubic-bezier(.22,1,.36,1) forwards; animation-delay: calc(var(--i, 0) * .07s); }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; opacity: 1; transform: none; } .hero-glow { animation: none; } }

/* ---- 工具栏 / 筛选 ---- */
.toolbar { margin-bottom: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filter-bar { background: var(--surface); border-radius: 10px; padding: 12px; margin-bottom: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; border: 1px solid var(--border); }
.f-input { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; min-width: 130px; background: var(--bg); color: var(--text); }
.f-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.legend { display: flex; gap: 16px; margin: 8px 0 14px; font-size: 12px; color: var(--text-secondary); flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 5px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.warn-green { background: var(--success); } .warn-yellow { background: var(--warn); }
.warn-red { background: var(--danger); } .warn-gray { background: var(--text-muted); }

/* ---- 表格 ---- */
.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
.data-table th { background: var(--surface-hover); color: var(--text-secondary); font-weight: 600; box-shadow: 0 1px 0 var(--border); }
.data-table tbody tr { height: 50px; }
.data-table tbody tr:hover { background: rgba(56,189,248,.08); }
.data-table a { color: var(--accent); }
.data-table a:hover { text-decoration: underline; }
.th-check, .td-check { width: 44px; text-align: center; padding-left: 16px; padding-right: 8px; }
.text-right { text-align: right !important; }
.days-left { display: block; font-size: 11px; color: var(--text-secondary); }
.actions { white-space: normal; }
.data-table td.actions { text-align: left; }
.tag-archived { font-size: 11px; background: var(--surface-hover); color: var(--text-secondary); padding: 1px 6px; border-radius: 4px; margin-left: 4px; }
.pill { display: inline-flex; align-items: center; gap: 5px; background: var(--surface-hover); border: 1px solid var(--border); border-radius: 20px; padding: 5px 12px; font-size: 13px; color: var(--text); transition: .15s; }
.pill:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.pill.red { color: var(--danger); border-color: rgba(239,68,68,.4); }
.pill.red:hover, .pill.red.active { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.pill.yellow { color: var(--warn); border-color: rgba(245,158,11,.4); }
.pill.yellow:hover, .pill.yellow.active { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.pill.success { color: var(--success); border-color: rgba(34,197,94,.4); }
.pill.success:hover, .pill.success.active { background: var(--success-soft); border-color: var(--success); color: var(--success); }
.pill.danger { color: var(--danger); border-color: rgba(239,68,68,.4); }
.pill.danger:hover, .pill.danger.active { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }

/* 用于带圆角边框的大表格（产品列表等） */
.table-wrap { border-radius: 10px; border: 1px solid var(--border); overflow: visible; box-shadow: var(--shadow); }
.table-wrap > .data-table { border: none; border-radius: 10px; box-shadow: none; overflow: hidden; }

/* 分页条在面板底部时贴合面板 */
.panel-body > .pager-bar { margin: 14px -20px -18px -20px; padding: 14px 20px; border-radius: 0 0 13px 13px; border-width: 1px 0 0 0; box-shadow: none; background: transparent; }
.panel-body > .pager-bar .pager { flex: 1 1 auto; justify-content: center; }

.empty { text-align: center; color: var(--text-muted); padding: 40px; background: var(--surface); border-radius: 10px; border: 1px dashed var(--border); }
.muted { color: var(--text-muted); }

/* ---- 分页 ---- */
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 14px; }
.pager a, .pager .pager-link { display: inline-block; padding: 6px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: var(--text); text-decoration: none; }
.pager a:hover, .pager .pager-link:hover { background: var(--surface-hover); border-color: var(--accent); }
.pager .pager-link.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.pager-info { background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 20px; }

.pager-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; margin-top: 14px; box-shadow: var(--shadow); }
.pager-bar .pager { flex: 1 1 auto; justify-content: center; padding: 0; background: transparent; border: none; box-shadow: none; }
.pager-left, .pager-right { flex: 0 0 auto; display: flex; align-items: center; }
.pager-size { padding: 6px 26px 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 13px; cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }
.pager-size:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pager-total { font-size: 13px; color: var(--text-secondary); background: var(--surface-hover); padding: 4px 12px; border-radius: 20px; }

/* ---- 表格序号列 ---- */
.seq-col { width: 52px; text-align: center; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ---- 表单 ---- */
.field { margin-bottom: 14px; }
.field label, .form-row label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; color: var(--text-secondary); }
.field input, .field select, .field textarea,
.form-row input, .form-row select, .form-row textarea,
.product-form input, .product-form select, .product-form textarea,
.user-form input, .user-form select, .cfg-form input, .cfg-form select,
.opt-form input, .inv-form input, .tag-form input {
    width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit;
    background: var(--bg); color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus,
.form-row input:focus, .form-row select:focus, .form-row textarea:focus,
.product-form input:focus, .product-form select:focus, .product-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.checkbox { display: inline-flex; align-items: center; gap: 6px; font-weight: 400 !important; color: var(--text-secondary); }
.checkbox input { width: auto !important; }
.hint { color: var(--text-muted); font-size: 12px; }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; align-items: flex-end; }
.form-row > label { flex: 1; min-width: 160px; }
.form-row.checks { flex-direction: column; gap: 6px; align-items: flex-start; }
.form-row .btn { align-self: center; }
.form-actions { margin-top: 10px; display: flex; gap: 10px; }

/* 产品表单网格 + 美化 */
.product-form { padding: 0; background: transparent; }
.product-form .pf-body { padding: 18px 20px 6px; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 18px; }
.product-form fieldset { border: 1px solid var(--border); border-radius: 12px; padding: 14px 14px 16px; margin: 0; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.product-form fieldset:hover { border-color: var(--border-strong, #2b3650); }
.product-form legend { font-weight: 700; color: var(--accent); padding: 0 8px; font-size: 13px; letter-spacing: .3px; }
.product-form label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }
.product-form input, .product-form select, .product-form textarea { padding: 9px 11px; border-radius: 9px; transition: border-color .15s, box-shadow .15s, background .15s; }
.product-form input:hover, .product-form select:hover, .product-form textarea:hover { border-color: #2b3650; }
.product-form textarea { resize: vertical; min-height: 52px; }
.product-form .form-actions { position: sticky; bottom: 0; background: var(--surface); padding: 14px 20px; border-top: 1px solid var(--border); margin-top: 0; display: flex; gap: 10px; justify-content: flex-end; }
.product-form .form-actions .btn { min-width: 96px; padding: 9px 20px; }

/* 金额输入：¥ 前缀 + 等宽数字 */
.product-form .money-field { position: relative; display: block; }
.product-form .money-field::before { content: "\A5"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; pointer-events: none; }
.product-form input.money { padding-left: 26px; font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.tag-picker { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.tag-opt { display: inline-flex; align-items: center; gap: 4px; font-weight: 400 !important; }
.tag-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

/* ---- 标签云 ---- */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-item { display: flex; align-items: center; gap: 6px; background: var(--surface-hover); border: 1px solid var(--border); border-radius: 20px; padding: 5px 12px; }
.tag-name { cursor: pointer; user-select: none; }
.tag-name:hover { text-decoration: underline; }
.tag-scope { font-size: 11px; color: var(--text-muted); }
.tag-count { font-size: 11px; color: var(--text); background: var(--accent-soft); border-radius: 10px; padding: 1px 8px; }
.tag-ops a { margin-left: 4px; font-size: 12px; }
.rs-copy-tip { position: absolute; background: var(--success); color: #fff; padding: 3px 10px; border-radius: 4px; font-size: 12px; white-space: nowrap; z-index: 1000; pointer-events: none; box-shadow: 0 2px 6px rgba(0,0,0,.15); }

/* ---- 标签编辑器（新建/编辑） ---- */
.tag-editor-panel { padding: 0; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.tag-editor-panel.editing { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tag-editor-panel .panel-head { margin: 0; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.tag-editor-panel .panel-body { padding: 18px 20px; }
.tag-form { margin: 0; }
.tf-row { margin-bottom: 16px; }
.tf-row:last-of-type { margin-bottom: 0; }
.tf-row-2col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.tf-row-2col .tf-col { min-width: 0; }
.tf-row-inline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tf-row-inline .tf-label { margin-bottom: 0; }
.tf-label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 600; }
.tag-form input[type="text"],
.tag-form select { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; background: var(--bg); color: var(--text); font-family: inherit; transition: border-color .15s, box-shadow .15s; }
.tag-form input[type="text"]:focus,
.tag-form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tf-color { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tag-form input[type="color"] { width: 40px; height: 40px; padding: 3px; border: 1px solid var(--border); border-radius: 50%; background: var(--bg); cursor: pointer; flex: 0 0 auto; }
.tag-form input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.tag-form input[type="color"]::-webkit-color-swatch { border: none; border-radius: 50%; }
.tag-presets { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.tag-preset { width: 24px; height: 24px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: transform .12s, border-color .12s, box-shadow .12s; }
.tag-preset:hover { transform: scale(1.15); }
.tag-preset.active { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.tf-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.tf-preview { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-hover); border: 1px solid var(--border); border-radius: 20px; padding: 5px 14px; font-size: 13px; color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.tf-preview .tag-dot { width: 10px; height: 10px; }
.tf-msg { font-size: 13px; margin: -6px 0 12px; min-height: 18px; }
.tf-msg.err { color: var(--danger); }
.tf-msg.ok { color: var(--success); }
.tag-editor-panel .form-actions { margin-top: 6px; display: flex; gap: 10px; }
.tag-editor-panel .form-actions .btn { min-width: 88px; }

/* ---- 邀请码生成表单 ---- */
.inv-form .tf-row-inline { align-items: center; }
.inv-form input[type="number"] { width: 140px; }

/* ---- 是否已提醒 列 ---- */
.remind-status { white-space: nowrap; }
.reminded { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 10px; font-weight: 600; }
.reminded.yes { color: var(--success); background: var(--success-soft); }
.reminded.no { color: var(--text-muted); background: var(--surface-hover); }
.reminded-date { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ---- 消息中心 ---- */
.noti-list { list-style: none; padding: 0; margin: 0; }
.noti { display: flex; align-items: flex-start; gap: 12px; background: var(--surface); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; border-left: 3px solid var(--border); }
.noti.unread { border-left-color: var(--accent); background: var(--accent-soft); }
.noti-check { flex: 0 0 auto; padding-top: 2px; }
.noti-check input, .check-all input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.noti-body { flex: 1 1 auto; min-width: 0; }
.noti-head { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
.noti-time { font-size: 12px; color: var(--text-muted); font-weight: 400; white-space: nowrap; }
.noti-msg { color: var(--text-secondary); margin: 6px 0; font-size: 13px; word-break: break-word; }
.check-all { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); cursor: pointer; user-select: none; }
.btn-danger { background: var(--danger); color: #fff; font-weight: 600; border-color: transparent; }
.btn-danger:hover { background: #dc2626; }
.btn-danger:disabled { opacity: .5; cursor: not-allowed; }

/* ---- 提示条 ---- */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; transition: opacity .5s; border: 1px solid transparent; }
.flash-success { background: var(--success-soft); color: var(--success); border-color: rgba(34,197,94,.3); }
.flash-error { background: var(--danger-soft); color: var(--danger); border-color: rgba(239,68,68,.3); }
.flash-warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(245,158,11,.3); }

/* ---- 弹窗 ---- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,.65); }
.modal-box { position: relative; background: var(--surface); border-radius: var(--radius); width: min(960px, 94vw); max-height: 92vh; overflow: auto; box-shadow: var(--shadow); border: 1px solid var(--border); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--border); font-weight: 600; color: #fff; }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-secondary); line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 0; }

/* ---- 登录/注册 ---- */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: radial-gradient(ellipse at top, #1e293b 0%, #0b1120 60%); }
.auth-card { background: var(--surface); border-radius: 18px; padding: 34px; width: min(420px, 92vw); box-shadow: var(--shadow); border: 1px solid var(--border); }
.auth-title { margin: 0; font-size: 24px; text-align: center; background: linear-gradient(90deg, var(--accent), #60a5fa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.auth-sub { text-align: center; color: var(--text-secondary); font-size: 14px; margin: 6px 0 24px; }
.auth-foot { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 16px; }
.auth-foot a { color: var(--accent); text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }
.auth-foot-sep { margin: 0 8px; color: var(--border); }
.auth-submit { padding: 12px; font-size: 16px; border-radius: 10px; margin-top: 6px; }

.captcha-field .field label { margin-bottom: 8px; }
.captcha-display {
    background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
    height: 56px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
    font-size: 20px; font-weight: 700; letter-spacing: 1px; color: var(--accent);
}
.captcha-display img { height: 42px; border-radius: 6px; cursor: pointer; }
.captcha-answer-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.captcha-answer-row input { flex: 1; }
.captcha-answer-row .btn { white-space: nowrap; padding: 8px 18px; }
.captcha-type-row { display: flex; gap: 10px; margin-bottom: 8px; }
.captcha-type {
    flex: 1; padding: 7px 0; border-radius: 8px; border: 1px solid var(--border);
    background: var(--surface-hover); color: var(--text-secondary); cursor: pointer; transition: .15s;
}
.captcha-type:hover { border-color: var(--accent); color: var(--text); }
.captcha-type.active { background: var(--accent); color: #0f172a; border-color: var(--accent); font-weight: 600; }
.captcha-hint { text-align: center; font-size: 13px; color: var(--text-muted); margin: 4px 0 0; }
.captcha-hint.ok { color: var(--success); }
.captcha-hint.err { color: var(--danger); }

.row-between { display: flex; justify-content: space-between; align-items: center; }

/* ---- 看板图例（详见文件末尾响应式区补充） ---- */
.summary { list-style: none; padding: 0; margin: 4px 0; }
.summary li { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.summary li:last-child { border-bottom: none; }
.summary li span { color: var(--text-secondary); font-size: 13px; }
.summary b { color: #fff; font-size: 16px; font-weight: 700; }
.rank { list-style: none; margin: 4px 0 0; padding: 0; counter-reset: rank; }
.rank li { counter-increment: rank; display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.rank li:last-child { border-bottom: none; }
.rank li::before { content: counter(rank); flex: 0 0 auto; width: 22px; height: 22px; margin-right: 10px; border-radius: 50%; background: var(--surface-hover); color: var(--text-secondary); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.rank li:nth-child(1)::before { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #1f2937; }
.rank li:nth-child(2)::before { background: linear-gradient(135deg, #94a3b8, #cbd5e1); color: #1f2937; }
.rank li:nth-child(3)::before { background: linear-gradient(135deg, #b45309, #d97706); color: #fff; }
.rank-name { color: var(--text); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank b { color: var(--accent); font-size: 13px; white-space: nowrap; margin-left: 10px; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.panel-full { grid-column: 1 / -1; }

/* ---- 设置页：邮件模板帮助 ---- */
.panel-help { margin: 14px 0; padding: 12px; background: var(--surface-hover); border: 1px dashed var(--border); border-radius: 8px; }
.panel-help summary { cursor: pointer; font-weight: 600; color: var(--text); }
.tag-list { margin-top: 10px; }
.tag-list p { margin: 8px 0 4px; font-size: 12px; color: var(--text-muted); }
.tag-list code {
    display: inline-block; background: var(--bg); color: var(--accent);
    padding: 2px 6px; border-radius: 4px; font-size: 12px; margin: 2px 4px 2px 0;
}

/* ---- 响应式 ---- */
@media (max-width: 900px) {
    .cards { grid-template-columns: repeat(2, 1fr); }
    .form-grid { grid-template-columns: 1fr; }
    .dash-grid { grid-template-columns: 1fr; }
    .panel-full { grid-column: auto; }
    .tf-row-2col { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .dash-hero { flex-direction: column; align-items: flex-start; }
    .hero-right { text-align: left; }
    .cards { grid-template-columns: 1fr; }
    .hero-title { font-size: 24px; }
}
/* ---- 产品资产滚动列表 ---- */
.asset-table-wrap { max-height: 340px; overflow: auto; border-radius: 10px; border: 1px solid var(--border); }
.asset-table-wrap::-webkit-scrollbar { width: 8px; height: 8px; }
.asset-table-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
.asset-table-wrap::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
.asset-table { width: 100%; border-collapse: collapse; background: var(--surface); }
.asset-table th, .asset-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; white-space: nowrap; }
.asset-table th { background: var(--surface-hover); color: var(--text-secondary); font-weight: 600; position: sticky; top: 0; z-index: 1; }
.asset-table tbody tr { height: 50px; }
.asset-table tbody tr:hover { background: rgba(56,189,248,.06); }
.asset-table a { color: var(--accent); }
.asset-table .days-left { display: block; font-size: 11px; color: var(--text-secondary); }
.asset-table td.actions { white-space: normal; }
.asset-table td.actions .mini { padding: 3px 6px; font-size: 11px; margin: 1px 1px 1px 0; }
.asset-empty { padding: 26px 0; text-align: center; }

.legend-inline { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: 12px; color: var(--text-secondary); }
.legend-inline .lg { display: inline-flex; align-items: center; gap: 6px; }
.legend-inline .lg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
@media (max-width: 560px) {
    .cards { grid-template-columns: 1fr; }
    .stat-card { padding: 14px 16px; }
    .stat-ico { width: 40px; height: 40px; }
}
@media (max-width: 768px) {
    .sidebar {
        position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; transform: translateX(-100%);
        transition: transform .2s; width: 200px;
    }
    .sidebar.open { transform: translateX(0); }
    .menu-toggle { display: block; }
    .cards { grid-template-columns: 1fr 1fr; }
    .filter-bar .f-input { min-width: 100%; }
    /* 表格转卡片 */
    .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
    .data-table thead { display: none; }
    .data-table tr { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; padding: 6px 4px; background: var(--surface); }
    .data-table td { border: none; padding: 6px 12px; display: flex; justify-content: space-between; gap: 10px; }
    .data-table td::before { content: attr(data-label); font-weight: 600; color: var(--text-secondary); }
    .data-table td.actions { justify-content: flex-start; flex-wrap: wrap; }
}

/* ---- 个人中心 ---- */
.profile-grid { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
.profile-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.profile-info { position: sticky; top: 18px; }
.profile-head { display: flex; align-items: center; gap: 16px; padding: 22px 20px; border-bottom: 1px solid var(--border); background: linear-gradient(135deg, #0e1a33, #152747); }
.profile-avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, #2563eb, #38bdf8); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; color: #fff; flex: 0 0 64px; text-transform: uppercase; }
.profile-meta { min-width: 0; }
.profile-name { margin: 0; font-size: 20px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-role { display: inline-block; margin-top: 6px; font-size: 12px; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(56,189,248,.25); border-radius: 20px; padding: 2px 10px; }
.profile-body { padding: 14px 20px; }
.profile-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--border); gap: 10px; }
.profile-row:last-child { border-bottom: none; }
.profile-label { color: var(--text-secondary); font-size: 13px; flex: 0 0 auto; }
.profile-value { color: var(--text); font-size: 13px; text-align: right; min-width: 0; }
.profile-value a { color: var(--accent); }
.profile-value a:hover { text-decoration: underline; }
.profile-value a.profile-points:hover { text-decoration: none; }
.profile-forms { display: flex; flex-direction: column; gap: 18px; }
.profile-form .panel-head { padding: 14px 20px; border-bottom: 1px solid var(--border); }
.profile-form .panel-body { padding: 18px 20px; }
.profile-form .field { margin-bottom: 14px; }
.profile-form .field label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.profile-form .field input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font-size: 14px; }
.profile-form .field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.profile-form .btn { min-width: 120px; }

@media (max-width: 900px) {
    .profile-grid { grid-template-columns: 1fr; }
    .profile-info { position: static; }
}
@media (max-width: 768px) {
    .profile-head { padding: 18px; }
    .profile-avatar { width: 56px; height: 56px; font-size: 24px; flex-basis: 56px; }
    .profile-name { font-size: 18px; }
}

/* ---- 头像（个人中心 / 顶栏） ---- */
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.chip-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 6px; border: 1px solid rgba(255,255,255,.25); flex: 0 0 auto; }
.avatar-edit { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.avatar-preview { width: 110px; height: 110px; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg, #2563eb, #38bdf8); display: flex; align-items: center; justify-content: center; font-size: 44px; font-weight: 800; color: #fff; border: 3px solid var(--border); box-shadow: var(--shadow); }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-preview span { line-height: 1; }
.avatar-edit form { width: 100%; }
.avatar-edit .field input[type="file"] { padding: 8px; font-size: 13px; }
.avatar-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.profile-form .avatar-actions .btn { flex: 1 1 auto; }

/* ---- 系统设置横向标签页 ---- */
.settings-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 6px;
    box-shadow: var(--shadow);
    overflow-x: auto;
    scrollbar-width: thin;
}
.settings-tabs::-webkit-scrollbar { height: 4px; }
.settings-tabs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.settings-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    white-space: nowrap;
    transition: color .15s, background .15s;
    text-decoration: none;
}
.settings-tab:hover {
    color: var(--text);
    background: var(--surface-hover);
    text-decoration: none;
}
.settings-tab.active {
    color: var(--accent);
    background: var(--accent-soft);
}
.settings-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: width .2s ease;
}
.settings-tab.active::after { width: 60%; }

.settings-panel { display: none; animation: fadeIn .25s ease; }
.settings-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
    .settings-tabs { padding: 4px; border-radius: 12px; }
    .settings-tab { padding: 9px 14px; font-size: 13px; }
}
