:root {
  --sidebar-width: 220px;
  --admin-primary: #2878c8;
  --admin-sidebar: #263445;
  --admin-sidebar-active: #1d6fb8;
  --admin-border: #dfe3e8;
  --admin-bg: #f2f4f7;
}

html, body { min-height: 100%; }
body { margin: 0; background: var(--admin-bg); color: #303133; font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif; font-size: 14px; }
a { text-decoration: none; }
.admin-shell { min-height: 100vh; }
.admin-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); background: var(--admin-sidebar); color: #fff; z-index: 1020; }
.brand { height: 58px; display: flex; align-items: center; padding: 0 20px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.sidebar-nav { padding: 12px 10px; }
.sidebar-nav a { display: flex; align-items: center; gap: 10px; color: #ced6df; padding: 10px 14px; border-radius: 3px; margin-bottom: 3px; }
.sidebar-nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar-nav a.active { color: #fff; background: var(--admin-sidebar-active); }
.sidebar-icon { width: 18px; text-align: center; }
.admin-main { margin-left: var(--sidebar-width); min-height: 100vh; }
.admin-topbar { height: 58px; background: #fff; border-bottom: 1px solid var(--admin-border); display: flex; align-items: center; justify-content: space-between; padding: 0 22px; position: sticky; top: 0; z-index: 1010; }
.admin-content { padding: 20px; }
.page-title { font-size: 20px; font-weight: 600; margin: 0 0 18px; }
.panel { background: #fff; border: 1px solid var(--admin-border); border-radius: 3px; margin-bottom: 18px; }
.panel-header { padding: 13px 16px; border-bottom: 1px solid var(--admin-border); font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.panel-body { padding: 16px; }
.stat-card { background: #fff; border: 1px solid var(--admin-border); border-radius: 3px; padding: 16px; height: 100%; }
.stat-title { color: #777; margin-bottom: 7px; }
.stat-value { font-size: 25px; font-weight: 600; }
.table { margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .68rem .65rem; vertical-align: middle; border-color: #e6e9ed; }
.table thead th { background: #f7f8fa; white-space: nowrap; font-weight: 600; }
.form-label { font-weight: 600; margin-bottom: 6px; }
.form-control, .form-select { border-radius: 3px; }
.btn { border-radius: 3px; }
.badge-status { display: inline-block; min-width: 58px; text-align: center; padding: 5px 7px; border-radius: 3px; font-weight: 400; }
.status-success { color: #18794e; background: #dff5ea; }
.status-processing, .status-pending { color: #1d5f91; background: #e1effb; }
.status-manual_review { color: #8a5a00; background: #fff0c7; }
.status-failed { color: #a12622; background: #fde4e2; }
.status-refunded { color: #555; background: #eceff2; }
.code-box { font-family: Consolas, Monaco, monospace; background: #f7f8fa; border: 1px solid var(--admin-border); padding: 10px; border-radius: 3px; word-break: break-all; }
.help-text { color: #777; font-size: 13px; margin-top: 5px; }
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #eef1f5; }
.login-box { width: 390px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid #dfe3e8; border-radius: 4px; box-shadow: 0 8px 24px rgba(31,45,61,.08); }
.login-header { padding: 22px 26px 16px; border-bottom: 1px solid #e7e9ec; }
.login-body { padding: 24px 26px 28px; }
.modal-content { border-radius: 4px; }
.text-mono { font-family: Consolas, Monaco, monospace; }
.masked-secret { letter-spacing: .5px; }
@media (max-width: 900px) {
  :root { --sidebar-width: 64px; }
  .brand { padding: 0; justify-content: center; font-size: 0; }
  .brand::after { content: "能"; font-size: 20px; }
  .sidebar-nav a { justify-content: center; padding: 11px 0; }
  .sidebar-nav .nav-text { display: none; }
  .admin-content { padding: 14px; }
}
