/* ============ 表格 ============ */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
    text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px;
    padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: #fafbfe; }
.data-table .mono { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }

/* ============ 徽章 / 状态 ============ */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.badge-success { background: #e7f6ee; color: var(--success); }
.badge-danger { background: #fdecec; color: var(--danger); }
.badge-warning { background: #fdf3e3; color: var(--warning); }
.badge-muted { background: var(--surface-2); color: var(--muted); }
.badge-info { background: var(--primary-soft); color: var(--primary); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ============ 统计卡 ============ */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.stat-card .stat-label { font-size: 13px; color: var(--muted); }
.stat-card .stat-value { font-size: 26px; font-weight: 700; margin-top: 6px; letter-spacing: -.02em; }
.stat-card .stat-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1024px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .stat-grid { grid-template-columns: 1fr; } }

/* ============ 弹窗 ============ */
.modal-mask {
    position: fixed; inset: 0; background: rgba(22, 32, 58, .45); z-index: 100;
    display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal-mask.open { display: flex; }
.modal {
    background: var(--surface); border-radius: var(--radius); width: 100%; max-width: 520px;
    box-shadow: var(--shadow); max-height: 86vh; overflow-y: auto;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px 0; }
.modal-head h3 { font-size: 17px; }
.modal-close { color: var(--muted); font-size: 22px; line-height: 1; }
.modal-body { padding: 18px 22px 22px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ============ Toast ============ */
.toast-stack { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; width: min(380px, 90vw); }
.toast {
    background: var(--text); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px;
    box-shadow: var(--shadow); display: flex; align-items: center; gap: 10px; animation: toastIn .22s ease;
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-warning { background: var(--warning); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ============ 空态 ============ */
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-state .empty-icon { font-size: 34px; margin-bottom: 10px; opacity: .5; }

/* ============ 代码 / 密钥 ============ */
.code-box {
    background: #131c33; color: #dce6ff; border-radius: var(--radius-sm); padding: 14px 16px;
    font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 13px; word-break: break-all;
    display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.code-box button { color: #9db4ff; font-size: 12.5px; flex: none; }

/* ============ 标签 ============ */
.tag { display: inline-block; padding: 4px 10px; border-radius: 8px; background: var(--surface-2); color: var(--text-2); font-size: 12.5px; }

/* ============ 分页 ============ */
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 18px; }
.pager button { padding: 7px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 13.5px; }
.pager button:disabled { opacity: .4; }
.pager .pager-info { font-size: 13px; color: var(--muted); }

/* ============ 网格两列 ============ */
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1024px) { .split-grid { grid-template-columns: 1fr; } }
